@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.
Files changed (83) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/MIGRATIONS.md +7 -0
  3. package/README.md +53 -4
  4. package/index.cjs +71 -39
  5. package/index.dashboard-next.cjs +6291 -0
  6. package/index.dashboard-next.js +6259 -0
  7. package/index.js +70 -39
  8. package/index.rn.cjs +19 -2
  9. package/index.rn.js +18 -2
  10. package/index.shared.cjs +19 -2
  11. package/index.shared.js +18 -2
  12. package/luzmo-dashboard-next.min.js +157860 -0
  13. package/luzmo-embed.min.js +196 -165
  14. package/package.json +16 -9
  15. package/src/index.common.d.ts +1 -0
  16. package/src/index.d.ts +3 -0
  17. package/src/index.dashboard-next.d.ts +1 -0
  18. package/src/index.internal.d.ts +3 -0
  19. package/src/lib/dashboard/dashboard-base.d.ts +1 -1
  20. package/src/lib/dashboard-next/dashboard-next-component.d.ts +76 -0
  21. package/src/lib/dashboard-next/data/dashboard-api.d.ts +9 -0
  22. package/src/lib/dashboard-next/data/dashboard-errors.d.ts +5 -0
  23. package/src/lib/dashboard-next/data/dashboard-loading-controller.d.ts +21 -0
  24. package/src/lib/dashboard-next/data/dashboard-metadata-controller.d.ts +25 -0
  25. package/src/lib/dashboard-next/data/dashboard-permissions-api.d.ts +4 -0
  26. package/src/lib/dashboard-next/data/dashboard-publishing-api.d.ts +5 -0
  27. package/src/lib/dashboard-next/data/dashboard-renderer-controller.d.ts +25 -0
  28. package/src/lib/dashboard-next/data/dashboard-variant-management-controller.d.ts +30 -0
  29. package/src/lib/dashboard-next/data/dashboard-variant-rename-controller.d.ts +18 -0
  30. package/src/lib/dashboard-next/data/dashboard-variants-api.d.ts +30 -0
  31. package/src/lib/dashboard-next/data/dashboard-variants-controller.d.ts +47 -0
  32. package/src/lib/dashboard-next/data/load-dashboard-definition.d.ts +20 -0
  33. package/src/lib/dashboard-next/data/load-dashboard-layout.d.ts +4 -0
  34. package/src/lib/dashboard-next/grid/dashboard-grid-layout-controller.d.ts +23 -0
  35. package/src/lib/dashboard-next/grid/dashboard-layout-skeleton.d.ts +3 -0
  36. package/src/lib/dashboard-next/grid/dashboard-next-grid.d.ts +56 -0
  37. package/src/lib/dashboard-next/grid/dashboard-next-viz-item.d.ts +26 -0
  38. package/src/lib/dashboard-next/grid/dashboard-skeleton-motion-controller.d.ts +15 -0
  39. package/src/lib/dashboard-next/grid/render-dashboard-chart.d.ts +21 -0
  40. package/src/lib/dashboard-next/localization/dashboard-next-translations.d.ts +89 -0
  41. package/src/lib/dashboard-next/localization/resolve-dashboard-next-translations.d.ts +6 -0
  42. package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-config.d.ts +63 -0
  43. package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-settings-controller.d.ts +34 -0
  44. package/src/lib/dashboard-next/settings/appearance/dashboard-appearance-settings.d.ts +12 -0
  45. package/src/lib/dashboard-next/settings/appearance/dashboard-chart-type-conversion.d.ts +6 -0
  46. package/src/lib/dashboard-next/settings/dashboard-chart-settings-context.d.ts +31 -0
  47. package/src/lib/dashboard-next/settings/dashboard-editor-controller.d.ts +32 -0
  48. package/src/lib/dashboard-next/settings/dashboard-settings-content.d.ts +6 -0
  49. package/src/lib/dashboard-next/settings/dashboard-settings-controller.d.ts +43 -0
  50. package/src/lib/dashboard-next/settings/dashboard-settings-popover.d.ts +13 -0
  51. package/src/lib/dashboard-next/settings/dashboard-settings-positioning.d.ts +1 -0
  52. package/src/lib/dashboard-next/settings/dashboard-settings.test-utils.d.ts +19 -0
  53. package/src/lib/dashboard-next/settings/data/dashboard-data-metadata.d.ts +11 -0
  54. package/src/lib/dashboard-next/settings/data/dashboard-data-settings-controller.d.ts +41 -0
  55. package/src/lib/dashboard-next/settings/data/dashboard-data-settings.d.ts +15 -0
  56. package/src/lib/dashboard-next/settings/data/dashboard-data-slots.d.ts +3 -0
  57. package/src/lib/dashboard-next/settings/filters/dashboard-filter-settings-controller.d.ts +19 -0
  58. package/src/lib/dashboard-next/settings/filters/dashboard-filter-settings.d.ts +9 -0
  59. package/src/lib/dashboard-next/state/config/dashboard-config-store.d.ts +28 -0
  60. package/src/lib/dashboard-next/state/content/dashboard-content-controller.d.ts +47 -0
  61. package/src/lib/dashboard-next/state/content/dashboard-content-selectors.d.ts +6 -0
  62. package/src/lib/dashboard-next/state/content/dashboard-content-state.d.ts +46 -0
  63. package/src/lib/dashboard-next/state/content/dashboard-content-store.d.ts +18 -0
  64. package/src/lib/dashboard-next/state/content/dashboard-option-changes.d.ts +9 -0
  65. package/src/lib/dashboard-next/state/dashboard-stores.d.ts +12 -0
  66. package/src/lib/dashboard-next/state/runtime/dashboard-editor-state.d.ts +34 -0
  67. package/src/lib/dashboard-next/state/runtime/dashboard-runtime-state.d.ts +47 -0
  68. package/src/lib/dashboard-next/state/runtime/dashboard-runtime-store.d.ts +22 -0
  69. package/src/lib/dashboard-next/state/runtime/dashboard-variants-state.d.ts +42 -0
  70. package/src/lib/dashboard-next/toolbar/dashboard-next-toolbar.d.ts +36 -0
  71. package/src/lib/dashboard-next/toolbar/dashboard-picker.d.ts +36 -0
  72. package/src/lib/dashboard-next/toolbar/dashboard-toolbar-theme.d.ts +13 -0
  73. package/src/lib/dashboard-next/toolbar/dashboard-variant-delete.d.ts +15 -0
  74. package/src/lib/dashboard-next/views/dashboard-view-controller.d.ts +13 -0
  75. package/src/lib/dashboard-next/views/dashboard-view-layout.d.ts +3 -0
  76. package/src/lib/dashboard-next/views/dashboard-views.d.ts +44 -0
  77. package/src/lib/iq-components/luzmo-iq-answer.d.ts +1 -1
  78. package/src/lib/iq-components/luzmo-iq-chat.d.ts +1 -1
  79. package/src/lib/shared/helpers/normalize-viz-item-slots.d.ts +2 -0
  80. package/src/lib/shared/models/dashboard-definition.model.d.ts +34 -0
  81. package/src/lib/shared/models/index.d.ts +2 -0
  82. package/src/lib/shared/models/viz-item-service-port.model.d.ts +24 -0
  83. package/src/lib/viz-item/viz-item.base.d.ts +4 -4
package/package.json CHANGED
@@ -1,14 +1,20 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "9.1.0-es2021",
3
+ "version": "10.0.0",
4
4
  "dependencies": {
5
5
  "lit": "^3.3.1",
6
6
  "@module-federation/runtime": "^2.9.0",
7
- "@luzmo/dashboard-contents-types": "2.1.0"
7
+ "@luzmo/dashboard-contents-types": "2.2.0",
8
+ "@luzmo/analytics-components-kit": "2.5.0",
9
+ "@luzmo/lucero": "2.10.0",
10
+ "@luzmo/icons": "^1.0.1-alpha.49",
11
+ "gridstack": "14.0.0",
12
+ "yjs": "13.6.31",
13
+ "@ctrl/tinycolor": "4.2.0",
14
+ "@floating-ui/dom": "1.8.0",
15
+ "lodash-es": "4.18.1"
8
16
  },
9
17
  "keywords": [
10
- "es2021",
11
- "safari-compatible",
12
18
  "es6",
13
19
  "web-component",
14
20
  "lit",
@@ -41,11 +47,12 @@
41
47
  "import": "./index.rn.js",
42
48
  "require": "./index.rn.cjs",
43
49
  "default": "./index.rn.js"
50
+ },
51
+ "./dashboard-next": {
52
+ "types": "./src/index.dashboard-next.d.ts",
53
+ "import": "./index.dashboard-next.js",
54
+ "require": "./index.dashboard-next.cjs"
44
55
  }
45
56
  },
46
- "license": "SEE LICENSE IN LICENSE",
47
- "description": "ES2021 build for Safari before 16.4",
48
- "publishConfig": {
49
- "tag": "es2021"
50
- }
57
+ "license": "SEE LICENSE IN LICENSE"
51
58
  }
@@ -4,6 +4,7 @@ export * from './lib/shared/helpers/error';
4
4
  export * from './lib/shared/helpers/extents';
5
5
  export * from './lib/shared/helpers/translations';
6
6
  export * from './lib/shared/helpers/utils';
7
+ export * from './lib/shared/helpers/normalize-viz-item-slots';
7
8
  export * from './lib/shared/helpers/iframe-url';
8
9
  export * from './lib/shared/helpers/get-loader';
9
10
  export * from './lib/shared/helpers/promise-dispatch';
package/src/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export type * from '@luzmo/dashboard-contents-types';
2
2
  export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, CleanFilter, CleanFilterClauseGroup, CleanFilterGroup, CleanRetrievedFilterGroup, DashboardFilterOutput, ItemFilterOutput, SelectedDataInput, ExportType, DashboardExportType, ItemData, ItemDataRows, ExportDashboard, AccessibleDashboard, AddFilters, PartialRecord, SendExportEmailType, SetEditMode, SetPreview, SetSelectedData, DashboardEditMode, SupportedLanguage, VizItemPostMessageLoadEvent, VizItemPostMessageRenderedEvent, VizItemPostMessageExportedEvent, VizItemPostMessageChangedFiltersEvent, VizItemPostMessageCustomEventEvent, VizItemPostMessageAuthorizationExpiredEvent, VizItemPostMessageErrorEvent, EmbedErrorEvent, EmbedErrorEventData } from './index.shared';
3
3
  export { selectedDataUtils, preloadDashboard, preloadVizItem, preloadIQ } from './index.shared';
4
+ export { normalizeVizItemSlots } from './lib/shared/helpers/normalize-viz-item-slots';
5
+ export type * from './lib/shared/models/dashboard-definition.model';
6
+ export type * from './lib/shared/models/viz-item-service-port.model';
4
7
  export * from './lib/dashboard/dashboard-component';
5
8
  export * from './lib/viz-item/viz-item-component';
6
9
  export * from './lib/iq-components/luzmo-iq-chat';
@@ -0,0 +1 @@
1
+ export * from './lib/dashboard-next/dashboard-next-component';
@@ -0,0 +1,3 @@
1
+ export * from './lib/shared/models/dashboard-definition.model';
2
+ export * from './lib/shared/models/viz-item-service-port.model';
3
+ export * from './lib/shared/helpers/normalize-viz-item-slots';
@@ -47,7 +47,7 @@ export declare class LuzmoDashboard extends LitElement implements SharedLib.WebC
47
47
  browserErrorMsg: string;
48
48
  dashboardError: boolean;
49
49
  dashboardErrorMsg: string;
50
- browserNotSupported: any[];
50
+ browserNotSupported: never[];
51
51
  libVersion: string;
52
52
  protected isLibraryLoaded: boolean;
53
53
  protected dashboardReference: SharedLib.LuzmoElement | undefined;
@@ -0,0 +1,76 @@
1
+ import '@luzmo/lucero/notice';
2
+ import { LitElement, type PropertyValues } from 'lit';
3
+ import type { ScreenMode } from '@luzmo/dashboard-contents-types';
4
+ import { DashboardStores } from './state/dashboard-stores';
5
+ import type { DashboardMode } from './state/runtime/dashboard-runtime-state';
6
+ import type { DashboardNextTranslations } from './localization/dashboard-next-translations';
7
+ import type { EditableAppearanceOptions } from './settings/appearance/dashboard-appearance-config';
8
+ import './grid/dashboard-next-grid';
9
+ export type { DashboardMode } from './state/runtime/dashboard-runtime-state';
10
+ export type { DashboardNextTranslations } from './localization/dashboard-next-translations';
11
+ export type { EditableAppearanceOptions } from './settings/appearance/dashboard-appearance-config';
12
+ export interface DashboardModeChangedEventDetail {
13
+ mode: DashboardMode;
14
+ previousMode: DashboardMode;
15
+ }
16
+ export declare class LuzmoDashboardNext extends LitElement {
17
+ readonly stores: DashboardStores;
18
+ private get runtime();
19
+ private get documentKey();
20
+ private get loadStatus();
21
+ private readonly renderer;
22
+ private readonly toolbarTheme;
23
+ private readonly metadata;
24
+ private readonly content;
25
+ private readonly settings;
26
+ private readonly loading;
27
+ private readonly variants;
28
+ private readonly variantManagement;
29
+ private readonly variantRename;
30
+ private unsubscribeRuntime?;
31
+ private renderedScreenMode?;
32
+ private experimentalWarningShown;
33
+ constructor();
34
+ get mode(): DashboardMode;
35
+ set mode(mode: DashboardMode);
36
+ get allowModeSwitch(): boolean;
37
+ set allowModeSwitch(value: boolean);
38
+ get disableDashboardSwitching(): boolean;
39
+ set disableDashboardSwitching(value: boolean);
40
+ get editorLanguage(): string;
41
+ set editorLanguage(value: string);
42
+ get language(): string;
43
+ set language(value: string);
44
+ get customTranslations(): DashboardNextTranslations | undefined;
45
+ set customTranslations(value: DashboardNextTranslations | undefined);
46
+ get editableAppearanceOptions(): EditableAppearanceOptions | undefined;
47
+ set editableAppearanceOptions(value: EditableAppearanceOptions | undefined);
48
+ get dashboardId(): string | undefined;
49
+ set dashboardId(value: string | undefined);
50
+ get authKey(): string | undefined;
51
+ set authKey(value: string | undefined);
52
+ get authToken(): string | undefined;
53
+ set authToken(value: string | undefined);
54
+ get appServer(): string;
55
+ set appServer(value: string);
56
+ get apiHost(): string;
57
+ set apiHost(value: string);
58
+ get screenMode(): ScreenMode | 'auto';
59
+ set screenMode(value: ScreenMode | 'auto');
60
+ private readonly views;
61
+ private get layout();
62
+ static styles: import("lit").CSSResult[];
63
+ connectedCallback(): void;
64
+ disconnectedCallback(): void;
65
+ protected willUpdate(changes: PropertyValues): void;
66
+ protected updated(): void;
67
+ reloadDashboard(): Promise<void>;
68
+ private accessIdentity;
69
+ private finalizeInteractions;
70
+ protected render(): import("lit-html").TemplateResult<1>;
71
+ }
72
+ declare global {
73
+ interface HTMLElementTagNameMap {
74
+ 'luzmo-dashboard-next': LuzmoDashboardNext;
75
+ }
76
+ }
@@ -0,0 +1,9 @@
1
+ import type { DashboardConfigState } from '../state/config/dashboard-config-store';
2
+ export type DashboardAccess = Required<Pick<DashboardConfigState, 'apiHost' | 'authKey' | 'authToken'>>;
3
+ export declare class DashboardRequestError extends Error {
4
+ readonly status: number;
5
+ constructor(status: number);
6
+ }
7
+ export declare function requestDashboardResource(access: DashboardAccess, resource: 'securable' | 'securableversion' | 'user' | 'authorization' | 'integrationview', payload: {
8
+ action: string;
9
+ } & Record<string, unknown>, signal: AbortSignal): Promise<unknown>;
@@ -0,0 +1,5 @@
1
+ import type { DashboardNextLabels } from '../localization/dashboard-next-translations';
2
+ export type DashboardErrorReason = 'authentication' | 'permission' | 'missing' | 'network' | 'rate-limit' | 'request';
3
+ export declare function dashboardErrorReason(error: unknown): DashboardErrorReason;
4
+ export declare function dashboardErrorTranslationKey(reason?: DashboardErrorReason): keyof DashboardNextLabels | undefined;
5
+ export declare function dashboardErrorMessage(reason: DashboardErrorReason | undefined, labels: DashboardNextLabels, fallback: string): string;
@@ -0,0 +1,21 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { DashboardStores } from '../state/dashboard-stores';
3
+ import type { DashboardContentController } from '../state/content/dashboard-content-controller';
4
+ import type { DashboardSettingsController } from '../settings/dashboard-settings-controller';
5
+ import type { DashboardMetadataController } from './dashboard-metadata-controller';
6
+ import type { DashboardTarget } from './dashboard-variants-api';
7
+ export declare class DashboardLoadingController implements ReactiveController {
8
+ private readonly host;
9
+ private readonly stores;
10
+ private readonly content;
11
+ private readonly settings;
12
+ private readonly metadata;
13
+ private request?;
14
+ private requestDashboardId?;
15
+ constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardStores, content: DashboardContentController, settings: DashboardSettingsController, metadata: DashboardMetadataController);
16
+ load(target?: DashboardTarget, options?: {
17
+ discardCurrent?: boolean;
18
+ reload?: boolean;
19
+ }): Promise<boolean>;
20
+ hostDisconnected(): void;
21
+ }
@@ -0,0 +1,25 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { DashboardStores } from '../state/dashboard-stores';
3
+ import type { DashboardConfigState } from '../state/config/dashboard-config-store';
4
+ import { type DashboardDatasetFields } from '../settings/data/dashboard-data-metadata';
5
+ export declare class DashboardMetadataController implements ReactiveController {
6
+ private readonly host;
7
+ readonly stores: DashboardStores;
8
+ private scope?;
9
+ private request?;
10
+ private catalog?;
11
+ private fields;
12
+ constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardStores);
13
+ private get metadata();
14
+ update(): void;
15
+ matches(access?: Pick<DashboardConfigState, 'apiHost' | 'authKey' | 'authToken'>): boolean;
16
+ configure(): void;
17
+ getCached(datasetIds: string[]): DashboardDatasetFields | undefined;
18
+ getDatasets(): DashboardDatasetFields | undefined;
19
+ preload(datasetIds: string[]): void;
20
+ load(datasetIds: string[], retry?: boolean): Promise<DashboardDatasetFields>;
21
+ hostDisconnected(): void;
22
+ private requiredIds;
23
+ private setFields;
24
+ private reset;
25
+ }
@@ -0,0 +1,4 @@
1
+ import type { DashboardPermissions } from '../state/runtime/dashboard-runtime-state';
2
+ import { type DashboardAccess } from './dashboard-api';
3
+ import type { DashboardTarget } from './dashboard-variants-api';
4
+ export declare function loadDashboardPermissions(access: DashboardAccess, target: DashboardTarget, signal: AbortSignal): Promise<DashboardPermissions>;
@@ -0,0 +1,5 @@
1
+ import type { DashboardContentState } from '../state/content/dashboard-content-state';
2
+ import { type DashboardAccess } from './dashboard-api';
3
+ export declare class DashboardSaveConflictError extends Error {
4
+ }
5
+ export declare function saveAndPublishDashboard(access: DashboardAccess, id: string, document: DashboardContentState, name: Record<string, string>, source: DashboardContentState, signal: AbortSignal): Promise<string>;
@@ -0,0 +1,25 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { DashboardStores } from '../state/dashboard-stores';
3
+ export declare class DashboardRendererController implements ReactiveController {
4
+ private readonly host;
5
+ private readonly stores;
6
+ private readonly scopes;
7
+ private readonly requests;
8
+ private sequence;
9
+ private refreshPending;
10
+ private readonly refreshTargets;
11
+ private readonly unsubscribers;
12
+ constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardStores);
13
+ hostConnected(): void;
14
+ hostDisconnected(): void;
15
+ createVizItem(itemId?: string): Promise<HTMLElement | undefined>;
16
+ private setRenderState;
17
+ releaseVizItem(element: HTMLElement): void;
18
+ private createPort;
19
+ private getFilterSources;
20
+ private request;
21
+ private cancel;
22
+ private scheduleRefresh;
23
+ private dispose;
24
+ private reset;
25
+ }
@@ -0,0 +1,30 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { DashboardStores } from '../state/dashboard-stores';
3
+ import { type DashboardTarget } from './dashboard-variants-api';
4
+ import type { DashboardLoadingController } from './dashboard-loading-controller';
5
+ export declare class DashboardVariantManagementController implements ReactiveController {
6
+ private readonly host;
7
+ private readonly stores;
8
+ private readonly loading;
9
+ private readonly variants;
10
+ private request?;
11
+ private unsubscribers;
12
+ constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardStores, loading: Pick<DashboardLoadingController, 'load'>, variants: {
13
+ loadCatalog(refresh?: boolean): Promise<boolean>;
14
+ });
15
+ private get state();
16
+ get isDefault(): boolean;
17
+ isDefaultTarget(target: DashboardTarget): boolean;
18
+ canSetDefaultFor(target: DashboardTarget): boolean;
19
+ private get available();
20
+ get canSetDefault(): boolean;
21
+ get canDelete(): boolean;
22
+ setDefault(target?: DashboardTarget | undefined): Promise<boolean>;
23
+ requestDelete(): void;
24
+ cancel(): void;
25
+ confirmDelete(): Promise<boolean>;
26
+ private fail;
27
+ hostConnected(): void;
28
+ private reset;
29
+ hostDisconnected(): void;
30
+ }
@@ -0,0 +1,18 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { DashboardStores } from '../state/dashboard-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: DashboardStores);
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,30 @@
1
+ import type { DashboardContentState } from '../state/content/dashboard-content-state';
2
+ import { type DashboardAccess } from './dashboard-api';
3
+ export type { DashboardAccess } from './dashboard-api';
4
+ export interface DashboardTarget {
5
+ dashboardId: string;
6
+ variantId?: string;
7
+ }
8
+ export interface DashboardSummary {
9
+ id: string;
10
+ name: Record<string, string>;
11
+ is_variant?: boolean;
12
+ original_id?: string;
13
+ owner_id?: string;
14
+ updated_at?: string;
15
+ isFavorite?: boolean;
16
+ groupFavoriteAt?: number;
17
+ }
18
+ export interface DashboardCatalog {
19
+ userId?: string;
20
+ canCreateVariants: boolean;
21
+ dashboards: DashboardSummary[];
22
+ }
23
+ export declare function loadDashboardCatalog(access: DashboardAccess, signal: AbortSignal): Promise<DashboardCatalog>;
24
+ export declare function setDashboardDefault(access: DashboardAccess, userId: string, id: string, signal: AbortSignal): Promise<void>;
25
+ export declare function deleteDashboardVariant(access: DashboardAccess, id: string, signal: AbortSignal): Promise<void>;
26
+ export declare function saveDashboardDocument(access: DashboardAccess, target: {
27
+ id: string;
28
+ } | {
29
+ originalId: string;
30
+ }, document: DashboardContentState, name: Record<string, string>, signal: AbortSignal): Promise<string>;
@@ -0,0 +1,47 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { DashboardStores } from '../state/dashboard-stores';
3
+ import type { DashboardContentController } from '../state/content/dashboard-content-controller';
4
+ import { type DashboardTarget } from './dashboard-variants-api';
5
+ export type DashboardSaveAction = 'save' | 'variant';
6
+ export declare class DashboardVariantsController implements ReactiveController {
7
+ private readonly host;
8
+ readonly stores: DashboardStores;
9
+ private readonly content;
10
+ private readonly loading;
11
+ private readonly finalizeInteractions;
12
+ private catalogRequest?;
13
+ private catalogTask?;
14
+ private saveRequest?;
15
+ private saveTask?;
16
+ private unsubscribers;
17
+ private picker?;
18
+ private pickerObserver?;
19
+ private pickerVisible;
20
+ private cancelCatalogPreload?;
21
+ private dirtyCache?;
22
+ constructor(host: ReactiveControllerHost & HTMLElement, stores: DashboardStores, content: DashboardContentController, loading: {
23
+ load(target: DashboardTarget): Promise<boolean>;
24
+ }, finalizeInteractions?: () => void);
25
+ get dirty(): boolean;
26
+ get saveError(): string | undefined;
27
+ get canModify(): boolean;
28
+ get canCreateVariant(): boolean;
29
+ exitEdit(): void;
30
+ private get state();
31
+ private get access();
32
+ hostConnected(): void;
33
+ observePicker(picker?: HTMLElement | null): void;
34
+ private scheduleCatalogPreload;
35
+ setPickerOpen(pickerOpen: boolean): void;
36
+ setPickerSearch(pickerSearch: string): void;
37
+ togglePickerDashboard(dashboardId: string): void;
38
+ loadCatalog(refresh?: boolean): Promise<boolean>;
39
+ save(action?: DashboardSaveAction): Promise<boolean>;
40
+ private performSave;
41
+ private nextVariantName;
42
+ select(target: DashboardTarget): Promise<void>;
43
+ resolveSwitch(action: 'save' | 'variant' | 'keep' | 'discard'): Promise<void>;
44
+ private canSwitchTo;
45
+ private reset;
46
+ hostDisconnected(): void;
47
+ }
@@ -0,0 +1,20 @@
1
+ import type { ThemeConfig } from '@luzmo/dashboard-contents-types';
2
+ import type { DashboardContentState } from '../state/content/dashboard-content-state';
3
+ import { type DashboardAccess } from './dashboard-api';
4
+ import type { DashboardTarget } from './dashboard-variants-api';
5
+ export interface DashboardDefinitionRequest extends DashboardAccess {
6
+ dashboardId: string;
7
+ variantId?: string;
8
+ useDefault?: boolean;
9
+ }
10
+ export interface LoadedDashboardDefinition {
11
+ document: DashboardContentState;
12
+ themes: {
13
+ id: string;
14
+ theme: ThemeConfig;
15
+ }[];
16
+ target?: DashboardTarget;
17
+ defaultVersionId?: string;
18
+ dashboardName?: Record<string, string>;
19
+ }
20
+ export declare function loadDashboardDefinition(request: DashboardDefinitionRequest, signal: AbortSignal): Promise<LoadedDashboardDefinition>;
@@ -0,0 +1,4 @@
1
+ import { type DashboardViews } from '../views/dashboard-views';
2
+ import { type DashboardDefinitionRequest } from './load-dashboard-definition';
3
+ export type DashboardLayoutRequest = DashboardDefinitionRequest;
4
+ export declare function loadDashboardLayout(request: DashboardLayoutRequest, signal: AbortSignal): Promise<DashboardViews>;
@@ -0,0 +1,23 @@
1
+ import type { ItemGridBase } from '@luzmo/analytics-components-kit/grid-core';
2
+ import type { ScreenMode } from '@luzmo/dashboard-contents-types';
3
+ import type { ReactiveController } from 'lit';
4
+ import type { DashboardStores } from '../state/dashboard-stores';
5
+ type LayoutHost = ItemGridBase & {
6
+ stores?: DashboardStores;
7
+ screenMode?: ScreenMode;
8
+ readonly contentRevision: number;
9
+ };
10
+ export declare class DashboardGridLayoutController implements ReactiveController {
11
+ private readonly host;
12
+ private interaction?;
13
+ private completionTimer?;
14
+ constructor(host: LayoutHost);
15
+ private readonly begin;
16
+ private readonly changed;
17
+ private readonly committed;
18
+ private readonly cancel;
19
+ private readonly finish;
20
+ hostConnected(): void;
21
+ hostDisconnected(): void;
22
+ }
23
+ export {};
@@ -0,0 +1,3 @@
1
+ import '@luzmo/lucero/skeleton-loader';
2
+ export declare const dashboardLayoutSkeletonStyles: import("lit").CSSResult;
3
+ export declare const renderDashboardLayoutSkeleton: (label: string, language?: string) => import("lit-html").TemplateResult<1>;
@@ -0,0 +1,56 @@
1
+ import '@luzmo/lucero/notice';
2
+ import type { ScreenMode, ThemeConfig } from '@luzmo/dashboard-contents-types';
3
+ import { ItemGridBase, type GridItemData } from '@luzmo/analytics-components-kit/grid-core';
4
+ import { type PropertyValues, type CSSResultArray, type TemplateResult } from 'lit';
5
+ import '@luzmo/lucero/action-button';
6
+ import '@luzmo/lucero/menu';
7
+ import '@luzmo/lucero/icon';
8
+ import '@luzmo/lucero/skeleton-loader';
9
+ import type { DashboardLayoutItem } from '../state/content/dashboard-content-state';
10
+ import type { DashboardStores } from '../state/dashboard-stores';
11
+ import type { DashboardRendererController } from '../data/dashboard-renderer-controller';
12
+ export interface DashboardGridAction {
13
+ action: 'duplicate' | 'remove' | 'layout';
14
+ itemId: string;
15
+ duplicateId?: string;
16
+ screenMode?: ScreenMode;
17
+ items: DashboardLayoutItem[];
18
+ revision: number;
19
+ }
20
+ export declare class LuzmoDashboardNextGrid extends ItemGridBase {
21
+ get layoutEditingEnabled(): boolean;
22
+ get contentRevision(): number;
23
+ constructor();
24
+ private readonly onItemStatesChanged;
25
+ private dispatchGridAction;
26
+ private applyMenuAction;
27
+ private readonly definitions;
28
+ renderer?: DashboardRendererController;
29
+ stores?: DashboardStores;
30
+ private subscriptions;
31
+ get dashboardId(): string | undefined;
32
+ get authKey(): string | undefined;
33
+ get authToken(): string | undefined;
34
+ get appServer(): string | undefined;
35
+ get apiHost(): string | undefined;
36
+ get screenMode(): ScreenMode | undefined;
37
+ get editorMode(): boolean;
38
+ get selectedItemId(): string | undefined;
39
+ get definitionVersion(): string | undefined;
40
+ get filterGroups(): import("@luzmo/dashboard-contents-types").ItemFilterGroup[] | undefined;
41
+ get editorLabels(): Readonly<import("../localization/dashboard-next-translations").DashboardNextLabels>;
42
+ connectedCallback(): void;
43
+ disconnectedCallback(): void;
44
+ protected willUpdate(changes: PropertyValues): void;
45
+ private subscribeStores;
46
+ protected resolveTheme(theme: ThemeConfig | undefined, currentTheme: ThemeConfig | undefined): Promise<ThemeConfig | undefined>;
47
+ protected updated(changes: PropertyValues): void;
48
+ static get styles(): CSSResultArray;
49
+ protected renderItemContent(item: GridItemData): TemplateResult;
50
+ protected getItemRenderDependencies(): readonly unknown[];
51
+ }
52
+ declare global {
53
+ interface HTMLElementTagNameMap {
54
+ 'luzmo-dashboard-next-grid': LuzmoDashboardNextGrid;
55
+ }
56
+ }
@@ -0,0 +1,26 @@
1
+ import type { PropertyValues } from 'lit';
2
+ import { LuzmoBaseVizItem } from '../../viz-item/viz-item.base';
3
+ import type { DashboardDefinition, VizItemDefinition } from '../../shared/models/dashboard-definition.model';
4
+ import type { DashboardRendererController } from '../data/dashboard-renderer-controller';
5
+ export declare class LuzmoDashboardNextVizItem extends LuzmoBaseVizItem {
6
+ definition?: VizItemDefinition;
7
+ querySource?: 'dashboard';
8
+ chartElement: LuzmoBaseVizItem['chartElement'] & {
9
+ normalizeDashboardDefinition?: (document: DashboardDefinition) => DashboardDefinition | Promise<DashboardDefinition>;
10
+ };
11
+ renderer?: Pick<DashboardRendererController, 'createVizItem' | 'releaseVizItem'>;
12
+ private pending?;
13
+ private element?;
14
+ normalizeDashboardDefinition(document: DashboardDefinition): Promise<DashboardDefinition>;
15
+ private updateDefinitionInputs;
16
+ protected loadVizItem(): Promise<boolean>;
17
+ protected createVizItemElement(): typeof this.chartElement;
18
+ updated(changes: PropertyValues): Promise<void>;
19
+ disconnectedCallback(): void;
20
+ connectedCallback(): void;
21
+ }
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ 'luzmo-dashboard-next-viz-item': LuzmoDashboardNextVizItem;
25
+ }
26
+ }
@@ -0,0 +1,15 @@
1
+ import type { ReactiveController, LitElement } from 'lit';
2
+ import type { DashboardStores } from '../state/dashboard-stores';
3
+ export declare class DashboardSkeletonMotionController implements ReactiveController {
4
+ private readonly host;
5
+ private readonly stores;
6
+ private origins;
7
+ private animations;
8
+ private frame?;
9
+ private stopWaiting?;
10
+ constructor(host: LitElement, stores: DashboardStores);
11
+ hostUpdate(): void;
12
+ hostUpdated(): void;
13
+ private cancel;
14
+ hostDisconnected(): void;
15
+ }
@@ -0,0 +1,21 @@
1
+ import type { ThemeConfig, ScreenMode } from '@luzmo/dashboard-contents-types';
2
+ import { type TemplateResult } from 'lit';
3
+ import type { GridItemData } from '@luzmo/analytics-components-kit/grid-core';
4
+ import type { VizItemDefinition } from '../../shared/models/dashboard-definition.model';
5
+ import type { DashboardRendererController } from '../data/dashboard-renderer-controller';
6
+ import './dashboard-next-viz-item';
7
+ export interface DashboardNextChartContext {
8
+ renderer?: DashboardRendererController;
9
+ dashboardId?: string;
10
+ screenMode?: ScreenMode;
11
+ appServer?: string;
12
+ apiHost?: string;
13
+ authKey?: string;
14
+ authToken?: string;
15
+ contentLanguage: string;
16
+ fullTheme?: ThemeConfig;
17
+ editorMode?: boolean;
18
+ definition?: VizItemDefinition;
19
+ onReady?: (chart: HTMLElement) => void;
20
+ }
21
+ export declare const renderDashboardNextChart: (item: GridItemData, { renderer, dashboardId, screenMode, appServer, apiHost, authKey, authToken, contentLanguage, fullTheme, editorMode, definition, onReady }: DashboardNextChartContext) => TemplateResult;