@qlik/api 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analytics/change-stores.d.ts +40 -76
- package/analytics/change-stores.js +9 -10
- package/analytics.d.ts +1 -2
- package/analytics.js +5 -6
- package/api-keys.d.ts +46 -100
- package/api-keys.js +3 -4
- package/apps.d.ts +334 -461
- package/apps.js +74 -6
- package/assistants.d.ts +172 -337
- package/assistants.js +3 -4
- package/audits.d.ts +41 -85
- package/audits.js +3 -4
- package/auth-types.d.ts +110 -1
- package/auth-types.js +22 -1
- package/auth.d.ts +1 -2
- package/auth.js +1 -1
- package/automation-connections.d.ts +44 -95
- package/automation-connections.js +3 -4
- package/automation-connectors.d.ts +10 -20
- package/automation-connectors.js +3 -4
- package/automations.d.ts +54 -112
- package/automations.js +3 -4
- package/automl-deployments.d.ts +17 -36
- package/automl-deployments.js +3 -4
- package/automl-predictions.d.ts +12 -24
- package/automl-predictions.js +3 -4
- package/banners.d.ts +8 -14
- package/banners.js +3 -4
- package/brands.d.ts +19 -39
- package/brands.js +3 -4
- package/chunks/auth-B8lJw7rm.js +31 -0
- package/chunks/{interceptors-2VSXImC9.js → boot-interceptors-DqRxTczb.js} +50 -150
- package/chunks/{chunk-D3vHIbds.js → chunk-BdHzlgOL.js} +3 -3
- package/chunks/{invoke-fetch-CckTK7bh.js → invoke-fetch-DMAi6Fg3.js} +3 -3
- package/chunks/{invoke-fetch-D9lpiAb-.js → invoke-fetch-pMN6iqup.js} +2 -3
- package/chunks/platform-types-CECrZkOF.d.ts +29 -0
- package/chunks/{public-runtime-modules-BqxAMJ9M.js → public-runtime-modules-2KfyI2qM.js} +5 -5
- package/chunks/{qix-DpvHvpx7.js → qix-BdNrIA4s.js} +19 -20
- package/chunks/{qix-chunk-entrypoint-BXZPnE6J.js → qix-chunk-entrypoint-L9RpWwLK.js} +52 -58
- package/chunks/{qix-CrqXv44x.d.ts → qix-types-y_di0roE.d.ts} +33 -115
- package/collections.d.ts +67 -144
- package/collections.js +3 -4
- package/conditions.d.ts +87 -190
- package/conditions.js +3 -4
- package/consumption.d.ts +35 -72
- package/consumption.js +3 -4
- package/core/ip-policies.d.ts +43 -93
- package/core/ip-policies.js +5 -6
- package/core.d.ts +1 -2
- package/core.js +5 -6
- package/csp-origins.d.ts +42 -85
- package/csp-origins.js +3 -4
- package/csrf-token.d.ts +6 -11
- package/csrf-token.js +3 -4
- package/data-alerts.d.ts +152 -325
- package/data-alerts.js +3 -4
- package/data-assets.d.ts +16 -31
- package/data-assets.js +3 -4
- package/data-connections.d.ts +123 -257
- package/data-connections.js +3 -4
- package/data-credentials.d.ts +36 -76
- package/data-credentials.js +3 -4
- package/data-files.d.ts +60 -121
- package/data-files.js +3 -4
- package/data-governance/data-products.d.ts +429 -0
- package/data-governance/data-products.js +212 -0
- package/data-governance.d.ts +13 -0
- package/data-governance.js +12 -0
- package/data-qualities.d.ts +11 -25
- package/data-qualities.js +3 -4
- package/data-sets.d.ts +28 -57
- package/data-sets.js +3 -4
- package/data-sources.d.ts +45 -97
- package/data-sources.js +3 -4
- package/data-stores.d.ts +53 -107
- package/data-stores.js +3 -4
- package/dcaas.d.ts +32 -67
- package/dcaas.js +3 -4
- package/di-projects.d.ts +111 -136
- package/di-projects.js +25 -4
- package/direct-access-agents.d.ts +29 -63
- package/direct-access-agents.js +3 -4
- package/encryption.d.ts +28 -59
- package/encryption.js +3 -4
- package/extensions.d.ts +35 -73
- package/extensions.js +3 -4
- package/global-types.d.ts +139 -1
- package/glossaries.d.ts +75 -158
- package/glossaries.js +3 -4
- package/groups.d.ts +58 -125
- package/groups.js +3 -4
- package/identity-providers.d.ts +148 -324
- package/identity-providers.js +3 -4
- package/index.d.ts +18 -4
- package/index.js +64 -19
- package/interceptors.d.ts +2 -3
- package/interceptors.js +104 -2
- package/invoke-fetch-types.d.ts +97 -1
- package/items.d.ts +85 -181
- package/items.js +3 -4
- package/knowledgebases.d.ts +137 -270
- package/knowledgebases.js +3 -4
- package/licenses.d.ts +71 -153
- package/licenses.js +3 -4
- package/lineage-graphs.d.ts +39 -85
- package/lineage-graphs.js +3 -4
- package/ml.d.ts +290 -621
- package/ml.js +3 -4
- package/notes.d.ts +9 -18
- package/notes.js +3 -4
- package/notifications.d.ts +14 -30
- package/notifications.js +3 -4
- package/oauth-clients.d.ts +98 -159
- package/oauth-clients.js +4 -5
- package/oauth-tokens.d.ts +16 -33
- package/oauth-tokens.js +3 -4
- package/package.json +6 -3
- package/qix.d.ts +46 -2
- package/qix.js +2 -3
- package/questions.d.ts +53 -110
- package/questions.js +3 -4
- package/quotas.d.ts +13 -26
- package/quotas.js +3 -4
- package/reload-tasks.d.ts +23 -46
- package/reload-tasks.js +3 -4
- package/reloads.d.ts +26 -52
- package/reloads.js +3 -4
- package/report-templates.d.ts +30 -63
- package/report-templates.js +3 -4
- package/reports.d.ts +111 -238
- package/reports.js +3 -4
- package/roles.d.ts +36 -77
- package/roles.js +3 -4
- package/sharing-tasks.d.ts +201 -427
- package/sharing-tasks.js +3 -4
- package/spaces.d.ts +71 -157
- package/spaces.js +3 -4
- package/tasks.d.ts +76 -164
- package/tasks.js +3 -4
- package/temp-contents.d.ts +17 -35
- package/temp-contents.js +3 -4
- package/tenant-settings.d.ts +298 -0
- package/tenant-settings.js +107 -0
- package/tenants.d.ts +31 -67
- package/tenants.js +3 -4
- package/themes.d.ts +27 -55
- package/themes.js +3 -4
- package/transports.d.ts +46 -106
- package/transports.js +3 -4
- package/ui-config.d.ts +8 -17
- package/ui-config.js +3 -4
- package/users.d.ts +80 -170
- package/users.js +3 -4
- package/web-integrations.d.ts +38 -83
- package/web-integrations.js +3 -4
- package/web-notifications.d.ts +14 -29
- package/web-notifications.js +3 -4
- package/webhooks.d.ts +77 -162
- package/webhooks.js +3 -4
- package/chunks/auth-XusKk8IA.js +0 -32
- package/chunks/auth-types-YrlH_R9f.d.ts +0 -416
- package/chunks/auth-types-h43TVDpB.js +0 -24
- package/chunks/global-types-CEVAJebk.js +0 -1
- /package/chunks/{dist-n3iOVn1W.js → dist-DR758NU5.js} +0 -0
- /package/chunks/{invoke-fetch-C1Z0RJYU.d.ts → invoke-fetch-DFc3yzaj.d.ts} +0 -0
- /package/chunks/{utils-vv-xFm06.js → utils-jkpLuYZR.js} +0 -0
- /package/chunks/{websocket-errors-CRTDTtBL.js → websocket-errors-C5U1tba-.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as isBrowser } from "./utils-
|
|
2
|
-
import {
|
|
3
|
-
import { t as getHumanReadableSocketClosedErrorMessage } from "./websocket-errors-
|
|
1
|
+
import { r as isBrowser } from "./utils-jkpLuYZR.js";
|
|
2
|
+
import { F as getPlatform, O as invokeFetch, c as handleAuthenticationError, u as isWindows, x as toValidWebsocketLocationUrl } from "./boot-interceptors-DqRxTczb.js";
|
|
3
|
+
import { t as getHumanReadableSocketClosedErrorMessage } from "./websocket-errors-C5U1tba-.js";
|
|
4
4
|
|
|
5
5
|
//#region src/qix/app-session.ts
|
|
6
6
|
const isBrowserEnvironment = isBrowser();
|
|
@@ -39,7 +39,7 @@ function createAppSession(sharedSession) {
|
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/qix/external-app-session.ts
|
|
42
|
-
function createExternalSharedSession(externalApp, onWebSocketEvent
|
|
42
|
+
function createExternalSharedSession(externalApp, onWebSocketEvent, appSessionProps) {
|
|
43
43
|
const clients = [];
|
|
44
44
|
const sharedSession = {
|
|
45
45
|
getDoc: () => externalApp,
|
|
@@ -62,7 +62,7 @@ function createExternalSharedSession(externalApp, onWebSocketEvent$1, appSession
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
const triggerEventListeners = (event) => {
|
|
65
|
-
onWebSocketEvent
|
|
65
|
+
onWebSocketEvent(event);
|
|
66
66
|
for (const client of clients) client.onWebSocketEvent(event);
|
|
67
67
|
};
|
|
68
68
|
externalApp.then((app) => {
|
|
@@ -198,10 +198,10 @@ function listenForWindowsAuthenticationInformation(session) {
|
|
|
198
198
|
/**
|
|
199
199
|
* Opens the websocket and handles a few windows authentication details
|
|
200
200
|
*/
|
|
201
|
-
async function createAndSetupEnigmaSession(props, canRetry, onWebSocketEvent
|
|
202
|
-
const { createEnigmaSessionEntrypoint } = await import("./qix-chunk-entrypoint-
|
|
201
|
+
async function createAndSetupEnigmaSession(props, canRetry, onWebSocketEvent) {
|
|
202
|
+
const { createEnigmaSessionEntrypoint } = await import("./qix-chunk-entrypoint-L9RpWwLK.js");
|
|
203
203
|
const session = await createEnigmaSessionEntrypoint(props);
|
|
204
|
-
setupSessionListeners(session, props, onWebSocketEvent
|
|
204
|
+
setupSessionListeners(session, props, onWebSocketEvent);
|
|
205
205
|
let global;
|
|
206
206
|
if (await isWindows(props.hostConfig)) {
|
|
207
207
|
const loginInfoPromise = listenForWindowsAuthenticationInformation(session);
|
|
@@ -213,7 +213,7 @@ async function createAndSetupEnigmaSession(props, canRetry, onWebSocketEvent$1)
|
|
|
213
213
|
canRetry,
|
|
214
214
|
hostConfig: props.hostConfig
|
|
215
215
|
});
|
|
216
|
-
if (canRetry && action.retry) return createAndSetupEnigmaSession(props, false, onWebSocketEvent
|
|
216
|
+
if (canRetry && action.retry) return createAndSetupEnigmaSession(props, false, onWebSocketEvent);
|
|
217
217
|
if (action.preventDefault) return new Promise(() => {});
|
|
218
218
|
}
|
|
219
219
|
} else global = await session.open();
|
|
@@ -301,7 +301,7 @@ function createSharedEnigmaSession(props, { getInitialAppActions, onClose, onWeb
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
let resumePromise;
|
|
304
|
-
function onWebSocketEvent
|
|
304
|
+
function onWebSocketEvent(event) {
|
|
305
305
|
if (event.eventType === "suspended") {
|
|
306
306
|
resumePromise = void 0;
|
|
307
307
|
if (shouldAutoResume(event.code)) resume().catch((err) => {
|
|
@@ -311,7 +311,7 @@ function createSharedEnigmaSession(props, { getInitialAppActions, onClose, onWeb
|
|
|
311
311
|
for (const client of clients) client.onWebSocketEvent(event);
|
|
312
312
|
onGlobalWebsocketEvent(event);
|
|
313
313
|
}
|
|
314
|
-
const { sessionPromise, globalPromise } = separatePromises(createAndSetupEnigmaSession(props, true, onWebSocketEvent
|
|
314
|
+
const { sessionPromise, globalPromise } = separatePromises(createAndSetupEnigmaSession(props, true, onWebSocketEvent));
|
|
315
315
|
async function resume() {
|
|
316
316
|
if (!resumePromise) resumePromise = (async () => {
|
|
317
317
|
let session = await sessionPromise;
|
|
@@ -408,8 +408,8 @@ async function checkConnectivity(hostConfig) {
|
|
|
408
408
|
async function sessionResumeWithRetry(session, hostConfig) {
|
|
409
409
|
const status = await checkConnectivity(hostConfig);
|
|
410
410
|
if (status !== "online") {
|
|
411
|
-
const error
|
|
412
|
-
return Promise.reject(error
|
|
411
|
+
const error = new Error(`failed to resume: ${status}`, { cause: status });
|
|
412
|
+
return Promise.reject(error);
|
|
413
413
|
}
|
|
414
414
|
session.emit("resuming", {});
|
|
415
415
|
const maxRetries = 10;
|
|
@@ -441,13 +441,13 @@ async function sessionResumeWithRetry(session, hostConfig) {
|
|
|
441
441
|
function createSharedPhoenixSession(props, { onClose, onWebSocketEvent: onWebSocketEventGlobal, getInitialAppActions }) {
|
|
442
442
|
try {
|
|
443
443
|
const clients = [];
|
|
444
|
-
const onWebSocketEvent
|
|
444
|
+
const onWebSocketEvent = (event) => {
|
|
445
445
|
onWebSocketEventGlobal(event);
|
|
446
446
|
for (const client of clients) client.onWebSocketEvent(event);
|
|
447
447
|
};
|
|
448
|
-
const phoenixConnectionPromise = import("./qix-chunk-entrypoint-
|
|
448
|
+
const phoenixConnectionPromise = import("./qix-chunk-entrypoint-L9RpWwLK.js").then((module) => {
|
|
449
449
|
return module.createPhoenixConnectionEntrypoint(props, {
|
|
450
|
-
onWebSocketEvent
|
|
450
|
+
onWebSocketEvent,
|
|
451
451
|
getInitialAppActions
|
|
452
452
|
});
|
|
453
453
|
});
|
|
@@ -563,10 +563,10 @@ function registerExternalAppSession(appId, enigmaDocObject, props) {
|
|
|
563
563
|
...props,
|
|
564
564
|
appId
|
|
565
565
|
});
|
|
566
|
-
function onWebSocketEvent
|
|
566
|
+
function onWebSocketEvent(event) {
|
|
567
567
|
triggerGlobalWebSocketEventListeners(event);
|
|
568
568
|
}
|
|
569
|
-
externalApps[appSessionId] = createExternalSharedSession(Promise.resolve(enigmaDocObject), onWebSocketEvent
|
|
569
|
+
externalApps[appSessionId] = createExternalSharedSession(Promise.resolve(enigmaDocObject), onWebSocketEvent, { appId });
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
//#endregion
|
|
@@ -659,7 +659,6 @@ const qix = {
|
|
|
659
659
|
resumeOnlyOnReattach
|
|
660
660
|
})
|
|
661
661
|
};
|
|
662
|
-
var qix_default = qix;
|
|
663
662
|
|
|
664
663
|
//#endregion
|
|
665
|
-
export { addInitialAppAction, createSessionApp,
|
|
664
|
+
export { addInitialAppAction, createSessionApp, qix as default, onCombinedWebSocketStateChange, onWebSocketEvent, openAppSession, registerExternalAppSession, resumeOnlyOnReattach, resumeSuspendedSessions, useAppHook };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as isNode, n as createResolvablePromise$1 } from "./utils-
|
|
2
|
-
import {
|
|
3
|
-
import { t as getHumanReadableSocketClosedErrorMessage$1 } from "./websocket-errors-
|
|
1
|
+
import { i as isNode, n as createResolvablePromise$1 } from "./utils-jkpLuYZR.js";
|
|
2
|
+
import { A as appendQueryToUrl, N as exposeInternalApiOnWindow, P as generateRandomString, c as handleAuthenticationError, s as getWebSocketAuthParams, u as isWindows, x as toValidWebsocketLocationUrl } from "./boot-interceptors-DqRxTczb.js";
|
|
3
|
+
import { t as getHumanReadableSocketClosedErrorMessage$1 } from "./websocket-errors-C5U1tba-.js";
|
|
4
4
|
import isPlainObject from "lodash/isPlainObject.js";
|
|
5
5
|
import merge from "lodash/merge.js";
|
|
6
6
|
import originalExtend from "extend";
|
|
@@ -13137,7 +13137,8 @@ var engine_api_default = {
|
|
|
13137
13137
|
SESSION_ERROR_SECURITY_HEADER_CHANGED: 5,
|
|
13138
13138
|
SESSION_ACCESS_CONTROL_SETUP_FAILURE: 6,
|
|
13139
13139
|
SESSION_ERROR_APP_ACCESS_DENIED: 7,
|
|
13140
|
-
SESSION_ERROR_APP_FAILURE: 8
|
|
13140
|
+
SESSION_ERROR_APP_FAILURE: 8,
|
|
13141
|
+
SESSION_ERROR_LICENSE_INVALID: 9
|
|
13141
13142
|
},
|
|
13142
13143
|
ReloadState: {
|
|
13143
13144
|
RELOAD_PAUSED: 0,
|
|
@@ -13181,7 +13182,6 @@ var engine_api_default = {
|
|
|
13181
13182
|
*/
|
|
13182
13183
|
const { enums } = engine_api_default;
|
|
13183
13184
|
for (const key in enums) enums[`Nx${key}`] = enums[key];
|
|
13184
|
-
var engine_enums_default = enums;
|
|
13185
13185
|
|
|
13186
13186
|
//#endregion
|
|
13187
13187
|
//#region src/qix/session/interceptors.ts
|
|
@@ -13198,7 +13198,7 @@ const somethingWithEmptyMethodsRequestInterceptor = { onFulfilled(sessionReferen
|
|
|
13198
13198
|
/** @private */
|
|
13199
13199
|
const retryAbortedErrorResponseInterceptor = { onRejected(session, request, error) {
|
|
13200
13200
|
const api = request.handle ? session.apis.getApi(request.handle) : void 0;
|
|
13201
|
-
if (api && !api.isCancelled && error.code ===
|
|
13201
|
+
if (api && !api.isCancelled && error.code === enums.LocalizedErrorCode.LOCERR_GENERIC_ABORTED && retryRegexpFilter$1.test(request.method)) {
|
|
13202
13202
|
error.isHandled = true;
|
|
13203
13203
|
return request.retry();
|
|
13204
13204
|
}
|
|
@@ -13219,7 +13219,7 @@ const somethingWithErrorPopupsResponnseInterceptor = { onRejected(session, reque
|
|
|
13219
13219
|
|
|
13220
13220
|
//#endregion
|
|
13221
13221
|
//#region src/qix/session/mixins/all/base.ts
|
|
13222
|
-
var base_default
|
|
13222
|
+
var base_default = {
|
|
13223
13223
|
types: [
|
|
13224
13224
|
"Doc",
|
|
13225
13225
|
"GenericObject",
|
|
@@ -13257,9 +13257,9 @@ function createGetMethod(cacheKey) {
|
|
|
13257
13257
|
}).catch((err) => {
|
|
13258
13258
|
delete apiCache[id];
|
|
13259
13259
|
return Promise.reject({
|
|
13260
|
-
code:
|
|
13260
|
+
code: enums.NxLocalizedErrorCode.LOCERR_GENERIC_NOT_FOUND,
|
|
13261
13261
|
message: "Object not found",
|
|
13262
|
-
error: { code:
|
|
13262
|
+
error: { code: enums.NxLocalizedErrorCode.LOCERR_GENERIC_NOT_FOUND }
|
|
13263
13263
|
});
|
|
13264
13264
|
});
|
|
13265
13265
|
apiCache[id] = promise;
|
|
@@ -13289,15 +13289,14 @@ const mixin$20 = {
|
|
|
13289
13289
|
mixin$20.override[method] = variableGet;
|
|
13290
13290
|
});
|
|
13291
13291
|
mixin$20.override.getField = fieldGet;
|
|
13292
|
-
var get_object_cache_default = mixin$20;
|
|
13293
13292
|
|
|
13294
13293
|
//#endregion
|
|
13295
13294
|
//#region src/qix/session/mixins/all/layout-observable.js
|
|
13296
13295
|
function Observable(api) {
|
|
13297
|
-
this.getLayout = function(api
|
|
13298
|
-
this.requestPromise = api
|
|
13296
|
+
this.getLayout = function(api) {
|
|
13297
|
+
this.requestPromise = api.getLayout(false).then((layout) => {
|
|
13299
13298
|
this.requestPromise = null;
|
|
13300
|
-
if (api
|
|
13299
|
+
if (api.isCancelled) return;
|
|
13301
13300
|
this.fn(layout);
|
|
13302
13301
|
}).catch((err) => {
|
|
13303
13302
|
if (process.env.NODE_ENV === "development") {
|
|
@@ -13491,7 +13490,7 @@ function patchArray$1(original, newA, basePath) {
|
|
|
13491
13490
|
function findIndex(a, id, idx) {
|
|
13492
13491
|
if (a[idx] && isUndef$1(a[idx].qInfo)) return null;
|
|
13493
13492
|
if (a[idx] && a[idx].qInfo.qId === id) return idx;
|
|
13494
|
-
for (let i
|
|
13493
|
+
for (let i = 0, l = a.length; i < l; i++) if (a[i] && a[i].qInfo.qId === id) return i;
|
|
13495
13494
|
return -1;
|
|
13496
13495
|
}
|
|
13497
13496
|
if (compare$1(newA, oldA)) return patches;
|
|
@@ -13654,7 +13653,6 @@ JSONPatch$1.updateObject = function(original, newData) {
|
|
|
13654
13653
|
}
|
|
13655
13654
|
JSONPatch$1.apply(original, JSONPatch$1.generate(original, newData));
|
|
13656
13655
|
};
|
|
13657
|
-
var json_patch_default$1 = JSONPatch$1;
|
|
13658
13656
|
|
|
13659
13657
|
//#endregion
|
|
13660
13658
|
//#region src/qix/session/mixins/utils/notification.js
|
|
@@ -13676,7 +13674,7 @@ let NotificationMixin;
|
|
|
13676
13674
|
* @param {String} name PascalCased name of the notification.
|
|
13677
13675
|
* @type class
|
|
13678
13676
|
*/
|
|
13679
|
-
const Notification = function Notification
|
|
13677
|
+
const Notification = function Notification(receiver, name) {
|
|
13680
13678
|
if (INSTANTIATING !== true) throw new Error("This class can't be instantiated directly.");
|
|
13681
13679
|
this.observers = [];
|
|
13682
13680
|
this.receiver = receiver;
|
|
@@ -13819,7 +13817,6 @@ if (process.env.NODE_ENV === "development") {
|
|
|
13819
13817
|
trackNotifications = true;
|
|
13820
13818
|
};
|
|
13821
13819
|
}
|
|
13822
|
-
var notification_default = Notification;
|
|
13823
13820
|
|
|
13824
13821
|
//#endregion
|
|
13825
13822
|
//#region src/qix/session/mixins/utils/permissions.js
|
|
@@ -13982,20 +13979,20 @@ var state_default = {
|
|
|
13982
13979
|
if (self.isValid && self.layout) return self.Promise.resolve(getPureLayout ? self.pureLayout : self.layout);
|
|
13983
13980
|
if (!self.isValidating) self.setState(RPCStates.VALIDATING);
|
|
13984
13981
|
if (self.ongoingRequests[CACHE_KEY]) {
|
|
13985
|
-
const ongoingRequests
|
|
13982
|
+
const ongoingRequests = self.ongoingRequests[CACHE_KEY];
|
|
13986
13983
|
if (pure)
|
|
13987
13984
|
/**
|
|
13988
13985
|
* Since we are using a cache we have to make sure to return
|
|
13989
13986
|
* the pure layout when we request using pure.
|
|
13990
13987
|
*/
|
|
13991
|
-
return ongoingRequests
|
|
13988
|
+
return ongoingRequests.then(() => {
|
|
13992
13989
|
if (!self.pureLayout.permissions) self.pureLayout.permissions = self.layout.permissions;
|
|
13993
13990
|
return self.pureLayout;
|
|
13994
13991
|
});
|
|
13995
|
-
return ongoingRequests
|
|
13992
|
+
return ongoingRequests;
|
|
13996
13993
|
}
|
|
13997
13994
|
const request = _getLayout().then((layout) => {
|
|
13998
|
-
if (!self.isValid)
|
|
13995
|
+
if (!self.isValid) JSONPatch$1.updateObject(self.layout, layout);
|
|
13999
13996
|
if (self.ongoingRequests[CACHE_KEY] === request) {
|
|
14000
13997
|
self.setState(RPCStates.VALID);
|
|
14001
13998
|
delete self.ongoingRequests[CACHE_KEY];
|
|
@@ -14017,9 +14014,9 @@ var state_default = {
|
|
|
14017
14014
|
if (self.isValid && !self.needCacheProperties) return self.Promise.resolve(self.properties);
|
|
14018
14015
|
if (self.ongoingRequests[CACHE_KEY]) return self.ongoingRequests[CACHE_KEY];
|
|
14019
14016
|
const request = _getProperties().then((properties) => {
|
|
14020
|
-
const patches =
|
|
14017
|
+
const patches = JSONPatch$1.generate(self._properties, properties);
|
|
14021
14018
|
self._properties = properties;
|
|
14022
|
-
|
|
14019
|
+
JSONPatch$1.apply(self.properties, patches);
|
|
14023
14020
|
if (self.isValid) self.needCacheProperties = false;
|
|
14024
14021
|
return self.properties;
|
|
14025
14022
|
});
|
|
@@ -14032,13 +14029,13 @@ var state_default = {
|
|
|
14032
14029
|
setProperties(_setProperties, properties) {
|
|
14033
14030
|
const self = this;
|
|
14034
14031
|
return _setProperties(properties).then(() => {
|
|
14035
|
-
|
|
14032
|
+
JSONPatch$1.updateObject(self._properties, self.properties);
|
|
14036
14033
|
});
|
|
14037
14034
|
}
|
|
14038
14035
|
},
|
|
14039
14036
|
init(args) {
|
|
14040
14037
|
const { api } = args;
|
|
14041
|
-
|
|
14038
|
+
Notification.mixin(api);
|
|
14042
14039
|
api.notification("Validated");
|
|
14043
14040
|
api.notification("Invalidated");
|
|
14044
14041
|
api.notification("Validating");
|
|
@@ -14093,8 +14090,8 @@ var state_default = {
|
|
|
14093
14090
|
//#endregion
|
|
14094
14091
|
//#region src/qix/session/mixins/all/index.ts
|
|
14095
14092
|
const mixins$4 = [
|
|
14096
|
-
base_default
|
|
14097
|
-
|
|
14093
|
+
base_default,
|
|
14094
|
+
mixin$20,
|
|
14098
14095
|
migration_default,
|
|
14099
14096
|
state_default,
|
|
14100
14097
|
layout_observable_default
|
|
@@ -14155,7 +14152,6 @@ const mixin$18 = {
|
|
|
14155
14152
|
});
|
|
14156
14153
|
} }
|
|
14157
14154
|
};
|
|
14158
|
-
var fields_mixins_default = mixin$18;
|
|
14159
14155
|
|
|
14160
14156
|
//#endregion
|
|
14161
14157
|
//#region src/qix/session/mixins/custom/undoinfo/undo-info-mixins.js
|
|
@@ -14184,8 +14180,8 @@ var undo_info_mixins_default = {
|
|
|
14184
14180
|
const model = this;
|
|
14185
14181
|
function proceed(waitForPromise) {
|
|
14186
14182
|
return waitForPromise.then(() => model.getLayout().then((layout) => {
|
|
14187
|
-
if (layout.qUndoInfo.qUndoCount > 0) return model.app.undo().then(() => model.getLayout().then((layout
|
|
14188
|
-
evenMarkers = layout
|
|
14183
|
+
if (layout.qUndoInfo.qUndoCount > 0) return model.app.undo().then(() => model.getLayout().then((layout) => {
|
|
14184
|
+
evenMarkers = layout.markers.length % 2 === 0;
|
|
14189
14185
|
if (!evenMarkers) return proceed(Promise.resolve());
|
|
14190
14186
|
queue.splice(0, 1);
|
|
14191
14187
|
}));
|
|
@@ -14257,7 +14253,7 @@ var undo_info_mixins_default = {
|
|
|
14257
14253
|
//#region src/qix/session/mixins/custom/index.ts
|
|
14258
14254
|
const mixins$3 = [
|
|
14259
14255
|
mixin$19,
|
|
14260
|
-
|
|
14256
|
+
mixin$18,
|
|
14261
14257
|
undo_info_mixins_default
|
|
14262
14258
|
];
|
|
14263
14259
|
|
|
@@ -14303,7 +14299,6 @@ const mixin$17 = {
|
|
|
14303
14299
|
args.api._listCache = {};
|
|
14304
14300
|
}
|
|
14305
14301
|
};
|
|
14306
|
-
var base_default = mixin$17;
|
|
14307
14302
|
|
|
14308
14303
|
//#endregion
|
|
14309
14304
|
//#region src/qix/session/mixins/doc/modal.js
|
|
@@ -14835,7 +14830,7 @@ const mixin$3 = {
|
|
|
14835
14830
|
//#endregion
|
|
14836
14831
|
//#region src/qix/session/mixins/doc/index.ts
|
|
14837
14832
|
const mixins$2 = [
|
|
14838
|
-
|
|
14833
|
+
mixin$17,
|
|
14839
14834
|
normalize_default,
|
|
14840
14835
|
modal_default,
|
|
14841
14836
|
mixin$16,
|
|
@@ -14875,7 +14870,7 @@ const mixin$2 = {
|
|
|
14875
14870
|
const self = this;
|
|
14876
14871
|
return _getEffectiveProperties().then((effectiveProperties) => {
|
|
14877
14872
|
self.effectiveProperties = self.effectiveProperties || effectiveProperties;
|
|
14878
|
-
|
|
14873
|
+
JSONPatch$1.updateObject(self.effectiveProperties, effectiveProperties);
|
|
14879
14874
|
return self.effectiveProperties;
|
|
14880
14875
|
});
|
|
14881
14876
|
}
|
|
@@ -15498,7 +15493,6 @@ JSONPatch.updateObject = function updateObject(original, newData) {
|
|
|
15498
15493
|
}
|
|
15499
15494
|
JSONPatch.apply(original, JSONPatch.generate(original, newData));
|
|
15500
15495
|
};
|
|
15501
|
-
var json_patch_default = JSONPatch;
|
|
15502
15496
|
|
|
15503
15497
|
//#endregion
|
|
15504
15498
|
//#region src/qix/session/phoenix/delta-compression.ts
|
|
@@ -15513,7 +15507,7 @@ function unwrapDeltas(result, state, handle, method) {
|
|
|
15513
15507
|
if (typeof entry === "undefined") entry = patches[0] && Array.isArray(patches[0].value) ? [] : {};
|
|
15514
15508
|
if (patches.length) {
|
|
15515
15509
|
if (patches[0].path === "/" && typeof patches[0].value !== "object") entry = patches[0].value;
|
|
15516
|
-
else
|
|
15510
|
+
else JSONPatch.apply(entry, patches);
|
|
15517
15511
|
if (!state[handle]) state[handle] = {};
|
|
15518
15512
|
if (!state[handle][method]) state[handle][method] = {};
|
|
15519
15513
|
state[handle][method][outKey] = entry;
|
|
@@ -15941,7 +15935,7 @@ async function createQixConnection(props, listener) {
|
|
|
15941
15935
|
}
|
|
15942
15936
|
if (response.error) {
|
|
15943
15937
|
const isCancelled = requestWasCanceled(websocketRequest.id);
|
|
15944
|
-
const { jsonrpc
|
|
15938
|
+
const { jsonrpc, delta, id, ...errorResponse } = response;
|
|
15945
15939
|
logResponse(handleOrObject, websocketRequest, errorResponse);
|
|
15946
15940
|
throw new QixError(response.error, isCancelled);
|
|
15947
15941
|
}
|
|
@@ -15996,7 +15990,7 @@ function shouldRetryRequest(request, error) {
|
|
|
15996
15990
|
* Utility functions
|
|
15997
15991
|
*/
|
|
15998
15992
|
var util = {};
|
|
15999
|
-
util.isObject = function isObject
|
|
15993
|
+
util.isObject = function isObject(arg) {
|
|
16000
15994
|
return typeof arg === "object" && arg !== null;
|
|
16001
15995
|
};
|
|
16002
15996
|
util.isNumber = function isNumber(arg) {
|
|
@@ -16005,7 +15999,7 @@ util.isNumber = function isNumber(arg) {
|
|
|
16005
15999
|
util.isUndefined = function isUndefined(arg) {
|
|
16006
16000
|
return arg === void 0;
|
|
16007
16001
|
};
|
|
16008
|
-
util.isFunction = function isFunction
|
|
16002
|
+
util.isFunction = function isFunction(arg) {
|
|
16009
16003
|
return typeof arg === "function";
|
|
16010
16004
|
};
|
|
16011
16005
|
/**
|
|
@@ -16286,8 +16280,8 @@ var RpcObjectSessionImpl = class extends EventEmitter {
|
|
|
16286
16280
|
* Creates a QIX session that adds the concept of Rpc objects on top of the QixConnection which is only Json.
|
|
16287
16281
|
* Reopens a new QixConnection if the existing one goes down and recreates the serverside state of objects using the new connection.
|
|
16288
16282
|
*/
|
|
16289
|
-
async function createPhoenixConnection(openProps, objectFactory
|
|
16290
|
-
const phoenixConnection = new PhoenixConnectionImpl(openProps, objectFactory
|
|
16283
|
+
async function createPhoenixConnection(openProps, objectFactory, { onWebSocketEvent, getInitialAppActions }) {
|
|
16284
|
+
const phoenixConnection = new PhoenixConnectionImpl(openProps, objectFactory, {
|
|
16291
16285
|
onWebSocketEvent,
|
|
16292
16286
|
getInitialAppActions
|
|
16293
16287
|
});
|
|
@@ -16309,21 +16303,21 @@ var PhoenixConnectionImpl = class {
|
|
|
16309
16303
|
#lastTrafficAt = Date.now();
|
|
16310
16304
|
#createdAt = Date.now();
|
|
16311
16305
|
/** @internal */
|
|
16312
|
-
constructor(openProps, objectFactory
|
|
16306
|
+
constructor(openProps, objectFactory, owner) {
|
|
16313
16307
|
this.#openProps = openProps;
|
|
16314
|
-
this.#objectFactory = objectFactory
|
|
16308
|
+
this.#objectFactory = objectFactory;
|
|
16315
16309
|
this.#owner = owner;
|
|
16316
16310
|
this.#rpcObjectSession = new RpcObjectSessionImpl(this);
|
|
16317
16311
|
logEvent("Creating phoenix session", openProps);
|
|
16318
16312
|
/**
|
|
16319
16313
|
* The root objects
|
|
16320
16314
|
*/
|
|
16321
|
-
this.#globalRpcObject = objectFactory
|
|
16315
|
+
this.#globalRpcObject = objectFactory.createObject({
|
|
16322
16316
|
qHandle: -1,
|
|
16323
16317
|
qType: "Global",
|
|
16324
16318
|
qGenericId: "Global"
|
|
16325
16319
|
}, this, void 0);
|
|
16326
|
-
this.#docRpcObject = objectFactory
|
|
16320
|
+
this.#docRpcObject = objectFactory.createObject({
|
|
16327
16321
|
qHandle: 1,
|
|
16328
16322
|
qGenericId: openProps.appId,
|
|
16329
16323
|
qType: "Doc"
|
|
@@ -16970,17 +16964,17 @@ var rpc_object_respawn_mixins_default = [
|
|
|
16970
16964
|
//#endregion
|
|
16971
16965
|
//#region src/qix/session/phoenix/rpc-object-mixins.ts
|
|
16972
16966
|
function toMixinMap(mixinsArray) {
|
|
16973
|
-
const mixins
|
|
16974
|
-
rpc_object_respawn_mixins_default.concat(mixinsArray).forEach((mixin
|
|
16975
|
-
(Array.isArray(mixin
|
|
16976
|
-
mixins
|
|
16977
|
-
mixins
|
|
16967
|
+
const mixins = {};
|
|
16968
|
+
rpc_object_respawn_mixins_default.concat(mixinsArray).forEach((mixin) => {
|
|
16969
|
+
(Array.isArray(mixin.types) ? mixin.types : [mixin.types]).forEach((type) => {
|
|
16970
|
+
mixins[type] = mixins[type] || [];
|
|
16971
|
+
mixins[type].push(mixin);
|
|
16978
16972
|
});
|
|
16979
16973
|
});
|
|
16980
|
-
return mixins
|
|
16974
|
+
return mixins;
|
|
16981
16975
|
}
|
|
16982
16976
|
function applyMixins(classPrototype, mixinList) {
|
|
16983
|
-
mixinList.forEach(({ extend
|
|
16977
|
+
mixinList.forEach(({ extend = {}, override = {} }) => {
|
|
16984
16978
|
Object.keys(override).forEach((key) => {
|
|
16985
16979
|
if (typeof classPrototype[key] === "function" && typeof override[key] === "function") {
|
|
16986
16980
|
const baseFn = classPrototype[key];
|
|
@@ -16989,9 +16983,9 @@ function applyMixins(classPrototype, mixinList) {
|
|
|
16989
16983
|
};
|
|
16990
16984
|
} else throw new Error(`Tring to override non-existing function in ${classPrototype.type}/${classPrototype.genericType}: ${key}`);
|
|
16991
16985
|
});
|
|
16992
|
-
Object.keys(extend
|
|
16993
|
-
if (typeof classPrototype[key] === "function" && typeof extend
|
|
16994
|
-
else classPrototype[key] = extend
|
|
16986
|
+
Object.keys(extend).forEach((key) => {
|
|
16987
|
+
if (typeof classPrototype[key] === "function" && typeof extend[key] === "function") throw new Error(`Extend is not allowed. Function already exists in ${classPrototype.type}/${classPrototype.genericType}: ${key}`);
|
|
16988
|
+
else classPrototype[key] = extend[key];
|
|
16995
16989
|
});
|
|
16996
16990
|
});
|
|
16997
16991
|
}
|
|
@@ -17084,18 +17078,18 @@ var RpcObjectFactoryImpl = class {
|
|
|
17084
17078
|
const key = `${type}:${genericType}`;
|
|
17085
17079
|
if (!this.#generatedClasses[key]) {
|
|
17086
17080
|
const rpcFunctions = this.#getRpcFunctionsForType(type);
|
|
17087
|
-
const mixins
|
|
17081
|
+
const mixins = this.#getMixinsForType(type).concat(this.#getMixinsForType(genericType));
|
|
17088
17082
|
this.#generatedClasses[type] = class GeneratedBaseQixRpxObject extends PhoenixRpcObjectImpl {
|
|
17089
17083
|
constructor(createProps) {
|
|
17090
17084
|
super(createProps);
|
|
17091
|
-
initMixins(this, mixins
|
|
17085
|
+
initMixins(this, mixins);
|
|
17092
17086
|
}
|
|
17093
17087
|
};
|
|
17094
17088
|
const classPrototype = this.#generatedClasses[type].prototype;
|
|
17095
17089
|
rpcFunctions.forEach(({ methodName, fn }) => {
|
|
17096
17090
|
classPrototype[methodName] = fn;
|
|
17097
17091
|
});
|
|
17098
|
-
applyMixins(classPrototype, mixins
|
|
17092
|
+
applyMixins(classPrototype, mixins);
|
|
17099
17093
|
}
|
|
17100
17094
|
return this.#generatedClasses[type];
|
|
17101
17095
|
}
|