@luzmo/embed 9.1.0 → 10.1.0-es2021
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 +76 -45
- package/index.dashboard-analyst.cjs +9874 -0
- package/index.dashboard-analyst.js +9866 -0
- package/index.dashboard-next.cjs +6635 -0
- package/index.dashboard-next.js +6622 -0
- package/index.js +74 -45
- 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 +176206 -0
- package/luzmo-dashboard-next.min.js +159871 -0
- package/luzmo-embed.min.js +200 -171
- package/package.json +27 -3
- 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
package/index.js
CHANGED
|
@@ -295,6 +295,23 @@ var uuidv4 = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, fu
|
|
|
295
295
|
return v.toString(16);
|
|
296
296
|
});
|
|
297
297
|
|
|
298
|
+
// libs/embed-libs/embed/src/lib/shared/helpers/normalize-viz-item-slots.ts
|
|
299
|
+
function normalizeVizItemSlots(slots) {
|
|
300
|
+
return slots.map((slot) => ({
|
|
301
|
+
...slot,
|
|
302
|
+
content: slot.content.map((content) => ({
|
|
303
|
+
...content,
|
|
304
|
+
...content.columnId === void 0 ? {} : { column: content.columnId },
|
|
305
|
+
...content.datasetId === void 0 ? {} : { set: content.datasetId },
|
|
306
|
+
...content.aggregationWeight ? { aggregationWeight: {
|
|
307
|
+
...content.aggregationWeight,
|
|
308
|
+
set: content.aggregationWeight.datasetId ?? content.aggregationWeight.set,
|
|
309
|
+
column: content.aggregationWeight.columnId ?? content.aggregationWeight.column
|
|
310
|
+
} } : {}
|
|
311
|
+
}))
|
|
312
|
+
}));
|
|
313
|
+
}
|
|
314
|
+
|
|
298
315
|
// libs/embed-libs/embed/src/lib/shared/helpers/iframe-url.ts
|
|
299
316
|
var createIframeUrl = (dashboardContent) => {
|
|
300
317
|
const searchString = [];
|
|
@@ -1297,6 +1314,7 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1297
1314
|
slots: "slots",
|
|
1298
1315
|
inlineData: "inline-data",
|
|
1299
1316
|
options: "options",
|
|
1317
|
+
definition: "definition",
|
|
1300
1318
|
appServer: "app-server",
|
|
1301
1319
|
apiHost: "api-host",
|
|
1302
1320
|
authKey: "auth-key",
|
|
@@ -1306,7 +1324,6 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1306
1324
|
filters: "filters",
|
|
1307
1325
|
dashboardId: "dashboard-id",
|
|
1308
1326
|
screenMode: "screen-mode",
|
|
1309
|
-
querySource: "query-source",
|
|
1310
1327
|
itemId: "item-id",
|
|
1311
1328
|
aiMessageAssetId: "ai-message-asset-id",
|
|
1312
1329
|
dashboardContentsVersion: "dashboard-contents-version",
|
|
@@ -1419,6 +1436,14 @@ function preloadIQ(appServer = "https://app.luzmo.com") {
|
|
|
1419
1436
|
});
|
|
1420
1437
|
}
|
|
1421
1438
|
|
|
1439
|
+
// libs/embed-libs/embed/src/lib/dashboard-next/state/config/dashboard-chart-types.ts
|
|
1440
|
+
var dashboardChartTypeGroups = [
|
|
1441
|
+
{ group: "charts", types: ["bar-chart", "column-chart", "line-chart", "area-chart", "combination-chart", "scatter-plot", "donut-chart", "treemap-chart"] },
|
|
1442
|
+
{ group: "numbers-tables", types: ["kpi", "conditional-number", "regular-table", "pivot-table"] },
|
|
1443
|
+
{ group: "filters", types: ["date-filter", "date-comparison-filter", "dropdown-filter", "slicer-filter", "search-filter", "slider-filter"] }
|
|
1444
|
+
];
|
|
1445
|
+
var defaultChartTypes = Object.freeze(dashboardChartTypeGroups.flatMap(({ types }) => types));
|
|
1446
|
+
|
|
1422
1447
|
// libs/embed-libs/embed/src/index.ts
|
|
1423
1448
|
import { LitElement as LitElement5 } from "lit";
|
|
1424
1449
|
|
|
@@ -1428,7 +1453,7 @@ import { property, query, state } from "lit/decorators.js";
|
|
|
1428
1453
|
import { styleMap } from "lit/directives/style-map.js";
|
|
1429
1454
|
|
|
1430
1455
|
// libs/embed-libs/embed/package.json
|
|
1431
|
-
var version = "
|
|
1456
|
+
var version = "10.1.0";
|
|
1432
1457
|
|
|
1433
1458
|
// libs/embed-libs/embed/src/lib/utils/embed-error.utils.ts
|
|
1434
1459
|
function buildEmbedErrorDetail(errorMsg) {
|
|
@@ -2792,22 +2817,6 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
2792
2817
|
this.libVersion = version + "-wc-luzmo";
|
|
2793
2818
|
this.postInitCallQueue = [];
|
|
2794
2819
|
}
|
|
2795
|
-
static {
|
|
2796
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
2797
|
-
this.styles = css2`
|
|
2798
|
-
:host {
|
|
2799
|
-
display: block;
|
|
2800
|
-
width: 100%;
|
|
2801
|
-
height: 100%;
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
luzmo-embed-viz-item {
|
|
2805
|
-
width: 100%;
|
|
2806
|
-
height: 1000%;
|
|
2807
|
-
display: block;
|
|
2808
|
-
}
|
|
2809
|
-
`;
|
|
2810
|
-
}
|
|
2811
2820
|
createRenderRoot() {
|
|
2812
2821
|
if (!this.style.display) {
|
|
2813
2822
|
this.style.display = "block";
|
|
@@ -2874,13 +2883,22 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
2874
2883
|
async firstUpdated(_changedProperties) {
|
|
2875
2884
|
super.firstUpdated(_changedProperties);
|
|
2876
2885
|
if (this.canInitializeVizItem()) {
|
|
2877
|
-
await
|
|
2886
|
+
if (!await this.loadVizItem()) {
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2878
2889
|
this.createAndAppendElement();
|
|
2879
2890
|
}
|
|
2880
2891
|
}
|
|
2892
|
+
async loadVizItem() {
|
|
2893
|
+
await loadLibrary(this.appServer, vizItemRemote);
|
|
2894
|
+
return true;
|
|
2895
|
+
}
|
|
2896
|
+
createVizItemElement() {
|
|
2897
|
+
return document.createElement("chart-component");
|
|
2898
|
+
}
|
|
2881
2899
|
createAndAppendElement() {
|
|
2882
2900
|
if (!this.chartElement) {
|
|
2883
|
-
this.chartElement =
|
|
2901
|
+
this.chartElement = this.createVizItemElement();
|
|
2884
2902
|
this.chartElement.setAttribute("embedding-mode", "chart");
|
|
2885
2903
|
this.chartElement.style.height = "100%";
|
|
2886
2904
|
this.chartElement.style.width = "100%";
|
|
@@ -2951,7 +2969,7 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
2951
2969
|
if (propertyName === "inlineData" && (value === void 0 || value === null)) {
|
|
2952
2970
|
this.inlineData = void 0;
|
|
2953
2971
|
this.chartElement.removeAttribute(mappedAttributeName);
|
|
2954
|
-
} else if (
|
|
2972
|
+
} else if (propertyName === "screenMode" && value == null) {
|
|
2955
2973
|
this.chartElement.removeAttribute(mappedAttributeName);
|
|
2956
2974
|
} else {
|
|
2957
2975
|
const attributeValue = typeof value === "object" ? JSON.stringify(value) : value?.toString() ?? value;
|
|
@@ -2967,7 +2985,9 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
2967
2985
|
}
|
|
2968
2986
|
} else {
|
|
2969
2987
|
if (this.canInitializeVizItem()) {
|
|
2970
|
-
await
|
|
2988
|
+
if (!await this.loadVizItem()) {
|
|
2989
|
+
return;
|
|
2990
|
+
}
|
|
2971
2991
|
this.createAndAppendElement();
|
|
2972
2992
|
}
|
|
2973
2993
|
}
|
|
@@ -2976,6 +2996,20 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
2976
2996
|
return html2``;
|
|
2977
2997
|
}
|
|
2978
2998
|
};
|
|
2999
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
3000
|
+
LuzmoBaseVizItem.styles = css2`
|
|
3001
|
+
:host {
|
|
3002
|
+
display: block;
|
|
3003
|
+
width: 100%;
|
|
3004
|
+
height: 100%;
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
luzmo-embed-viz-item {
|
|
3008
|
+
width: 100%;
|
|
3009
|
+
height: 1000%;
|
|
3010
|
+
display: block;
|
|
3011
|
+
}
|
|
3012
|
+
`;
|
|
2979
3013
|
__decorateClass([
|
|
2980
3014
|
property2()
|
|
2981
3015
|
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
@@ -3029,9 +3063,6 @@ __decorateClass([
|
|
|
3029
3063
|
__decorateClass([
|
|
3030
3064
|
property2({ attribute: "screen-mode" })
|
|
3031
3065
|
], LuzmoBaseVizItem.prototype, "screenMode", 2);
|
|
3032
|
-
__decorateClass([
|
|
3033
|
-
property2({ attribute: "query-source" })
|
|
3034
|
-
], LuzmoBaseVizItem.prototype, "querySource", 2);
|
|
3035
3066
|
__decorateClass([
|
|
3036
3067
|
property2()
|
|
3037
3068
|
], LuzmoBaseVizItem.prototype, "itemId", 2);
|
|
@@ -3087,16 +3118,6 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
3087
3118
|
this.remoteEntryServer = "http://localhost:4202/";
|
|
3088
3119
|
this.aydHost = "https://ayd.luzmo.com/";
|
|
3089
3120
|
}
|
|
3090
|
-
static {
|
|
3091
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
3092
|
-
this.styles = css3`
|
|
3093
|
-
:host {
|
|
3094
|
-
display: block;
|
|
3095
|
-
width: 100%;
|
|
3096
|
-
height: 100%;
|
|
3097
|
-
}
|
|
3098
|
-
`;
|
|
3099
|
-
}
|
|
3100
3121
|
createRenderRoot() {
|
|
3101
3122
|
return this;
|
|
3102
3123
|
}
|
|
@@ -3174,6 +3195,14 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
3174
3195
|
observer.observe(embedChat, { childList: true, subtree: true });
|
|
3175
3196
|
}
|
|
3176
3197
|
};
|
|
3198
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
3199
|
+
LuzmoIQEmbedChatComponent.styles = css3`
|
|
3200
|
+
:host {
|
|
3201
|
+
display: block;
|
|
3202
|
+
width: 100%;
|
|
3203
|
+
height: 100%;
|
|
3204
|
+
}
|
|
3205
|
+
`;
|
|
3177
3206
|
__decorateClass([
|
|
3178
3207
|
property3()
|
|
3179
3208
|
], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
|
|
@@ -3250,16 +3279,6 @@ var LuzmoIQEmbedAnswerComponent = class extends LitElement4 {
|
|
|
3250
3279
|
this.libVersion = version + "-wc-luzmo";
|
|
3251
3280
|
this.remoteEntryServer = "http://localhost:4202";
|
|
3252
3281
|
}
|
|
3253
|
-
static {
|
|
3254
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
3255
|
-
this.styles = css4`
|
|
3256
|
-
:host {
|
|
3257
|
-
display: block;
|
|
3258
|
-
width: 100%;
|
|
3259
|
-
height: 100%;
|
|
3260
|
-
}
|
|
3261
|
-
`;
|
|
3262
|
-
}
|
|
3263
3282
|
createRenderRoot() {
|
|
3264
3283
|
return this;
|
|
3265
3284
|
}
|
|
@@ -3310,6 +3329,14 @@ var LuzmoIQEmbedAnswerComponent = class extends LitElement4 {
|
|
|
3310
3329
|
return html4` `;
|
|
3311
3330
|
}
|
|
3312
3331
|
};
|
|
3332
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
3333
|
+
LuzmoIQEmbedAnswerComponent.styles = css4`
|
|
3334
|
+
:host {
|
|
3335
|
+
display: block;
|
|
3336
|
+
width: 100%;
|
|
3337
|
+
height: 100%;
|
|
3338
|
+
}
|
|
3339
|
+
`;
|
|
3313
3340
|
__decorateClass([
|
|
3314
3341
|
property4()
|
|
3315
3342
|
], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);
|
|
@@ -3405,6 +3432,7 @@ var luzmoRefParserOptions = {
|
|
|
3405
3432
|
// libs/embed-libs/embed/src/index.ts
|
|
3406
3433
|
LitElement5.disableWarning?.("change-in-update");
|
|
3407
3434
|
export {
|
|
3435
|
+
defaultChartTypes as DEFAULT_CHART_TYPES,
|
|
3408
3436
|
LuzmoEmbedDashboard,
|
|
3409
3437
|
LuzmoEmbedVizItem,
|
|
3410
3438
|
LuzmoIQEmbedAnswerComponent,
|
|
@@ -3415,6 +3443,7 @@ export {
|
|
|
3415
3443
|
getCachedJSONSchemas,
|
|
3416
3444
|
getJSONSchemaUrl,
|
|
3417
3445
|
luzmoRefParserOptions,
|
|
3446
|
+
normalizeVizItemSlots,
|
|
3418
3447
|
preloadDashboard,
|
|
3419
3448
|
preloadIQ,
|
|
3420
3449
|
preloadVizItem,
|
package/index.rn.cjs
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_rn_exports, {
|
|
|
48
48
|
libraryTypeToWebComponentTypeMapping: () => libraryTypeToWebComponentTypeMapping,
|
|
49
49
|
loaderStyles: () => loaderStyles,
|
|
50
50
|
luzmoEmbedContainerClass: () => luzmoEmbedContainerClass,
|
|
51
|
+
normalizeVizItemSlots: () => normalizeVizItemSlots,
|
|
51
52
|
plStyles: () => plStyles,
|
|
52
53
|
refreshData: () => refreshData,
|
|
53
54
|
rejectPromise: () => rejectPromise,
|
|
@@ -355,6 +356,23 @@ var uuidv4 = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, fu
|
|
|
355
356
|
return v.toString(16);
|
|
356
357
|
});
|
|
357
358
|
|
|
359
|
+
// libs/embed-libs/embed/src/lib/shared/helpers/normalize-viz-item-slots.ts
|
|
360
|
+
function normalizeVizItemSlots(slots) {
|
|
361
|
+
return slots.map((slot) => ({
|
|
362
|
+
...slot,
|
|
363
|
+
content: slot.content.map((content) => ({
|
|
364
|
+
...content,
|
|
365
|
+
...content.columnId === void 0 ? {} : { column: content.columnId },
|
|
366
|
+
...content.datasetId === void 0 ? {} : { set: content.datasetId },
|
|
367
|
+
...content.aggregationWeight ? { aggregationWeight: {
|
|
368
|
+
...content.aggregationWeight,
|
|
369
|
+
set: content.aggregationWeight.datasetId ?? content.aggregationWeight.set,
|
|
370
|
+
column: content.aggregationWeight.columnId ?? content.aggregationWeight.column
|
|
371
|
+
} } : {}
|
|
372
|
+
}))
|
|
373
|
+
}));
|
|
374
|
+
}
|
|
375
|
+
|
|
358
376
|
// libs/embed-libs/embed/src/lib/shared/helpers/iframe-url.ts
|
|
359
377
|
var createIframeUrl = (dashboardContent) => {
|
|
360
378
|
const searchString = [];
|
|
@@ -1357,6 +1375,7 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1357
1375
|
slots: "slots",
|
|
1358
1376
|
inlineData: "inline-data",
|
|
1359
1377
|
options: "options",
|
|
1378
|
+
definition: "definition",
|
|
1360
1379
|
appServer: "app-server",
|
|
1361
1380
|
apiHost: "api-host",
|
|
1362
1381
|
authKey: "auth-key",
|
|
@@ -1366,7 +1385,6 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1366
1385
|
filters: "filters",
|
|
1367
1386
|
dashboardId: "dashboard-id",
|
|
1368
1387
|
screenMode: "screen-mode",
|
|
1369
|
-
querySource: "query-source",
|
|
1370
1388
|
itemId: "item-id",
|
|
1371
1389
|
aiMessageAssetId: "ai-message-asset-id",
|
|
1372
1390
|
dashboardContentsVersion: "dashboard-contents-version",
|
|
@@ -1376,6 +1394,7 @@ var libraryAcceptedParametersList = [
|
|
|
1376
1394
|
"appServer",
|
|
1377
1395
|
"apiHost",
|
|
1378
1396
|
"options",
|
|
1397
|
+
"definition",
|
|
1379
1398
|
"type",
|
|
1380
1399
|
"authKey",
|
|
1381
1400
|
"authToken",
|
|
@@ -1387,7 +1406,6 @@ var libraryAcceptedParametersList = [
|
|
|
1387
1406
|
"itemId",
|
|
1388
1407
|
"dashboardId",
|
|
1389
1408
|
"screenMode",
|
|
1390
|
-
"querySource",
|
|
1391
1409
|
"aiMessageAssetId",
|
|
1392
1410
|
"libVersion"
|
|
1393
1411
|
];
|
|
@@ -1424,6 +1442,7 @@ var luzmoEmbedContainerClass = "luzmo-embed-container";
|
|
|
1424
1442
|
libraryTypeToWebComponentTypeMapping,
|
|
1425
1443
|
loaderStyles,
|
|
1426
1444
|
luzmoEmbedContainerClass,
|
|
1445
|
+
normalizeVizItemSlots,
|
|
1427
1446
|
plStyles,
|
|
1428
1447
|
refreshData,
|
|
1429
1448
|
rejectPromise,
|
package/index.rn.js
CHANGED
|
@@ -286,6 +286,23 @@ var uuidv4 = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, fu
|
|
|
286
286
|
return v.toString(16);
|
|
287
287
|
});
|
|
288
288
|
|
|
289
|
+
// libs/embed-libs/embed/src/lib/shared/helpers/normalize-viz-item-slots.ts
|
|
290
|
+
function normalizeVizItemSlots(slots) {
|
|
291
|
+
return slots.map((slot) => ({
|
|
292
|
+
...slot,
|
|
293
|
+
content: slot.content.map((content) => ({
|
|
294
|
+
...content,
|
|
295
|
+
...content.columnId === void 0 ? {} : { column: content.columnId },
|
|
296
|
+
...content.datasetId === void 0 ? {} : { set: content.datasetId },
|
|
297
|
+
...content.aggregationWeight ? { aggregationWeight: {
|
|
298
|
+
...content.aggregationWeight,
|
|
299
|
+
set: content.aggregationWeight.datasetId ?? content.aggregationWeight.set,
|
|
300
|
+
column: content.aggregationWeight.columnId ?? content.aggregationWeight.column
|
|
301
|
+
} } : {}
|
|
302
|
+
}))
|
|
303
|
+
}));
|
|
304
|
+
}
|
|
305
|
+
|
|
289
306
|
// libs/embed-libs/embed/src/lib/shared/helpers/iframe-url.ts
|
|
290
307
|
var createIframeUrl = (dashboardContent) => {
|
|
291
308
|
const searchString = [];
|
|
@@ -1288,6 +1305,7 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1288
1305
|
slots: "slots",
|
|
1289
1306
|
inlineData: "inline-data",
|
|
1290
1307
|
options: "options",
|
|
1308
|
+
definition: "definition",
|
|
1291
1309
|
appServer: "app-server",
|
|
1292
1310
|
apiHost: "api-host",
|
|
1293
1311
|
authKey: "auth-key",
|
|
@@ -1297,7 +1315,6 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1297
1315
|
filters: "filters",
|
|
1298
1316
|
dashboardId: "dashboard-id",
|
|
1299
1317
|
screenMode: "screen-mode",
|
|
1300
|
-
querySource: "query-source",
|
|
1301
1318
|
itemId: "item-id",
|
|
1302
1319
|
aiMessageAssetId: "ai-message-asset-id",
|
|
1303
1320
|
dashboardContentsVersion: "dashboard-contents-version",
|
|
@@ -1307,6 +1324,7 @@ var libraryAcceptedParametersList = [
|
|
|
1307
1324
|
"appServer",
|
|
1308
1325
|
"apiHost",
|
|
1309
1326
|
"options",
|
|
1327
|
+
"definition",
|
|
1310
1328
|
"type",
|
|
1311
1329
|
"authKey",
|
|
1312
1330
|
"authToken",
|
|
@@ -1318,7 +1336,6 @@ var libraryAcceptedParametersList = [
|
|
|
1318
1336
|
"itemId",
|
|
1319
1337
|
"dashboardId",
|
|
1320
1338
|
"screenMode",
|
|
1321
|
-
"querySource",
|
|
1322
1339
|
"aiMessageAssetId",
|
|
1323
1340
|
"libVersion"
|
|
1324
1341
|
];
|
|
@@ -1354,6 +1371,7 @@ export {
|
|
|
1354
1371
|
libraryTypeToWebComponentTypeMapping,
|
|
1355
1372
|
loaderStyles,
|
|
1356
1373
|
luzmoEmbedContainerClass,
|
|
1374
|
+
normalizeVizItemSlots,
|
|
1357
1375
|
plStyles,
|
|
1358
1376
|
refreshData,
|
|
1359
1377
|
rejectPromise,
|
package/index.shared.cjs
CHANGED
|
@@ -49,6 +49,7 @@ __export(index_shared_exports, {
|
|
|
49
49
|
loadLibrary: () => loadLibrary,
|
|
50
50
|
loaderStyles: () => loaderStyles,
|
|
51
51
|
luzmoEmbedContainerClass: () => luzmoEmbedContainerClass,
|
|
52
|
+
normalizeVizItemSlots: () => normalizeVizItemSlots,
|
|
52
53
|
plStyles: () => plStyles,
|
|
53
54
|
preloadDashboard: () => preloadDashboard,
|
|
54
55
|
preloadIQ: () => preloadIQ,
|
|
@@ -359,6 +360,23 @@ var uuidv4 = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, fu
|
|
|
359
360
|
return v.toString(16);
|
|
360
361
|
});
|
|
361
362
|
|
|
363
|
+
// libs/embed-libs/embed/src/lib/shared/helpers/normalize-viz-item-slots.ts
|
|
364
|
+
function normalizeVizItemSlots(slots) {
|
|
365
|
+
return slots.map((slot) => ({
|
|
366
|
+
...slot,
|
|
367
|
+
content: slot.content.map((content) => ({
|
|
368
|
+
...content,
|
|
369
|
+
...content.columnId === void 0 ? {} : { column: content.columnId },
|
|
370
|
+
...content.datasetId === void 0 ? {} : { set: content.datasetId },
|
|
371
|
+
...content.aggregationWeight ? { aggregationWeight: {
|
|
372
|
+
...content.aggregationWeight,
|
|
373
|
+
set: content.aggregationWeight.datasetId ?? content.aggregationWeight.set,
|
|
374
|
+
column: content.aggregationWeight.columnId ?? content.aggregationWeight.column
|
|
375
|
+
} } : {}
|
|
376
|
+
}))
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
|
|
362
380
|
// libs/embed-libs/embed/src/lib/shared/helpers/iframe-url.ts
|
|
363
381
|
var createIframeUrl = (dashboardContent) => {
|
|
364
382
|
const searchString = [];
|
|
@@ -1361,6 +1379,7 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1361
1379
|
slots: "slots",
|
|
1362
1380
|
inlineData: "inline-data",
|
|
1363
1381
|
options: "options",
|
|
1382
|
+
definition: "definition",
|
|
1364
1383
|
appServer: "app-server",
|
|
1365
1384
|
apiHost: "api-host",
|
|
1366
1385
|
authKey: "auth-key",
|
|
@@ -1370,7 +1389,6 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1370
1389
|
filters: "filters",
|
|
1371
1390
|
dashboardId: "dashboard-id",
|
|
1372
1391
|
screenMode: "screen-mode",
|
|
1373
|
-
querySource: "query-source",
|
|
1374
1392
|
itemId: "item-id",
|
|
1375
1393
|
aiMessageAssetId: "ai-message-asset-id",
|
|
1376
1394
|
dashboardContentsVersion: "dashboard-contents-version",
|
|
@@ -1380,6 +1398,7 @@ var libraryAcceptedParametersList = [
|
|
|
1380
1398
|
"appServer",
|
|
1381
1399
|
"apiHost",
|
|
1382
1400
|
"options",
|
|
1401
|
+
"definition",
|
|
1383
1402
|
"type",
|
|
1384
1403
|
"authKey",
|
|
1385
1404
|
"authToken",
|
|
@@ -1391,7 +1410,6 @@ var libraryAcceptedParametersList = [
|
|
|
1391
1410
|
"itemId",
|
|
1392
1411
|
"dashboardId",
|
|
1393
1412
|
"screenMode",
|
|
1394
|
-
"querySource",
|
|
1395
1413
|
"aiMessageAssetId",
|
|
1396
1414
|
"libVersion"
|
|
1397
1415
|
];
|
|
@@ -1532,6 +1550,7 @@ function preloadIQ(appServer = "https://app.luzmo.com") {
|
|
|
1532
1550
|
loadLibrary,
|
|
1533
1551
|
loaderStyles,
|
|
1534
1552
|
luzmoEmbedContainerClass,
|
|
1553
|
+
normalizeVizItemSlots,
|
|
1535
1554
|
plStyles,
|
|
1536
1555
|
preloadDashboard,
|
|
1537
1556
|
preloadIQ,
|
package/index.shared.js
CHANGED
|
@@ -286,6 +286,23 @@ var uuidv4 = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, fu
|
|
|
286
286
|
return v.toString(16);
|
|
287
287
|
});
|
|
288
288
|
|
|
289
|
+
// libs/embed-libs/embed/src/lib/shared/helpers/normalize-viz-item-slots.ts
|
|
290
|
+
function normalizeVizItemSlots(slots) {
|
|
291
|
+
return slots.map((slot) => ({
|
|
292
|
+
...slot,
|
|
293
|
+
content: slot.content.map((content) => ({
|
|
294
|
+
...content,
|
|
295
|
+
...content.columnId === void 0 ? {} : { column: content.columnId },
|
|
296
|
+
...content.datasetId === void 0 ? {} : { set: content.datasetId },
|
|
297
|
+
...content.aggregationWeight ? { aggregationWeight: {
|
|
298
|
+
...content.aggregationWeight,
|
|
299
|
+
set: content.aggregationWeight.datasetId ?? content.aggregationWeight.set,
|
|
300
|
+
column: content.aggregationWeight.columnId ?? content.aggregationWeight.column
|
|
301
|
+
} } : {}
|
|
302
|
+
}))
|
|
303
|
+
}));
|
|
304
|
+
}
|
|
305
|
+
|
|
289
306
|
// libs/embed-libs/embed/src/lib/shared/helpers/iframe-url.ts
|
|
290
307
|
var createIframeUrl = (dashboardContent) => {
|
|
291
308
|
const searchString = [];
|
|
@@ -1288,6 +1305,7 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1288
1305
|
slots: "slots",
|
|
1289
1306
|
inlineData: "inline-data",
|
|
1290
1307
|
options: "options",
|
|
1308
|
+
definition: "definition",
|
|
1291
1309
|
appServer: "app-server",
|
|
1292
1310
|
apiHost: "api-host",
|
|
1293
1311
|
authKey: "auth-key",
|
|
@@ -1297,7 +1315,6 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1297
1315
|
filters: "filters",
|
|
1298
1316
|
dashboardId: "dashboard-id",
|
|
1299
1317
|
screenMode: "screen-mode",
|
|
1300
|
-
querySource: "query-source",
|
|
1301
1318
|
itemId: "item-id",
|
|
1302
1319
|
aiMessageAssetId: "ai-message-asset-id",
|
|
1303
1320
|
dashboardContentsVersion: "dashboard-contents-version",
|
|
@@ -1307,6 +1324,7 @@ var libraryAcceptedParametersList = [
|
|
|
1307
1324
|
"appServer",
|
|
1308
1325
|
"apiHost",
|
|
1309
1326
|
"options",
|
|
1327
|
+
"definition",
|
|
1310
1328
|
"type",
|
|
1311
1329
|
"authKey",
|
|
1312
1330
|
"authToken",
|
|
@@ -1318,7 +1336,6 @@ var libraryAcceptedParametersList = [
|
|
|
1318
1336
|
"itemId",
|
|
1319
1337
|
"dashboardId",
|
|
1320
1338
|
"screenMode",
|
|
1321
|
-
"querySource",
|
|
1322
1339
|
"aiMessageAssetId",
|
|
1323
1340
|
"libVersion"
|
|
1324
1341
|
];
|
|
@@ -1458,6 +1475,7 @@ export {
|
|
|
1458
1475
|
loadLibrary,
|
|
1459
1476
|
loaderStyles,
|
|
1460
1477
|
luzmoEmbedContainerClass,
|
|
1478
|
+
normalizeVizItemSlots,
|
|
1461
1479
|
plStyles,
|
|
1462
1480
|
preloadDashboard,
|
|
1463
1481
|
preloadIQ,
|