@luzmo/embed 6.2.1 → 6.2.3
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 +12 -0
- package/index.cjs +54 -22
- package/index.js +54 -22
- package/luzmo-embed.min.js +54 -22
- package/package.json +4 -2
- package/src/lib/luzmo-iq-components/luzmo-iq-chat.d.ts +1 -0
- package/src/lib/viz-item/viz-item.base.d.ts +1 -1
- package/index.d.ts +0 -8
- package/lib/dashboard-component/dashboard-base.d.ts +0 -98
- package/lib/dashboard-component/dashboard-component.d.ts +0 -8
- package/lib/dashboard-component/dashboard-styles.d.ts +0 -1
- package/lib/helper/event-bus-handler.d.ts +0 -1
- package/lib/helper/json-schema-utils.d.ts +0 -64
- package/lib/luzmo-iq-components/luzmo-iq-answer.d.ts +0 -22
- package/lib/luzmo-iq-components/luzmo-iq-chat.d.ts +0 -23
- package/lib/luzmo-service.d.ts +0 -6
- package/lib/viz-item/viz-item-component.d.ts +0 -4
- package/lib/viz-item/viz-item.base.d.ts +0 -71
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
All notable changes to this project will be documented in this file.
|
|
2
2
|
|
|
3
|
+
## [6.2.3] - 2024-12-10
|
|
4
|
+
|
|
5
|
+
### Updates
|
|
6
|
+
|
|
7
|
+
- Enable Luzmo IQ custom chat widget button content with WebComponents slot
|
|
8
|
+
|
|
9
|
+
## [6.2.2] - 2024-12-09
|
|
10
|
+
|
|
11
|
+
### Updates
|
|
12
|
+
|
|
13
|
+
- Minor bugfixes for EDE mode
|
|
14
|
+
|
|
3
15
|
## [6.2.1] - 2024-11-22
|
|
4
16
|
|
|
5
17
|
### Updates
|
package/index.cjs
CHANGED
|
@@ -62,7 +62,7 @@ var import_style_map = require("lit/directives/style-map.js");
|
|
|
62
62
|
var import_shared_embed = require("@luzmo/shared-embed");
|
|
63
63
|
|
|
64
64
|
// libs/embed-libs/embed/package.json
|
|
65
|
-
var version = "6.2.
|
|
65
|
+
var version = "6.2.3";
|
|
66
66
|
|
|
67
67
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
68
68
|
var LuzmoService = class {
|
|
@@ -107,7 +107,7 @@ var _setEventHandler = () => {
|
|
|
107
107
|
}
|
|
108
108
|
dashboardComponent.iframeLoaded = true;
|
|
109
109
|
dashboardComponent._displayError();
|
|
110
|
-
console.error("Dashboard error:
|
|
110
|
+
console.error("Dashboard error:", event.data.errorMsg ?? event.data.error?.msg);
|
|
111
111
|
break;
|
|
112
112
|
}
|
|
113
113
|
case "data": {
|
|
@@ -200,29 +200,42 @@ var _setEventHandler = () => {
|
|
|
200
200
|
}
|
|
201
201
|
break;
|
|
202
202
|
}
|
|
203
|
+
case "calculatedDimensions": {
|
|
204
|
+
dashboardComponent.dimensions = event.data.dimensions;
|
|
205
|
+
SharedLib._setCalculatedDimensions(dashboardComponent);
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
203
208
|
case "setSelectedData":
|
|
204
209
|
case "setFilters": {
|
|
205
|
-
event.data.error
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
if (event.data.error) {
|
|
211
|
+
SharedLib.rejectPromise(
|
|
212
|
+
dashboardComponent,
|
|
213
|
+
event.data.requestId,
|
|
214
|
+
event.data
|
|
215
|
+
);
|
|
216
|
+
} else {
|
|
217
|
+
SharedLib.resolvePromise(
|
|
218
|
+
dashboardComponent,
|
|
219
|
+
event.data.requestId,
|
|
220
|
+
event.data
|
|
221
|
+
);
|
|
222
|
+
}
|
|
214
223
|
break;
|
|
215
224
|
}
|
|
216
225
|
case "setPreview": {
|
|
217
|
-
event.data.error
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
if (event.data.error) {
|
|
227
|
+
SharedLib.rejectPromise(
|
|
228
|
+
dashboardComponent,
|
|
229
|
+
event.data.requestId,
|
|
230
|
+
event.data
|
|
231
|
+
);
|
|
232
|
+
} else {
|
|
233
|
+
SharedLib.resolvePromise(
|
|
234
|
+
dashboardComponent,
|
|
235
|
+
event.data.requestId,
|
|
236
|
+
event.data
|
|
237
|
+
);
|
|
238
|
+
}
|
|
226
239
|
break;
|
|
227
240
|
}
|
|
228
241
|
}
|
|
@@ -1071,7 +1084,7 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
1071
1084
|
var import_decorators2 = require("lit/decorators.js");
|
|
1072
1085
|
var import_lit3 = require("lit");
|
|
1073
1086
|
var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
1074
|
-
var dashboardContentsVersion = "0.1.
|
|
1087
|
+
var dashboardContentsVersion = "0.1.91";
|
|
1075
1088
|
var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
1076
1089
|
constructor() {
|
|
1077
1090
|
super(...arguments);
|
|
@@ -1351,7 +1364,26 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
|
1351
1364
|
}
|
|
1352
1365
|
}
|
|
1353
1366
|
render() {
|
|
1354
|
-
return import_lit4.html
|
|
1367
|
+
return import_lit4.html``;
|
|
1368
|
+
}
|
|
1369
|
+
connectedCallback() {
|
|
1370
|
+
super.connectedCallback();
|
|
1371
|
+
const embedChat = document.querySelector("luzmo-iq-embed-chat");
|
|
1372
|
+
if (!embedChat) {
|
|
1373
|
+
return;
|
|
1374
|
+
}
|
|
1375
|
+
const observer = new MutationObserver(() => {
|
|
1376
|
+
const customChatWidgetContentSlot = embedChat.querySelector('*[slot="custom-chat-widget-content"]');
|
|
1377
|
+
if (!customChatWidgetContentSlot) {
|
|
1378
|
+
return;
|
|
1379
|
+
}
|
|
1380
|
+
const chatElement = embedChat.querySelector("luzmo-iq-chat-component");
|
|
1381
|
+
if (chatElement) {
|
|
1382
|
+
chatElement.append(customChatWidgetContentSlot);
|
|
1383
|
+
observer.disconnect();
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
observer.observe(embedChat, { childList: true, subtree: true });
|
|
1355
1387
|
}
|
|
1356
1388
|
};
|
|
1357
1389
|
__decorateClass([
|
package/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "@luzmo/shared-embed";
|
|
33
33
|
|
|
34
34
|
// libs/embed-libs/embed/package.json
|
|
35
|
-
var version = "6.2.
|
|
35
|
+
var version = "6.2.3";
|
|
36
36
|
|
|
37
37
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
38
38
|
var LuzmoService = class {
|
|
@@ -77,7 +77,7 @@ var _setEventHandler = () => {
|
|
|
77
77
|
}
|
|
78
78
|
dashboardComponent.iframeLoaded = true;
|
|
79
79
|
dashboardComponent._displayError();
|
|
80
|
-
console.error("Dashboard error:
|
|
80
|
+
console.error("Dashboard error:", event.data.errorMsg ?? event.data.error?.msg);
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
83
|
case "data": {
|
|
@@ -170,29 +170,42 @@ var _setEventHandler = () => {
|
|
|
170
170
|
}
|
|
171
171
|
break;
|
|
172
172
|
}
|
|
173
|
+
case "calculatedDimensions": {
|
|
174
|
+
dashboardComponent.dimensions = event.data.dimensions;
|
|
175
|
+
SharedLib._setCalculatedDimensions(dashboardComponent);
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
173
178
|
case "setSelectedData":
|
|
174
179
|
case "setFilters": {
|
|
175
|
-
event.data.error
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
if (event.data.error) {
|
|
181
|
+
SharedLib.rejectPromise(
|
|
182
|
+
dashboardComponent,
|
|
183
|
+
event.data.requestId,
|
|
184
|
+
event.data
|
|
185
|
+
);
|
|
186
|
+
} else {
|
|
187
|
+
SharedLib.resolvePromise(
|
|
188
|
+
dashboardComponent,
|
|
189
|
+
event.data.requestId,
|
|
190
|
+
event.data
|
|
191
|
+
);
|
|
192
|
+
}
|
|
184
193
|
break;
|
|
185
194
|
}
|
|
186
195
|
case "setPreview": {
|
|
187
|
-
event.data.error
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
+
if (event.data.error) {
|
|
197
|
+
SharedLib.rejectPromise(
|
|
198
|
+
dashboardComponent,
|
|
199
|
+
event.data.requestId,
|
|
200
|
+
event.data
|
|
201
|
+
);
|
|
202
|
+
} else {
|
|
203
|
+
SharedLib.resolvePromise(
|
|
204
|
+
dashboardComponent,
|
|
205
|
+
event.data.requestId,
|
|
206
|
+
event.data
|
|
207
|
+
);
|
|
208
|
+
}
|
|
196
209
|
break;
|
|
197
210
|
}
|
|
198
211
|
}
|
|
@@ -1041,7 +1054,7 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
1041
1054
|
import { property as property2 } from "lit/decorators.js";
|
|
1042
1055
|
import { LitElement as LitElement2, html as html2, css as css2 } from "lit";
|
|
1043
1056
|
import * as SharedLib3 from "@luzmo/shared-embed";
|
|
1044
|
-
var dashboardContentsVersion = "0.1.
|
|
1057
|
+
var dashboardContentsVersion = "0.1.91";
|
|
1045
1058
|
var LuzmoBaseVizItem = class extends LitElement2 {
|
|
1046
1059
|
constructor() {
|
|
1047
1060
|
super(...arguments);
|
|
@@ -1321,7 +1334,26 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
1321
1334
|
}
|
|
1322
1335
|
}
|
|
1323
1336
|
render() {
|
|
1324
|
-
return html3
|
|
1337
|
+
return html3``;
|
|
1338
|
+
}
|
|
1339
|
+
connectedCallback() {
|
|
1340
|
+
super.connectedCallback();
|
|
1341
|
+
const embedChat = document.querySelector("luzmo-iq-embed-chat");
|
|
1342
|
+
if (!embedChat) {
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
const observer = new MutationObserver(() => {
|
|
1346
|
+
const customChatWidgetContentSlot = embedChat.querySelector('*[slot="custom-chat-widget-content"]');
|
|
1347
|
+
if (!customChatWidgetContentSlot) {
|
|
1348
|
+
return;
|
|
1349
|
+
}
|
|
1350
|
+
const chatElement = embedChat.querySelector("luzmo-iq-chat-component");
|
|
1351
|
+
if (chatElement) {
|
|
1352
|
+
chatElement.append(customChatWidgetContentSlot);
|
|
1353
|
+
observer.disconnect();
|
|
1354
|
+
}
|
|
1355
|
+
});
|
|
1356
|
+
observer.observe(embedChat, { childList: true, subtree: true });
|
|
1325
1357
|
}
|
|
1326
1358
|
};
|
|
1327
1359
|
__decorateClass([
|
package/luzmo-embed.min.js
CHANGED
|
@@ -2015,7 +2015,7 @@ var se = e5(class extends i3 {
|
|
|
2015
2015
|
});
|
|
2016
2016
|
|
|
2017
2017
|
// libs/embed-libs/embed/package.json
|
|
2018
|
-
var version = "6.2.
|
|
2018
|
+
var version = "6.2.3";
|
|
2019
2019
|
|
|
2020
2020
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
2021
2021
|
var LuzmoService = class {
|
|
@@ -2059,7 +2059,7 @@ var _setEventHandler = () => {
|
|
|
2059
2059
|
}
|
|
2060
2060
|
dashboardComponent.iframeLoaded = true;
|
|
2061
2061
|
dashboardComponent._displayError();
|
|
2062
|
-
console.error("Dashboard error:
|
|
2062
|
+
console.error("Dashboard error:", event.data.errorMsg ?? event.data.error?.msg);
|
|
2063
2063
|
break;
|
|
2064
2064
|
}
|
|
2065
2065
|
case "data": {
|
|
@@ -2152,29 +2152,42 @@ var _setEventHandler = () => {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
break;
|
|
2154
2154
|
}
|
|
2155
|
+
case "calculatedDimensions": {
|
|
2156
|
+
dashboardComponent.dimensions = event.data.dimensions;
|
|
2157
|
+
_setCalculatedDimensions(dashboardComponent);
|
|
2158
|
+
break;
|
|
2159
|
+
}
|
|
2155
2160
|
case "setSelectedData":
|
|
2156
2161
|
case "setFilters": {
|
|
2157
|
-
event.data.error
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2162
|
+
if (event.data.error) {
|
|
2163
|
+
rejectPromise(
|
|
2164
|
+
dashboardComponent,
|
|
2165
|
+
event.data.requestId,
|
|
2166
|
+
event.data
|
|
2167
|
+
);
|
|
2168
|
+
} else {
|
|
2169
|
+
resolvePromise(
|
|
2170
|
+
dashboardComponent,
|
|
2171
|
+
event.data.requestId,
|
|
2172
|
+
event.data
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2166
2175
|
break;
|
|
2167
2176
|
}
|
|
2168
2177
|
case "setPreview": {
|
|
2169
|
-
event.data.error
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
+
if (event.data.error) {
|
|
2179
|
+
rejectPromise(
|
|
2180
|
+
dashboardComponent,
|
|
2181
|
+
event.data.requestId,
|
|
2182
|
+
event.data
|
|
2183
|
+
);
|
|
2184
|
+
} else {
|
|
2185
|
+
resolvePromise(
|
|
2186
|
+
dashboardComponent,
|
|
2187
|
+
event.data.requestId,
|
|
2188
|
+
event.data
|
|
2189
|
+
);
|
|
2190
|
+
}
|
|
2178
2191
|
break;
|
|
2179
2192
|
}
|
|
2180
2193
|
}
|
|
@@ -3019,7 +3032,7 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
3019
3032
|
}
|
|
3020
3033
|
|
|
3021
3034
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
3022
|
-
var dashboardContentsVersion = "0.1.
|
|
3035
|
+
var dashboardContentsVersion = "0.1.91";
|
|
3023
3036
|
var LuzmoBaseVizItem = class extends h3 {
|
|
3024
3037
|
constructor() {
|
|
3025
3038
|
super(...arguments);
|
|
@@ -3296,7 +3309,26 @@ var LuzmoIQEmbedChatComponent = class extends h3 {
|
|
|
3296
3309
|
}
|
|
3297
3310
|
}
|
|
3298
3311
|
render() {
|
|
3299
|
-
return ke
|
|
3312
|
+
return ke``;
|
|
3313
|
+
}
|
|
3314
|
+
connectedCallback() {
|
|
3315
|
+
super.connectedCallback();
|
|
3316
|
+
const embedChat = document.querySelector("luzmo-iq-embed-chat");
|
|
3317
|
+
if (!embedChat) {
|
|
3318
|
+
return;
|
|
3319
|
+
}
|
|
3320
|
+
const observer = new MutationObserver(() => {
|
|
3321
|
+
const customChatWidgetContentSlot = embedChat.querySelector('*[slot="custom-chat-widget-content"]');
|
|
3322
|
+
if (!customChatWidgetContentSlot) {
|
|
3323
|
+
return;
|
|
3324
|
+
}
|
|
3325
|
+
const chatElement = embedChat.querySelector("luzmo-iq-chat-component");
|
|
3326
|
+
if (chatElement) {
|
|
3327
|
+
chatElement.append(customChatWidgetContentSlot);
|
|
3328
|
+
observer.disconnect();
|
|
3329
|
+
}
|
|
3330
|
+
});
|
|
3331
|
+
observer.observe(embedChat, { childList: true, subtree: true });
|
|
3300
3332
|
}
|
|
3301
3333
|
};
|
|
3302
3334
|
__decorateClass([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/embed",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "3.1.2",
|
|
6
6
|
"@luzmo/shared-embed": "5.2.1",
|
|
@@ -20,5 +20,7 @@
|
|
|
20
20
|
"chart",
|
|
21
21
|
"cumul.io",
|
|
22
22
|
"component"
|
|
23
|
-
]
|
|
23
|
+
],
|
|
24
|
+
"module": "./index.js",
|
|
25
|
+
"types": "./src/index.d.ts"
|
|
24
26
|
}
|
|
@@ -9,7 +9,7 @@ import { VizItemType, FilterGroup, VizItemOptions, VizItemSlots } from '@luzmo/d
|
|
|
9
9
|
* together with this dashboard contents version are passed to the dashboard app (https://app.luzmo.com/dashboard-app/remoteEntry.mjs)
|
|
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.91";
|
|
13
13
|
type FunctionCall = [(...args: any) => any, any[]];
|
|
14
14
|
interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
15
15
|
options?: VizItemOptions;
|
package/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type * from '@luzmo/dashboard-contents-types';
|
|
2
|
-
export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, SelectedDataInput, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, SetSelectedData, VizItemPostMessageLoadEvent, VizItemPostMessageRenderedEvent, VizItemPostMessageExportedEvent, VizItemPostMessageChangedFiltersEvent, VizItemPostMessageCustomEventEvent } from '@luzmo/shared-embed';
|
|
3
|
-
export { selectedDataUtils } from '@luzmo/shared-embed';
|
|
4
|
-
export * from './lib/dashboard-component/dashboard-component';
|
|
5
|
-
export * from './lib/viz-item/viz-item-component';
|
|
6
|
-
export * from './lib/luzmo-iq-components/luzmo-iq-chat';
|
|
7
|
-
export * from './lib/luzmo-iq-components/luzmo-iq-answer';
|
|
8
|
-
export * from './lib/helper/json-schema-utils';
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import * as SharedLib from '@luzmo/shared-embed';
|
|
2
|
-
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
3
|
-
import { LuzmoElement, CombinedSelectedDataInput } from '@luzmo/shared-embed';
|
|
4
|
-
import type { FilterGroup } from '@luzmo/dashboard-contents-types';
|
|
5
|
-
/**
|
|
6
|
-
* Luzmo Dashboard
|
|
7
|
-
* Base component isn't registered in customEvents registry so that it can be reused.
|
|
8
|
-
*/
|
|
9
|
-
export declare class LuzmoDashboard extends LitElement implements SharedLib.ES6LuzmoDashboard {
|
|
10
|
-
container: HTMLElement;
|
|
11
|
-
luzmoEmbedContainer: HTMLElement;
|
|
12
|
-
iframe: HTMLIFrameElement;
|
|
13
|
-
dashboardId?: SharedLib.DashboardInputs['dashboardId'];
|
|
14
|
-
dashboardSlug?: SharedLib.DashboardInputs['dashboardSlug'];
|
|
15
|
-
itemId?: SharedLib.DashboardInputs['itemId'];
|
|
16
|
-
language: SharedLib.DashboardInputs['language'];
|
|
17
|
-
qeVersion: SharedLib.DashboardInputs['qeVersion'];
|
|
18
|
-
screenMode: SharedLib.DashboardInputs['screenMode'];
|
|
19
|
-
switchScreenModeOnResize: boolean;
|
|
20
|
-
editMode: SharedLib.DashboardInputs['editMode'];
|
|
21
|
-
mainColor?: SharedLib.DashboardInputs['mainColor'];
|
|
22
|
-
accentColor?: SharedLib.DashboardInputs['accentColor'];
|
|
23
|
-
authToken?: SharedLib.DashboardInputs['authToken'];
|
|
24
|
-
authKey?: SharedLib.DashboardInputs['authKey'];
|
|
25
|
-
loaderBackground?: SharedLib.DashboardInputs['loaderBackground'];
|
|
26
|
-
loaderFontColor?: SharedLib.DashboardInputs['loaderFontColor'];
|
|
27
|
-
loaderSpinnerColor?: SharedLib.DashboardInputs['loaderSpinnerColor'];
|
|
28
|
-
loaderSpinnerBackground?: SharedLib.DashboardInputs['loaderSpinnerBackground'];
|
|
29
|
-
appServer?: SharedLib.DashboardInputs['appServer'];
|
|
30
|
-
timezoneId?: SharedLib.DashboardInputs['timezoneId'];
|
|
31
|
-
apiHost?: SharedLib.DashboardInputs['apiHost'];
|
|
32
|
-
itemDimensions: SharedLib.DashboardInputs['itemDimensions'];
|
|
33
|
-
experimental: boolean;
|
|
34
|
-
_containerId: string;
|
|
35
|
-
_iframeId: string;
|
|
36
|
-
params: SharedLib.DashboardContentParams;
|
|
37
|
-
_iframeUrl?: string;
|
|
38
|
-
iframeLoaded: boolean;
|
|
39
|
-
promises: SharedLib.DashboardPromises;
|
|
40
|
-
iframeStyle: SharedLib.IframeStyles;
|
|
41
|
-
_containerStyle: SharedLib.ContainerStyles;
|
|
42
|
-
_loaderStyle: SharedLib.LoaderStyles;
|
|
43
|
-
_lcStyle: SharedLib.LcStyles;
|
|
44
|
-
_loadingCircleStyle: SharedLib.PlStyles;
|
|
45
|
-
_containerLoaderStyle: SharedLib.ContainerLoaderStyles;
|
|
46
|
-
_loaderMsg: string;
|
|
47
|
-
containerWidth?: number;
|
|
48
|
-
dimensions?: SharedLib.DashboardDimensions;
|
|
49
|
-
currentScreenMode?: SharedLib.ScreenMode;
|
|
50
|
-
_itemEmbedding: boolean;
|
|
51
|
-
browserError: boolean;
|
|
52
|
-
browserErrorMsg: string;
|
|
53
|
-
dashboardError: boolean;
|
|
54
|
-
browserNotSupported: any[];
|
|
55
|
-
libVersion: string;
|
|
56
|
-
protected isLibraryLoaded: boolean;
|
|
57
|
-
protected dashboardReference: LuzmoElement;
|
|
58
|
-
currentAuthKey: string;
|
|
59
|
-
currentAuthToken: string;
|
|
60
|
-
isInitCalled: boolean;
|
|
61
|
-
private attributesMap;
|
|
62
|
-
_loadTimeoutHandle?: number;
|
|
63
|
-
_onResize: () => void;
|
|
64
|
-
loaderSize: number;
|
|
65
|
-
borderWidth: number;
|
|
66
|
-
minHeight: number;
|
|
67
|
-
iframeHeight?: string;
|
|
68
|
-
iframeWidth?: string;
|
|
69
|
-
_resizeObserver: ResizeObserver;
|
|
70
|
-
constructor();
|
|
71
|
-
connectedCallback(): void;
|
|
72
|
-
disconnectedCallback(): void;
|
|
73
|
-
firstUpdated(): void;
|
|
74
|
-
initComponent(): void;
|
|
75
|
-
setAllAttributes(): void;
|
|
76
|
-
updated(changedProperties: PropertyValues): void;
|
|
77
|
-
_setOptions(): SharedLib.DashboardContentParams;
|
|
78
|
-
_updateIframeUrl(): void;
|
|
79
|
-
_setupLoader(): void;
|
|
80
|
-
_displayError(): void;
|
|
81
|
-
_calculateDimAfterDashboardLoaded(): void;
|
|
82
|
-
_loaderStyles(): void;
|
|
83
|
-
static get styles(): import("lit").CSSResult[];
|
|
84
|
-
render(): TemplateResult;
|
|
85
|
-
getDashboards(): Promise<LuzmoDashboard[]>;
|
|
86
|
-
getData(itemId: string): Promise<SharedLib.ItemData>;
|
|
87
|
-
getFilters(): Promise<FilterGroup[]>;
|
|
88
|
-
setSelectedData<K extends CombinedSelectedDataInput>(itemId: string, filters: K): Promise<SharedLib.SetSelectedData>;
|
|
89
|
-
setAuthorization(key: string, token: string): Promise<void>;
|
|
90
|
-
refreshData(itemId?: string): Promise<void>;
|
|
91
|
-
reloadDashboard(): Promise<void>;
|
|
92
|
-
exportDashboard(format?: SharedLib.ExportType): Promise<SharedLib.ExportDashboard>;
|
|
93
|
-
getAccessibleDashboards(): Promise<SharedLib.AccessibleDashboard[]>;
|
|
94
|
-
addFilters(itemId: string, filters: FilterGroup[]): Promise<SharedLib.AddFilters>;
|
|
95
|
-
setEditMode(editMode?: SharedLib.DashboardEditMode): Promise<SharedLib.SetEditMode>;
|
|
96
|
-
setPreview(preview: boolean): Promise<SharedLib.SetPreview>;
|
|
97
|
-
getIsViewMode(): boolean;
|
|
98
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dashboardStyles: import("lit").CSSResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const _setEventHandler: () => void;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds JSON schemas to cache.
|
|
3
|
-
*/
|
|
4
|
-
export declare function addJSONSchemas(schemas: any): void;
|
|
5
|
-
/**
|
|
6
|
-
* Returns a cached JSON schema by URL/schema $id.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getCachedJSONSchema(schemaUrl: string): any;
|
|
9
|
-
/**
|
|
10
|
-
* Returns all the cached JSON schemas.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getCachedJSONSchemas(): Record<string, any>;
|
|
13
|
-
/**
|
|
14
|
-
* Returns a URL for a Luzmo JSON schema name.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getJSONSchemaUrl(schemaName: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Fetches a Luzmo JSON schema. If a schema is cached it's returned.
|
|
19
|
-
*
|
|
20
|
-
* Example usage:
|
|
21
|
-
* const schema = await fetchJSONSchema('viz-item-type');
|
|
22
|
-
*
|
|
23
|
-
* In the example above, a schema https://developer.luzmo.com/assets/json-schemas/{version}/viz-item-type.schema.json
|
|
24
|
-
* will be fetched and cached.
|
|
25
|
-
*/
|
|
26
|
-
export declare function fetchJSONSchema(schemaName: string): Promise<any>;
|
|
27
|
-
/**
|
|
28
|
-
* If you need to dereference Luzmo JSON schemas in your application, you can use @apidevtools/json-schema-ref-parser
|
|
29
|
-
* library and provide the following options for the refParser.dereference() method.
|
|
30
|
-
*
|
|
31
|
-
* Example usage:
|
|
32
|
-
*
|
|
33
|
-
* import * as refParser from '@apidevtools/json-schema-ref-parser';
|
|
34
|
-
* import { fetchJSONSchema, luzmoRefParserOptions } from '@luzmo/embed';
|
|
35
|
-
*
|
|
36
|
-
* async function showDereferencedSchema() {
|
|
37
|
-
* const schema = await fetchJSONSchema('text');
|
|
38
|
-
* const dereferencedSchema = await refParser.dereference(schema, luzmoRefParserOptions);
|
|
39
|
-
* console.log(dereferencedSchema);
|
|
40
|
-
* }
|
|
41
|
-
*
|
|
42
|
-
* Another example:
|
|
43
|
-
*
|
|
44
|
-
* import * as refParser from '@apidevtools/json-schema-ref-parser';
|
|
45
|
-
* import { addJSONSchemas, luzmoRefParserOptions } from '@luzmo/embed';
|
|
46
|
-
* import { TextJSONSchema, TextOptionsJSONSchema } from "@luzmo/dashboard-contents-types";
|
|
47
|
-
*
|
|
48
|
-
* async function showDereferencedSchema() {
|
|
49
|
-
* addJSONSchemas([TextJSONSchema, TextOptionsJSONSchema]);
|
|
50
|
-
* const dereferencedSchema = await refParser.dereference(TextJSONSchema, luzmoRefParserOptions);
|
|
51
|
-
* console.log(dereferencedSchema);
|
|
52
|
-
* }
|
|
53
|
-
*/
|
|
54
|
-
export declare const luzmoRefParserOptions: {
|
|
55
|
-
mutateInputSchema: boolean;
|
|
56
|
-
resolve: {
|
|
57
|
-
luzmo: {
|
|
58
|
-
order: number;
|
|
59
|
-
canRead: (file: any) => boolean;
|
|
60
|
-
read: (file: any, callback: any) => void;
|
|
61
|
-
};
|
|
62
|
-
external: boolean;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IQAnswerOptions, IQMessage } from '@luzmo/dashboard-contents-types';
|
|
2
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
3
|
-
export declare class LuzmoIQEmbedAnswerComponent extends LitElement {
|
|
4
|
-
appServer?: string;
|
|
5
|
-
apiHost?: string;
|
|
6
|
-
options?: IQAnswerOptions;
|
|
7
|
-
aiEndPoint?: string;
|
|
8
|
-
authKey?: string;
|
|
9
|
-
authToken?: string;
|
|
10
|
-
messages: IQMessage[];
|
|
11
|
-
version?: string;
|
|
12
|
-
libVersion?: string;
|
|
13
|
-
remoteEntryServer: string;
|
|
14
|
-
chartElement: HTMLElement;
|
|
15
|
-
static styles: import("lit").CSSResult;
|
|
16
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
17
|
-
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
18
|
-
private createAndAppendElement;
|
|
19
|
-
private updateVizItemProperties;
|
|
20
|
-
updated(changedProperties: PropertyValues): Promise<void>;
|
|
21
|
-
protected render(): unknown;
|
|
22
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IQChatOptions } from '@luzmo/dashboard-contents-types';
|
|
2
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
3
|
-
export declare class LuzmoIQEmbedChatComponent extends LitElement {
|
|
4
|
-
appServer?: string;
|
|
5
|
-
apiHost?: string;
|
|
6
|
-
options?: IQChatOptions;
|
|
7
|
-
initialSuggestionsDatasetId?: string;
|
|
8
|
-
aiEndpoint?: string;
|
|
9
|
-
authKey?: string;
|
|
10
|
-
authToken?: string;
|
|
11
|
-
version?: string;
|
|
12
|
-
libVersion?: string;
|
|
13
|
-
remoteEntryServer: string;
|
|
14
|
-
aydHost: string;
|
|
15
|
-
chartElement: HTMLElement;
|
|
16
|
-
static styles: import("lit").CSSResult;
|
|
17
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
18
|
-
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
19
|
-
private createAndAppendElement;
|
|
20
|
-
private updateVizItemProperties;
|
|
21
|
-
updated(changedProperties: PropertyValues): Promise<void>;
|
|
22
|
-
protected render(): unknown;
|
|
23
|
-
}
|
package/lib/luzmo-service.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
-
import { VizItemType, FilterGroup, VizItemOptions, VizItemSlots } from '@luzmo/dashboard-contents-types';
|
|
4
|
-
/**
|
|
5
|
-
* The version of the dashboard contents that is linked to the current library.
|
|
6
|
-
*
|
|
7
|
-
* If custom options/slots/etc. are passed to the component, the library assumes that
|
|
8
|
-
* they are using this dashboard contents version. Then custom options/slots/etc.
|
|
9
|
-
* together with this dashboard contents version are passed to the dashboard app (https://app.luzmo.com/dashboard-app/remoteEntry.mjs)
|
|
10
|
-
* and if needed the migration will be applied on the dashboard app level.
|
|
11
|
-
*/
|
|
12
|
-
export declare const dashboardContentsVersion = "0.1.90";
|
|
13
|
-
type FunctionCall = [(...args: any) => any, any[]];
|
|
14
|
-
interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
15
|
-
options?: VizItemOptions;
|
|
16
|
-
type?: VizItemType;
|
|
17
|
-
appServer?: string;
|
|
18
|
-
apiHost?: string;
|
|
19
|
-
slots?: VizItemSlots;
|
|
20
|
-
canFilter?: string[] | 'all';
|
|
21
|
-
filters?: FilterGroup[];
|
|
22
|
-
contextId?: string;
|
|
23
|
-
authKey?: string;
|
|
24
|
-
authToken?: string;
|
|
25
|
-
dashboardId?: string;
|
|
26
|
-
itemId?: string;
|
|
27
|
-
getFilters: () => FilterGroup[];
|
|
28
|
-
export: () => void;
|
|
29
|
-
refreshData: () => void;
|
|
30
|
-
getData: () => SharedLib.ItemData;
|
|
31
|
-
setSelectedData: (selectedDataInput: SharedLib.SelectedDataInput) => SharedLib.SetSelectedData;
|
|
32
|
-
setAuthorization: (key: string, token: string) => void;
|
|
33
|
-
}
|
|
34
|
-
export type { LuzmoVizItemComponentInterface };
|
|
35
|
-
export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItemComponentInterface {
|
|
36
|
-
appServer?: string;
|
|
37
|
-
apiHost?: string;
|
|
38
|
-
slots?: VizItemSlots;
|
|
39
|
-
options?: VizItemOptions;
|
|
40
|
-
type?: VizItemType;
|
|
41
|
-
authKey?: string;
|
|
42
|
-
authToken?: string;
|
|
43
|
-
version?: string;
|
|
44
|
-
contextId?: string;
|
|
45
|
-
canFilter?: SharedLib.CanFilter;
|
|
46
|
-
filters?: FilterGroup[];
|
|
47
|
-
dashboardId?: string;
|
|
48
|
-
itemId?: string;
|
|
49
|
-
selectedData: SharedLib.SelectedDataInput;
|
|
50
|
-
dashboardContentsVersion?: string;
|
|
51
|
-
libVersion?: string;
|
|
52
|
-
chartElement: HTMLElement & Partial<LuzmoVizItemComponentInterface> & {
|
|
53
|
-
setSelectedData?: (itemId?: string, filters?: SharedLib.SelectedDataInput) => SharedLib.SetSelectedData;
|
|
54
|
-
};
|
|
55
|
-
postInitCallQueue: FunctionCall[];
|
|
56
|
-
static styles: import("lit").CSSResult;
|
|
57
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
58
|
-
canInitializeVizItem(): boolean;
|
|
59
|
-
getFilters(): FilterGroup[];
|
|
60
|
-
export(): void;
|
|
61
|
-
getData(): any;
|
|
62
|
-
refreshData(): void;
|
|
63
|
-
setSelectedData(selectedDataInput: SharedLib.SelectedDataInput): SharedLib.SetSelectedData;
|
|
64
|
-
setAuthorization(key: string, token: string): void;
|
|
65
|
-
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
66
|
-
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
67
|
-
private createAndAppendElement;
|
|
68
|
-
private updateVizItemProperties;
|
|
69
|
-
updated(changedProperties: PropertyValues): Promise<void>;
|
|
70
|
-
protected render(): unknown;
|
|
71
|
-
}
|