@luzmo/embed 9.1.0 → 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 +35 -9
  5. package/index.dashboard-next.cjs +6291 -0
  6. package/index.dashboard-next.js +6259 -0
  7. package/index.js +34 -9
  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 +160 -135
  14. package/package.json +15 -2
  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/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [10.0.0] - 2026-11-19
6
+
7
+ ### Changed
8
+
9
+ - Dashboard Next uses Analytics Components Kit `2.5.0` and Lucero `2.10.0`, allowing ACK and the application to share the installed Embed 10 version.
10
+ - `@luzmo/dashboard-contents-types` is now `2.2.0` (was `2.1.0`). It brings localized slot labels in English, French, Dutch, German and Spanish, corrected radar color slot types and improved chart option visibility. This package re-exports its types.
11
+ - Breaking: `<luzmo-embed-viz-item>` no longer accepts `querySource` or the `query-source` attribute. Use `dashboardId` and `itemId` to embed a saved chart.
12
+
13
+ ### Added
14
+
15
+ - Experimental `<luzmo-dashboard-next>` through the separate `@luzmo/embed/dashboard-next` entry and `luzmo-dashboard-next.min.js` CDN bundle. It supports view and edit modes, chart data/filter/appearance settings, undo and redo, saving dashboard variants and switching between them. It is opt-in and does not replace `<luzmo-embed-dashboard>`; its API and behavior may change without notice.
16
+ - Dashboard Next editor labels in English, French, Dutch, German and Spanish, with `editorLanguage`, `customTranslations` and `editableAppearanceOptions` properties. Chart content language remains independent through `language`.
17
+ - Experimental `normalizeVizItemSlots` helper and `DashboardDefinition`, `DashboardDefinitionItem`, `DashboardDefinitionView`, `VizItemDefinition`, `VizItemServiceObserver`, `VizItemServiceSource` and `VizItemServicePort` types for dashboard and chart integrations, exported from `@luzmo/embed`.
18
+
19
+ ### Fixed
20
+
21
+ - CDN bundles use the same published dashboard contents types version as the npm package, including its slot translations and chart configuration fixes.
22
+ - Dashboard Next declares its runtime color, positioning and utility dependencies so the npm entry can be bundled outside the monorepo.
23
+ - Saved dashboard charts preserve their saved options when runtime option overrides are updated or cleared.
24
+
5
25
  ## [9.1.0] - 2026-11-11
6
26
 
7
27
  ### Fixed
package/MIGRATIONS.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Luzmo embed migrations
2
2
 
3
+ ## [9.X.X] -> [10.0.0] - 2026-11-18
4
+
5
+ ### Breaking changes
6
+
7
+ - Remove `querySource` and the `query-source` attribute from `<luzmo-embed-viz-item>` integrations. Public viz items no longer accept an override for the query source. Continue to use `dashboardId` and `itemId` to embed a saved chart.
8
+ - Dashboard Next is a separate experimental opt-in. Existing `<luzmo-embed-dashboard>` integrations do not need to migrate to it; import `@luzmo/embed/dashboard-next` only when adopting `<luzmo-dashboard-next>`.
9
+
3
10
  ## [5.X.X] -> [6.0.0] - 2024-07-11
4
11
 
5
12
  ### Breaking changes
package/README.md CHANGED
@@ -7,10 +7,11 @@ A modern [Web Component](https://developer.mozilla.org/en-US/docs/Web/Web_Compon
7
7
  1. [Installation instructions](#installation-instructions)
8
8
  2. [Luzmo Embed Viz Item](#luzmo-embed-viz-item)
9
9
  3. [Luzmo Embed Dashboard](#luzmo-embed-dashboard)
10
- 4. [Luzmo IQ Components](#luzmo-iq-components)
11
- 5. [Changelog](#changelog)
12
- 6. [Migrations](#migrations)
13
- 7. [Quick links](#quick-links)
10
+ 4. [Experimental Dashboard Next](#experimental-dashboard-next)
11
+ 5. [Luzmo IQ Components](#luzmo-iq-components)
12
+ 6. [Changelog](#changelog)
13
+ 7. [Migrations](#migrations)
14
+ 8. [Quick links](#quick-links)
14
15
 
15
16
  ## Installation instructions
16
17
 
@@ -42,6 +43,54 @@ OR
42
43
  <script type="module" src="./node_modules/@luzmo/embed/index.js"></script>
43
44
  ```
44
45
 
46
+ ## Experimental Dashboard Next
47
+
48
+ Dashboard Next is an opt-in dashboard web component with view and edit modes, chart settings, undo and redo, and saved dashboard variants. Its API and behavior may change without notice. Importing the normal `@luzmo/embed` entry does not load or register it.
49
+
50
+ ```js
51
+ import '@luzmo/embed/dashboard-next';
52
+ ```
53
+
54
+ ```html
55
+ <luzmo-dashboard-next
56
+ style="display: block; width: 100%; height: 600px"
57
+ dashboard-id="YOUR_DASHBOARD_ID"
58
+ auth-key="YOUR_AUTH_KEY"
59
+ auth-token="YOUR_AUTH_TOKEN"></luzmo-dashboard-next>
60
+ ```
61
+
62
+ Give the component an explicit width and height, as in the example above.
63
+
64
+ For a script-tag integration, load the separate bundle instead:
65
+
66
+ ```html
67
+ <script src="https://cdn.luzmo.com/js/luzmo-embed/10.0.0/luzmo-dashboard-next.min.js"></script>
68
+ ```
69
+
70
+ ### Properties: luzmo-dashboard-next
71
+
72
+ | JavaScript property | HTML attribute | Description |
73
+ | --------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------- |
74
+ | `dashboardId` | `dashboard-id` | Dashboard to load. |
75
+ | `authKey` | `auth-key` | Embed authorization key. |
76
+ | `authToken` | `auth-token` | Embed authorization token. |
77
+ | `appServer` | `app-server` | Luzmo application URL; defaults to `https://app.luzmo.com`. |
78
+ | `apiHost` | `api-host` | Luzmo API URL; defaults to `https://api.luzmo.com`. |
79
+ | `mode` | `mode` | `view` or `edit`; defaults to `view`. Editing and saving require the corresponding dashboard permissions. |
80
+ | `allowModeSwitch` | `allow-mode-switch` | Show the control for switching between view and edit modes; defaults to `false`. |
81
+ | `disableDashboardSwitching` | `disable-dashboard-switching` | Disable switching between saved dashboard variants; defaults to `false`. |
82
+ | `screenMode` | `screen-mode` | `auto`, `desktop`, `tablet`, `mobile`, `largeScreen` or `fixed`; defaults to `auto`. |
83
+ | `editorLanguage` | `editor-language` | Editor language: English, French, Dutch, German or Spanish (`en`, `fr`, `nl`, `de`, `es`); defaults to `en`. |
84
+ | `language` | `language` | Chart content language; defaults to `en`, independently of the editor language. |
85
+ | `customTranslations` | `custom-translations` | Optional editor label overrides. Set the object as a JavaScript property. |
86
+ | `editableAppearanceOptions` | `editable-appearance-options` | Optional map of chart types to the appearance option paths users may edit. Set the object as a JavaScript property. |
87
+
88
+ Set Boolean properties from JavaScript, or include the HTML attribute to enable them. Omit the attribute to disable them.
89
+
90
+ `reloadDashboard()` reloads the dashboard. Listen for `mode-changed` to receive `{ mode, previousMode }` in the event's `detail`.
91
+
92
+ The Angular, React, Vue and React Native dashboard wrappers continue to use their existing dashboard components; this release does not replace them with Dashboard Next.
93
+
45
94
  ## Luzmo Embed Viz Item
46
95
 
47
96
  ### For a more comprehensive documentation visit [Luzmo Developer Docs - Flex](https://developer.luzmo.com/guide/flex--introduction)
package/index.cjs CHANGED
@@ -38,6 +38,7 @@ __export(index_exports, {
38
38
  getCachedJSONSchemas: () => getCachedJSONSchemas,
39
39
  getJSONSchemaUrl: () => getJSONSchemaUrl,
40
40
  luzmoRefParserOptions: () => luzmoRefParserOptions,
41
+ normalizeVizItemSlots: () => normalizeVizItemSlots,
41
42
  preloadDashboard: () => preloadDashboard,
42
43
  preloadIQ: () => preloadIQ,
43
44
  preloadVizItem: () => preloadVizItem,
@@ -331,6 +332,23 @@ var uuidv4 = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, fu
331
332
  return v.toString(16);
332
333
  });
333
334
 
335
+ // libs/embed-libs/embed/src/lib/shared/helpers/normalize-viz-item-slots.ts
336
+ function normalizeVizItemSlots(slots) {
337
+ return slots.map((slot) => ({
338
+ ...slot,
339
+ content: slot.content.map((content) => ({
340
+ ...content,
341
+ ...content.columnId === void 0 ? {} : { column: content.columnId },
342
+ ...content.datasetId === void 0 ? {} : { set: content.datasetId },
343
+ ...content.aggregationWeight ? { aggregationWeight: {
344
+ ...content.aggregationWeight,
345
+ set: content.aggregationWeight.datasetId ?? content.aggregationWeight.set,
346
+ column: content.aggregationWeight.columnId ?? content.aggregationWeight.column
347
+ } } : {}
348
+ }))
349
+ }));
350
+ }
351
+
334
352
  // libs/embed-libs/embed/src/lib/shared/helpers/iframe-url.ts
335
353
  var createIframeUrl = (dashboardContent) => {
336
354
  const searchString = [];
@@ -1342,7 +1360,6 @@ var libraryTypeToWebComponentTypeMapping = {
1342
1360
  filters: "filters",
1343
1361
  dashboardId: "dashboard-id",
1344
1362
  screenMode: "screen-mode",
1345
- querySource: "query-source",
1346
1363
  itemId: "item-id",
1347
1364
  aiMessageAssetId: "ai-message-asset-id",
1348
1365
  dashboardContentsVersion: "dashboard-contents-version",
@@ -1464,7 +1481,7 @@ var import_decorators = require("lit/decorators.js");
1464
1481
  var import_style_map = require("lit/directives/style-map.js");
1465
1482
 
1466
1483
  // libs/embed-libs/embed/package.json
1467
- var version = "9.1.0";
1484
+ var version = "10.0.0";
1468
1485
 
1469
1486
  // libs/embed-libs/embed/src/lib/utils/embed-error.utils.ts
1470
1487
  function buildEmbedErrorDetail(errorMsg) {
@@ -2908,13 +2925,22 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
2908
2925
  async firstUpdated(_changedProperties) {
2909
2926
  super.firstUpdated(_changedProperties);
2910
2927
  if (this.canInitializeVizItem()) {
2911
- await loadLibrary(this.appServer, vizItemRemote);
2928
+ if (!await this.loadVizItem()) {
2929
+ return;
2930
+ }
2912
2931
  this.createAndAppendElement();
2913
2932
  }
2914
2933
  }
2934
+ async loadVizItem() {
2935
+ await loadLibrary(this.appServer, vizItemRemote);
2936
+ return true;
2937
+ }
2938
+ createVizItemElement() {
2939
+ return document.createElement("chart-component");
2940
+ }
2915
2941
  createAndAppendElement() {
2916
2942
  if (!this.chartElement) {
2917
- this.chartElement = document.createElement("chart-component");
2943
+ this.chartElement = this.createVizItemElement();
2918
2944
  this.chartElement.setAttribute("embedding-mode", "chart");
2919
2945
  this.chartElement.style.height = "100%";
2920
2946
  this.chartElement.style.width = "100%";
@@ -2985,7 +3011,7 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
2985
3011
  if (propertyName === "inlineData" && (value === void 0 || value === null)) {
2986
3012
  this.inlineData = void 0;
2987
3013
  this.chartElement.removeAttribute(mappedAttributeName);
2988
- } else if ((propertyName === "screenMode" || propertyName === "querySource") && value == null) {
3014
+ } else if (propertyName === "screenMode" && value == null) {
2989
3015
  this.chartElement.removeAttribute(mappedAttributeName);
2990
3016
  } else {
2991
3017
  const attributeValue = typeof value === "object" ? JSON.stringify(value) : value?.toString() ?? value;
@@ -3001,7 +3027,9 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
3001
3027
  }
3002
3028
  } else {
3003
3029
  if (this.canInitializeVizItem()) {
3004
- await loadLibrary(this.appServer, vizItemRemote);
3030
+ if (!await this.loadVizItem()) {
3031
+ return;
3032
+ }
3005
3033
  this.createAndAppendElement();
3006
3034
  }
3007
3035
  }
@@ -3063,9 +3091,6 @@ __decorateClass([
3063
3091
  __decorateClass([
3064
3092
  (0, import_decorators2.property)({ attribute: "screen-mode" })
3065
3093
  ], LuzmoBaseVizItem.prototype, "screenMode", 2);
3066
- __decorateClass([
3067
- (0, import_decorators2.property)({ attribute: "query-source" })
3068
- ], LuzmoBaseVizItem.prototype, "querySource", 2);
3069
3094
  __decorateClass([
3070
3095
  (0, import_decorators2.property)()
3071
3096
  ], LuzmoBaseVizItem.prototype, "itemId", 2);
@@ -3450,6 +3475,7 @@ import_lit6.LitElement.disableWarning?.("change-in-update");
3450
3475
  getCachedJSONSchemas,
3451
3476
  getJSONSchemaUrl,
3452
3477
  luzmoRefParserOptions,
3478
+ normalizeVizItemSlots,
3453
3479
  preloadDashboard,
3454
3480
  preloadIQ,
3455
3481
  preloadVizItem,