@luzmo/embed 6.13.5 → 7.0.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 +14 -0
- package/README.md +54 -15
- package/index.cjs +109 -55
- package/index.js +109 -55
- package/luzmo-embed.min.js +325 -133
- package/package.json +9 -3
- package/src/lib/dashboard/dashboard-base.d.ts +1 -2
- package/src/lib/iq-components/luzmo-iq-chat.d.ts +10 -11
- package/src/lib/viz-item/viz-item.base.d.ts +7 -0
package/luzmo-embed.min.js
CHANGED
|
@@ -109,21 +109,19 @@ var DEFAULT_PARAMETERS = {
|
|
|
109
109
|
token: null,
|
|
110
110
|
language: "auto",
|
|
111
111
|
editorLanguage: "auto",
|
|
112
|
-
qeVersion: null,
|
|
113
112
|
editMode: null,
|
|
114
113
|
screenMode: null,
|
|
115
114
|
switchScreenModeOnResize: true,
|
|
116
115
|
itemId: null,
|
|
117
116
|
theme: "",
|
|
118
117
|
mainColor: "",
|
|
119
|
-
accentColor: "",
|
|
120
118
|
itemDimensions: {
|
|
121
119
|
width: "auto",
|
|
122
120
|
height: "auto"
|
|
123
121
|
},
|
|
124
122
|
loaderBackground: "#f9f9f9",
|
|
125
123
|
loaderFontColor: "#5a5a5a",
|
|
126
|
-
loaderSpinnerColor: "
|
|
124
|
+
loaderSpinnerColor: "rgb(68, 52, 255)",
|
|
127
125
|
loaderSpinnerBackground: "rgba(169, 169, 169, 0.14)",
|
|
128
126
|
timezoneId: null,
|
|
129
127
|
contextId: null
|
|
@@ -341,7 +339,6 @@ var createIframeUrl = (dashboardContent) => {
|
|
|
341
339
|
appServer,
|
|
342
340
|
language,
|
|
343
341
|
editorLanguage,
|
|
344
|
-
qeVersion,
|
|
345
342
|
loaderBackground,
|
|
346
343
|
loaderSpinnerColor,
|
|
347
344
|
loaderSpinnerBackground,
|
|
@@ -357,7 +354,6 @@ var createIframeUrl = (dashboardContent) => {
|
|
|
357
354
|
itemId,
|
|
358
355
|
theme,
|
|
359
356
|
mainColor,
|
|
360
|
-
accentColor,
|
|
361
357
|
editMode
|
|
362
358
|
} = dashboardContent.params;
|
|
363
359
|
if (language && language !== "auto") {
|
|
@@ -366,9 +362,6 @@ var createIframeUrl = (dashboardContent) => {
|
|
|
366
362
|
if (editorLanguage && editorLanguage !== "auto") {
|
|
367
363
|
searchString.push(`editorLanguage=${editorLanguage}`);
|
|
368
364
|
}
|
|
369
|
-
if (qeVersion) {
|
|
370
|
-
searchString.push(`qe_version=${qeVersion}`);
|
|
371
|
-
}
|
|
372
365
|
if (loaderBackground) {
|
|
373
366
|
searchString.push(`ldrbg=${loaderBackground}`);
|
|
374
367
|
}
|
|
@@ -387,9 +380,6 @@ var createIframeUrl = (dashboardContent) => {
|
|
|
387
380
|
if (mainColor) {
|
|
388
381
|
searchString.push(`mainColor=${mainColor}`);
|
|
389
382
|
}
|
|
390
|
-
if (accentColor) {
|
|
391
|
-
searchString.push(`accentColor=${accentColor}`);
|
|
392
|
-
}
|
|
393
383
|
if (screenMode && screenMode !== "auto") {
|
|
394
384
|
searchString.push(`screenMode=${screenMode}`);
|
|
395
385
|
}
|
|
@@ -754,6 +744,30 @@ var getAccessibleDashboards = async (dashboardComponent) => {
|
|
|
754
744
|
throw new Error("No authKey or authToken found in the luzmo-dashboard component.");
|
|
755
745
|
};
|
|
756
746
|
|
|
747
|
+
// libs/embed-libs/shared-embed/src/lib/methods/get-dashboard-context.ts
|
|
748
|
+
var getDashboardContext = (dashboardComponent, iframe) => {
|
|
749
|
+
if (iframe?.contentWindow) {
|
|
750
|
+
const requestId = uuidv4();
|
|
751
|
+
iframe.contentWindow.postMessage(
|
|
752
|
+
{ action: "getDashboardContext", _version: dashboardComponent.libVersion, requestId },
|
|
753
|
+
"*"
|
|
754
|
+
);
|
|
755
|
+
return new Promise((resolve, reject) => {
|
|
756
|
+
dashboardComponent.promises[requestId] = { resolve, reject };
|
|
757
|
+
setTimeout(() => {
|
|
758
|
+
if (dashboardComponent.promises[requestId]) {
|
|
759
|
+
const errorMessage = "getDashboardContext request timed out.";
|
|
760
|
+
dashboardComponent.promises[requestId].reject(
|
|
761
|
+
new Error(errorMessage)
|
|
762
|
+
);
|
|
763
|
+
delete dashboardComponent.promises[requestId];
|
|
764
|
+
}
|
|
765
|
+
}, 2e3);
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
return Promise.reject(new Error("Cannot retrieve contentWindow."));
|
|
769
|
+
};
|
|
770
|
+
|
|
757
771
|
// libs/embed-libs/shared-embed/src/lib/methods/get-data.ts
|
|
758
772
|
var getData = (dashboardComponent, iframe, itemId) => {
|
|
759
773
|
if (iframe?.contentWindow) {
|
|
@@ -1773,16 +1787,12 @@ function importNodeModule(name) {
|
|
|
1773
1787
|
sdkImportCache.set(name, promise);
|
|
1774
1788
|
return promise;
|
|
1775
1789
|
}
|
|
1776
|
-
var loadNodeFetch = async () => {
|
|
1777
|
-
const fetchModule = await importNodeModule("node-fetch");
|
|
1778
|
-
return fetchModule.default || fetchModule;
|
|
1779
|
-
};
|
|
1780
1790
|
var lazyLoaderHookFetch = async (input, init, loaderHook) => {
|
|
1781
1791
|
const hook = (url, init2) => {
|
|
1782
1792
|
return loaderHook.lifecycle.fetch.emit(url, init2);
|
|
1783
1793
|
};
|
|
1784
1794
|
const res = await hook(input, init || {});
|
|
1785
|
-
if (!res || !(res instanceof Response)) return
|
|
1795
|
+
if (!res || !(res instanceof Response)) return fetch(input, init || {});
|
|
1786
1796
|
return res;
|
|
1787
1797
|
};
|
|
1788
1798
|
var createScriptNode = typeof ENV_TARGET === "undefined" || ENV_TARGET !== "web" ? (url, cb, attrs, loaderHook) => {
|
|
@@ -1800,7 +1810,7 @@ var createScriptNode = typeof ENV_TARGET === "undefined" || ENV_TARGET !== "web"
|
|
|
1800
1810
|
}
|
|
1801
1811
|
const getFetch = async () => {
|
|
1802
1812
|
if (loaderHook?.fetch) return (input, init) => lazyLoaderHookFetch(input, init, loaderHook);
|
|
1803
|
-
return
|
|
1813
|
+
return fetch;
|
|
1804
1814
|
};
|
|
1805
1815
|
const handleScriptFetch = async (f3, urlObj2) => {
|
|
1806
1816
|
try {
|
|
@@ -1862,20 +1872,82 @@ var loadScriptNode = typeof ENV_TARGET === "undefined" || ENV_TARGET !== "web" ?
|
|
|
1862
1872
|
throw new Error("loadScriptNode is disabled in non-Node.js environment");
|
|
1863
1873
|
};
|
|
1864
1874
|
var esmModuleCache = /* @__PURE__ */ new Map();
|
|
1875
|
+
var isFetchableRemoteModuleUrl = (url) => url.startsWith("http:") || url.startsWith("https:");
|
|
1876
|
+
var isBareModuleSpecifier = (specifier) => !specifier.startsWith("./") && !specifier.startsWith("../") && !specifier.startsWith("/") && !specifier.includes(":");
|
|
1877
|
+
function encodeRemoteModulePath(url) {
|
|
1878
|
+
const remoteUrl = new URL(url);
|
|
1879
|
+
const encodedProtocol = encodeURIComponent(remoteUrl.protocol.slice(0, -1));
|
|
1880
|
+
const encodedHost = encodeURIComponent(remoteUrl.host);
|
|
1881
|
+
const encodedPathname = remoteUrl.pathname.split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
1882
|
+
const encodedSearchHash = encodeURIComponent(`${remoteUrl.search}${remoteUrl.hash}`);
|
|
1883
|
+
return `/${encodedProtocol}/${encodedHost}${encodedPathname}${encodedSearchHash ? `/${encodedSearchHash}` : ""}`;
|
|
1884
|
+
}
|
|
1885
|
+
function createImportMetaUrl(url, baseFileUrl) {
|
|
1886
|
+
const baseUrl = baseFileUrl.endsWith("/") ? baseFileUrl : `${baseFileUrl}/`;
|
|
1887
|
+
return new URL(`__module_federation_remote__${encodeRemoteModulePath(url)}`, baseUrl).href;
|
|
1888
|
+
}
|
|
1889
|
+
async function isNodeBuiltinSpecifier(specifier) {
|
|
1890
|
+
if (specifier.startsWith("node:")) return true;
|
|
1891
|
+
if (!isBareModuleSpecifier(specifier)) return false;
|
|
1892
|
+
return (await importNodeModule("node:module")).builtinModules.includes(specifier);
|
|
1893
|
+
}
|
|
1894
|
+
function getSyntheticModuleExports(moduleExports) {
|
|
1895
|
+
const namespaceObject = moduleExports && (typeof moduleExports === "object" || typeof moduleExports === "function") ? moduleExports : { default: moduleExports };
|
|
1896
|
+
const effectiveExports = { ...namespaceObject };
|
|
1897
|
+
if (!Object.prototype.hasOwnProperty.call(effectiveExports, "default")) effectiveExports.default = namespaceObject;
|
|
1898
|
+
return effectiveExports;
|
|
1899
|
+
}
|
|
1900
|
+
async function createSyntheticModuleFromExports(identifier, moduleExports, vm) {
|
|
1901
|
+
if (typeof vm.SyntheticModule !== "function") throw new Error("vm.SyntheticModule is required to load Node.js built-in modules in ESM remote entries.");
|
|
1902
|
+
const effectiveExports = getSyntheticModuleExports(moduleExports);
|
|
1903
|
+
const exportNames = Object.keys(effectiveExports);
|
|
1904
|
+
const syntheticModule = new vm.SyntheticModule(exportNames, function setSyntheticModuleExports() {
|
|
1905
|
+
for (const name of exportNames) this.setExport(name, effectiveExports[name]);
|
|
1906
|
+
}, { identifier });
|
|
1907
|
+
esmModuleCache.set(identifier, syntheticModule);
|
|
1908
|
+
await syntheticModule.link(async () => {
|
|
1909
|
+
throw new Error(`Node.js built-in module "${identifier}" should not request child modules.`);
|
|
1910
|
+
});
|
|
1911
|
+
await syntheticModule.evaluate();
|
|
1912
|
+
return syntheticModule;
|
|
1913
|
+
}
|
|
1914
|
+
async function loadNodeBuiltinModule(specifier, vm) {
|
|
1915
|
+
const cacheKey = `node-builtin:${specifier}`;
|
|
1916
|
+
if (esmModuleCache.has(cacheKey)) return esmModuleCache.get(cacheKey);
|
|
1917
|
+
return createSyntheticModuleFromExports(cacheKey, await importNodeModule(specifier), vm);
|
|
1918
|
+
}
|
|
1919
|
+
async function loadResolvedModule(specifier, parentUrl, options) {
|
|
1920
|
+
if (await isNodeBuiltinSpecifier(specifier)) return loadNodeBuiltinModule(specifier, options.vm);
|
|
1921
|
+
if (isBareModuleSpecifier(specifier)) throw new Error(`Unsupported ESM module specifier "${specifier}". Only relative or absolute http(s) remote modules and Node.js built-in modules are supported.`);
|
|
1922
|
+
const resolvedUrl = new URL(specifier, parentUrl).href;
|
|
1923
|
+
if (!isFetchableRemoteModuleUrl(resolvedUrl)) throw new Error(`Unsupported ESM module specifier "${specifier}" resolved to "${resolvedUrl}". Only http(s) remote modules and Node.js built-in modules are supported.`);
|
|
1924
|
+
return loadModule(resolvedUrl, options);
|
|
1925
|
+
}
|
|
1926
|
+
async function evaluateDynamicModule(module2) {
|
|
1927
|
+
if (module2.status === "linked") await module2.evaluate();
|
|
1928
|
+
if (module2.status === "errored") throw module2.error;
|
|
1929
|
+
return module2;
|
|
1930
|
+
}
|
|
1865
1931
|
async function loadModule(url, options) {
|
|
1866
1932
|
if (esmModuleCache.has(url)) return esmModuleCache.get(url);
|
|
1867
1933
|
const { fetch: fetch2, vm } = options;
|
|
1934
|
+
if (!isFetchableRemoteModuleUrl(url)) throw new Error(`Unsupported ESM module URL "${url}". Only http(s) remote modules and Node.js built-in modules are supported.`);
|
|
1868
1935
|
const code = await (await fetch2(url)).text();
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1936
|
+
const cwdFileUrl = (await importNodeModule("node:url")).pathToFileURL(process.cwd()).href;
|
|
1937
|
+
const sourceTextModule = new vm.SourceTextModule(code, {
|
|
1938
|
+
identifier: url,
|
|
1939
|
+
initializeImportMeta: (meta) => {
|
|
1940
|
+
meta.url = createImportMetaUrl(url, cwdFileUrl);
|
|
1941
|
+
},
|
|
1942
|
+
importModuleDynamically: async (specifier) => {
|
|
1943
|
+
return evaluateDynamicModule(await loadResolvedModule(specifier, url, options));
|
|
1944
|
+
}
|
|
1877
1945
|
});
|
|
1878
|
-
|
|
1946
|
+
esmModuleCache.set(url, sourceTextModule);
|
|
1947
|
+
await sourceTextModule.link(async (specifier) => {
|
|
1948
|
+
return loadResolvedModule(specifier, url, options);
|
|
1949
|
+
});
|
|
1950
|
+
return sourceTextModule;
|
|
1879
1951
|
}
|
|
1880
1952
|
|
|
1881
1953
|
// node_modules/@module-federation/error-codes/dist/getShortErrorMsg.mjs
|
|
@@ -2027,7 +2099,7 @@ function getGlobalFederationConstructor() {
|
|
|
2027
2099
|
function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
|
|
2028
2100
|
if (isDebug) {
|
|
2029
2101
|
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
|
|
2030
|
-
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.
|
|
2102
|
+
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.8.0";
|
|
2031
2103
|
}
|
|
2032
2104
|
}
|
|
2033
2105
|
function getInfoWithoutType(target, key) {
|
|
@@ -3435,6 +3507,36 @@ var Module$1 = class {
|
|
|
3435
3507
|
}
|
|
3436
3508
|
};
|
|
3437
3509
|
|
|
3510
|
+
// node_modules/@module-federation/runtime-core/dist/utils/hooks/pluginSystem.js
|
|
3511
|
+
var PluginSystem = class {
|
|
3512
|
+
constructor(lifecycle) {
|
|
3513
|
+
this.registerPlugins = {};
|
|
3514
|
+
this.lifecycle = lifecycle;
|
|
3515
|
+
this.lifecycleKeys = Object.keys(lifecycle);
|
|
3516
|
+
}
|
|
3517
|
+
applyPlugin(plugin, instance) {
|
|
3518
|
+
assert2(isPlainObject(plugin), "Plugin configuration is invalid.");
|
|
3519
|
+
const pluginName = plugin.name;
|
|
3520
|
+
assert2(pluginName, "A name must be provided by the plugin.");
|
|
3521
|
+
if (!this.registerPlugins[pluginName]) {
|
|
3522
|
+
this.registerPlugins[pluginName] = plugin;
|
|
3523
|
+
plugin.apply?.(instance);
|
|
3524
|
+
Object.keys(this.lifecycle).forEach((key) => {
|
|
3525
|
+
const pluginLife = plugin[key];
|
|
3526
|
+
if (pluginLife) this.lifecycle[key].on(pluginLife);
|
|
3527
|
+
});
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
removePlugin(pluginName) {
|
|
3531
|
+
assert2(pluginName, "A name is required.");
|
|
3532
|
+
const plugin = this.registerPlugins[pluginName];
|
|
3533
|
+
assert2(plugin, `The plugin "${pluginName}" is not registered.`);
|
|
3534
|
+
Object.keys(plugin).forEach((key) => {
|
|
3535
|
+
if (key !== "name") this.lifecycle[key].remove(plugin[key]);
|
|
3536
|
+
});
|
|
3537
|
+
}
|
|
3538
|
+
};
|
|
3539
|
+
|
|
3438
3540
|
// node_modules/@module-federation/runtime-core/dist/utils/hooks/syncHook.js
|
|
3439
3541
|
var SyncHook = class {
|
|
3440
3542
|
constructor(type) {
|
|
@@ -3557,33 +3659,29 @@ var AsyncWaterfallHook = class extends SyncHook {
|
|
|
3557
3659
|
}
|
|
3558
3660
|
};
|
|
3559
3661
|
|
|
3560
|
-
// node_modules/@module-federation/runtime-core/dist/
|
|
3561
|
-
var
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
this.
|
|
3565
|
-
this.lifecycleKeys = Object.keys(lifecycle);
|
|
3662
|
+
// node_modules/@module-federation/runtime-core/dist/remote/disabled.js
|
|
3663
|
+
var REMOTE_DISABLED_MESSAGE = "Remote loading is disabled by experiments.optimization.disableRemote.";
|
|
3664
|
+
var DisabledRemoteHandler = class {
|
|
3665
|
+
constructor() {
|
|
3666
|
+
this.hooks = new PluginSystem({});
|
|
3566
3667
|
}
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
const pluginName = plugin.name;
|
|
3570
|
-
assert2(pluginName, "A name must be provided by the plugin.");
|
|
3571
|
-
if (!this.registerPlugins[pluginName]) {
|
|
3572
|
-
this.registerPlugins[pluginName] = plugin;
|
|
3573
|
-
plugin.apply?.(instance);
|
|
3574
|
-
Object.keys(this.lifecycle).forEach((key) => {
|
|
3575
|
-
const pluginLife = plugin[key];
|
|
3576
|
-
if (pluginLife) this.lifecycle[key].on(pluginLife);
|
|
3577
|
-
});
|
|
3578
|
-
}
|
|
3668
|
+
formatAndRegisterRemote() {
|
|
3669
|
+
return [];
|
|
3579
3670
|
}
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3671
|
+
loadRemote() {
|
|
3672
|
+
throw new Error(REMOTE_DISABLED_MESSAGE);
|
|
3673
|
+
}
|
|
3674
|
+
preloadRemote() {
|
|
3675
|
+
throw new Error(REMOTE_DISABLED_MESSAGE);
|
|
3676
|
+
}
|
|
3677
|
+
registerRemotes() {
|
|
3678
|
+
throw new Error(REMOTE_DISABLED_MESSAGE);
|
|
3679
|
+
}
|
|
3680
|
+
getRemoteModuleAndOptions() {
|
|
3681
|
+
throw new Error(REMOTE_DISABLED_MESSAGE);
|
|
3682
|
+
}
|
|
3683
|
+
initRawContainer() {
|
|
3684
|
+
throw new Error(REMOTE_DISABLED_MESSAGE);
|
|
3587
3685
|
}
|
|
3588
3686
|
};
|
|
3589
3687
|
|
|
@@ -4011,6 +4109,13 @@ var SnapshotHandler = class {
|
|
|
4011
4109
|
}
|
|
4012
4110
|
};
|
|
4013
4111
|
|
|
4112
|
+
// node_modules/@module-federation/runtime-core/dist/plugins/snapshot/disabled.js
|
|
4113
|
+
var DisabledSnapshotHandler = class {
|
|
4114
|
+
constructor() {
|
|
4115
|
+
this.hooks = new PluginSystem({});
|
|
4116
|
+
}
|
|
4117
|
+
};
|
|
4118
|
+
|
|
4014
4119
|
// node_modules/@module-federation/runtime-core/dist/shared/index.js
|
|
4015
4120
|
var SharedHandler = class {
|
|
4016
4121
|
constructor(host) {
|
|
@@ -4413,6 +4518,32 @@ var SharedHandler = class {
|
|
|
4413
4518
|
}
|
|
4414
4519
|
};
|
|
4415
4520
|
|
|
4521
|
+
// node_modules/@module-federation/runtime-core/dist/shared/disabled.js
|
|
4522
|
+
var DisabledSharedHandler = class {
|
|
4523
|
+
constructor() {
|
|
4524
|
+
this.shareScopeMap = {};
|
|
4525
|
+
this.hooks = new PluginSystem({ afterResolve: new AsyncWaterfallHook("afterResolve") });
|
|
4526
|
+
}
|
|
4527
|
+
registerShared() {
|
|
4528
|
+
return {
|
|
4529
|
+
newShareInfos: {},
|
|
4530
|
+
allShareInfos: {}
|
|
4531
|
+
};
|
|
4532
|
+
}
|
|
4533
|
+
loadShare() {
|
|
4534
|
+
throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.");
|
|
4535
|
+
}
|
|
4536
|
+
loadShareSync() {
|
|
4537
|
+
throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.");
|
|
4538
|
+
}
|
|
4539
|
+
initializeSharing() {
|
|
4540
|
+
return [];
|
|
4541
|
+
}
|
|
4542
|
+
initShareScopeMap(scopeName, shareScope) {
|
|
4543
|
+
this.shareScopeMap[scopeName] = shareScope;
|
|
4544
|
+
}
|
|
4545
|
+
};
|
|
4546
|
+
|
|
4416
4547
|
// node_modules/@module-federation/runtime-core/dist/remote/index.js
|
|
4417
4548
|
var RemoteHandler = class {
|
|
4418
4549
|
constructor(host) {
|
|
@@ -4645,6 +4776,19 @@ var RemoteHandler = class {
|
|
|
4645
4776
|
this.registerRemote(remote, host.options.remotes, { force: options?.force });
|
|
4646
4777
|
});
|
|
4647
4778
|
}
|
|
4779
|
+
initRawContainer(name, url, container) {
|
|
4780
|
+
const { host } = this;
|
|
4781
|
+
const module2 = new Module$1({
|
|
4782
|
+
host,
|
|
4783
|
+
remoteInfo: getRemoteInfo({
|
|
4784
|
+
name,
|
|
4785
|
+
entry: url
|
|
4786
|
+
})
|
|
4787
|
+
});
|
|
4788
|
+
module2.remoteEntryExports = container;
|
|
4789
|
+
host.moduleCache.set(name, module2);
|
|
4790
|
+
return module2;
|
|
4791
|
+
}
|
|
4648
4792
|
async getRemoteModuleAndOptions(options) {
|
|
4649
4793
|
const { host } = this;
|
|
4650
4794
|
const { id } = options;
|
|
@@ -4760,6 +4904,17 @@ var RemoteHandler = class {
|
|
|
4760
4904
|
const { name } = remote;
|
|
4761
4905
|
const remoteIndex = host.options.remotes.findIndex((item) => item.name === name);
|
|
4762
4906
|
if (remoteIndex !== -1) host.options.remotes.splice(remoteIndex, 1);
|
|
4907
|
+
const globalSnapshotKey = getInfoWithoutType(CurrentGlobal.__FEDERATION__.moduleInfo, getFMId(remote)).key;
|
|
4908
|
+
delete CurrentGlobal.__FEDERATION__.moduleInfo[globalSnapshotKey];
|
|
4909
|
+
if ("entry" in remote) {
|
|
4910
|
+
host.snapshotHandler.manifestCache.delete(remote.entry);
|
|
4911
|
+
delete Global.__FEDERATION__.__MANIFEST_LOADING__[remote.entry];
|
|
4912
|
+
}
|
|
4913
|
+
const { hostGlobalSnapshot } = getGlobalRemoteInfo(remote, host);
|
|
4914
|
+
if (hostGlobalSnapshot) {
|
|
4915
|
+
const remoteKey = hostGlobalSnapshot && "remotesInfo" in hostGlobalSnapshot && hostGlobalSnapshot.remotesInfo && getInfoWithoutType(hostGlobalSnapshot.remotesInfo, remote.name).key;
|
|
4916
|
+
if (remoteKey) delete hostGlobalSnapshot.remotesInfo[remoteKey];
|
|
4917
|
+
}
|
|
4763
4918
|
const loadedModule = host.moduleCache.get(remote.name);
|
|
4764
4919
|
if (loadedModule) {
|
|
4765
4920
|
const remoteInfo = loadedModule.remoteInfo;
|
|
@@ -4768,7 +4923,6 @@ var RemoteHandler = class {
|
|
|
4768
4923
|
else CurrentGlobal[key] = void 0;
|
|
4769
4924
|
const remoteEntryUniqueKey = getRemoteEntryUniqueKey(loadedModule.remoteInfo);
|
|
4770
4925
|
if (globalLoading[remoteEntryUniqueKey]) delete globalLoading[remoteEntryUniqueKey];
|
|
4771
|
-
host.snapshotHandler.manifestCache.delete(remoteInfo.entry);
|
|
4772
4926
|
let remoteInsId = remoteInfo.buildVersion ? composeKeyWithSeparator(remoteInfo.name, remoteInfo.buildVersion) : remoteInfo.name;
|
|
4773
4927
|
const remoteInsIndex = CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex((ins) => {
|
|
4774
4928
|
if (remoteInfo.buildVersion) return ins.options.id === remoteInsId;
|
|
@@ -4816,14 +4970,6 @@ var RemoteHandler = class {
|
|
|
4816
4970
|
});
|
|
4817
4971
|
CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(remoteInsIndex, 1);
|
|
4818
4972
|
}
|
|
4819
|
-
const { hostGlobalSnapshot } = getGlobalRemoteInfo(remote, host);
|
|
4820
|
-
if (hostGlobalSnapshot) {
|
|
4821
|
-
const remoteKey = hostGlobalSnapshot && "remotesInfo" in hostGlobalSnapshot && hostGlobalSnapshot.remotesInfo && getInfoWithoutType(hostGlobalSnapshot.remotesInfo, remote.name).key;
|
|
4822
|
-
if (remoteKey) {
|
|
4823
|
-
delete hostGlobalSnapshot.remotesInfo[remoteKey];
|
|
4824
|
-
if (Boolean(Global.__FEDERATION__.__MANIFEST_LOADING__[remoteKey])) delete Global.__FEDERATION__.__MANIFEST_LOADING__[remoteKey];
|
|
4825
|
-
}
|
|
4826
|
-
}
|
|
4827
4973
|
host.moduleCache.delete(remote.name);
|
|
4828
4974
|
}
|
|
4829
4975
|
} catch (err) {
|
|
@@ -4834,6 +4980,8 @@ var RemoteHandler = class {
|
|
|
4834
4980
|
|
|
4835
4981
|
// node_modules/@module-federation/runtime-core/dist/core.js
|
|
4836
4982
|
var USE_SNAPSHOT = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN === "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : true;
|
|
4983
|
+
var USE_REMOTE = typeof FEDERATION_OPTIMIZE_NO_REMOTE === "boolean" ? !FEDERATION_OPTIMIZE_NO_REMOTE : true;
|
|
4984
|
+
var USE_SHARED = typeof FEDERATION_OPTIMIZE_NO_SHARED === "boolean" ? !FEDERATION_OPTIMIZE_NO_SHARED : true;
|
|
4837
4985
|
var ModuleFederation = class {
|
|
4838
4986
|
constructor(userOptions) {
|
|
4839
4987
|
this.hooks = new PluginSystem({
|
|
@@ -4842,7 +4990,7 @@ var ModuleFederation = class {
|
|
|
4842
4990
|
beforeInitContainer: new AsyncWaterfallHook("beforeInitContainer"),
|
|
4843
4991
|
initContainer: new AsyncWaterfallHook("initContainer")
|
|
4844
4992
|
});
|
|
4845
|
-
this.version = "2.
|
|
4993
|
+
this.version = "2.8.0";
|
|
4846
4994
|
this.moduleCache = /* @__PURE__ */ new Map();
|
|
4847
4995
|
this.loaderHook = new PluginSystem({
|
|
4848
4996
|
getModuleInfo: new SyncHook(),
|
|
@@ -4865,7 +5013,7 @@ var ModuleFederation = class {
|
|
|
4865
5013
|
beforeBridgeDestroy: new SyncHook(),
|
|
4866
5014
|
afterBridgeDestroy: new SyncHook()
|
|
4867
5015
|
});
|
|
4868
|
-
const plugins = USE_SNAPSHOT ? [snapshotPlugin(), generatePreloadAssetsPlugin()] : [];
|
|
5016
|
+
const plugins = USE_REMOTE && USE_SNAPSHOT ? [snapshotPlugin(), generatePreloadAssetsPlugin()] : [];
|
|
4869
5017
|
const defaultOptions = {
|
|
4870
5018
|
id: getBuilderId(),
|
|
4871
5019
|
name: userOptions.name,
|
|
@@ -4876,9 +5024,9 @@ var ModuleFederation = class {
|
|
|
4876
5024
|
};
|
|
4877
5025
|
this.name = userOptions.name;
|
|
4878
5026
|
this.options = defaultOptions;
|
|
4879
|
-
this.snapshotHandler = new SnapshotHandler(this);
|
|
4880
|
-
this.sharedHandler = new SharedHandler(this);
|
|
4881
|
-
this.remoteHandler = new RemoteHandler(this);
|
|
5027
|
+
this.snapshotHandler = USE_REMOTE ? new SnapshotHandler(this) : new DisabledSnapshotHandler();
|
|
5028
|
+
this.sharedHandler = USE_SHARED ? new SharedHandler(this) : new DisabledSharedHandler();
|
|
5029
|
+
this.remoteHandler = USE_REMOTE ? new RemoteHandler(this) : new DisabledRemoteHandler();
|
|
4882
5030
|
this.shareScopeMap = this.sharedHandler.shareScopeMap;
|
|
4883
5031
|
this.registerPlugins([...defaultOptions.plugins, ...userOptions.plugins || []]);
|
|
4884
5032
|
this.options = this.formatOptions(defaultOptions, userOptions);
|
|
@@ -4900,17 +5048,7 @@ var ModuleFederation = class {
|
|
|
4900
5048
|
return this.sharedHandler.initializeSharing(shareScopeName, extraOptions);
|
|
4901
5049
|
}
|
|
4902
5050
|
initRawContainer(name, url, container) {
|
|
4903
|
-
|
|
4904
|
-
name,
|
|
4905
|
-
entry: url
|
|
4906
|
-
});
|
|
4907
|
-
const module2 = new Module$1({
|
|
4908
|
-
host: this,
|
|
4909
|
-
remoteInfo
|
|
4910
|
-
});
|
|
4911
|
-
module2.remoteEntryExports = container;
|
|
4912
|
-
this.moduleCache.set(name, module2);
|
|
4913
|
-
return module2;
|
|
5051
|
+
return this.remoteHandler.initRawContainer(name, url, container);
|
|
4914
5052
|
}
|
|
4915
5053
|
async loadRemote(id, options) {
|
|
4916
5054
|
return this.remoteHandler.loadRemote(id, options);
|
|
@@ -4922,7 +5060,7 @@ var ModuleFederation = class {
|
|
|
4922
5060
|
this.sharedHandler.initShareScopeMap(scopeName, shareScope, extraOptions);
|
|
4923
5061
|
}
|
|
4924
5062
|
formatOptions(globalOptions, userOptions) {
|
|
4925
|
-
const
|
|
5063
|
+
const shared = USE_SHARED ? formatShareConfigs(globalOptions, userOptions).allShareInfos : {};
|
|
4926
5064
|
const { userOptions: userOptionsRes, options: globalOptionsRes } = this.hooks.lifecycle.beforeInit.emit({
|
|
4927
5065
|
origin: this,
|
|
4928
5066
|
userOptions,
|
|
@@ -5743,7 +5881,7 @@ var o6 = e6(class extends i5 {
|
|
|
5743
5881
|
});
|
|
5744
5882
|
|
|
5745
5883
|
// libs/embed-libs/embed/package.json
|
|
5746
|
-
var version = "
|
|
5884
|
+
var version = "7.0.0";
|
|
5747
5885
|
|
|
5748
5886
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
5749
5887
|
var LuzmoDashboardService = class {
|
|
@@ -5806,6 +5944,14 @@ var _setEventHandler = () => {
|
|
|
5806
5944
|
);
|
|
5807
5945
|
break;
|
|
5808
5946
|
}
|
|
5947
|
+
case "dashboardContext": {
|
|
5948
|
+
resolvePromise(
|
|
5949
|
+
dashboardComponent,
|
|
5950
|
+
event.data.requestId,
|
|
5951
|
+
event.data.context
|
|
5952
|
+
);
|
|
5953
|
+
break;
|
|
5954
|
+
}
|
|
5809
5955
|
case "getAccessibleDashboards": {
|
|
5810
5956
|
resolvePromise(
|
|
5811
5957
|
dashboardComponent,
|
|
@@ -5845,6 +5991,12 @@ var _setEventHandler = () => {
|
|
|
5845
5991
|
);
|
|
5846
5992
|
break;
|
|
5847
5993
|
}
|
|
5994
|
+
case "contextChanged": {
|
|
5995
|
+
dashboardComponent.dispatchEvent(
|
|
5996
|
+
new CustomEvent("contextChanged", { detail: { data: event.data } })
|
|
5997
|
+
);
|
|
5998
|
+
break;
|
|
5999
|
+
}
|
|
5848
6000
|
case "customEvent": {
|
|
5849
6001
|
dashboardComponent.dispatchEvent(
|
|
5850
6002
|
new CustomEvent("customEvent", { detail: { data: event.data } })
|
|
@@ -6100,7 +6252,6 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6100
6252
|
itemId: "item-id",
|
|
6101
6253
|
language: "language",
|
|
6102
6254
|
editorLanguage: "editorLanguage",
|
|
6103
|
-
qeVersion: "qe-version",
|
|
6104
6255
|
screenMode: "screen-mode",
|
|
6105
6256
|
switchScreenModeOnResize: "switch-screen-mode-on-resize",
|
|
6106
6257
|
authKey: "auth-key",
|
|
@@ -6108,7 +6259,6 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6108
6259
|
editMode: "edit-mode",
|
|
6109
6260
|
theme: "theme",
|
|
6110
6261
|
mainColor: "main-color",
|
|
6111
|
-
accentColor: "accent-color",
|
|
6112
6262
|
loaderBackground: "loader-background",
|
|
6113
6263
|
loaderFontColor: "loader-font-color",
|
|
6114
6264
|
loaderSpinnerColor: "loader-spinner-color",
|
|
@@ -6239,6 +6389,7 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6239
6389
|
el.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
|
|
6240
6390
|
el.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
|
|
6241
6391
|
el.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
|
|
6392
|
+
el.addEventListener("contextChanged", (payload) => this.dispatchEvent(new CustomEvent("contextChanged", payload)));
|
|
6242
6393
|
const container = this.renderRoot.querySelector("#dashboard-wc-container");
|
|
6243
6394
|
if (container) {
|
|
6244
6395
|
container.append(el);
|
|
@@ -6300,7 +6451,6 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6300
6451
|
"itemId",
|
|
6301
6452
|
"language",
|
|
6302
6453
|
"editorLanguage",
|
|
6303
|
-
"qeVersion",
|
|
6304
6454
|
"theme",
|
|
6305
6455
|
"editMode",
|
|
6306
6456
|
"screenMode",
|
|
@@ -6387,9 +6537,6 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6387
6537
|
if (this.editorLanguage) {
|
|
6388
6538
|
defaultParameters.editorLanguage = this.editorLanguage;
|
|
6389
6539
|
}
|
|
6390
|
-
if (this.qeVersion) {
|
|
6391
|
-
defaultParameters.qeVersion = this.qeVersion;
|
|
6392
|
-
}
|
|
6393
6540
|
if (this.screenMode) {
|
|
6394
6541
|
defaultParameters.screenMode = this.screenMode;
|
|
6395
6542
|
}
|
|
@@ -6409,9 +6556,6 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6409
6556
|
if (this.mainColor) {
|
|
6410
6557
|
defaultParameters.mainColor = this.mainColor;
|
|
6411
6558
|
}
|
|
6412
|
-
if (this.accentColor) {
|
|
6413
|
-
defaultParameters.accentColor = this.accentColor;
|
|
6414
|
-
}
|
|
6415
6559
|
if (this.loaderBackground) {
|
|
6416
6560
|
defaultParameters.loaderBackground = this.loaderBackground;
|
|
6417
6561
|
}
|
|
@@ -6594,6 +6738,15 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6594
6738
|
}
|
|
6595
6739
|
return Promise.reject();
|
|
6596
6740
|
}
|
|
6741
|
+
getDashboardContext() {
|
|
6742
|
+
if (this.isWebComponentViewMode() && this.dashboardReference) {
|
|
6743
|
+
return this.dashboardReference.getDashboardContext();
|
|
6744
|
+
}
|
|
6745
|
+
if (!this.isWebComponentViewMode()) {
|
|
6746
|
+
return getDashboardContext(this, this.iframe);
|
|
6747
|
+
}
|
|
6748
|
+
return Promise.reject(new Error("getDashboardContext is not available: dashboard reference is not ready."));
|
|
6749
|
+
}
|
|
6597
6750
|
setSelectedData(itemId, filters) {
|
|
6598
6751
|
if (this.isWebComponentViewMode() && this.dashboardReference) {
|
|
6599
6752
|
return this.dashboardReference.setSelectedData(itemId, filters);
|
|
@@ -6716,9 +6869,6 @@ __decorateClass([
|
|
|
6716
6869
|
__decorateClass([
|
|
6717
6870
|
n4()
|
|
6718
6871
|
], LuzmoDashboard.prototype, "editorLanguage", 2);
|
|
6719
|
-
__decorateClass([
|
|
6720
|
-
n4()
|
|
6721
|
-
], LuzmoDashboard.prototype, "qeVersion", 2);
|
|
6722
6872
|
__decorateClass([
|
|
6723
6873
|
n4()
|
|
6724
6874
|
], LuzmoDashboard.prototype, "screenMode", 2);
|
|
@@ -6739,9 +6889,6 @@ __decorateClass([
|
|
|
6739
6889
|
__decorateClass([
|
|
6740
6890
|
n4()
|
|
6741
6891
|
], LuzmoDashboard.prototype, "mainColor", 2);
|
|
6742
|
-
__decorateClass([
|
|
6743
|
-
n4()
|
|
6744
|
-
], LuzmoDashboard.prototype, "accentColor", 2);
|
|
6745
6892
|
__decorateClass([
|
|
6746
6893
|
n4()
|
|
6747
6894
|
], LuzmoDashboard.prototype, "authToken", 2);
|
|
@@ -6870,6 +7017,19 @@ var CONTENTS_VERSION = "0.1.100";
|
|
|
6870
7017
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
6871
7018
|
var dashboardContentsVersion = CONTENTS_VERSION;
|
|
6872
7019
|
var vizItemRemote = "VizItemApp";
|
|
7020
|
+
function collectVizItemDatasetIds(slots) {
|
|
7021
|
+
const ids = /* @__PURE__ */ new Set();
|
|
7022
|
+
for (const slot of slots ?? []) {
|
|
7023
|
+
for (const content of slot?.content ?? []) {
|
|
7024
|
+
const column = content;
|
|
7025
|
+
const datasetId = column.datasetId ?? column.set;
|
|
7026
|
+
if (datasetId) {
|
|
7027
|
+
ids.add(datasetId);
|
|
7028
|
+
}
|
|
7029
|
+
}
|
|
7030
|
+
}
|
|
7031
|
+
return [...ids];
|
|
7032
|
+
}
|
|
6873
7033
|
var LuzmoBaseVizItem = class extends i4 {
|
|
6874
7034
|
constructor() {
|
|
6875
7035
|
super(...arguments);
|
|
@@ -6881,22 +7041,6 @@ var LuzmoBaseVizItem = class extends i4 {
|
|
|
6881
7041
|
this.libVersion = version + "-wc-luzmo";
|
|
6882
7042
|
this.postInitCallQueue = [];
|
|
6883
7043
|
}
|
|
6884
|
-
static {
|
|
6885
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
6886
|
-
this.styles = i`
|
|
6887
|
-
:host {
|
|
6888
|
-
display: block;
|
|
6889
|
-
width: 100%;
|
|
6890
|
-
height: 100%;
|
|
6891
|
-
}
|
|
6892
|
-
|
|
6893
|
-
luzmo-embed-viz-item {
|
|
6894
|
-
width: 100%;
|
|
6895
|
-
height: 1000%;
|
|
6896
|
-
display: block;
|
|
6897
|
-
}
|
|
6898
|
-
`;
|
|
6899
|
-
}
|
|
6900
7044
|
createRenderRoot() {
|
|
6901
7045
|
if (!this.style.display) {
|
|
6902
7046
|
this.style.display = "block";
|
|
@@ -6915,6 +7059,22 @@ var LuzmoBaseVizItem = class extends i4 {
|
|
|
6915
7059
|
getFilters() {
|
|
6916
7060
|
return this.chartElement.getFilters();
|
|
6917
7061
|
}
|
|
7062
|
+
/**
|
|
7063
|
+
* Snapshot of this flex chart's live context: its definition (type, slots,
|
|
7064
|
+
* options), current filters and the datasets it reads. Used by context-aware
|
|
7065
|
+
* embeds such as the Luzmo IQ chat component.
|
|
7066
|
+
*/
|
|
7067
|
+
getVizItemContext() {
|
|
7068
|
+
const slots = this.slots ?? [];
|
|
7069
|
+
return {
|
|
7070
|
+
id: this.contextId ?? this.getAttribute("context-id") ?? this.id ?? this.itemId ?? "",
|
|
7071
|
+
type: this.type,
|
|
7072
|
+
slots,
|
|
7073
|
+
options: this.options,
|
|
7074
|
+
filters: typeof this.chartElement?.getFilters === "function" ? this.getFilters() : this.filters ?? [],
|
|
7075
|
+
datasetIds: collectVizItemDatasetIds(slots)
|
|
7076
|
+
};
|
|
7077
|
+
}
|
|
6918
7078
|
export(type = "png") {
|
|
6919
7079
|
return this.chartElement.export(type);
|
|
6920
7080
|
}
|
|
@@ -6967,7 +7127,12 @@ var LuzmoBaseVizItem = class extends i4 {
|
|
|
6967
7127
|
}
|
|
6968
7128
|
this.dispatchEvent(new CustomEvent("rendered", payload));
|
|
6969
7129
|
});
|
|
6970
|
-
this.chartElement.addEventListener("changedFilters", (payload) =>
|
|
7130
|
+
this.chartElement.addEventListener("changedFilters", (payload) => {
|
|
7131
|
+
this.dispatchEvent(new CustomEvent("changedFilters", payload));
|
|
7132
|
+
this.dispatchEvent(new CustomEvent("contextChanged", {
|
|
7133
|
+
detail: { data: { type: "contextChanged", context: this.getVizItemContext() } }
|
|
7134
|
+
}));
|
|
7135
|
+
});
|
|
6971
7136
|
this.chartElement.addEventListener("exported", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
|
|
6972
7137
|
this.chartElement.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
|
|
6973
7138
|
this.chartElement.addEventListener("authorizationExpired", (payload) => this.dispatchEvent(new CustomEvent("authorizationExpired", payload)));
|
|
@@ -7007,6 +7172,20 @@ var LuzmoBaseVizItem = class extends i4 {
|
|
|
7007
7172
|
return b2` `;
|
|
7008
7173
|
}
|
|
7009
7174
|
};
|
|
7175
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7176
|
+
LuzmoBaseVizItem.styles = i`
|
|
7177
|
+
:host {
|
|
7178
|
+
display: block;
|
|
7179
|
+
width: 100%;
|
|
7180
|
+
height: 100%;
|
|
7181
|
+
}
|
|
7182
|
+
|
|
7183
|
+
luzmo-embed-viz-item {
|
|
7184
|
+
width: 100%;
|
|
7185
|
+
height: 1000%;
|
|
7186
|
+
display: block;
|
|
7187
|
+
}
|
|
7188
|
+
`;
|
|
7010
7189
|
__decorateClass([
|
|
7011
7190
|
n4()
|
|
7012
7191
|
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
@@ -7087,7 +7266,9 @@ var inputMap = {
|
|
|
7087
7266
|
libVersion: "lib-version",
|
|
7088
7267
|
aydHost: "ayd-host",
|
|
7089
7268
|
availableDatasets: "available-datasets",
|
|
7090
|
-
dashboardContext: "dashboard-context"
|
|
7269
|
+
dashboardContext: "dashboard-context",
|
|
7270
|
+
dashboardId: "dashboard-id",
|
|
7271
|
+
contextIds: "context-ids"
|
|
7091
7272
|
};
|
|
7092
7273
|
var embedChatTag = "luzmo-iq-embed-chat";
|
|
7093
7274
|
var chatComponentTag = "luzmo-iq-chat-component";
|
|
@@ -7101,16 +7282,6 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
|
|
|
7101
7282
|
this.remoteEntryServer = "http://localhost:4202/";
|
|
7102
7283
|
this.aydHost = "https://ayd.luzmo.com/";
|
|
7103
7284
|
}
|
|
7104
|
-
static {
|
|
7105
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7106
|
-
this.styles = i`
|
|
7107
|
-
:host {
|
|
7108
|
-
display: block;
|
|
7109
|
-
width: 100%;
|
|
7110
|
-
height: 100%;
|
|
7111
|
-
}
|
|
7112
|
-
`;
|
|
7113
|
-
}
|
|
7114
7285
|
createRenderRoot() {
|
|
7115
7286
|
return this;
|
|
7116
7287
|
}
|
|
@@ -7126,6 +7297,10 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
|
|
|
7126
7297
|
if (!this.chartElement) {
|
|
7127
7298
|
this.chartElement = document.createElement(chatComponentTag);
|
|
7128
7299
|
this.chartElement.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload)));
|
|
7300
|
+
this.chartElement.addEventListener(
|
|
7301
|
+
"connectionStatusChanged",
|
|
7302
|
+
(event) => this.dispatchEvent(new CustomEvent("connectionStatusChanged", { detail: event.detail }))
|
|
7303
|
+
);
|
|
7129
7304
|
this.updateVizItemProperties();
|
|
7130
7305
|
this.renderRoot.append(this.chartElement);
|
|
7131
7306
|
}
|
|
@@ -7148,7 +7323,12 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
|
|
|
7148
7323
|
if (this.chartElement) {
|
|
7149
7324
|
for (const [propertyName] of changedProperties.entries()) {
|
|
7150
7325
|
const mappedAttributeName = inputMap[propertyName] ?? propertyName;
|
|
7151
|
-
const
|
|
7326
|
+
const propertyValue = this[propertyName];
|
|
7327
|
+
if (propertyValue == null) {
|
|
7328
|
+
this.chartElement.removeAttribute(mappedAttributeName);
|
|
7329
|
+
continue;
|
|
7330
|
+
}
|
|
7331
|
+
const attributeValue = typeof propertyValue === "object" ? JSON.stringify(propertyValue) : propertyValue.toString();
|
|
7152
7332
|
this.chartElement.setAttribute(mappedAttributeName, attributeValue);
|
|
7153
7333
|
}
|
|
7154
7334
|
} else {
|
|
@@ -7179,6 +7359,14 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
|
|
|
7179
7359
|
observer.observe(embedChat, { childList: true, subtree: true });
|
|
7180
7360
|
}
|
|
7181
7361
|
};
|
|
7362
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7363
|
+
LuzmoIQEmbedChatComponent.styles = i`
|
|
7364
|
+
:host {
|
|
7365
|
+
display: block;
|
|
7366
|
+
width: 100%;
|
|
7367
|
+
height: 100%;
|
|
7368
|
+
}
|
|
7369
|
+
`;
|
|
7182
7370
|
__decorateClass([
|
|
7183
7371
|
n4()
|
|
7184
7372
|
], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
|
|
@@ -7218,6 +7406,12 @@ __decorateClass([
|
|
|
7218
7406
|
__decorateClass([
|
|
7219
7407
|
n4({ type: Object })
|
|
7220
7408
|
], LuzmoIQEmbedChatComponent.prototype, "dashboardContext", 2);
|
|
7409
|
+
__decorateClass([
|
|
7410
|
+
n4()
|
|
7411
|
+
], LuzmoIQEmbedChatComponent.prototype, "dashboardId", 2);
|
|
7412
|
+
__decorateClass([
|
|
7413
|
+
n4({ type: Array })
|
|
7414
|
+
], LuzmoIQEmbedChatComponent.prototype, "contextIds", 2);
|
|
7221
7415
|
if (!customElements.get(embedChatTag)) {
|
|
7222
7416
|
customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
|
|
7223
7417
|
}
|
|
@@ -7244,16 +7438,6 @@ var LuzmoIQEmbedAnswerComponent = class extends i4 {
|
|
|
7244
7438
|
this.libVersion = version + "-wc-luzmo";
|
|
7245
7439
|
this.remoteEntryServer = "http://localhost:4202";
|
|
7246
7440
|
}
|
|
7247
|
-
static {
|
|
7248
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7249
|
-
this.styles = i`
|
|
7250
|
-
:host {
|
|
7251
|
-
display: block;
|
|
7252
|
-
width: 100%;
|
|
7253
|
-
height: 100%;
|
|
7254
|
-
}
|
|
7255
|
-
`;
|
|
7256
|
-
}
|
|
7257
7441
|
createRenderRoot() {
|
|
7258
7442
|
return this;
|
|
7259
7443
|
}
|
|
@@ -7304,6 +7488,14 @@ var LuzmoIQEmbedAnswerComponent = class extends i4 {
|
|
|
7304
7488
|
return b2` `;
|
|
7305
7489
|
}
|
|
7306
7490
|
};
|
|
7491
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7492
|
+
LuzmoIQEmbedAnswerComponent.styles = i`
|
|
7493
|
+
:host {
|
|
7494
|
+
display: block;
|
|
7495
|
+
width: 100%;
|
|
7496
|
+
height: 100%;
|
|
7497
|
+
}
|
|
7498
|
+
`;
|
|
7307
7499
|
__decorateClass([
|
|
7308
7500
|
n4()
|
|
7309
7501
|
], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);
|