@luzmo/embed 8.0.0 → 8.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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "dependencies": {
5
5
  "lit": "^3.3.1",
6
6
  "@module-federation/runtime": "^2.9.0",
7
- "@luzmo/dashboard-contents-types": "1.0.41"
7
+ "@luzmo/dashboard-contents-types": "1.0.45"
8
8
  },
9
9
  "keywords": [
10
10
  "es6",
@@ -49,9 +49,9 @@ export declare class LuzmoDashboard extends LitElement implements SharedLib.WebC
49
49
  browserNotSupported: any[];
50
50
  libVersion: string;
51
51
  protected isLibraryLoaded: boolean;
52
- protected dashboardReference: SharedLib.LuzmoElement;
53
- currentAuthKey: string;
54
- currentAuthToken: string;
52
+ protected dashboardReference: SharedLib.LuzmoElement | undefined;
53
+ currentAuthKey: string | undefined;
54
+ currentAuthToken: string | undefined;
55
55
  isInitCalled: boolean;
56
56
  private attributesMap;
57
57
  _loadTimeoutHandle?: number;
@@ -2,7 +2,7 @@ import type { IQAnswerOptions, IQMessage } from '@luzmo/dashboard-contents-types
2
2
  import { LitElement, type PropertyValues } from 'lit';
3
3
  import type { TemplateResult } from 'lit-html';
4
4
  export declare class LuzmoIQEmbedAnswerComponent extends LitElement {
5
- appServer?: string;
5
+ appServer: string;
6
6
  apiHost?: string;
7
7
  options?: IQAnswerOptions;
8
8
  aiEndPoint?: string;
@@ -10,7 +10,7 @@ import { type DashboardContext } from '../../index.shared';
10
10
  */
11
11
  export type SerializedDashboardContext = DashboardContext;
12
12
  export declare class LuzmoIQEmbedChatComponent extends LitElement {
13
- appServer?: string;
13
+ appServer: string;
14
14
  apiHost?: string;
15
15
  options?: IQChatOptions;
16
16
  initialSuggestionsDatasetId?: string;
@@ -1,4 +1,4 @@
1
- import { LuzmoDashboard } from './dashboard/dashboard-base';
1
+ import type { LuzmoDashboard } from './dashboard/dashboard-base';
2
2
  declare class LuzmoDashboardService {
3
3
  _dashboardComponents: LuzmoDashboard[];
4
4
  }
@@ -1,2 +1,19 @@
1
- import { DashboardContentParams } from '../models/common.model';
2
- export declare const DEFAULT_PARAMETERS: DashboardContentParams;
1
+ import { DashboardContentParams, DashboardEditMode, ScreenMode } from '../models/common.model';
2
+ type DefaultParameters = Omit<DashboardContentParams, 'dashboardId' | 'dashboardSlug' | 'container' | 'key' | 'token' | 'editMode' | 'screenMode' | 'itemId' | 'timezoneId' | 'contextId' | 'itemDimensions'> & {
3
+ dashboardId: string | null;
4
+ dashboardSlug: string | null;
5
+ container: string | null;
6
+ key: string | null;
7
+ token: string | null;
8
+ editMode: DashboardEditMode | null;
9
+ screenMode: ScreenMode | null;
10
+ itemId: string | null;
11
+ timezoneId: string | null;
12
+ contextId: string | null;
13
+ itemDimensions: {
14
+ width: number | 'auto';
15
+ height: number | 'auto';
16
+ };
17
+ };
18
+ export declare const DEFAULT_PARAMETERS: DefaultParameters;
19
+ export {};
@@ -4,7 +4,7 @@ export declare const removeTrailingSlash: (serverUrl?: string) => string;
4
4
  export declare const formatDashboardList: (dashboards: any[], integrationId: string, user: any, dashboardComponent: LuzmoDashboard) => {
5
5
  accessibleBy: {
6
6
  id: string;
7
- name: string;
7
+ name: string | Record<string, never>;
8
8
  model: "User" | "Group" | "Integration";
9
9
  }[];
10
10
  accessRights: {
@@ -16,12 +16,12 @@ export declare const formatDashboardList: (dashboards: any[], integrationId: str
16
16
  id: string;
17
17
  modifiedAt: string;
18
18
  name: string;
19
- slug: string;
19
+ slug: string | null;
20
20
  tags: string[];
21
21
  }[];
22
22
  export declare const VERSION = "0.0.0-unknown-luzmo";
23
23
  export declare const sanitizeUrl: (url: string) => string;
24
24
  export declare const cloneDeep: <T>(obj: T) => T;
25
- export declare const defaultsDeep: <T extends object>(target: T, defaults: T) => T;
25
+ export declare const defaultsDeep: <T extends object>(target: T, defaults: object) => T;
26
26
  export declare const s4: () => string;
27
27
  export declare const uuidv4: () => string;
@@ -1,5 +1,4 @@
1
1
  import { ExportDashboard } from '../models/common.model';
2
2
  import { LuzmoDashboard } from '../models/dashboard.model';
3
- export type DashboardExportType = 'pdf' | 'png';
4
- export type ExportType = DashboardExportType;
3
+ import { DashboardExportType } from '../models/export.model';
5
4
  export declare const exportDashboard: <T extends LuzmoDashboard>(dashboardComponent: T, iframe: HTMLIFrameElement, format?: DashboardExportType) => Promise<ExportDashboard>;
@@ -1,4 +1,5 @@
1
- import { PartialRecord, SupportedLanguage } from '../models';
1
+ import { PartialRecord } from '../models/common.model';
2
2
  import { LuzmoDashboard } from '../models/dashboard.model';
3
- export type SendExportEmailType = 'once' | 'scheduled';
3
+ import { SendExportEmailType } from '../models/export.model';
4
+ import { SupportedLanguage } from '../models/translation.model';
4
5
  export declare const sendExportEmail: <T extends LuzmoDashboard>(dashboardComponent: T, iframe: HTMLIFrameElement, type?: SendExportEmailType, subject?: PartialRecord<SupportedLanguage, string>, message?: PartialRecord<SupportedLanguage, string>) => Promise<void>;
@@ -25,7 +25,7 @@ export type AccessibleDashboard = {
25
25
  accessibleBy?: {
26
26
  model?: 'User' | 'Group' | 'Integration';
27
27
  id?: string;
28
- name?: string;
28
+ name?: string | Record<string, never>;
29
29
  }[];
30
30
  accessRights?: {
31
31
  flagRead?: boolean;
@@ -1,3 +1,4 @@
1
+ import type { InlineData } from '@luzmo/dashboard-contents-types';
1
2
  import type { DashboardFilterOutput } from './filter-output.model';
2
3
  /**
3
4
  * The dashboard-state payload carried by the unified `dashboard` aiprompt input.
@@ -44,6 +45,7 @@ export interface VizItemContext {
44
45
  id: string;
45
46
  type?: string;
46
47
  slots?: unknown;
48
+ inlineData?: InlineData;
47
49
  options?: Record<string, unknown>;
48
50
  filters?: DashboardFilterOutput;
49
51
  datasetIds: string[];
@@ -1,7 +1,6 @@
1
- import { DashboardExportType } from '../methods/export-dashboard';
2
- import { SendExportEmailType } from '../methods/send-export-email';
3
1
  import { DashboardContext } from './dashboard-context.model';
4
2
  import { AccessibleDashboard, AddFilters, BrowserCheckKey, DashboardContentParams, DashboardDimensions, DashboardEditMode, DashboardInputs, DashboardPromises, ExportDashboard, ItemData, PartialRecord, ScreenMode, SetEditMode, SetPreview, SetSelectedData } from './common.model';
3
+ import type { DashboardExportType, SendExportEmailType } from './export.model';
5
4
  import type { FilterInput } from './filter-input.model';
6
5
  import type { DashboardFilterOutput } from './filter-output.model';
7
6
  import { IframeStyles } from './styles.model';
@@ -0,0 +1,3 @@
1
+ export type DashboardExportType = 'pdf' | 'png';
2
+ export type ExportType = DashboardExportType;
3
+ export type SendExportEmailType = 'once' | 'scheduled';
@@ -2,6 +2,7 @@ export * from './common.model';
2
2
  export * from './dashboard-context.model';
3
3
  export * from './dashboard.model';
4
4
  export * from './events.model';
5
+ export * from './export.model';
5
6
  export * from './filter-input.model';
6
7
  export * from './filter-output.model';
7
8
  export * from './filters.model';
@@ -1,4 +1,4 @@
1
- import { type VizItemExportType, type VizItemOptions, type VizItemSlot, type VizItemType } from '@luzmo/dashboard-contents-types';
1
+ import { type InlineData, type VizItemExportType, type VizItemOptions, type VizItemSlot, type VizItemType } from '@luzmo/dashboard-contents-types';
2
2
  import { LitElement, type PropertyValues } from 'lit';
3
3
  import * as SharedLib from '../../index.shared';
4
4
  /**
@@ -9,10 +9,11 @@ import * as SharedLib from '../../index.shared';
9
9
  * together with this dashboard contents version are passed to the dashboard app (https://app.luzmo.com/dashboard-app/remoteEntry.js)
10
10
  * and if needed the migration will be applied on the dashboard app level.
11
11
  */
12
- export declare const dashboardContentsVersion = "0.1.104";
12
+ export declare const dashboardContentsVersion = "0.1.106";
13
13
  type FunctionCall = [(...args: any) => any, any[]];
14
14
  interface LuzmoVizItemComponentInterface extends HTMLElement {
15
15
  options?: VizItemOptions;
16
+ inlineData?: InlineData;
16
17
  type?: VizItemType;
17
18
  appServer?: string;
18
19
  apiHost?: string;
@@ -37,9 +38,10 @@ interface LuzmoVizItemComponentInterface extends HTMLElement {
37
38
  }
38
39
  export type { LuzmoVizItemComponentInterface };
39
40
  export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItemComponentInterface {
40
- appServer?: string;
41
+ appServer: string;
41
42
  apiHost?: string;
42
43
  slots?: VizItemSlot[];
44
+ inlineData?: InlineData;
43
45
  options?: VizItemOptions;
44
46
  type?: VizItemType;
45
47
  authKey?: string;
@@ -54,8 +56,15 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
54
56
  selectedData: SharedLib.SelectedDataInput;
55
57
  dashboardContentsVersion?: string;
56
58
  libVersion?: string;
57
- chartElement: HTMLElement & Partial<LuzmoVizItemComponentInterface> & {
58
- setSelectedData?: (itemId?: string, filters?: SharedLib.SelectedDataInput) => SharedLib.SetSelectedData;
59
+ chartElement: HTMLElement & {
60
+ getFilters: () => SharedLib.ItemFilterOutput;
61
+ getContextFilters?: () => SharedLib.DashboardFilterOutput;
62
+ export: (type?: VizItemExportType) => Promise<string | void>;
63
+ getData: () => SharedLib.ItemData;
64
+ getInsights: (options?: SharedLib.GetInsightsOptions) => Promise<string>;
65
+ refreshData: () => void;
66
+ setSelectedData: (itemId?: string, filters?: SharedLib.SelectedDataInput) => SharedLib.SetSelectedData;
67
+ setAuthorization: (key: string, token: string) => void;
59
68
  };
60
69
  postInitCallQueue: FunctionCall[];
61
70
  static styles: import("lit").CSSResult;