@luzmo/embed 9.1.0 → 10.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/CHANGELOG.md +19 -0
- package/MIGRATIONS.md +6 -0
- package/index.cjs +46 -9
- package/index.dashboard-analyst.cjs +9894 -0
- package/index.dashboard-analyst.js +9886 -0
- package/index.dashboard-next.cjs +6647 -0
- package/index.dashboard-next.js +6634 -0
- package/index.js +44 -9
- package/index.rn.cjs +21 -2
- package/index.rn.js +20 -2
- package/index.shared.cjs +21 -2
- package/index.shared.js +20 -2
- package/luzmo-dashboard-analyst.min.js +176230 -0
- package/luzmo-dashboard-next.min.js +159886 -0
- package/luzmo-embed.min.js +170 -135
- package/package.json +20 -2
- package/src/index.common.d.ts +1 -0
- package/src/index.d.ts +6 -0
- package/src/index.dashboard-analyst.d.ts +4 -0
- package/src/index.dashboard-next.d.ts +1 -0
- package/src/index.internal.d.ts +3 -0
- package/src/lib/dashboard/dashboard-base.d.ts +1 -1
- package/src/lib/dashboard-next/agent/dashboard-agent-controller.d.ts +28 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-feedback-api.d.ts +6 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-feedback-controller.d.ts +20 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-history-api.d.ts +17 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-history-controller.d.ts +40 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-history.d.ts +11 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-history.styles.d.ts +1 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-panel.d.ts +10 -0
- package/src/lib/dashboard-next/agent/dashboard-agent-panel.styles.d.ts +1 -0
- package/src/lib/dashboard-next/dashboard-analyst-component.d.ts +36 -0
- package/src/lib/dashboard-next/dashboard-analyst-component.styles.d.ts +1 -0
- package/src/lib/dashboard-next/dashboard-configured-element.d.ts +31 -0
- package/src/lib/dashboard-next/dashboard-next-component.d.ts +86 -0
- package/src/lib/dashboard-next/dashboard-next-component.styles.d.ts +1 -0
- package/src/lib/dashboard-next/data/dashboard-api.d.ts +9 -0
- package/src/lib/dashboard-next/data/dashboard-custom-charts.d.ts +18 -0
- package/src/lib/dashboard-next/data/dashboard-errors.d.ts +5 -0
- package/src/lib/dashboard-next/data/dashboard-loading-controller.d.ts +21 -0
- package/src/lib/dashboard-next/data/dashboard-metadata-controller.d.ts +25 -0
- package/src/lib/dashboard-next/data/dashboard-permissions-api.d.ts +14 -0
- package/src/lib/dashboard-next/data/dashboard-renderer-controller.d.ts +30 -0
- package/src/lib/dashboard-next/data/dashboard-variant-management-controller.d.ts +30 -0
- package/src/lib/dashboard-next/data/dashboard-variants-api.d.ts +30 -0
- package/src/lib/dashboard-next/data/dashboard-variants-controller.d.ts +38 -0
- package/src/lib/dashboard-next/data/load-dashboard-definition.d.ts +21 -0
- package/src/lib/dashboard-next/data/load-dashboard-layout.d.ts +4 -0
- package/src/lib/dashboard-next/grid/dashboard-grid-layout-controller.d.ts +23 -0
- package/src/lib/dashboard-next/grid/dashboard-layout-skeleton.d.ts +2 -0
- package/src/lib/dashboard-next/grid/dashboard-layout-skeleton.styles.d.ts +1 -0
- package/src/lib/dashboard-next/grid/dashboard-next-grid.d.ts +62 -0
- package/src/lib/dashboard-next/grid/dashboard-next-grid.styles.d.ts +1 -0
- package/src/lib/dashboard-next/grid/dashboard-next-viz-item.d.ts +26 -0
- package/src/lib/dashboard-next/grid/dashboard-skeleton-motion-controller.d.ts +15 -0
- package/src/lib/dashboard-next/grid/render-dashboard-chart.d.ts +22 -0
- package/src/lib/dashboard-next/localization/dashboard-next-translations.d.ts +134 -0
- package/src/lib/dashboard-next/localization/format-dashboard-relative-date.d.ts +1 -0
- package/src/lib/dashboard-next/localization/resolve-dashboard-next-translations.d.ts +6 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-config.d.ts +20 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-settings-controller.d.ts +45 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-settings.d.ts +14 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-settings.styles.d.ts +1 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-chart-type-conversion.d.ts +11 -0
- package/src/lib/dashboard-next/settings/dashboard-chart-settings-context.d.ts +30 -0
- package/src/lib/dashboard-next/settings/dashboard-chart-settings-context.styles.d.ts +1 -0
- package/src/lib/dashboard-next/settings/dashboard-editor-controller.d.ts +32 -0
- package/src/lib/dashboard-next/settings/dashboard-settings-content.d.ts +7 -0
- package/src/lib/dashboard-next/settings/dashboard-settings-controller.d.ts +54 -0
- package/src/lib/dashboard-next/settings/dashboard-settings-popover.d.ts +17 -0
- package/src/lib/dashboard-next/settings/dashboard-settings-popover.styles.d.ts +1 -0
- package/src/lib/dashboard-next/settings/dashboard-settings-positioning.d.ts +1 -0
- package/src/lib/dashboard-next/settings/dashboard-settings.test-utils.d.ts +19 -0
- package/src/lib/dashboard-next/settings/data/dashboard-data-metadata.d.ts +11 -0
- package/src/lib/dashboard-next/settings/data/dashboard-data-settings-controller.d.ts +42 -0
- package/src/lib/dashboard-next/settings/data/dashboard-data-settings.d.ts +20 -0
- package/src/lib/dashboard-next/settings/data/dashboard-data-settings.styles.d.ts +1 -0
- package/src/lib/dashboard-next/settings/data/dashboard-data-slots.d.ts +3 -0
- package/src/lib/dashboard-next/settings/filters/dashboard-filter-settings-controller.d.ts +19 -0
- package/src/lib/dashboard-next/settings/filters/dashboard-filter-settings.d.ts +9 -0
- package/src/lib/dashboard-next/settings/filters/dashboard-filter-settings.styles.d.ts +1 -0
- package/src/lib/dashboard-next/state/config/dashboard-chart-catalog.d.ts +11 -0
- package/src/lib/dashboard-next/state/config/dashboard-chart-names-controller.d.ts +9 -0
- package/src/lib/dashboard-next/state/config/dashboard-chart-types.d.ts +47 -0
- package/src/lib/dashboard-next/state/config/dashboard-config-store.d.ts +33 -0
- package/src/lib/dashboard-next/state/content/dashboard-agent-draft.d.ts +28 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-controller.d.ts +57 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-selectors.d.ts +7 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-state.d.ts +61 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-store.d.ts +22 -0
- package/src/lib/dashboard-next/state/content/dashboard-option-changes.d.ts +9 -0
- package/src/lib/dashboard-next/state/dashboard-analyst-stores.d.ts +40 -0
- package/src/lib/dashboard-next/state/dashboard-stores.d.ts +13 -0
- package/src/lib/dashboard-next/state/dashboard-workspace.d.ts +33 -0
- package/src/lib/dashboard-next/state/runtime/dashboard-agent-history-state.d.ts +21 -0
- package/src/lib/dashboard-next/state/runtime/dashboard-analyst-runtime-store.d.ts +43 -0
- package/src/lib/dashboard-next/state/runtime/dashboard-editor-state.d.ts +38 -0
- package/src/lib/dashboard-next/state/runtime/dashboard-runtime-state.d.ts +47 -0
- package/src/lib/dashboard-next/state/runtime/dashboard-runtime-store.d.ts +22 -0
- package/src/lib/dashboard-next/state/runtime/dashboard-variants-state.d.ts +31 -0
- package/src/lib/dashboard-next/toolbar/dashboard-add-chart-controller.d.ts +20 -0
- package/src/lib/dashboard-next/toolbar/dashboard-add-chart-menu.d.ts +19 -0
- package/src/lib/dashboard-next/toolbar/dashboard-navigation-controller.d.ts +32 -0
- package/src/lib/dashboard-next/toolbar/dashboard-next-toolbar.d.ts +35 -0
- package/src/lib/dashboard-next/toolbar/dashboard-next-toolbar.styles.d.ts +1 -0
- package/src/lib/dashboard-next/toolbar/dashboard-picker.d.ts +36 -0
- package/src/lib/dashboard-next/toolbar/dashboard-picker.styles.d.ts +1 -0
- package/src/lib/dashboard-next/toolbar/dashboard-preview-thumbnail.d.ts +2 -0
- package/src/lib/dashboard-next/toolbar/dashboard-question-dashboards.d.ts +7 -0
- package/src/lib/dashboard-next/toolbar/dashboard-question-mode.styles.d.ts +1 -0
- package/src/lib/dashboard-next/toolbar/dashboard-variant-delete.d.ts +15 -0
- package/src/lib/dashboard-next/toolbar/dashboard-variant-delete.styles.d.ts +1 -0
- package/src/lib/dashboard-next/toolbar/dashboard-variant-rename-controller.d.ts +18 -0
- package/src/lib/dashboard-next/views/dashboard-view-controller.d.ts +13 -0
- package/src/lib/dashboard-next/views/dashboard-view-layout.d.ts +12 -0
- package/src/lib/dashboard-next/views/dashboard-views.d.ts +48 -0
- package/src/lib/iq-components/luzmo-iq-answer.d.ts +1 -1
- package/src/lib/iq-components/luzmo-iq-chat.d.ts +1 -1
- package/src/lib/shared/helpers/normalize-viz-item-slots.d.ts +2 -0
- package/src/lib/shared/models/dashboard-definition.model.d.ts +34 -0
- package/src/lib/shared/models/events.model.d.ts +9 -8
- package/src/lib/shared/models/index.d.ts +2 -0
- package/src/lib/shared/models/viz-item-service-port.model.d.ts +24 -0
- package/src/lib/viz-item/viz-item.base.d.ts +4 -4
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ItemFilterGroup, ScreenMode, ThemeConfig } from '@luzmo/dashboard-contents-types';
|
|
2
|
+
import type { DashboardErrorReason } from '../../data/dashboard-errors';
|
|
3
|
+
import type { DashboardViews } from '../../views/dashboard-views';
|
|
4
|
+
import type { DashboardDatasetFields } from '../../settings/data/dashboard-data-metadata';
|
|
5
|
+
import type { DashboardVariantsState } from './dashboard-variants-state';
|
|
6
|
+
import type { DashboardEditorState } from './dashboard-editor-state';
|
|
7
|
+
export type DashboardMode = 'view' | 'edit';
|
|
8
|
+
export type DashboardSettingsTab = 'data' | 'filters' | 'appearance';
|
|
9
|
+
export interface DashboardPermissions {
|
|
10
|
+
readonly canModify: boolean;
|
|
11
|
+
readonly canCreateVariant: boolean;
|
|
12
|
+
readonly canDelete?: boolean;
|
|
13
|
+
readonly errorReason?: DashboardErrorReason;
|
|
14
|
+
}
|
|
15
|
+
export interface DashboardRuntimeState {
|
|
16
|
+
readonly editingLocked?: boolean;
|
|
17
|
+
readonly variants: DashboardVariantsState;
|
|
18
|
+
readonly mode: DashboardMode;
|
|
19
|
+
readonly requestedEditMode?: 'edit';
|
|
20
|
+
readonly tokenTimezoneId?: string;
|
|
21
|
+
readonly permissions?: DashboardPermissions;
|
|
22
|
+
readonly editor: DashboardEditorState;
|
|
23
|
+
readonly loadErrorReason?: DashboardErrorReason;
|
|
24
|
+
readonly loadStatus: 'idle' | 'loading' | 'loaded' | 'error';
|
|
25
|
+
readonly hydrationStatus: 'idle' | 'loading' | 'ready' | 'error';
|
|
26
|
+
readonly documentGeneration: number;
|
|
27
|
+
readonly contentRevision: number;
|
|
28
|
+
readonly themes: {
|
|
29
|
+
id: string;
|
|
30
|
+
theme: ThemeConfig;
|
|
31
|
+
}[];
|
|
32
|
+
readonly layout?: DashboardViews;
|
|
33
|
+
readonly containerWidth: number;
|
|
34
|
+
readonly effectiveScreenMode?: ScreenMode;
|
|
35
|
+
readonly viewWidth?: number;
|
|
36
|
+
readonly selectedItemId?: string;
|
|
37
|
+
readonly settingsTab: DashboardSettingsTab;
|
|
38
|
+
readonly metadata?: DashboardMetadataState;
|
|
39
|
+
readonly vizItemFilters: Readonly<Record<string, ItemFilterGroup[]>>;
|
|
40
|
+
readonly vizItemRenderStates: Readonly<Record<string, 'ready' | 'error'>>;
|
|
41
|
+
}
|
|
42
|
+
export type DashboardMetadataStatus = 'loading' | 'ready' | 'error';
|
|
43
|
+
export interface DashboardMetadataState {
|
|
44
|
+
readonly catalogStatus: DashboardMetadataStatus;
|
|
45
|
+
readonly datasets: DashboardDatasetFields;
|
|
46
|
+
readonly fieldStatus: Readonly<Record<string, DashboardMetadataStatus>>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type DashboardVariantsState } from './dashboard-variants-state';
|
|
2
|
+
import { type DashboardEditorState } from './dashboard-editor-state';
|
|
3
|
+
import type { DashboardMetadataState, DashboardMode, DashboardRuntimeState, DashboardSettingsTab } from './dashboard-runtime-state';
|
|
4
|
+
type RuntimeSubscriber = (state: DashboardRuntimeState, previous: DashboardRuntimeState) => void;
|
|
5
|
+
export declare class DashboardRuntimeStore {
|
|
6
|
+
private state;
|
|
7
|
+
private readonly subscribers;
|
|
8
|
+
constructor(mode?: DashboardMode);
|
|
9
|
+
getState(): DashboardRuntimeState;
|
|
10
|
+
updateVariants(patch: Partial<DashboardVariantsState>): boolean;
|
|
11
|
+
setMetadata(metadata?: DashboardMetadataState): boolean;
|
|
12
|
+
setMode(mode: DashboardMode): boolean;
|
|
13
|
+
selectItem(itemId: string): boolean;
|
|
14
|
+
setSettingsTab(settingsTab: DashboardSettingsTab): boolean;
|
|
15
|
+
closeSettings(): boolean;
|
|
16
|
+
updateEditor<K extends keyof DashboardEditorState>(section: K, patch: Partial<DashboardEditorState[K]>): boolean;
|
|
17
|
+
resetEditor(section: keyof DashboardEditorState): void;
|
|
18
|
+
updateSession(patch: Partial<Omit<DashboardRuntimeState, 'mode' | 'selectedItemId' | 'settingsTab'>>): boolean;
|
|
19
|
+
private update;
|
|
20
|
+
subscribe(subscriber: RuntimeSubscriber): () => void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DashboardErrorReason } from '../../data/dashboard-errors';
|
|
2
|
+
import type { DashboardCatalog, DashboardSummary, DashboardTarget } from '../../data/dashboard-variants-api';
|
|
3
|
+
import type { DashboardContentState } from '../content/dashboard-content-state';
|
|
4
|
+
export interface DashboardVariantsState {
|
|
5
|
+
defaultVersionId?: string;
|
|
6
|
+
management?: {
|
|
7
|
+
action: 'default' | 'delete';
|
|
8
|
+
status: 'confirming' | 'saving' | 'error';
|
|
9
|
+
target: DashboardTarget;
|
|
10
|
+
error?: 'request' | 'load';
|
|
11
|
+
errorReason?: DashboardErrorReason;
|
|
12
|
+
deleted?: boolean;
|
|
13
|
+
};
|
|
14
|
+
active?: DashboardTarget & {
|
|
15
|
+
name: Record<string, string>;
|
|
16
|
+
dashboardName?: Record<string, string>;
|
|
17
|
+
ownerId?: string;
|
|
18
|
+
};
|
|
19
|
+
catalog: DashboardCatalog;
|
|
20
|
+
catalogStatus: 'idle' | 'loading' | 'ready' | 'error';
|
|
21
|
+
saveErrorReason?: DashboardErrorReason;
|
|
22
|
+
catalogErrorReason?: DashboardErrorReason;
|
|
23
|
+
switchErrorReason?: DashboardErrorReason;
|
|
24
|
+
saveStatus: 'idle' | 'saving' | 'error';
|
|
25
|
+
switchStatus: 'idle' | 'loading' | 'error';
|
|
26
|
+
savedDocument?: DashboardContentState;
|
|
27
|
+
}
|
|
28
|
+
export declare function createDashboardVariantsState(): DashboardVariantsState;
|
|
29
|
+
export declare function dashboardSummaryTarget(dashboard: DashboardSummary): DashboardTarget;
|
|
30
|
+
export declare function dashboardDefaultVersionId(catalog: DashboardCatalog, dashboardId: string, fallback?: string): string;
|
|
31
|
+
export declare function dashboardVariantManagementBusy(state: DashboardVariantsState): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import type { DashboardAnalystStores } from '../state/dashboard-analyst-stores';
|
|
3
|
+
export declare class DashboardAddChartController implements ReactiveController {
|
|
4
|
+
private readonly host;
|
|
5
|
+
private readonly getStores;
|
|
6
|
+
private readonly names;
|
|
7
|
+
private unsubscribers;
|
|
8
|
+
constructor(host: ReactiveControllerHost, getStores: () => DashboardAnalystStores | undefined);
|
|
9
|
+
connect(): void;
|
|
10
|
+
hostConnected(): void;
|
|
11
|
+
hostDisconnected(): void;
|
|
12
|
+
setOpen(open: boolean): void;
|
|
13
|
+
setSearch(search: string): void;
|
|
14
|
+
get entries(): {
|
|
15
|
+
name: string;
|
|
16
|
+
type: import("@luzmo/dashboard-contents-types").VizItemType;
|
|
17
|
+
group: import("../../..").DashboardChartTypeGroup;
|
|
18
|
+
icon: import("@luzmo/icons").IconDefinition;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
+
import '@luzmo/lucero/button';
|
|
3
|
+
import '@luzmo/lucero/icon';
|
|
4
|
+
import '@luzmo/lucero/popover';
|
|
5
|
+
import type { DashboardAnalystStores } from '../state/dashboard-analyst-stores';
|
|
6
|
+
export declare class DashboardAddChartMenu extends LitElement {
|
|
7
|
+
stores: DashboardAnalystStores;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
buttonColor?: 'white' | 'black';
|
|
10
|
+
private readonly controller;
|
|
11
|
+
private focusedType?;
|
|
12
|
+
static styles: import("lit").CSSResult;
|
|
13
|
+
protected willUpdate(changes: PropertyValues): void;
|
|
14
|
+
protected updated(): void;
|
|
15
|
+
private close;
|
|
16
|
+
private choose;
|
|
17
|
+
private handleKeys;
|
|
18
|
+
protected render(): import("lit-html").TemplateResult<1> | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import type { LuzmoDashboardNext } from '../dashboard-next-component';
|
|
3
|
+
import type { DashboardAnalystStores } from '../state/dashboard-analyst-stores';
|
|
4
|
+
import type { DashboardTarget } from '../data/dashboard-variants-api';
|
|
5
|
+
import type { DashboardMode } from '../state/runtime/dashboard-runtime-state';
|
|
6
|
+
export declare class DashboardNavigationController implements ReactiveController {
|
|
7
|
+
private readonly host;
|
|
8
|
+
private readonly stores;
|
|
9
|
+
private readonly dashboard;
|
|
10
|
+
private picker?;
|
|
11
|
+
private pickerObserver?;
|
|
12
|
+
private pickerVisible;
|
|
13
|
+
private cancelPreload?;
|
|
14
|
+
private unsubscribers;
|
|
15
|
+
constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardAnalystStores, dashboard: Pick<LuzmoDashboardNext, 'openDashboard' | 'setEditMode' | 'save'>);
|
|
16
|
+
private get state();
|
|
17
|
+
hostConnected(): void;
|
|
18
|
+
hostDisconnected(): void;
|
|
19
|
+
observePicker(picker?: HTMLElement | null): void;
|
|
20
|
+
private scheduleCatalogPreload;
|
|
21
|
+
setPickerOpen(pickerOpen: boolean): void;
|
|
22
|
+
setPickerSearch(pickerSearch: string): void;
|
|
23
|
+
togglePickerDashboard(dashboardId: string): void;
|
|
24
|
+
requestDelete(): void;
|
|
25
|
+
cancelDelete(): void;
|
|
26
|
+
confirmDelete(): Promise<boolean>;
|
|
27
|
+
setEditMode(mode: DashboardMode): void;
|
|
28
|
+
save(): Promise<boolean>;
|
|
29
|
+
select(target: DashboardTarget): Promise<void>;
|
|
30
|
+
resolveSwitch(action: 'save' | 'keep' | 'discard'): Promise<void>;
|
|
31
|
+
private clearPendingLeave;
|
|
32
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import '@luzmo/lucero/notice';
|
|
2
|
+
import '@luzmo/lucero/button';
|
|
3
|
+
import './dashboard-picker';
|
|
4
|
+
import './dashboard-add-chart-menu';
|
|
5
|
+
import './dashboard-variant-delete';
|
|
6
|
+
import '@luzmo/lucero/badge';
|
|
7
|
+
import '@luzmo/lucero/action-button';
|
|
8
|
+
import '@luzmo/lucero/icon';
|
|
9
|
+
import '@luzmo/lucero/tooltip';
|
|
10
|
+
import { type TemplateResult } from 'lit';
|
|
11
|
+
import type { DashboardAnalystStores } from '../state/dashboard-analyst-stores';
|
|
12
|
+
import type { DashboardWorkspace } from '../state/dashboard-workspace';
|
|
13
|
+
import type { DashboardNextLabels } from '../localization/dashboard-next-translations';
|
|
14
|
+
import type { DashboardMode } from '../state/runtime/dashboard-runtime-state';
|
|
15
|
+
import type { DashboardVariantRenameController } from './dashboard-variant-rename-controller';
|
|
16
|
+
import type { DashboardNavigationController } from './dashboard-navigation-controller';
|
|
17
|
+
interface DashboardToolbarOptions {
|
|
18
|
+
stores: DashboardAnalystStores;
|
|
19
|
+
variants: DashboardWorkspace['variants'];
|
|
20
|
+
variantRename: DashboardVariantRenameController;
|
|
21
|
+
navigation: DashboardNavigationController;
|
|
22
|
+
variantManagement: DashboardWorkspace['management'];
|
|
23
|
+
mode: DashboardMode;
|
|
24
|
+
labels: DashboardNextLabels;
|
|
25
|
+
editorLanguage: string;
|
|
26
|
+
canChangeEditMode: boolean;
|
|
27
|
+
canUndo: boolean;
|
|
28
|
+
canRedo: boolean;
|
|
29
|
+
onUndo: () => void;
|
|
30
|
+
onRedo: () => void;
|
|
31
|
+
onOpenAgent?: () => void;
|
|
32
|
+
onModeChange: (mode: DashboardMode) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function renderDashboardNextToolbar({ stores, variants, variantRename, variantManagement, navigation, mode, labels, editorLanguage, canChangeEditMode, canUndo, canRedo, onUndo, onRedo, onModeChange, onOpenAgent }: DashboardToolbarOptions): TemplateResult;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashboardNextToolbarStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import '@luzmo/lucero/notice';
|
|
2
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
3
|
+
import '@luzmo/lucero/button';
|
|
4
|
+
import '@luzmo/lucero/badge';
|
|
5
|
+
import '@luzmo/lucero/action-button';
|
|
6
|
+
import '@luzmo/lucero/icon';
|
|
7
|
+
import '@luzmo/lucero/popover';
|
|
8
|
+
import '@luzmo/lucero/skeleton-loader';
|
|
9
|
+
import '@luzmo/lucero/progress-circle';
|
|
10
|
+
import type { DashboardAnalystStores } from '../state/dashboard-analyst-stores';
|
|
11
|
+
import type { DashboardWorkspace } from '../state/dashboard-workspace';
|
|
12
|
+
import type { DashboardVariantRenameController } from './dashboard-variant-rename-controller';
|
|
13
|
+
import type { DashboardNavigationController } from './dashboard-navigation-controller';
|
|
14
|
+
export declare class DashboardPicker extends LitElement {
|
|
15
|
+
stores: DashboardAnalystStores;
|
|
16
|
+
controller: DashboardNavigationController;
|
|
17
|
+
management: DashboardWorkspace['management'];
|
|
18
|
+
rename: DashboardVariantRenameController;
|
|
19
|
+
showPicker: boolean;
|
|
20
|
+
private unsubscribers;
|
|
21
|
+
private optionProjection?;
|
|
22
|
+
static styles: import("lit").CSSResult[];
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
protected willUpdate(changes: PropertyValues): void;
|
|
25
|
+
private subscribe;
|
|
26
|
+
disconnectedCallback(): void;
|
|
27
|
+
focus(options?: FocusOptions): void;
|
|
28
|
+
protected updated(): void;
|
|
29
|
+
private name;
|
|
30
|
+
private get options();
|
|
31
|
+
private renderDashboardPreview;
|
|
32
|
+
private target;
|
|
33
|
+
private renderVersion;
|
|
34
|
+
private handleKeys;
|
|
35
|
+
protected render(): import("lit-html").TemplateResult<1> | null;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashboardPickerStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '@luzmo/lucero/action-button';
|
|
2
|
+
import '@luzmo/lucero/button';
|
|
3
|
+
import '@luzmo/lucero/icon';
|
|
4
|
+
import '@luzmo/lucero/skeleton-loader';
|
|
5
|
+
import type { DashboardWorkspace } from '../state/dashboard-workspace';
|
|
6
|
+
import type { DashboardAnalystStores } from '../state/dashboard-analyst-stores';
|
|
7
|
+
export declare function renderDashboardQuestionDashboards(stores: DashboardAnalystStores, variants: Pick<DashboardWorkspace['variants'], 'loadCatalog'>, openDashboard: (id: string) => void): import("lit-html").TemplateResult<1>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashboardQuestionModeStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '@luzmo/lucero/notice';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import '@luzmo/lucero/button';
|
|
4
|
+
import type { DashboardNextLabels } from '../localization/dashboard-next-translations';
|
|
5
|
+
import type { DashboardVariantsState } from '../state/runtime/dashboard-variants-state';
|
|
6
|
+
import type { DashboardNavigationController } from './dashboard-navigation-controller';
|
|
7
|
+
export declare class DashboardVariantDelete extends LitElement {
|
|
8
|
+
controller: Pick<DashboardNavigationController, 'cancelDelete' | 'confirmDelete'>;
|
|
9
|
+
state: DashboardVariantsState['management'];
|
|
10
|
+
labels: DashboardNextLabels;
|
|
11
|
+
dirty: boolean;
|
|
12
|
+
static styles: import("lit").CSSResult;
|
|
13
|
+
protected updated(): void;
|
|
14
|
+
protected render(): import("lit-html").TemplateResult<1> | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashboardVariantDeleteStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import type { DashboardAnalystStores } from '../state/dashboard-analyst-stores';
|
|
3
|
+
export declare class DashboardVariantRenameController implements ReactiveController {
|
|
4
|
+
private readonly host;
|
|
5
|
+
private readonly stores;
|
|
6
|
+
private unsubscribers;
|
|
7
|
+
constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardAnalystStores);
|
|
8
|
+
private get state();
|
|
9
|
+
get canRename(): boolean;
|
|
10
|
+
start(): void;
|
|
11
|
+
setDraft(draft: string): void;
|
|
12
|
+
cancel(): void;
|
|
13
|
+
update(draft: string): boolean;
|
|
14
|
+
apply(): boolean;
|
|
15
|
+
hostConnected(): void;
|
|
16
|
+
private reset;
|
|
17
|
+
hostDisconnected(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import type { DashboardStores } from '../state/dashboard-stores';
|
|
3
|
+
export declare class DashboardViewController implements ReactiveController {
|
|
4
|
+
private readonly host;
|
|
5
|
+
private readonly stores;
|
|
6
|
+
private observer?;
|
|
7
|
+
constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardStores);
|
|
8
|
+
get view(): import("./dashboard-views").DashboardView | undefined;
|
|
9
|
+
get width(): number | undefined;
|
|
10
|
+
hostConnected(): void;
|
|
11
|
+
hostDisconnected(): void;
|
|
12
|
+
update(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DashboardContentView, DashboardLayoutItem } from '../state/content/dashboard-content-state';
|
|
2
|
+
export interface DashboardItemSize {
|
|
3
|
+
sizeX: number;
|
|
4
|
+
sizeY: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function getDashboardItemSize(view: DashboardContentView, defaultSize?: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}): DashboardItemSize;
|
|
10
|
+
export declare function duplicateDashboardViewLayout(view: DashboardContentView, itemId: string, duplicateId: string): DashboardLayoutItem[];
|
|
11
|
+
export declare function insertDashboardViewLayout(view: DashboardContentView, itemId: string, size: DashboardItemSize, afterItemId?: string): DashboardLayoutItem[];
|
|
12
|
+
export declare function removeDashboardViewLayout(view: DashboardContentView, itemId: string): DashboardLayoutItem[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { GridItemData } from '@luzmo/analytics-components-kit/grid-core';
|
|
2
|
+
import type { ItemFilterGroup, ThemeConfig, ScreenMode } from '@luzmo/dashboard-contents-types';
|
|
3
|
+
import type { DashboardContentItem } from '../state/content/dashboard-content-state';
|
|
4
|
+
export interface DashboardView {
|
|
5
|
+
screenMode: ScreenMode;
|
|
6
|
+
items: GridItemData[];
|
|
7
|
+
columns: number;
|
|
8
|
+
rowHeight: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
theme?: ThemeConfig;
|
|
11
|
+
showBackground?: boolean;
|
|
12
|
+
filterGroups?: ItemFilterGroup[];
|
|
13
|
+
}
|
|
14
|
+
export interface DashboardViews {
|
|
15
|
+
views: DashboardView[];
|
|
16
|
+
syncScreenModes: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface DashboardLayoutOptions {
|
|
19
|
+
columns?: number;
|
|
20
|
+
rowHeight?: number;
|
|
21
|
+
width?: number;
|
|
22
|
+
theme?: ThemeConfig;
|
|
23
|
+
share?: {
|
|
24
|
+
showBackground?: boolean;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface IntegrationLayoutResponse {
|
|
28
|
+
securable?: {
|
|
29
|
+
contents?: {
|
|
30
|
+
syncScreenModes?: boolean;
|
|
31
|
+
views?: {
|
|
32
|
+
screenModus?: string;
|
|
33
|
+
options?: DashboardLayoutOptions;
|
|
34
|
+
gridOptions?: DashboardLayoutOptions;
|
|
35
|
+
items?: DashboardContentItem[];
|
|
36
|
+
filterGroups?: ItemFilterGroup[];
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
themes?: {
|
|
41
|
+
id: string;
|
|
42
|
+
theme: ThemeConfig;
|
|
43
|
+
}[];
|
|
44
|
+
}
|
|
45
|
+
export declare function parseDashboardViews(result: IntegrationLayoutResponse, previous?: DashboardViews): DashboardViews;
|
|
46
|
+
export declare function selectDashboardView(dashboard: DashboardViews, mode: ScreenMode | 'auto', width: number): DashboardView;
|
|
47
|
+
export declare function getDashboardViewWidth(view: DashboardView, containerWidth: number): number;
|
|
48
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { LitElement, type PropertyValues } from 'lit';
|
|
|
3
3
|
import type { TemplateResult } from 'lit-html';
|
|
4
4
|
export declare class LuzmoIQEmbedAnswerComponent extends LitElement {
|
|
5
5
|
appServer: string;
|
|
6
|
-
apiHost?: string;
|
|
6
|
+
apiHost?: string | undefined;
|
|
7
7
|
options?: IQAnswerOptions;
|
|
8
8
|
aiEndPoint?: string;
|
|
9
9
|
authKey?: string;
|
|
@@ -11,7 +11,7 @@ import { type DashboardContext } from '../../index.shared';
|
|
|
11
11
|
export type SerializedDashboardContext = DashboardContext;
|
|
12
12
|
export declare class LuzmoIQEmbedChatComponent extends LitElement {
|
|
13
13
|
appServer: string;
|
|
14
|
-
apiHost?: string;
|
|
14
|
+
apiHost?: string | undefined;
|
|
15
15
|
options?: IQChatOptions;
|
|
16
16
|
initialSuggestionsDatasetId?: string;
|
|
17
17
|
aiEndpoint?: string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { InlineData, ItemFilter, ItemFilterGroup, ScreenMode, VizItemOptions, VizItemSlot, VizItemType } from '@luzmo/dashboard-contents-types';
|
|
2
|
+
export interface DashboardDefinitionItem {
|
|
3
|
+
id: string;
|
|
4
|
+
type: VizItemType;
|
|
5
|
+
options?: VizItemOptions;
|
|
6
|
+
slots?: VizItemSlot[];
|
|
7
|
+
filters?: ItemFilter[];
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface DashboardDefinitionView {
|
|
11
|
+
screenModus?: ScreenMode;
|
|
12
|
+
items: DashboardDefinitionItem[];
|
|
13
|
+
filterGroups?: ItemFilterGroup[];
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface DashboardDefinition {
|
|
17
|
+
contents: {
|
|
18
|
+
version?: string;
|
|
19
|
+
syncScreenModes?: boolean;
|
|
20
|
+
views: DashboardDefinitionView[];
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface VizItemDefinition {
|
|
26
|
+
authoredItem?: Record<string, unknown>;
|
|
27
|
+
customChartId?: string;
|
|
28
|
+
inlineData?: InlineData;
|
|
29
|
+
version: string;
|
|
30
|
+
type: VizItemType;
|
|
31
|
+
options: VizItemOptions;
|
|
32
|
+
slots: VizItemSlot[];
|
|
33
|
+
filters: ItemFilterGroup[];
|
|
34
|
+
}
|
|
@@ -33,13 +33,9 @@ interface VizItemContextChangedEventData {
|
|
|
33
33
|
interface ItemsRenderedEventData extends EventDataBase {
|
|
34
34
|
type: 'chartsRendered';
|
|
35
35
|
}
|
|
36
|
-
interface CustomEventData extends EventDataBase {
|
|
36
|
+
interface CustomEventData<TPayload> extends EventDataBase {
|
|
37
37
|
itemId: string;
|
|
38
|
-
data:
|
|
39
|
-
event: string;
|
|
40
|
-
language: string;
|
|
41
|
-
[key: string]: unknown;
|
|
42
|
-
};
|
|
38
|
+
data: TPayload;
|
|
43
39
|
}
|
|
44
40
|
export interface LoadEvent {
|
|
45
41
|
data: LoadEventData;
|
|
@@ -58,8 +54,13 @@ export interface ContextChangedEvent {
|
|
|
58
54
|
export interface VizItemContextChangedEvent {
|
|
59
55
|
data: VizItemContextChangedEventData;
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
/** The default preserves the standard chart payload type. Use `unknown` for mixed chart sources or supply a known custom chart payload type. */
|
|
58
|
+
export interface CustomEvent<TPayload = {
|
|
59
|
+
event: string;
|
|
60
|
+
language: string;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}> {
|
|
63
|
+
data: CustomEventData<TPayload>;
|
|
63
64
|
}
|
|
64
65
|
export interface ItemsRenderedEvent {
|
|
65
66
|
data: ItemsRenderedEventData;
|
|
@@ -11,3 +11,5 @@ export * from './translation.model';
|
|
|
11
11
|
export * from './viz-item-post-message.model';
|
|
12
12
|
export * from './embed-error-event.model';
|
|
13
13
|
export * from './viz-item.model';
|
|
14
|
+
export type * from './dashboard-definition.model';
|
|
15
|
+
export type * from './viz-item-service-port.model';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ItemData, ItemFilterGroup, ItemQuery, VizItemOptions, VizItemSlot, VizItemType } from '@luzmo/dashboard-contents-types';
|
|
2
|
+
export interface VizItemServiceObserver {
|
|
3
|
+
next(data: ItemData): void;
|
|
4
|
+
error(reason: unknown): void;
|
|
5
|
+
complete(): void;
|
|
6
|
+
}
|
|
7
|
+
export interface VizItemServiceSource {
|
|
8
|
+
subscribe(observer: VizItemServiceObserver): {
|
|
9
|
+
unsubscribe(): void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface VizItemServicePort {
|
|
13
|
+
getFilters(): ItemFilterGroup[];
|
|
14
|
+
setFilters(filters: ItemFilterGroup[]): void;
|
|
15
|
+
getItems(): {
|
|
16
|
+
id: string;
|
|
17
|
+
type: VizItemType;
|
|
18
|
+
options?: VizItemOptions;
|
|
19
|
+
slots?: VizItemSlot[];
|
|
20
|
+
}[];
|
|
21
|
+
connect(refresh: () => void): void;
|
|
22
|
+
request(query: ItemQuery, load: () => VizItemServiceSource, observer: VizItemServiceObserver): string;
|
|
23
|
+
cancel(id: string): void;
|
|
24
|
+
}
|
|
@@ -9,7 +9,7 @@ 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.
|
|
12
|
+
export declare const dashboardContentsVersion = "0.1.109";
|
|
13
13
|
type FunctionCall = [(...args: any) => any, any[]];
|
|
14
14
|
interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
15
15
|
options?: VizItemOptions;
|
|
@@ -25,7 +25,6 @@ interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
|
25
25
|
authToken?: string;
|
|
26
26
|
dashboardId?: string;
|
|
27
27
|
screenMode?: ScreenMode;
|
|
28
|
-
querySource?: 'dashboard';
|
|
29
28
|
itemId?: string;
|
|
30
29
|
aiMessageAssetId?: string;
|
|
31
30
|
getFilters: () => SharedLib.ItemFilterOutput;
|
|
@@ -41,7 +40,7 @@ interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
|
41
40
|
export type { LuzmoVizItemComponentInterface };
|
|
42
41
|
export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItemComponentInterface {
|
|
43
42
|
appServer: string;
|
|
44
|
-
apiHost?: string;
|
|
43
|
+
apiHost?: string | undefined;
|
|
45
44
|
slots?: VizItemSlot[];
|
|
46
45
|
inlineData?: InlineData;
|
|
47
46
|
options?: VizItemOptions;
|
|
@@ -54,7 +53,6 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
|
|
|
54
53
|
filters?: SharedLib.FilterInput;
|
|
55
54
|
dashboardId?: string;
|
|
56
55
|
screenMode?: ScreenMode;
|
|
57
|
-
querySource?: 'dashboard';
|
|
58
56
|
itemId?: string;
|
|
59
57
|
aiMessageAssetId?: string;
|
|
60
58
|
selectedData: SharedLib.SelectedDataInput;
|
|
@@ -89,6 +87,8 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
|
|
|
89
87
|
setAuthorization(key: string, token: string): void;
|
|
90
88
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
91
89
|
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
90
|
+
protected loadVizItem(): Promise<boolean>;
|
|
91
|
+
protected createVizItemElement(): typeof this.chartElement;
|
|
92
92
|
private createAndAppendElement;
|
|
93
93
|
private updateVizItemProperties;
|
|
94
94
|
updated(changedProperties: PropertyValues): Promise<void>;
|