@luzmo/embed 9.1.0-es2021 → 10.0.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 +20 -0
- package/MIGRATIONS.md +7 -0
- package/README.md +53 -4
- package/index.cjs +71 -39
- package/index.dashboard-next.cjs +6291 -0
- package/index.dashboard-next.js +6259 -0
- package/index.js +70 -39
- package/index.rn.cjs +19 -2
- package/index.rn.js +18 -2
- package/index.shared.cjs +19 -2
- package/index.shared.js +18 -2
- package/luzmo-dashboard-next.min.js +157860 -0
- package/luzmo-embed.min.js +196 -165
- package/package.json +16 -9
- package/src/index.common.d.ts +1 -0
- package/src/index.d.ts +3 -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/dashboard-next-component.d.ts +76 -0
- package/src/lib/dashboard-next/data/dashboard-api.d.ts +9 -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 +4 -0
- package/src/lib/dashboard-next/data/dashboard-publishing-api.d.ts +5 -0
- package/src/lib/dashboard-next/data/dashboard-renderer-controller.d.ts +25 -0
- package/src/lib/dashboard-next/data/dashboard-variant-management-controller.d.ts +30 -0
- package/src/lib/dashboard-next/data/dashboard-variant-rename-controller.d.ts +18 -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 +47 -0
- package/src/lib/dashboard-next/data/load-dashboard-definition.d.ts +20 -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 +3 -0
- package/src/lib/dashboard-next/grid/dashboard-next-grid.d.ts +56 -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 +21 -0
- package/src/lib/dashboard-next/localization/dashboard-next-translations.d.ts +89 -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 +63 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-settings-controller.d.ts +34 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-settings.d.ts +12 -0
- package/src/lib/dashboard-next/settings/appearance/dashboard-chart-type-conversion.d.ts +6 -0
- package/src/lib/dashboard-next/settings/dashboard-chart-settings-context.d.ts +31 -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 +6 -0
- package/src/lib/dashboard-next/settings/dashboard-settings-controller.d.ts +43 -0
- package/src/lib/dashboard-next/settings/dashboard-settings-popover.d.ts +13 -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 +41 -0
- package/src/lib/dashboard-next/settings/data/dashboard-data-settings.d.ts +15 -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/state/config/dashboard-config-store.d.ts +28 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-controller.d.ts +47 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-selectors.d.ts +6 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-state.d.ts +46 -0
- package/src/lib/dashboard-next/state/content/dashboard-content-store.d.ts +18 -0
- package/src/lib/dashboard-next/state/content/dashboard-option-changes.d.ts +9 -0
- package/src/lib/dashboard-next/state/dashboard-stores.d.ts +12 -0
- package/src/lib/dashboard-next/state/runtime/dashboard-editor-state.d.ts +34 -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 +42 -0
- package/src/lib/dashboard-next/toolbar/dashboard-next-toolbar.d.ts +36 -0
- package/src/lib/dashboard-next/toolbar/dashboard-picker.d.ts +36 -0
- package/src/lib/dashboard-next/toolbar/dashboard-toolbar-theme.d.ts +13 -0
- package/src/lib/dashboard-next/toolbar/dashboard-variant-delete.d.ts +15 -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 +3 -0
- package/src/lib/dashboard-next/views/dashboard-views.d.ts +44 -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/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,12 @@
|
|
|
1
|
+
import type { DashboardChartSettingsContext } from '../settings/dashboard-chart-settings-context';
|
|
2
|
+
import { DashboardConfigStore } from './config/dashboard-config-store';
|
|
3
|
+
import { DashboardRuntimeStore } from './runtime/dashboard-runtime-store';
|
|
4
|
+
import { DashboardContentStore } from './content/dashboard-content-store';
|
|
5
|
+
export declare class DashboardStores {
|
|
6
|
+
readonly config: DashboardConfigStore;
|
|
7
|
+
readonly runtime: DashboardRuntimeStore;
|
|
8
|
+
readonly content: DashboardContentStore;
|
|
9
|
+
private settings?;
|
|
10
|
+
constructor();
|
|
11
|
+
getChartSettings(): DashboardChartSettingsContext | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ItemFilterGroup, VizItemSlot } from '@luzmo/dashboard-contents-types';
|
|
2
|
+
import type { DashboardChartType } from '../../settings/appearance/dashboard-appearance-config';
|
|
3
|
+
import type { DashboardDatasetFields } from '../../settings/data/dashboard-data-metadata';
|
|
4
|
+
import type { DashboardChartSettingsContext } from '../../settings/dashboard-chart-settings-context';
|
|
5
|
+
export interface DashboardEditorState {
|
|
6
|
+
data: {
|
|
7
|
+
selectedDatasetId?: string;
|
|
8
|
+
incompatible: boolean;
|
|
9
|
+
controlGeneration: number;
|
|
10
|
+
acceptedSlots?: VizItemSlot[];
|
|
11
|
+
inputSlots: VizItemSlot[];
|
|
12
|
+
datasets: DashboardDatasetFields;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
metadataFailed: boolean;
|
|
15
|
+
};
|
|
16
|
+
appearance: {
|
|
17
|
+
optionKeys: string[];
|
|
18
|
+
types: DashboardChartType[];
|
|
19
|
+
checkingTypes: boolean;
|
|
20
|
+
pending: boolean;
|
|
21
|
+
failed: boolean;
|
|
22
|
+
optionGenerations: Readonly<Record<string, number>>;
|
|
23
|
+
optionInputs: Readonly<Record<string, Record<string, unknown>>>;
|
|
24
|
+
acceptedOptions?: DashboardChartSettingsContext['definition']['options'];
|
|
25
|
+
acceptedOptionKey?: string;
|
|
26
|
+
};
|
|
27
|
+
filters: {
|
|
28
|
+
invalid: boolean;
|
|
29
|
+
controlGeneration: number;
|
|
30
|
+
acceptedFilters?: ItemFilterGroup[];
|
|
31
|
+
inputFilters: ItemFilterGroup[];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare function createDashboardEditorState(): DashboardEditorState;
|
|
@@ -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 saveBlockedByOverrides?: boolean;
|
|
14
|
+
readonly errorReason?: DashboardErrorReason;
|
|
15
|
+
}
|
|
16
|
+
export interface DashboardRuntimeState {
|
|
17
|
+
readonly variants: DashboardVariantsState;
|
|
18
|
+
readonly mode: DashboardMode;
|
|
19
|
+
readonly permissions?: DashboardPermissions;
|
|
20
|
+
readonly editor: DashboardEditorState;
|
|
21
|
+
readonly loadErrorReason?: DashboardErrorReason;
|
|
22
|
+
readonly loadStatus: 'idle' | 'loading' | 'loaded' | 'error';
|
|
23
|
+
readonly hydrationStatus: 'idle' | 'loading' | 'ready' | 'error';
|
|
24
|
+
readonly documentGeneration: number;
|
|
25
|
+
readonly contentRevision: number;
|
|
26
|
+
readonly themes: {
|
|
27
|
+
id: string;
|
|
28
|
+
theme: ThemeConfig;
|
|
29
|
+
}[];
|
|
30
|
+
readonly layout?: DashboardViews;
|
|
31
|
+
readonly containerWidth: number;
|
|
32
|
+
readonly effectiveScreenMode?: ScreenMode;
|
|
33
|
+
readonly viewWidth?: number;
|
|
34
|
+
readonly toolbarTheme?: ThemeConfig;
|
|
35
|
+
readonly toolbarBackground?: string;
|
|
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,42 @@
|
|
|
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 DashboardVariantRenameState {
|
|
5
|
+
draft: string;
|
|
6
|
+
status: 'editing' | 'error';
|
|
7
|
+
error?: 'required';
|
|
8
|
+
}
|
|
9
|
+
export interface DashboardVariantsState {
|
|
10
|
+
rename?: DashboardVariantRenameState;
|
|
11
|
+
defaultVersionId?: string;
|
|
12
|
+
management?: {
|
|
13
|
+
action: 'default' | 'delete';
|
|
14
|
+
status: 'confirming' | 'saving' | 'error';
|
|
15
|
+
target: DashboardTarget;
|
|
16
|
+
error?: 'request' | 'load';
|
|
17
|
+
errorReason?: DashboardErrorReason;
|
|
18
|
+
deleted?: boolean;
|
|
19
|
+
};
|
|
20
|
+
active?: DashboardTarget & {
|
|
21
|
+
name: Record<string, string>;
|
|
22
|
+
dashboardName?: Record<string, string>;
|
|
23
|
+
ownerId?: string;
|
|
24
|
+
};
|
|
25
|
+
catalog: DashboardCatalog;
|
|
26
|
+
catalogStatus: 'idle' | 'loading' | 'ready' | 'error';
|
|
27
|
+
saveErrorReason?: DashboardErrorReason;
|
|
28
|
+
catalogErrorReason?: DashboardErrorReason;
|
|
29
|
+
switchErrorReason?: DashboardErrorReason;
|
|
30
|
+
saveStatus: 'idle' | 'saving' | 'error' | 'conflict';
|
|
31
|
+
switchStatus: 'idle' | 'loading' | 'error';
|
|
32
|
+
savedDocument?: DashboardContentState;
|
|
33
|
+
sourceDocument?: DashboardContentState;
|
|
34
|
+
pickerOpen: boolean;
|
|
35
|
+
pickerSearch?: string;
|
|
36
|
+
pickerExpanded?: string[];
|
|
37
|
+
pendingTarget?: DashboardTarget;
|
|
38
|
+
}
|
|
39
|
+
export declare function createDashboardVariantsState(): DashboardVariantsState;
|
|
40
|
+
export declare function dashboardSummaryTarget(dashboard: DashboardSummary): DashboardTarget;
|
|
41
|
+
export declare function dashboardDefaultVersionId(catalog: DashboardCatalog, dashboardId: string, fallback?: string): string;
|
|
42
|
+
export declare function dashboardVariantManagementBusy(state: DashboardVariantsState): boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import '@luzmo/lucero/notice';
|
|
2
|
+
import '@luzmo/lucero/button';
|
|
3
|
+
import '@luzmo/lucero/menu';
|
|
4
|
+
import './dashboard-picker';
|
|
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 { DashboardStores } from '../state/dashboard-stores';
|
|
12
|
+
import type { DashboardVariantsController } from '../data/dashboard-variants-controller';
|
|
13
|
+
import type { DashboardVariantManagementController } from '../data/dashboard-variant-management-controller';
|
|
14
|
+
import type { DashboardVariantRenameController } from '../data/dashboard-variant-rename-controller';
|
|
15
|
+
import type { DashboardNextLabels } from '../localization/dashboard-next-translations';
|
|
16
|
+
import type { DashboardMode } from '../state/runtime/dashboard-runtime-state';
|
|
17
|
+
interface DashboardToolbarOptions {
|
|
18
|
+
stores: DashboardStores;
|
|
19
|
+
variants: DashboardVariantsController;
|
|
20
|
+
variantRename: DashboardVariantRenameController;
|
|
21
|
+
variantManagement: DashboardVariantManagementController;
|
|
22
|
+
mode: DashboardMode;
|
|
23
|
+
labels: DashboardNextLabels;
|
|
24
|
+
editorLanguage: string;
|
|
25
|
+
background?: string;
|
|
26
|
+
buttonColor?: 'white' | 'black';
|
|
27
|
+
allowModeSwitch: boolean;
|
|
28
|
+
canUndo: boolean;
|
|
29
|
+
canRedo: boolean;
|
|
30
|
+
onUndo: () => void;
|
|
31
|
+
onRedo: () => void;
|
|
32
|
+
onModeChange: (mode: DashboardMode) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare const dashboardNextToolbarStyles: import("lit").CSSResult;
|
|
35
|
+
export declare function renderDashboardNextToolbar({ stores, variants, variantRename, variantManagement, mode, labels, editorLanguage, background, buttonColor, allowModeSwitch, canUndo, canRedo, onUndo, onRedo, onModeChange }: DashboardToolbarOptions): TemplateResult;
|
|
36
|
+
export {};
|
|
@@ -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 { DashboardStores } from '../state/dashboard-stores';
|
|
11
|
+
import type { DashboardVariantsController } from '../data/dashboard-variants-controller';
|
|
12
|
+
import type { DashboardVariantRenameController } from '../data/dashboard-variant-rename-controller';
|
|
13
|
+
import type { DashboardVariantManagementController } from '../data/dashboard-variant-management-controller';
|
|
14
|
+
export declare class DashboardPicker extends LitElement {
|
|
15
|
+
stores: DashboardStores;
|
|
16
|
+
controller: DashboardVariantsController;
|
|
17
|
+
management: DashboardVariantManagementController;
|
|
18
|
+
rename: DashboardVariantRenameController;
|
|
19
|
+
private unsubscribers;
|
|
20
|
+
private optionProjection?;
|
|
21
|
+
static styles: import("lit").CSSResult;
|
|
22
|
+
connectedCallback(): void;
|
|
23
|
+
protected willUpdate(changes: PropertyValues): void;
|
|
24
|
+
private subscribe;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
focus(options?: FocusOptions): void;
|
|
27
|
+
protected updated(): void;
|
|
28
|
+
private name;
|
|
29
|
+
private relativeDate;
|
|
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,13 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import type { ThemeConfig } from '@luzmo/dashboard-contents-types';
|
|
3
|
+
import { DashboardRuntimeStore } from '../state/runtime/dashboard-runtime-store';
|
|
4
|
+
export declare class DashboardToolbarThemeController implements ReactiveController {
|
|
5
|
+
private readonly host;
|
|
6
|
+
private readonly runtime;
|
|
7
|
+
private generation;
|
|
8
|
+
get background(): string | undefined;
|
|
9
|
+
constructor(host: ReactiveControllerHost & HTMLElement, runtime: DashboardRuntimeStore);
|
|
10
|
+
get buttonColor(): 'white' | 'black' | undefined;
|
|
11
|
+
update(theme?: ThemeConfig): void;
|
|
12
|
+
hostDisconnected(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '@luzmo/lucero/notice';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import '@luzmo/lucero/button';
|
|
4
|
+
import type { DashboardVariantManagementController } from '../data/dashboard-variant-management-controller';
|
|
5
|
+
import type { DashboardNextLabels } from '../localization/dashboard-next-translations';
|
|
6
|
+
import type { DashboardVariantsState } from '../state/runtime/dashboard-variants-state';
|
|
7
|
+
export declare class DashboardVariantDelete extends LitElement {
|
|
8
|
+
controller: DashboardVariantManagementController;
|
|
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,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,3 @@
|
|
|
1
|
+
import type { DashboardContentView, DashboardLayoutItem } from '../state/content/dashboard-content-state';
|
|
2
|
+
export declare function duplicateDashboardViewLayout(view: DashboardContentView, itemId: string, duplicateId: string): DashboardLayoutItem[];
|
|
3
|
+
export declare function removeDashboardViewLayout(view: DashboardContentView, itemId: string): DashboardLayoutItem[];
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
filterGroups?: ItemFilterGroup[];
|
|
12
|
+
}
|
|
13
|
+
export interface DashboardViews {
|
|
14
|
+
views: DashboardView[];
|
|
15
|
+
syncScreenModes: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface DashboardLayoutOptions {
|
|
18
|
+
columns?: number;
|
|
19
|
+
rowHeight?: number;
|
|
20
|
+
width?: number;
|
|
21
|
+
theme?: ThemeConfig;
|
|
22
|
+
}
|
|
23
|
+
export interface IntegrationLayoutResponse {
|
|
24
|
+
securable?: {
|
|
25
|
+
contents?: {
|
|
26
|
+
syncScreenModes?: boolean;
|
|
27
|
+
views?: {
|
|
28
|
+
screenModus?: string;
|
|
29
|
+
options?: DashboardLayoutOptions;
|
|
30
|
+
gridOptions?: DashboardLayoutOptions;
|
|
31
|
+
items?: DashboardContentItem[];
|
|
32
|
+
filterGroups?: ItemFilterGroup[];
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
themes?: {
|
|
37
|
+
id: string;
|
|
38
|
+
theme: ThemeConfig;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export declare function parseDashboardViews(result: IntegrationLayoutResponse, previous?: DashboardViews): DashboardViews;
|
|
42
|
+
export declare function selectDashboardView(dashboard: DashboardViews, mode: ScreenMode | 'auto', width: number): DashboardView;
|
|
43
|
+
export declare function getDashboardViewWidth(view: DashboardView, containerWidth: number): number;
|
|
44
|
+
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
|
+
}
|
|
@@ -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>;
|