@kosdev-code/kos-ui-sdk 3.0.27 → 3.0.29
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/common/events/async-event-bus.d.ts.map +1 -1
- package/common/events/eventBus.d.ts.map +1 -1
- package/core/core/companion-instantiator.d.ts.map +1 -1
- package/core/core/decorators/fsm-injection-utils.d.ts.map +1 -1
- package/core/core/decorators/index.d.ts +0 -1
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +1 -1
- package/core/core/decorators/kos-container-aware.d.ts +104 -3
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-mixin.d.ts +7 -5
- package/core/core/decorators/kos-mixin.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +4 -0
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +1 -1
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/decorators/resolve-parameters.d.ts.map +1 -1
- package/core/core/dependency-manager.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/indexing/kos-container-index-aware.d.ts +4 -0
- package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
- package/core/core/indexing/kos-index-aware.d.ts +6 -0
- package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
- package/core/core/indexing/types.d.ts +30 -3
- package/core/core/indexing/types.d.ts.map +1 -1
- package/core/core/kos-container-index.d.ts.map +1 -1
- package/core/core/kos-container-model.d.ts.map +1 -1
- package/core/core/kos-data-container.d.ts.map +1 -1
- package/core/core/kos-model-factory.d.ts.map +1 -1
- package/core/core/kos-registration.d.ts.map +1 -1
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/model-active-machine.d.ts.map +1 -1
- package/core/core/lifecycle/model-machine.d.ts.map +1 -1
- package/core/core/lifecycle/model-online-machine.d.ts.map +1 -1
- package/core/core/log/index.d.ts +1 -0
- package/core/core/log/index.d.ts.map +1 -1
- package/core/core/log/log-groups.d.ts +27 -0
- package/core/core/log/log-groups.d.ts.map +1 -0
- package/core/core/log/log-override-match.d.ts +24 -0
- package/core/core/log/log-override-match.d.ts.map +1 -0
- package/core/core/log/log.d.ts +15 -9
- package/core/core/log/log.d.ts.map +1 -1
- package/core/core/model/kos-logger-factory.d.ts +6 -4
- package/core/core/model/kos-logger-factory.d.ts.map +1 -1
- package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
- package/core/core/model/model-hook-cache.d.ts +6 -1
- package/core/core/model/model-hook-cache.d.ts.map +1 -1
- package/core/core/model-cache.d.ts.map +1 -1
- package/core/core/model-instantiator.d.ts.map +1 -1
- package/core/core/registration/model-registration.d.ts +2 -0
- package/core/core/registration/model-registration.d.ts.map +1 -1
- package/core/core/registration/registration-manager.d.ts.map +1 -1
- package/core/core/services/app-startup-service.d.ts.map +1 -1
- package/core/core/services/intent-service.d.ts.map +1 -1
- package/core/core/transport/base-message-transport.d.ts.map +1 -1
- package/core/core/transport/bridge-transport.d.ts.map +1 -1
- package/core/core/transport/mock/future-simulator.d.ts.map +1 -1
- package/core/core/transport/mock/mock-config.d.ts.map +1 -1
- package/core/core/transport/mock/mock-fixtures.d.ts.map +1 -1
- package/core/core/transport/mock/mock-playback.d.ts.map +1 -1
- package/core/core/transport/mock/mock-recorder.d.ts.map +1 -1
- package/core/core/transport/mock/mock-registry.d.ts.map +1 -1
- package/core/core/transport/mock/mock-setups.d.ts.map +1 -1
- package/core/core/transport/mock/standalone-mock-socket.d.ts.map +1 -1
- package/core/core/transport/transport-factory.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/types/global.d.ts +0 -6
- package/core/util/feature-flags.d.ts.map +1 -1
- package/core/util/kos-core-utils.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-message-utils.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +2 -0
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/kos-service-request.d.ts +11 -2
- package/core/util/kos-service-request.d.ts.map +1 -1
- package/core/util/log-utils.d.ts +0 -10
- package/core/util/log-utils.d.ts.map +1 -1
- package/core/util/model-error-utils.d.ts.map +1 -1
- package/core/util/model-utils.d.ts.map +1 -1
- package/core/util/promise-utils.d.ts.map +1 -1
- package/core/util/retry-with-exponential-backoff.d.ts.map +1 -1
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/wait-for-request.d.ts.map +1 -1
- package/index.cjs +78 -322
- package/index.cjs.map +1 -1
- package/index.js +332 -576
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
- package/models/models/device/services/device-services.d.ts.map +1 -1
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-model-builder.d.ts.map +1 -1
- package/models/models/future/future-model.d.ts.map +1 -1
- package/models/models/future-container/future-container-model.d.ts.map +1 -1
- package/models/models/gpio-chip/gpio-chip-builders.d.ts +0 -3
- package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -1
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
- package/models/models/gpio-chip/services/gpio-chip-services.d.ts +1 -1
- package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +2 -0
- package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +43 -24
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
- package/models/models/kos-log-manager/services/kos-log-manager-services.d.ts +20 -1
- package/models/models/kos-log-manager/services/kos-log-manager-services.d.ts.map +1 -1
- package/models/models/kos-log-manager/types/index.d.ts +75 -6
- package/models/models/log-stream/services/log-stream-services.d.ts.map +1 -1
- package/models/models/network-interface/services/network-interface-services.d.ts.map +1 -1
- package/models/models/ota/services/ota-services.d.ts.map +1 -1
- package/models/models/region-info/region-info-model.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/models/state-bean/services/state-bean-services.d.ts.map +1 -1
- package/models/models/state-prop/services/state-prop-services.d.ts.map +1 -1
- package/models/models/storage-device/services/storage-device-services.d.ts.map +1 -1
- package/models/models/studio-properties/services/studio-properties-services.d.ts.map +1 -1
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/translation/descriptor-merge.d.ts +9 -1
- package/models/models/translation/descriptor-merge.d.ts.map +1 -1
- package/models/models/translation/services/translation-services.d.ts.map +1 -1
- package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
- package/models/models/trouble/utils/trouble-data-extension.d.ts.map +1 -1
- package/models/models/trouble/utils/trouble-extension.d.ts.map +1 -1
- package/models/models/usb-update/services/usb-update-services.d.ts.map +1 -1
- package/models/models/ws-event/ws-event-model.d.ts.map +1 -1
- package/models/services/future/index.d.ts.map +1 -1
- package/models/services/login/index.d.ts.map +1 -1
- package/models/services/trouble/index.d.ts.map +1 -1
- package/models/types/cancellable-promise.d.ts +2 -0
- package/models/types/cancellable-promise.d.ts.map +1 -1
- package/models/utils/await-future-call.d.ts +8 -0
- package/models/utils/await-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-future-call.d.ts.map +1 -1
- package/models/utils/client.d.ts +1 -1
- package/models/utils/core-registration-manager.d.ts +15 -2
- package/models/utils/core-registration-manager.d.ts.map +1 -1
- package/models/utils/get-kos-connection-id.d.ts.map +1 -1
- package/models/utils/service-accessor.d.ts +1 -1
- package/models/utils/service.d.ts +1 -1
- package/models/utils/services/kos/1.6.5/service.d.ts +1 -1
- package/models/utils/services/kos/1.8.1/service.d.ts +1 -1
- package/models/utils/services/kos/1.9.x/service.d.ts +1 -1
- package/models/utils/services/kos/daily/service.d.ts +1 -1
- package/models/utils/services/vfs/1.6.5/service.d.ts +1 -1
- package/models/utils/services/vfs/1.8.1/service.d.ts +1 -1
- package/models/utils/services/vfs/1.9.x/service.d.ts +1 -1
- package/models/utils/services/vfs/daily/service.d.ts +1 -1
- package/models/utils/timer-manager.d.ts.map +1 -1
- package/package.json +2 -2
- package/{software-info-registration-Le3V0a6v.cjs → software-info-registration-CA13_Qc_.cjs} +1285 -703
- package/software-info-registration-CA13_Qc_.cjs.map +1 -0
- package/{software-info-registration-kSGacOka.js → software-info-registration-CKRUzp_3.js} +1596 -1014
- package/software-info-registration-CKRUzp_3.js.map +1 -0
- package/testing.cjs +1 -2
- package/testing.cjs.map +1 -1
- package/testing.js +1 -2
- package/testing.js.map +1 -1
- package/ui/components/kos-model-loader/contexts/kos-model-hierarchy-context.d.ts.map +1 -1
- package/ui/components/kos-model-loader/kos-model-loader.d.ts.map +1 -1
- package/ui/contexts/kos-model-context.d.ts.map +1 -1
- package/ui/contexts/translation-container/kos-translations-provider.d.ts.map +1 -1
- package/ui/features/canvas/components/canvas-streamer/canvas-streamer.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation.d.ts.map +1 -1
- package/ui/hooks/use-kos-model.d.ts +1 -0
- package/ui/hooks/use-kos-model.d.ts.map +1 -1
- package/ui/hooks/use-mutation-observer.d.ts.map +1 -1
- package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
- package/core/core/decorators/kos-log.d.ts +0 -14
- package/core/core/decorators/kos-log.d.ts.map +0 -1
- package/software-info-registration-Le3V0a6v.cjs.map +0 -1
- package/software-info-registration-kSGacOka.js.map +0 -1
package/index.cjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const service$8 = require("./software-info-registration-
|
|
3
|
+
const service$8 = require("./software-info-registration-CA13_Qc_.cjs");
|
|
4
4
|
const mobx = require("mobx");
|
|
5
|
-
const log$6 = require("loglevel");
|
|
6
5
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
7
6
|
const styled = require("@emotion/styled");
|
|
8
7
|
const reactDom = require("react-dom");
|
|
@@ -397,10 +396,6 @@ function kosMultipleFutureAware(options) {
|
|
|
397
396
|
return target;
|
|
398
397
|
};
|
|
399
398
|
}
|
|
400
|
-
const kosLogger = ({ group } = { group: "" }) => (constructor) => {
|
|
401
|
-
constructor[service$8.LogConfig] = constructor[service$8.LogConfig] || {};
|
|
402
|
-
constructor[service$8.LogConfig] = { group };
|
|
403
|
-
};
|
|
404
399
|
function kosMixin(mixin, options) {
|
|
405
400
|
return (target, propertyKey) => {
|
|
406
401
|
const companion = mixin.class.prototype[service$8.CompanionParentModel];
|
|
@@ -961,33 +956,6 @@ const pairedClientHeartbeat = ({
|
|
|
961
956
|
controller.signal.addEventListener("abort", handleAbort);
|
|
962
957
|
return { cleanUpHeartbeat };
|
|
963
958
|
};
|
|
964
|
-
const BASE_OPTIONS = {
|
|
965
|
-
maxAttempts: 5,
|
|
966
|
-
baseDelayMs: 100,
|
|
967
|
-
backoffFactor: 1.5
|
|
968
|
-
};
|
|
969
|
-
async function retryWithExponentialBackoff(operation, options) {
|
|
970
|
-
let attempt = 1;
|
|
971
|
-
const _options = { ...BASE_OPTIONS, ...options };
|
|
972
|
-
const { maxAttempts, baseDelayMs, backoffFactor } = _options;
|
|
973
|
-
let delayMs = baseDelayMs;
|
|
974
|
-
while (attempt <= maxAttempts) {
|
|
975
|
-
try {
|
|
976
|
-
const result = await operation();
|
|
977
|
-
return result;
|
|
978
|
-
} catch (error) {
|
|
979
|
-
service$8.KosLog.error(`Attempt ${attempt} failed: ${error}`);
|
|
980
|
-
if (attempt < maxAttempts) {
|
|
981
|
-
delayMs = baseDelayMs * Math.pow(backoffFactor, attempt);
|
|
982
|
-
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
983
|
-
attempt++;
|
|
984
|
-
} else {
|
|
985
|
-
throw error;
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
throw new Error("All attempts failed");
|
|
990
|
-
}
|
|
991
959
|
function getServiceResponse(model, path, method = "get") {
|
|
992
960
|
const store = model.serviceResponses;
|
|
993
961
|
if (!store) {
|
|
@@ -1023,58 +991,6 @@ function clearAllServiceResponses(model) {
|
|
|
1023
991
|
}
|
|
1024
992
|
store.clear();
|
|
1025
993
|
}
|
|
1026
|
-
const waitForRequest = async (requestId, timeout = 6e4) => new Promise((resolve, reject) => {
|
|
1027
|
-
const { unsubscribe } = service$8.subscribe(requestId, (op) => {
|
|
1028
|
-
log$6.debug(`recieved response for refId ${requestId}: ${op}`);
|
|
1029
|
-
unsubscribe();
|
|
1030
|
-
clearTimeout(cancel);
|
|
1031
|
-
try {
|
|
1032
|
-
const body = op?.body ? JSON.parse(op.body) : {};
|
|
1033
|
-
resolve(body);
|
|
1034
|
-
} catch {
|
|
1035
|
-
const body = op?.body || {};
|
|
1036
|
-
resolve(body);
|
|
1037
|
-
}
|
|
1038
|
-
});
|
|
1039
|
-
const cancel = setTimeout(() => {
|
|
1040
|
-
unsubscribe();
|
|
1041
|
-
reject(Error(`Request with ID ${requestId} timed out. Cancelling.`));
|
|
1042
|
-
}, timeout);
|
|
1043
|
-
});
|
|
1044
|
-
const sendRequest = async (requestPromise, params, refId) => {
|
|
1045
|
-
const op = waitForRequest(refId);
|
|
1046
|
-
const result = await Promise.allSettled([requestPromise(params), op]);
|
|
1047
|
-
if (result[0].status === "fulfilled") {
|
|
1048
|
-
if (result[1].status === "rejected") {
|
|
1049
|
-
throw Error(result[1].reason);
|
|
1050
|
-
} else {
|
|
1051
|
-
if (result[0].value) {
|
|
1052
|
-
if (result[1].value.error) {
|
|
1053
|
-
throw Error(result[1].value.error);
|
|
1054
|
-
}
|
|
1055
|
-
result[0].value.data = result[1].value;
|
|
1056
|
-
return result[0].value;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
} else {
|
|
1060
|
-
throw Error(result[0].reason);
|
|
1061
|
-
}
|
|
1062
|
-
return void 0;
|
|
1063
|
-
};
|
|
1064
|
-
const syncPublish = async ({
|
|
1065
|
-
topic,
|
|
1066
|
-
msg,
|
|
1067
|
-
requestId
|
|
1068
|
-
}) => {
|
|
1069
|
-
const _requestId = requestId ?? service$8.uuid();
|
|
1070
|
-
const responsePromise = waitForRequest(_requestId);
|
|
1071
|
-
service$8.publish(topic, msg, { sync: _requestId });
|
|
1072
|
-
const response = await responsePromise;
|
|
1073
|
-
if (response.error) {
|
|
1074
|
-
throw Error(response.error);
|
|
1075
|
-
}
|
|
1076
|
-
return response;
|
|
1077
|
-
};
|
|
1078
994
|
function kosIndexAware(options) {
|
|
1079
995
|
return (target) => {
|
|
1080
996
|
const collection = options?.collection;
|
|
@@ -1372,7 +1288,10 @@ const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
1372
1288
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1373
1289
|
const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1374
1290
|
__proto__: null,
|
|
1375
|
-
|
|
1291
|
+
addLogOverride: service$8.addLogOverride,
|
|
1292
|
+
getLogGroups: service$8.getLogGroups,
|
|
1293
|
+
getLogOverrides: service$8.getLogOverrides,
|
|
1294
|
+
removeLogOverride: service$8.removeLogOverride
|
|
1376
1295
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1377
1296
|
const index$a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1378
1297
|
__proto__: null,
|
|
@@ -1396,185 +1315,6 @@ const index$8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
1396
1315
|
getTroubles: service$8.getTroubles,
|
|
1397
1316
|
resolveTrouble: service$8.resolveTrouble
|
|
1398
1317
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1399
|
-
function createCancellablePromise(promiseOrOptions, abortController, cancelFuture, future) {
|
|
1400
|
-
const options = promiseOrOptions instanceof Promise ? { promise: promiseOrOptions, abortController, cancelFuture, future } : promiseOrOptions;
|
|
1401
|
-
const {
|
|
1402
|
-
promise,
|
|
1403
|
-
abortController: controller,
|
|
1404
|
-
cancelFuture: cancelFn,
|
|
1405
|
-
future: futureRef
|
|
1406
|
-
} = options;
|
|
1407
|
-
const cancellablePromise = promise;
|
|
1408
|
-
let currentProgress = 0;
|
|
1409
|
-
let currentStatus = "PENDING";
|
|
1410
|
-
let isRunning = true;
|
|
1411
|
-
const progressCallbacks = /* @__PURE__ */ new Set();
|
|
1412
|
-
let effectDisposer;
|
|
1413
|
-
if (futureRef && typeof futureRef === "object") {
|
|
1414
|
-
effectDisposer = mobx.autorun(() => {
|
|
1415
|
-
const newProgress = futureRef.progress || 0;
|
|
1416
|
-
const newStatus = futureRef.status || "PENDING";
|
|
1417
|
-
const newIsRunning = !futureRef.endState;
|
|
1418
|
-
if (newProgress !== currentProgress || newStatus !== currentStatus || newIsRunning !== isRunning) {
|
|
1419
|
-
currentProgress = newProgress;
|
|
1420
|
-
currentStatus = newStatus;
|
|
1421
|
-
isRunning = newIsRunning;
|
|
1422
|
-
progressCallbacks.forEach((callback) => {
|
|
1423
|
-
try {
|
|
1424
|
-
callback(currentProgress, currentStatus);
|
|
1425
|
-
} catch (error) {
|
|
1426
|
-
console.warn("Progress callback error:", error);
|
|
1427
|
-
}
|
|
1428
|
-
});
|
|
1429
|
-
}
|
|
1430
|
-
});
|
|
1431
|
-
}
|
|
1432
|
-
promise.finally(() => {
|
|
1433
|
-
isRunning = false;
|
|
1434
|
-
if (!controller?.signal.aborted) {
|
|
1435
|
-
currentStatus = "COMPLETED";
|
|
1436
|
-
progressCallbacks.forEach((callback) => {
|
|
1437
|
-
try {
|
|
1438
|
-
callback(currentProgress, currentStatus);
|
|
1439
|
-
} catch (error) {
|
|
1440
|
-
console.warn("Progress callback error:", error);
|
|
1441
|
-
}
|
|
1442
|
-
});
|
|
1443
|
-
}
|
|
1444
|
-
if (effectDisposer) {
|
|
1445
|
-
effectDisposer();
|
|
1446
|
-
}
|
|
1447
|
-
progressCallbacks.clear();
|
|
1448
|
-
});
|
|
1449
|
-
cancellablePromise.cancel = async () => {
|
|
1450
|
-
if (controller && !controller.signal.aborted) {
|
|
1451
|
-
controller.abort();
|
|
1452
|
-
}
|
|
1453
|
-
if (cancelFn) {
|
|
1454
|
-
await cancelFn();
|
|
1455
|
-
}
|
|
1456
|
-
isRunning = false;
|
|
1457
|
-
currentStatus = "CANCELLED";
|
|
1458
|
-
progressCallbacks.forEach((callback) => {
|
|
1459
|
-
try {
|
|
1460
|
-
callback(currentProgress, currentStatus);
|
|
1461
|
-
} catch (error) {
|
|
1462
|
-
console.warn("Progress callback error:", error);
|
|
1463
|
-
}
|
|
1464
|
-
});
|
|
1465
|
-
if (effectDisposer) {
|
|
1466
|
-
effectDisposer();
|
|
1467
|
-
}
|
|
1468
|
-
};
|
|
1469
|
-
cancellablePromise.getController = () => controller;
|
|
1470
|
-
cancellablePromise.isCancelled = () => controller?.signal.aborted ?? false;
|
|
1471
|
-
Object.defineProperty(cancellablePromise, "progress", {
|
|
1472
|
-
get: () => currentProgress,
|
|
1473
|
-
enumerable: true
|
|
1474
|
-
});
|
|
1475
|
-
Object.defineProperty(cancellablePromise, "status", {
|
|
1476
|
-
get: () => currentStatus,
|
|
1477
|
-
enumerable: true
|
|
1478
|
-
});
|
|
1479
|
-
Object.defineProperty(cancellablePromise, "isRunning", {
|
|
1480
|
-
get: () => isRunning,
|
|
1481
|
-
enumerable: true
|
|
1482
|
-
});
|
|
1483
|
-
cancellablePromise.onProgressUpdate = (callback) => {
|
|
1484
|
-
progressCallbacks.add(callback);
|
|
1485
|
-
callback(currentProgress, currentStatus);
|
|
1486
|
-
return () => progressCallbacks.delete(callback);
|
|
1487
|
-
};
|
|
1488
|
-
return cancellablePromise;
|
|
1489
|
-
}
|
|
1490
|
-
function makeCancellable(model, methodCall) {
|
|
1491
|
-
const initialFuture = model.futureHandler.future;
|
|
1492
|
-
const promise = methodCall(model);
|
|
1493
|
-
let newFuture = null;
|
|
1494
|
-
setTimeout(() => {
|
|
1495
|
-
newFuture = model.futureHandler.future;
|
|
1496
|
-
if (newFuture === initialFuture) {
|
|
1497
|
-
newFuture = null;
|
|
1498
|
-
}
|
|
1499
|
-
}, 0);
|
|
1500
|
-
return createCancellablePromise({
|
|
1501
|
-
promise,
|
|
1502
|
-
abortController: void 0,
|
|
1503
|
-
// No direct AbortController access
|
|
1504
|
-
cancelFuture: async () => {
|
|
1505
|
-
if (newFuture) {
|
|
1506
|
-
await newFuture.cancelFuture();
|
|
1507
|
-
} else {
|
|
1508
|
-
const currentFuture = model.futureHandler.future;
|
|
1509
|
-
if (currentFuture) {
|
|
1510
|
-
await currentFuture.cancelFuture();
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
},
|
|
1514
|
-
future: newFuture
|
|
1515
|
-
// Pass the future for progress tracking
|
|
1516
|
-
});
|
|
1517
|
-
}
|
|
1518
|
-
function withCancellation(model, methodName, ...args) {
|
|
1519
|
-
const method = model[methodName];
|
|
1520
|
-
if (typeof method !== "function") {
|
|
1521
|
-
throw new Error(`${String(methodName)} is not a method`);
|
|
1522
|
-
}
|
|
1523
|
-
const initialFuture = model.futureHandler.future;
|
|
1524
|
-
const promise = method.apply(model, args);
|
|
1525
|
-
let targetFuture = null;
|
|
1526
|
-
setTimeout(() => {
|
|
1527
|
-
const currentFuture = model.futureHandler.future;
|
|
1528
|
-
if (currentFuture && currentFuture !== initialFuture) {
|
|
1529
|
-
targetFuture = currentFuture;
|
|
1530
|
-
}
|
|
1531
|
-
}, 0);
|
|
1532
|
-
return createCancellablePromise({
|
|
1533
|
-
promise,
|
|
1534
|
-
abortController: void 0,
|
|
1535
|
-
cancelFuture: async () => {
|
|
1536
|
-
if (targetFuture) {
|
|
1537
|
-
await targetFuture.cancelFuture();
|
|
1538
|
-
} else {
|
|
1539
|
-
const fallbackFuture = model.futureHandler.future;
|
|
1540
|
-
if (fallbackFuture) {
|
|
1541
|
-
await fallbackFuture.cancelFuture();
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
},
|
|
1545
|
-
future: targetFuture
|
|
1546
|
-
// Pass the future for progress tracking
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
|
-
class CancellationBatch {
|
|
1550
|
-
operations = [];
|
|
1551
|
-
add(model, methodCall) {
|
|
1552
|
-
const cancellable = makeCancellable(model, methodCall);
|
|
1553
|
-
this.operations.push(cancellable);
|
|
1554
|
-
return cancellable;
|
|
1555
|
-
}
|
|
1556
|
-
async cancelAll() {
|
|
1557
|
-
await Promise.all(
|
|
1558
|
-
this.operations.map(
|
|
1559
|
-
(op) => op.cancel().catch(() => {
|
|
1560
|
-
service$8.KosLog.warn("Cancellation failed for operation:", op);
|
|
1561
|
-
})
|
|
1562
|
-
)
|
|
1563
|
-
);
|
|
1564
|
-
}
|
|
1565
|
-
getAllControllers() {
|
|
1566
|
-
return this.operations.map((op) => op.getController());
|
|
1567
|
-
}
|
|
1568
|
-
getActiveCount() {
|
|
1569
|
-
return this.operations.filter((op) => !op.isCancelled()).length;
|
|
1570
|
-
}
|
|
1571
|
-
clear() {
|
|
1572
|
-
this.operations = [];
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
function createCancellationBatch() {
|
|
1576
|
-
return new CancellationBatch();
|
|
1577
|
-
}
|
|
1578
1318
|
const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1579
1319
|
__proto__: null,
|
|
1580
1320
|
sendCanvasData: service$8.sendCanvasData
|
|
@@ -1774,7 +1514,7 @@ const updateRegion = async (region) => {
|
|
|
1774
1514
|
regionInfo.updateProperty(region);
|
|
1775
1515
|
};
|
|
1776
1516
|
async function getKosServiceApi() {
|
|
1777
|
-
const { default: API } = await Promise.resolve().then(() => require("./software-info-registration-
|
|
1517
|
+
const { default: API } = await Promise.resolve().then(() => require("./software-info-registration-CA13_Qc_.cjs")).then((n) => n.service);
|
|
1778
1518
|
return API;
|
|
1779
1519
|
}
|
|
1780
1520
|
function kosServiceRequest$7(params) {
|
|
@@ -1902,7 +1642,7 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
1902
1642
|
function isTroubleAware(obj) {
|
|
1903
1643
|
return obj?.troubles !== void 0 && obj?.troubles instanceof Array && obj?.troublesByType !== void 0 && typeof obj?.troublesByType === "object";
|
|
1904
1644
|
}
|
|
1905
|
-
const log$
|
|
1645
|
+
const log$9 = service$8.KosLog.createLogger({ group: service$8.LogGroup.service, name: "services" });
|
|
1906
1646
|
const studioLogin = async (username, password) => login(username, password, `${service$8.BASE_URL}/api/server/login`);
|
|
1907
1647
|
const login = async (username, password, url = `${service$8.BASE_URL}/api/login`) => {
|
|
1908
1648
|
const response = await service$8.kosFetch(`${url}`, {
|
|
@@ -1936,7 +1676,7 @@ const startPasswordReset = async (userId, url = `${service$8.BASE_URL}/api/start
|
|
|
1936
1676
|
};
|
|
1937
1677
|
const studioResetPassword = async (token2, password) => resetPassword(token2, password, `${service$8.BASE_URL}/api/server/resetPassword`);
|
|
1938
1678
|
const resetPassword = async (token2, password, url = `${service$8.BASE_URL}/api/resetPassword`) => {
|
|
1939
|
-
log$
|
|
1679
|
+
log$9.debug(
|
|
1940
1680
|
`resetting password with token ${token2} and password ${password.replace(
|
|
1941
1681
|
/./g,
|
|
1942
1682
|
"*"
|
|
@@ -1950,9 +1690,9 @@ const resetPassword = async (token2, password, url = `${service$8.BASE_URL}/api/
|
|
|
1950
1690
|
password
|
|
1951
1691
|
})
|
|
1952
1692
|
});
|
|
1953
|
-
log$
|
|
1693
|
+
log$9.debug(`password reset returned status ${response.status}`);
|
|
1954
1694
|
if (!response.ok) {
|
|
1955
|
-
log$
|
|
1695
|
+
log$9.error(`password reset failed with message ${response.statusText}`);
|
|
1956
1696
|
const configResponse2 = await response.json();
|
|
1957
1697
|
throw Error(
|
|
1958
1698
|
`${configResponse2?.error}:There was a problem resetting the password.`
|
|
@@ -1968,7 +1708,7 @@ const studioAcceptOrgInvitation = async (token2, password, name) => acceptOrgInv
|
|
|
1968
1708
|
`${service$8.BASE_URL}/api/server/acceptInvite`
|
|
1969
1709
|
);
|
|
1970
1710
|
const acceptOrgInvitation = async (token2, password, name, url = `${service$8.BASE_URL}/api/server/acceptInvite`) => {
|
|
1971
|
-
log$
|
|
1711
|
+
log$9.debug(
|
|
1972
1712
|
`accepting invite with token ${token2} and password ${password.replace(
|
|
1973
1713
|
/./g,
|
|
1974
1714
|
"*"
|
|
@@ -1983,9 +1723,9 @@ const acceptOrgInvitation = async (token2, password, name, url = `${service$8.BA
|
|
|
1983
1723
|
name
|
|
1984
1724
|
})
|
|
1985
1725
|
});
|
|
1986
|
-
log$
|
|
1726
|
+
log$9.debug(`invitation accept returned status ${response.status}`);
|
|
1987
1727
|
if (!response.ok) {
|
|
1988
|
-
log$
|
|
1728
|
+
log$9.error(`invite failed with message ${response.statusText}`);
|
|
1989
1729
|
const configResponse2 = await response.json();
|
|
1990
1730
|
throw Error(
|
|
1991
1731
|
`${configResponse2?.error}:There was a problem accepting the invite.`
|
|
@@ -2161,15 +1901,6 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
2161
1901
|
gpioApi,
|
|
2162
1902
|
gpioServiceRequest
|
|
2163
1903
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2164
|
-
function mapGpioChipToOptions(dto) {
|
|
2165
|
-
return dto;
|
|
2166
|
-
}
|
|
2167
|
-
function createGpioChipModel(dto) {
|
|
2168
|
-
return GpioChip.instance(dto.id).options(mapGpioChipToOptions(dto)).build();
|
|
2169
|
-
}
|
|
2170
|
-
function updateGpioChipModel(dto, model) {
|
|
2171
|
-
model.updateModel(mapGpioChipToOptions(dto));
|
|
2172
|
-
}
|
|
2173
1904
|
function filterGpioChipDto(chip) {
|
|
2174
1905
|
return !!chip.num || chip.num === 0;
|
|
2175
1906
|
}
|
|
@@ -2296,8 +2027,7 @@ GpioChipContainerModelImpl = __decorateClass$1([
|
|
|
2296
2027
|
sortKey: "num"
|
|
2297
2028
|
},
|
|
2298
2029
|
reconcile: {
|
|
2299
|
-
|
|
2300
|
-
update: updateGpioChipModel,
|
|
2030
|
+
model: GpioChip,
|
|
2301
2031
|
filter: filterGpioChipDto,
|
|
2302
2032
|
idMapper: mapGpioChipId,
|
|
2303
2033
|
afterCreate: afterGpioChipCreated
|
|
@@ -2307,15 +2037,15 @@ GpioChipContainerModelImpl = __decorateClass$1([
|
|
|
2307
2037
|
], GpioChipContainerModelImpl);
|
|
2308
2038
|
const GpioChipContainer = GpioChipContainerModelImpl.Registration;
|
|
2309
2039
|
GpioChipContainer.addRelatedModel(GpioChip);
|
|
2310
|
-
const log$
|
|
2311
|
-
|
|
2312
|
-
|
|
2040
|
+
const log$8 = service$8.KosLog.createLogger({
|
|
2041
|
+
group: service$8.LogGroup.service,
|
|
2042
|
+
name: "studio-properties-service"
|
|
2313
2043
|
});
|
|
2314
2044
|
const SERVICE_PATH = "/api/kos/studio/properties";
|
|
2315
2045
|
const getStudioProperties = async (connectionId) => {
|
|
2316
|
-
log$
|
|
2046
|
+
log$8.debug("sending GET for studio-properties");
|
|
2317
2047
|
if (!connectionId) {
|
|
2318
|
-
log$
|
|
2048
|
+
log$8.error("connectionId is undefined");
|
|
2319
2049
|
throw new Error("connectionId is undefined");
|
|
2320
2050
|
}
|
|
2321
2051
|
return await service$8.api.get(
|
|
@@ -2404,7 +2134,10 @@ let StudioPropertiesModelImpl = class {
|
|
|
2404
2134
|
}, {});
|
|
2405
2135
|
this.data.setValues(update ?? DEFAULT_STUDIO_PROPERTIES);
|
|
2406
2136
|
service$8.KosLog.ifDebug(
|
|
2407
|
-
() => this.logger.debug(
|
|
2137
|
+
() => this.logger.debug(
|
|
2138
|
+
`studio-properties loaded: ${JSON.stringify(update)}`
|
|
2139
|
+
),
|
|
2140
|
+
this.logger
|
|
2408
2141
|
);
|
|
2409
2142
|
}
|
|
2410
2143
|
}
|
|
@@ -2477,7 +2210,7 @@ const MessageContainer = styled.div`
|
|
|
2477
2210
|
color: ${({ theme }) => theme === "light" ? "black" : "white"};
|
|
2478
2211
|
z-index: 10000;
|
|
2479
2212
|
`;
|
|
2480
|
-
const log$
|
|
2213
|
+
const log$7 = service$8.KosLog.createLogger({ group: service$8.LogGroup.ui, name: "error-boundary" });
|
|
2481
2214
|
class ErrorBoundary extends React.Component {
|
|
2482
2215
|
constructor(props) {
|
|
2483
2216
|
super(props);
|
|
@@ -2494,7 +2227,7 @@ class ErrorBoundary extends React.Component {
|
|
|
2494
2227
|
}
|
|
2495
2228
|
componentDidCatch(error, errorInfo) {
|
|
2496
2229
|
const seam = this.props.name ? ` in ${this.props.name}` : "";
|
|
2497
|
-
log$
|
|
2230
|
+
log$7.error(
|
|
2498
2231
|
`Error boundary caught${seam}: ${error?.message ?? error}`,
|
|
2499
2232
|
error,
|
|
2500
2233
|
errorInfo.componentStack
|
|
@@ -2604,11 +2337,14 @@ const KosModelProvider = ({
|
|
|
2604
2337
|
);
|
|
2605
2338
|
return /* @__PURE__ */ jsxRuntime.jsx(KosModelContext.Provider, { value: { model, setModel: setKosModel }, children });
|
|
2606
2339
|
};
|
|
2607
|
-
const log$
|
|
2340
|
+
const log$6 = service$8.KosLog.createLogger({
|
|
2341
|
+
group: service$8.LogGroup.ui,
|
|
2342
|
+
name: "kos-model-hierarchy-context"
|
|
2343
|
+
});
|
|
2608
2344
|
const defaultNestedProps = {
|
|
2609
2345
|
models: [],
|
|
2610
2346
|
addModel: () => {
|
|
2611
|
-
log$
|
|
2347
|
+
log$6.debug("Default implementation being used. Do Nothing.");
|
|
2612
2348
|
}
|
|
2613
2349
|
};
|
|
2614
2350
|
const NestedModelContext = React.createContext(defaultNestedProps);
|
|
@@ -2617,7 +2353,7 @@ const KosModelCollectionProvider = ({ children }) => {
|
|
|
2617
2353
|
const addModel = React.useCallback(
|
|
2618
2354
|
(model) => {
|
|
2619
2355
|
if (!models.includes(model)) {
|
|
2620
|
-
log$
|
|
2356
|
+
log$6.debug("adding to hierarchy context", model.id);
|
|
2621
2357
|
setModels((prevModels) => [...prevModels, model]);
|
|
2622
2358
|
}
|
|
2623
2359
|
},
|
|
@@ -2649,7 +2385,10 @@ const useModelFromHierarchy = (type) => {
|
|
|
2649
2385
|
});
|
|
2650
2386
|
return context[0];
|
|
2651
2387
|
};
|
|
2652
|
-
const log$
|
|
2388
|
+
const log$5 = service$8.KosLog.createLogger({
|
|
2389
|
+
group: service$8.LogGroup.ui,
|
|
2390
|
+
name: "kos-model-loader"
|
|
2391
|
+
});
|
|
2653
2392
|
const DefaultLoader = () => /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
2654
2393
|
const KosModelLoader = ({ fallback, children, ...modelProps }) => /* @__PURE__ */ jsxRuntime.jsx(KosModelProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { fallback, children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(KosModelLoaderDisplay, { ...modelProps, children }) }) }) });
|
|
2655
2394
|
const KosModelLoaderDisplay = (props) => {
|
|
@@ -2668,7 +2407,7 @@ const KosModelLoaderDisplay = (props) => {
|
|
|
2668
2407
|
}
|
|
2669
2408
|
}, [hierarchyContext, props.model, setModel]);
|
|
2670
2409
|
if (props.error) {
|
|
2671
|
-
log$
|
|
2410
|
+
log$5.error(props.error);
|
|
2672
2411
|
throw new Error(props.error);
|
|
2673
2412
|
}
|
|
2674
2413
|
const loader = props.loading || /* @__PURE__ */ jsxRuntime.jsx(DefaultLoader, {});
|
|
@@ -2708,6 +2447,10 @@ const useKosCore = () => {
|
|
|
2708
2447
|
return context;
|
|
2709
2448
|
};
|
|
2710
2449
|
const KOS_RECOVERING_SESSION_KEY = "kos:recovering";
|
|
2450
|
+
const log$4 = service$8.KosLog.createLogger({
|
|
2451
|
+
group: service$8.LogGroup.ui,
|
|
2452
|
+
name: "reload-on-disconnect-policy"
|
|
2453
|
+
});
|
|
2711
2454
|
const DEFAULT_GRACE_MS = 3e3;
|
|
2712
2455
|
const defaultReloadFn = () => {
|
|
2713
2456
|
window.location.reload();
|
|
@@ -2741,12 +2484,12 @@ const ReloadOnDisconnectPolicy = ({
|
|
|
2741
2484
|
JSON.stringify(info)
|
|
2742
2485
|
);
|
|
2743
2486
|
} catch (err) {
|
|
2744
|
-
|
|
2487
|
+
log$4.warn(
|
|
2745
2488
|
"ReloadOnDisconnectPolicy: failed to write sessionStorage",
|
|
2746
2489
|
err
|
|
2747
2490
|
);
|
|
2748
2491
|
}
|
|
2749
|
-
|
|
2492
|
+
log$4.warn(
|
|
2750
2493
|
`ReloadOnDisconnectPolicy: scheduling reload in ${graceMs}ms (code=${info.code}, wasClean=${info.wasClean})`
|
|
2751
2494
|
);
|
|
2752
2495
|
pendingReloadRef.current = setTimeout(() => {
|
|
@@ -2754,7 +2497,7 @@ const ReloadOnDisconnectPolicy = ({
|
|
|
2754
2497
|
try {
|
|
2755
2498
|
onBeforeReload?.(info);
|
|
2756
2499
|
} catch (err) {
|
|
2757
|
-
|
|
2500
|
+
log$4.error("ReloadOnDisconnectPolicy: onBeforeReload threw", err);
|
|
2758
2501
|
}
|
|
2759
2502
|
reloadFn();
|
|
2760
2503
|
}, graceMs);
|
|
@@ -3209,6 +2952,10 @@ const TokenContext = React.createContext(token);
|
|
|
3209
2952
|
function TokenProvider({ children }) {
|
|
3210
2953
|
return /* @__PURE__ */ jsxRuntime.jsx(TokenContext.Provider, { value: token, children });
|
|
3211
2954
|
}
|
|
2955
|
+
const log$3 = service$8.KosLog.createLogger({
|
|
2956
|
+
group: service$8.LogGroup.ui,
|
|
2957
|
+
name: "kos-translations-provider"
|
|
2958
|
+
});
|
|
3212
2959
|
const TranslationContainerContext = React.createContext(void 0);
|
|
3213
2960
|
const getDefaultHost = () => {
|
|
3214
2961
|
const defaultHost = window.location.origin;
|
|
@@ -3242,7 +2989,7 @@ const KosTranslationProvider = ({
|
|
|
3242
2989
|
const descriptorsResults = await Promise.allSettled(descriptorPromises);
|
|
3243
2990
|
const descriptors = descriptorsResults.map((d) => {
|
|
3244
2991
|
if (d.status === "rejected") {
|
|
3245
|
-
|
|
2992
|
+
log$3.warn("Failed to load localization descriptor", d.reason);
|
|
3246
2993
|
return void 0;
|
|
3247
2994
|
}
|
|
3248
2995
|
return d.value;
|
|
@@ -3348,8 +3095,11 @@ function renderDecodedPreview({
|
|
|
3348
3095
|
ctx.clearRect(0, 0, width * pixelSize, height * pixelSize);
|
|
3349
3096
|
ctx.drawImage(tempCanvas, 0, 0, width * pixelSize, height * pixelSize);
|
|
3350
3097
|
}
|
|
3351
|
-
const log = service$8.KosLog.createLogger({
|
|
3352
|
-
|
|
3098
|
+
const log$2 = service$8.KosLog.createLogger({
|
|
3099
|
+
group: service$8.LogGroup.ui,
|
|
3100
|
+
name: "canvas-streamer"
|
|
3101
|
+
});
|
|
3102
|
+
log$2.debug("main-view component loaded");
|
|
3353
3103
|
const PIXEL_SIZE = 10;
|
|
3354
3104
|
const CanvasStreamerBase = mobxReactLite.observer(
|
|
3355
3105
|
({
|
|
@@ -3576,7 +3326,7 @@ function withStorageDeviceContainer(WrappedComponent) {
|
|
|
3576
3326
|
return /* @__PURE__ */ jsxRuntime.jsx(KosModelLoader2, { ...status, children: /* @__PURE__ */ jsxRuntime.jsx(WrappedComponent, { ...props, storageDeviceContainer: model }) });
|
|
3577
3327
|
};
|
|
3578
3328
|
}
|
|
3579
|
-
const LOG = service$8.KosLog.createLogger({ name: "use-timer" });
|
|
3329
|
+
const LOG = service$8.KosLog.createLogger({ group: service$8.LogGroup.ui, name: "use-timer" });
|
|
3580
3330
|
const useTimer = ({
|
|
3581
3331
|
timerName,
|
|
3582
3332
|
onTimerExpired,
|
|
@@ -3698,6 +3448,10 @@ const Trans = (props) => {
|
|
|
3698
3448
|
const element = substituteBlocks(translated, components || {});
|
|
3699
3449
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: props.className, children: element });
|
|
3700
3450
|
};
|
|
3451
|
+
const log$1 = service$8.KosLog.createLogger({
|
|
3452
|
+
group: service$8.LogGroup.ui,
|
|
3453
|
+
name: "use-translation"
|
|
3454
|
+
});
|
|
3701
3455
|
const cache = /* @__PURE__ */ new Map();
|
|
3702
3456
|
function fetchData(key, fetcher) {
|
|
3703
3457
|
if (cache.has(key)) {
|
|
@@ -3772,7 +3526,7 @@ const useKosTranslation = (namespace, baseOptions) => {
|
|
|
3772
3526
|
if (translationModel) {
|
|
3773
3527
|
return translationModel.resolveKey(expandedKey, options);
|
|
3774
3528
|
}
|
|
3775
|
-
|
|
3529
|
+
log$1.debug(
|
|
3776
3530
|
`Translation model ${namespace} not ready for key: ${expandedKey}`
|
|
3777
3531
|
);
|
|
3778
3532
|
return expandedKey;
|
|
@@ -4816,6 +4570,10 @@ const useKosTimeFormats = (timeFormatMap = DEFAULT_FORMAT_MAP) => {
|
|
|
4816
4570
|
};
|
|
4817
4571
|
};
|
|
4818
4572
|
const useLocalComputed = (callback, dependencies) => React.useMemo(() => service$8.kosComputed(callback), dependencies);
|
|
4573
|
+
const log = service$8.KosLog.createLogger({
|
|
4574
|
+
group: service$8.LogGroup.ui,
|
|
4575
|
+
name: "use-mutation-observer"
|
|
4576
|
+
});
|
|
4819
4577
|
const DEFAULT_OPTIONS = {
|
|
4820
4578
|
config: { attributes: true, childList: true, subtree: true }
|
|
4821
4579
|
};
|
|
@@ -4838,7 +4596,7 @@ function useMutationObserver(targetEl, cb, options = DEFAULT_OPTIONS) {
|
|
|
4838
4596
|
try {
|
|
4839
4597
|
observer.observe(targetEl, config);
|
|
4840
4598
|
} catch (e) {
|
|
4841
|
-
|
|
4599
|
+
log.error(e);
|
|
4842
4600
|
}
|
|
4843
4601
|
return () => {
|
|
4844
4602
|
if (observer) {
|
|
@@ -4859,8 +4617,8 @@ const DomIntersectionStrategy = {
|
|
|
4859
4617
|
}
|
|
4860
4618
|
};
|
|
4861
4619
|
const logger = service$8.KosLog.createLogger({
|
|
4862
|
-
|
|
4863
|
-
|
|
4620
|
+
group: service$8.LogGroup.ui,
|
|
4621
|
+
name: "usePressGesture"
|
|
4864
4622
|
});
|
|
4865
4623
|
function usePressGesture({
|
|
4866
4624
|
onPressed,
|
|
@@ -5111,7 +4869,7 @@ function withProjectReloading(WrappedComponent) {
|
|
|
5111
4869
|
return reloading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingMessage, { message: "Wait a moment while your project reloads..." }) : /* @__PURE__ */ jsxRuntime.jsx(WrappedComponent, { ...props });
|
|
5112
4870
|
};
|
|
5113
4871
|
}
|
|
5114
|
-
registerApiLevels({ "kos-ui-sdk":
|
|
4872
|
+
registerApiLevels({ "kos-ui-sdk": 25 });
|
|
5115
4873
|
exports.AuthState = service$8.AuthState;
|
|
5116
4874
|
Object.defineProperty(exports, "BASE_URL", {
|
|
5117
4875
|
enumerable: true,
|
|
@@ -5120,6 +4878,7 @@ Object.defineProperty(exports, "BASE_URL", {
|
|
|
5120
4878
|
exports.BrowserKosRouter = service$8.BrowserKosRouter;
|
|
5121
4879
|
exports.BrowserRouter = service$8.BrowserRouter;
|
|
5122
4880
|
exports.CancellableServiceManager = service$8.CancellableServiceManager;
|
|
4881
|
+
exports.CancellationBatch = service$8.CancellationBatch;
|
|
5123
4882
|
exports.CanvasDispatcher = service$8.CanvasDispatcher;
|
|
5124
4883
|
exports.CanvasRenderer = service$8.CanvasRenderer;
|
|
5125
4884
|
exports.ChildModels = service$8.ChildModels;
|
|
@@ -5218,10 +4977,11 @@ exports.LOGIN_HOST = service$8.LOGIN_HOST;
|
|
|
5218
4977
|
exports.LOGIN_URL = service$8.LOGIN_URL;
|
|
5219
4978
|
exports.LogBlock = service$8.LogBlock;
|
|
5220
4979
|
exports.LogBlockContainer = service$8.LogBlockContainer;
|
|
5221
|
-
exports.
|
|
4980
|
+
exports.LogGroup = service$8.LogGroup;
|
|
5222
4981
|
exports.LogStream = service$8.LogStream;
|
|
5223
4982
|
exports.LogStreamContainer = service$8.LogStreamContainer;
|
|
5224
4983
|
exports.LoggerSetup = service$8.LoggerSetup;
|
|
4984
|
+
exports.MESSAGE_LOGGER_NAME = service$8.MESSAGE_LOGGER_NAME;
|
|
5225
4985
|
exports.MODEL_DELETION_DELAY = service$8.MODEL_DELETION_DELAY;
|
|
5226
4986
|
exports.MixinModels = service$8.MixinModels;
|
|
5227
4987
|
exports.ModelEffects = service$8.ModelEffects;
|
|
@@ -5305,7 +5065,9 @@ exports.convert = service$8.convert;
|
|
|
5305
5065
|
exports.convertWithUnits = service$8.convertWithUnits;
|
|
5306
5066
|
exports.createBaseMessage = service$8.createBaseMessage;
|
|
5307
5067
|
exports.createBroadcastMessageResponse = service$8.createBroadcastMessageResponse;
|
|
5068
|
+
exports.createCancellablePromise = service$8.createCancellablePromise;
|
|
5308
5069
|
exports.createCancellableService = service$8.createCancellableService;
|
|
5070
|
+
exports.createCancellationBatch = service$8.createCancellationBatch;
|
|
5309
5071
|
exports.createClient = service$8.createClient;
|
|
5310
5072
|
exports.createFosBaseMessage = service$8.createFosBaseMessage;
|
|
5311
5073
|
exports.createHeaders = service$8.createHeaders;
|
|
@@ -5339,7 +5101,6 @@ exports.getHttpRouteHandlers = service$8.getHttpRouteHandlers;
|
|
|
5339
5101
|
exports.getKosCompanionModel = service$8.getKosCompanionModel;
|
|
5340
5102
|
exports.getKosConnectionId = service$8.getKosConnectionId;
|
|
5341
5103
|
exports.getKosLocalizationDescriptor = service$8.getKosLocalizationDescriptor;
|
|
5342
|
-
exports.getKosMessageLogging = service$8.getKosMessageLogging;
|
|
5343
5104
|
exports.getKosModel = service$8.getKosModel;
|
|
5344
5105
|
exports.getKosModelActivationState = service$8.getKosModelActivationState;
|
|
5345
5106
|
exports.getKosModelSync = service$8.getKosModelSync;
|
|
@@ -5347,7 +5108,6 @@ exports.getKosModelType = service$8.getKosModelType;
|
|
|
5347
5108
|
exports.getKosSessionKey = service$8.getKosSessionKey;
|
|
5348
5109
|
exports.getLocalizationDescriptor = service$8.getLocalizationDescriptor;
|
|
5349
5110
|
exports.getLogLevel = service$8.getLogLevel;
|
|
5350
|
-
exports.getLogMessageToStudio = service$8.getLogMessageToStudio;
|
|
5351
5111
|
exports.getMessageBody = service$8.getMessageBody;
|
|
5352
5112
|
exports.getObservableCompanions = service$8.getObservableCompanions;
|
|
5353
5113
|
exports.getQueryParams = service$8.getQueryParams;
|
|
@@ -5399,6 +5159,7 @@ exports.kosStateGuard = service$8.kosStateGuard;
|
|
|
5399
5159
|
exports.kosStateMachine = service$8.kosStateMachine;
|
|
5400
5160
|
exports.kosTopicHandler = service$8.kosTopicHandler;
|
|
5401
5161
|
exports.kosWhen = service$8.kosWhen;
|
|
5162
|
+
exports.makeCancellable = service$8.makeCancellable;
|
|
5402
5163
|
exports.mapConfigBeanModelToDto = service$8.mapConfigBeanModelToDto;
|
|
5403
5164
|
exports.mapDataToModel = service$8.mapDataToModel;
|
|
5404
5165
|
exports.mapDtoToConfigBeanModel = service$8.mapDtoToConfigBeanModel;
|
|
@@ -5434,21 +5195,26 @@ exports.resolveKosProfiles = service$8.resolveKosProfiles;
|
|
|
5434
5195
|
exports.resolveListDeltas = service$8.resolveListDeltas;
|
|
5435
5196
|
exports.resolveServiceRequestParameters = service$8.resolveServiceRequestParameters;
|
|
5436
5197
|
exports.resolveServiceUrl = service$8.resolveServiceUrl;
|
|
5198
|
+
exports.retryWithExponentialBackoff = service$8.retryWithExponentialBackoff;
|
|
5437
5199
|
exports.sendAsyncIntent = service$8.sendAsyncIntent;
|
|
5438
5200
|
exports.sendBroadcastMessage = service$8.sendBroadcastMessage;
|
|
5439
5201
|
exports.sendIntent = service$8.sendIntent;
|
|
5440
5202
|
exports.sendKosHttpMessageResponse = service$8.sendKosHttpMessageResponse;
|
|
5441
5203
|
exports.sendKosMessage = service$8.sendKosMessage;
|
|
5442
5204
|
exports.sendKosMessageResponse = service$8.sendKosMessageResponse;
|
|
5205
|
+
exports.sendRequest = service$8.sendRequest;
|
|
5443
5206
|
exports.sendStudioMessage = service$8.sendStudioMessage;
|
|
5444
5207
|
exports.sendStudioMessageRequest = service$8.sendStudioMessageRequest;
|
|
5208
|
+
exports.syncPublish = service$8.syncPublish;
|
|
5445
5209
|
exports.troubleByTypeReducer = service$8.troubleByTypeReducer;
|
|
5446
5210
|
exports.troubleDataFactory = service$8.troubleDataFactory;
|
|
5447
5211
|
exports.unloadKosModel = service$8.unloadKosModel;
|
|
5448
5212
|
exports.uuid = service$8.uuid;
|
|
5449
5213
|
exports.waitForAppToStart = service$8.waitForAppToStart;
|
|
5450
5214
|
exports.waitForAppsToStart = service$8.waitForAppsToStart;
|
|
5215
|
+
exports.waitForRequest = service$8.waitForRequest;
|
|
5451
5216
|
exports.whenReady = service$8.whenReady;
|
|
5217
|
+
exports.withCancellation = service$8.withCancellation;
|
|
5452
5218
|
exports.wrapWithFutureLifecycle = service$8.wrapWithFutureLifecycle;
|
|
5453
5219
|
Object.defineProperty(exports, "makeAutoObservable", {
|
|
5454
5220
|
enumerable: true,
|
|
@@ -5463,7 +5229,6 @@ Object.defineProperty(exports, "kosComponent", {
|
|
|
5463
5229
|
get: () => mobxReactLite.observer
|
|
5464
5230
|
});
|
|
5465
5231
|
exports.AncestorPathVisitor = AncestorPathVisitor;
|
|
5466
|
-
exports.CancellationBatch = CancellationBatch;
|
|
5467
5232
|
exports.CanvasDispatcherServices = index$7;
|
|
5468
5233
|
exports.CanvasStreamer = CanvasStreamer;
|
|
5469
5234
|
exports.CanvasStreamerBase = CanvasStreamerBase;
|
|
@@ -5545,8 +5310,6 @@ exports.clearPath = clearPath;
|
|
|
5545
5310
|
exports.clearServiceResponse = clearServiceResponse;
|
|
5546
5311
|
exports.collectLocaleOptions = collectLocaleOptions;
|
|
5547
5312
|
exports.convertFileSizeRaw = convertFileSizeRaw;
|
|
5548
|
-
exports.createCancellablePromise = createCancellablePromise;
|
|
5549
|
-
exports.createCancellationBatch = createCancellationBatch;
|
|
5550
5313
|
exports.debounce = debounce;
|
|
5551
5314
|
exports.executeServiceRequest = executeServiceRequest;
|
|
5552
5315
|
exports.fetchModel = fetchModel;
|
|
@@ -5584,7 +5347,6 @@ exports.kosConfigProperty = kosConfigProperty;
|
|
|
5584
5347
|
exports.kosContainerIndexAware = kosContainerIndexAware;
|
|
5585
5348
|
exports.kosContext = kosContext;
|
|
5586
5349
|
exports.kosIndexAware = kosIndexAware;
|
|
5587
|
-
exports.kosLogger = kosLogger;
|
|
5588
5350
|
exports.kosMixin = kosMixin;
|
|
5589
5351
|
exports.kosMultipleFutureAware = kosMultipleFutureAware;
|
|
5590
5352
|
exports.kosReference = kosReference;
|
|
@@ -5594,15 +5356,12 @@ exports.kosSubscribe = kosSubscribe;
|
|
|
5594
5356
|
exports.kosTroubleAware = kosTroubleAware;
|
|
5595
5357
|
exports.kosViewModel = kosViewModel;
|
|
5596
5358
|
exports.login = login;
|
|
5597
|
-
exports.makeCancellable = makeCancellable;
|
|
5598
5359
|
exports.mergeLocalizationDescriptors = mergeLocalizationDescriptors;
|
|
5599
5360
|
exports.pairedClientHeartbeat = pairedClientHeartbeat;
|
|
5600
5361
|
exports.processMiddleware = processMiddleware;
|
|
5601
5362
|
exports.readModelHookEntry = readModelHookEntry;
|
|
5602
5363
|
exports.resetPassword = resetPassword;
|
|
5603
5364
|
exports.resolveVariable = resolveVariable;
|
|
5604
|
-
exports.retryWithExponentialBackoff = retryWithExponentialBackoff;
|
|
5605
|
-
exports.sendRequest = sendRequest;
|
|
5606
5365
|
exports.startPasswordReset = startPasswordReset;
|
|
5607
5366
|
exports.stringComponentInsert = stringComponentInsert;
|
|
5608
5367
|
exports.studioAcceptOrgInvitation = studioAcceptOrgInvitation;
|
|
@@ -5610,7 +5369,6 @@ exports.studioLogin = studioLogin;
|
|
|
5610
5369
|
exports.studioResetPassword = studioResetPassword;
|
|
5611
5370
|
exports.studioStartPasswordReset = studioStartPasswordReset;
|
|
5612
5371
|
exports.subscribeStore = subscribeStore;
|
|
5613
|
-
exports.syncPublish = syncPublish;
|
|
5614
5372
|
exports.updateCompanionModelRegistration = updateCompanionModelRegistration;
|
|
5615
5373
|
exports.updateModelRegistration = updateModelRegistration;
|
|
5616
5374
|
exports.updateRegion = updateRegion;
|
|
@@ -5675,8 +5433,6 @@ exports.useViewModel = useViewModel;
|
|
|
5675
5433
|
exports.useYears = useYears;
|
|
5676
5434
|
exports.useYearsOptions = useYearsOptions;
|
|
5677
5435
|
exports.variableToHex = variableToHex;
|
|
5678
|
-
exports.waitForRequest = waitForRequest;
|
|
5679
|
-
exports.withCancellation = withCancellation;
|
|
5680
5436
|
exports.withDevice = withDevice;
|
|
5681
5437
|
exports.withKosTime = withKosTime;
|
|
5682
5438
|
exports.withNetworkInterfaceContainer = withNetworkInterfaceContainer;
|