@kosdev-code/kos-ui-sdk 3.0.28 → 3.0.30
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-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-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/index.d.ts +2 -0
- package/core/core/transport/mock/index.d.ts.map +1 -1
- package/core/core/transport/mock/mock-boot.d.ts +39 -0
- package/core/core/transport/mock/mock-boot.d.ts.map +1 -0
- 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 +109 -323
- package/index.cjs.map +1 -1
- package/index.js +363 -577
- 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/translation/translation-model.d.ts +4 -2
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/translation/types/index.d.ts +24 -6
- 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-BPN4QLfN.cjs} +1299 -711
- package/software-info-registration-BPN4QLfN.cjs.map +1 -0
- package/{software-info-registration-kSGacOka.js → software-info-registration-BTHhITrs.js} +1610 -1022
- package/software-info-registration-BTHhITrs.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 +8 -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-BPN4QLfN.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];
|
|
@@ -666,6 +661,33 @@ function kosViewModel(options) {
|
|
|
666
661
|
return ProxiedClass;
|
|
667
662
|
};
|
|
668
663
|
}
|
|
664
|
+
const BOOT_PARAMS = ["kosMock", "kosFixtureServer", "kosFixture", "kosSetup"];
|
|
665
|
+
const bootKey = (params) => BOOT_PARAMS.map((name) => {
|
|
666
|
+
const value = params.get(name);
|
|
667
|
+
if (value === null) return "";
|
|
668
|
+
return name === "kosSetup" ? value.split(",").filter(Boolean).sort().join(",") : value;
|
|
669
|
+
}).join("|");
|
|
670
|
+
function kosMockBootUrl(href, boot) {
|
|
671
|
+
const url = new URL(href);
|
|
672
|
+
const before = bootKey(url.searchParams);
|
|
673
|
+
for (const name of BOOT_PARAMS) url.searchParams.delete(name);
|
|
674
|
+
const setups = boot?.setups?.filter(Boolean) ?? [];
|
|
675
|
+
if (boot && (boot.mode || boot.fixture || setups.length > 0)) {
|
|
676
|
+
url.searchParams.set("kosMock", boot.mode ?? "on");
|
|
677
|
+
if (boot.fixture || setups.length > 0) {
|
|
678
|
+
url.searchParams.set("kosFixtureServer", boot.fixtureServer ?? "");
|
|
679
|
+
}
|
|
680
|
+
if (boot.fixture) url.searchParams.set("kosFixture", boot.fixture);
|
|
681
|
+
if (setups.length > 0) url.searchParams.set("kosSetup", setups.join(","));
|
|
682
|
+
}
|
|
683
|
+
return bootKey(url.searchParams) === before ? void 0 : url.toString();
|
|
684
|
+
}
|
|
685
|
+
function ensureKosMockBoot(boot, location = window.location) {
|
|
686
|
+
const target = kosMockBootUrl(location.href, boot);
|
|
687
|
+
if (target === void 0) return false;
|
|
688
|
+
location.replace(target);
|
|
689
|
+
return true;
|
|
690
|
+
}
|
|
669
691
|
class AncestorPathVisitor extends service$8.KosModelVisitor {
|
|
670
692
|
targetId;
|
|
671
693
|
currentPath = [];
|
|
@@ -961,33 +983,6 @@ const pairedClientHeartbeat = ({
|
|
|
961
983
|
controller.signal.addEventListener("abort", handleAbort);
|
|
962
984
|
return { cleanUpHeartbeat };
|
|
963
985
|
};
|
|
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
986
|
function getServiceResponse(model, path, method = "get") {
|
|
992
987
|
const store = model.serviceResponses;
|
|
993
988
|
if (!store) {
|
|
@@ -1023,58 +1018,6 @@ function clearAllServiceResponses(model) {
|
|
|
1023
1018
|
}
|
|
1024
1019
|
store.clear();
|
|
1025
1020
|
}
|
|
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
1021
|
function kosIndexAware(options) {
|
|
1079
1022
|
return (target) => {
|
|
1080
1023
|
const collection = options?.collection;
|
|
@@ -1372,7 +1315,10 @@ const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
1372
1315
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1373
1316
|
const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1374
1317
|
__proto__: null,
|
|
1375
|
-
|
|
1318
|
+
addLogOverride: service$8.addLogOverride,
|
|
1319
|
+
getLogGroups: service$8.getLogGroups,
|
|
1320
|
+
getLogOverrides: service$8.getLogOverrides,
|
|
1321
|
+
removeLogOverride: service$8.removeLogOverride
|
|
1376
1322
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1377
1323
|
const index$a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1378
1324
|
__proto__: null,
|
|
@@ -1396,185 +1342,6 @@ const index$8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
1396
1342
|
getTroubles: service$8.getTroubles,
|
|
1397
1343
|
resolveTrouble: service$8.resolveTrouble
|
|
1398
1344
|
}, 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
1345
|
const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1579
1346
|
__proto__: null,
|
|
1580
1347
|
sendCanvasData: service$8.sendCanvasData
|
|
@@ -1774,7 +1541,7 @@ const updateRegion = async (region) => {
|
|
|
1774
1541
|
regionInfo.updateProperty(region);
|
|
1775
1542
|
};
|
|
1776
1543
|
async function getKosServiceApi() {
|
|
1777
|
-
const { default: API } = await Promise.resolve().then(() => require("./software-info-registration-
|
|
1544
|
+
const { default: API } = await Promise.resolve().then(() => require("./software-info-registration-BPN4QLfN.cjs")).then((n) => n.service);
|
|
1778
1545
|
return API;
|
|
1779
1546
|
}
|
|
1780
1547
|
function kosServiceRequest$7(params) {
|
|
@@ -1902,7 +1669,7 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
1902
1669
|
function isTroubleAware(obj) {
|
|
1903
1670
|
return obj?.troubles !== void 0 && obj?.troubles instanceof Array && obj?.troublesByType !== void 0 && typeof obj?.troublesByType === "object";
|
|
1904
1671
|
}
|
|
1905
|
-
const log$
|
|
1672
|
+
const log$9 = service$8.KosLog.createLogger({ group: service$8.LogGroup.service, name: "services" });
|
|
1906
1673
|
const studioLogin = async (username, password) => login(username, password, `${service$8.BASE_URL}/api/server/login`);
|
|
1907
1674
|
const login = async (username, password, url = `${service$8.BASE_URL}/api/login`) => {
|
|
1908
1675
|
const response = await service$8.kosFetch(`${url}`, {
|
|
@@ -1936,7 +1703,7 @@ const startPasswordReset = async (userId, url = `${service$8.BASE_URL}/api/start
|
|
|
1936
1703
|
};
|
|
1937
1704
|
const studioResetPassword = async (token2, password) => resetPassword(token2, password, `${service$8.BASE_URL}/api/server/resetPassword`);
|
|
1938
1705
|
const resetPassword = async (token2, password, url = `${service$8.BASE_URL}/api/resetPassword`) => {
|
|
1939
|
-
log$
|
|
1706
|
+
log$9.debug(
|
|
1940
1707
|
`resetting password with token ${token2} and password ${password.replace(
|
|
1941
1708
|
/./g,
|
|
1942
1709
|
"*"
|
|
@@ -1950,9 +1717,9 @@ const resetPassword = async (token2, password, url = `${service$8.BASE_URL}/api/
|
|
|
1950
1717
|
password
|
|
1951
1718
|
})
|
|
1952
1719
|
});
|
|
1953
|
-
log$
|
|
1720
|
+
log$9.debug(`password reset returned status ${response.status}`);
|
|
1954
1721
|
if (!response.ok) {
|
|
1955
|
-
log$
|
|
1722
|
+
log$9.error(`password reset failed with message ${response.statusText}`);
|
|
1956
1723
|
const configResponse2 = await response.json();
|
|
1957
1724
|
throw Error(
|
|
1958
1725
|
`${configResponse2?.error}:There was a problem resetting the password.`
|
|
@@ -1968,7 +1735,7 @@ const studioAcceptOrgInvitation = async (token2, password, name) => acceptOrgInv
|
|
|
1968
1735
|
`${service$8.BASE_URL}/api/server/acceptInvite`
|
|
1969
1736
|
);
|
|
1970
1737
|
const acceptOrgInvitation = async (token2, password, name, url = `${service$8.BASE_URL}/api/server/acceptInvite`) => {
|
|
1971
|
-
log$
|
|
1738
|
+
log$9.debug(
|
|
1972
1739
|
`accepting invite with token ${token2} and password ${password.replace(
|
|
1973
1740
|
/./g,
|
|
1974
1741
|
"*"
|
|
@@ -1983,9 +1750,9 @@ const acceptOrgInvitation = async (token2, password, name, url = `${service$8.BA
|
|
|
1983
1750
|
name
|
|
1984
1751
|
})
|
|
1985
1752
|
});
|
|
1986
|
-
log$
|
|
1753
|
+
log$9.debug(`invitation accept returned status ${response.status}`);
|
|
1987
1754
|
if (!response.ok) {
|
|
1988
|
-
log$
|
|
1755
|
+
log$9.error(`invite failed with message ${response.statusText}`);
|
|
1989
1756
|
const configResponse2 = await response.json();
|
|
1990
1757
|
throw Error(
|
|
1991
1758
|
`${configResponse2?.error}:There was a problem accepting the invite.`
|
|
@@ -2161,15 +1928,6 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
2161
1928
|
gpioApi,
|
|
2162
1929
|
gpioServiceRequest
|
|
2163
1930
|
}, 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
1931
|
function filterGpioChipDto(chip) {
|
|
2174
1932
|
return !!chip.num || chip.num === 0;
|
|
2175
1933
|
}
|
|
@@ -2296,8 +2054,7 @@ GpioChipContainerModelImpl = __decorateClass$1([
|
|
|
2296
2054
|
sortKey: "num"
|
|
2297
2055
|
},
|
|
2298
2056
|
reconcile: {
|
|
2299
|
-
|
|
2300
|
-
update: updateGpioChipModel,
|
|
2057
|
+
model: GpioChip,
|
|
2301
2058
|
filter: filterGpioChipDto,
|
|
2302
2059
|
idMapper: mapGpioChipId,
|
|
2303
2060
|
afterCreate: afterGpioChipCreated
|
|
@@ -2307,15 +2064,15 @@ GpioChipContainerModelImpl = __decorateClass$1([
|
|
|
2307
2064
|
], GpioChipContainerModelImpl);
|
|
2308
2065
|
const GpioChipContainer = GpioChipContainerModelImpl.Registration;
|
|
2309
2066
|
GpioChipContainer.addRelatedModel(GpioChip);
|
|
2310
|
-
const log$
|
|
2311
|
-
|
|
2312
|
-
|
|
2067
|
+
const log$8 = service$8.KosLog.createLogger({
|
|
2068
|
+
group: service$8.LogGroup.service,
|
|
2069
|
+
name: "studio-properties-service"
|
|
2313
2070
|
});
|
|
2314
2071
|
const SERVICE_PATH = "/api/kos/studio/properties";
|
|
2315
2072
|
const getStudioProperties = async (connectionId) => {
|
|
2316
|
-
log$
|
|
2073
|
+
log$8.debug("sending GET for studio-properties");
|
|
2317
2074
|
if (!connectionId) {
|
|
2318
|
-
log$
|
|
2075
|
+
log$8.error("connectionId is undefined");
|
|
2319
2076
|
throw new Error("connectionId is undefined");
|
|
2320
2077
|
}
|
|
2321
2078
|
return await service$8.api.get(
|
|
@@ -2404,7 +2161,10 @@ let StudioPropertiesModelImpl = class {
|
|
|
2404
2161
|
}, {});
|
|
2405
2162
|
this.data.setValues(update ?? DEFAULT_STUDIO_PROPERTIES);
|
|
2406
2163
|
service$8.KosLog.ifDebug(
|
|
2407
|
-
() => this.logger.debug(
|
|
2164
|
+
() => this.logger.debug(
|
|
2165
|
+
`studio-properties loaded: ${JSON.stringify(update)}`
|
|
2166
|
+
),
|
|
2167
|
+
this.logger
|
|
2408
2168
|
);
|
|
2409
2169
|
}
|
|
2410
2170
|
}
|
|
@@ -2477,7 +2237,7 @@ const MessageContainer = styled.div`
|
|
|
2477
2237
|
color: ${({ theme }) => theme === "light" ? "black" : "white"};
|
|
2478
2238
|
z-index: 10000;
|
|
2479
2239
|
`;
|
|
2480
|
-
const log$
|
|
2240
|
+
const log$7 = service$8.KosLog.createLogger({ group: service$8.LogGroup.ui, name: "error-boundary" });
|
|
2481
2241
|
class ErrorBoundary extends React.Component {
|
|
2482
2242
|
constructor(props) {
|
|
2483
2243
|
super(props);
|
|
@@ -2494,7 +2254,7 @@ class ErrorBoundary extends React.Component {
|
|
|
2494
2254
|
}
|
|
2495
2255
|
componentDidCatch(error, errorInfo) {
|
|
2496
2256
|
const seam = this.props.name ? ` in ${this.props.name}` : "";
|
|
2497
|
-
log$
|
|
2257
|
+
log$7.error(
|
|
2498
2258
|
`Error boundary caught${seam}: ${error?.message ?? error}`,
|
|
2499
2259
|
error,
|
|
2500
2260
|
errorInfo.componentStack
|
|
@@ -2604,11 +2364,14 @@ const KosModelProvider = ({
|
|
|
2604
2364
|
);
|
|
2605
2365
|
return /* @__PURE__ */ jsxRuntime.jsx(KosModelContext.Provider, { value: { model, setModel: setKosModel }, children });
|
|
2606
2366
|
};
|
|
2607
|
-
const log$
|
|
2367
|
+
const log$6 = service$8.KosLog.createLogger({
|
|
2368
|
+
group: service$8.LogGroup.ui,
|
|
2369
|
+
name: "kos-model-hierarchy-context"
|
|
2370
|
+
});
|
|
2608
2371
|
const defaultNestedProps = {
|
|
2609
2372
|
models: [],
|
|
2610
2373
|
addModel: () => {
|
|
2611
|
-
log$
|
|
2374
|
+
log$6.debug("Default implementation being used. Do Nothing.");
|
|
2612
2375
|
}
|
|
2613
2376
|
};
|
|
2614
2377
|
const NestedModelContext = React.createContext(defaultNestedProps);
|
|
@@ -2617,7 +2380,7 @@ const KosModelCollectionProvider = ({ children }) => {
|
|
|
2617
2380
|
const addModel = React.useCallback(
|
|
2618
2381
|
(model) => {
|
|
2619
2382
|
if (!models.includes(model)) {
|
|
2620
|
-
log$
|
|
2383
|
+
log$6.debug("adding to hierarchy context", model.id);
|
|
2621
2384
|
setModels((prevModels) => [...prevModels, model]);
|
|
2622
2385
|
}
|
|
2623
2386
|
},
|
|
@@ -2649,7 +2412,10 @@ const useModelFromHierarchy = (type) => {
|
|
|
2649
2412
|
});
|
|
2650
2413
|
return context[0];
|
|
2651
2414
|
};
|
|
2652
|
-
const log$
|
|
2415
|
+
const log$5 = service$8.KosLog.createLogger({
|
|
2416
|
+
group: service$8.LogGroup.ui,
|
|
2417
|
+
name: "kos-model-loader"
|
|
2418
|
+
});
|
|
2653
2419
|
const DefaultLoader = () => /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
2654
2420
|
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
2421
|
const KosModelLoaderDisplay = (props) => {
|
|
@@ -2668,7 +2434,7 @@ const KosModelLoaderDisplay = (props) => {
|
|
|
2668
2434
|
}
|
|
2669
2435
|
}, [hierarchyContext, props.model, setModel]);
|
|
2670
2436
|
if (props.error) {
|
|
2671
|
-
log$
|
|
2437
|
+
log$5.error(props.error);
|
|
2672
2438
|
throw new Error(props.error);
|
|
2673
2439
|
}
|
|
2674
2440
|
const loader = props.loading || /* @__PURE__ */ jsxRuntime.jsx(DefaultLoader, {});
|
|
@@ -2708,6 +2474,10 @@ const useKosCore = () => {
|
|
|
2708
2474
|
return context;
|
|
2709
2475
|
};
|
|
2710
2476
|
const KOS_RECOVERING_SESSION_KEY = "kos:recovering";
|
|
2477
|
+
const log$4 = service$8.KosLog.createLogger({
|
|
2478
|
+
group: service$8.LogGroup.ui,
|
|
2479
|
+
name: "reload-on-disconnect-policy"
|
|
2480
|
+
});
|
|
2711
2481
|
const DEFAULT_GRACE_MS = 3e3;
|
|
2712
2482
|
const defaultReloadFn = () => {
|
|
2713
2483
|
window.location.reload();
|
|
@@ -2741,12 +2511,12 @@ const ReloadOnDisconnectPolicy = ({
|
|
|
2741
2511
|
JSON.stringify(info)
|
|
2742
2512
|
);
|
|
2743
2513
|
} catch (err) {
|
|
2744
|
-
|
|
2514
|
+
log$4.warn(
|
|
2745
2515
|
"ReloadOnDisconnectPolicy: failed to write sessionStorage",
|
|
2746
2516
|
err
|
|
2747
2517
|
);
|
|
2748
2518
|
}
|
|
2749
|
-
|
|
2519
|
+
log$4.warn(
|
|
2750
2520
|
`ReloadOnDisconnectPolicy: scheduling reload in ${graceMs}ms (code=${info.code}, wasClean=${info.wasClean})`
|
|
2751
2521
|
);
|
|
2752
2522
|
pendingReloadRef.current = setTimeout(() => {
|
|
@@ -2754,7 +2524,7 @@ const ReloadOnDisconnectPolicy = ({
|
|
|
2754
2524
|
try {
|
|
2755
2525
|
onBeforeReload?.(info);
|
|
2756
2526
|
} catch (err) {
|
|
2757
|
-
|
|
2527
|
+
log$4.error("ReloadOnDisconnectPolicy: onBeforeReload threw", err);
|
|
2758
2528
|
}
|
|
2759
2529
|
reloadFn();
|
|
2760
2530
|
}, graceMs);
|
|
@@ -3209,6 +2979,10 @@ const TokenContext = React.createContext(token);
|
|
|
3209
2979
|
function TokenProvider({ children }) {
|
|
3210
2980
|
return /* @__PURE__ */ jsxRuntime.jsx(TokenContext.Provider, { value: token, children });
|
|
3211
2981
|
}
|
|
2982
|
+
const log$3 = service$8.KosLog.createLogger({
|
|
2983
|
+
group: service$8.LogGroup.ui,
|
|
2984
|
+
name: "kos-translations-provider"
|
|
2985
|
+
});
|
|
3212
2986
|
const TranslationContainerContext = React.createContext(void 0);
|
|
3213
2987
|
const getDefaultHost = () => {
|
|
3214
2988
|
const defaultHost = window.location.origin;
|
|
@@ -3222,6 +2996,7 @@ const KosTranslationProvider = ({
|
|
|
3222
2996
|
appContext,
|
|
3223
2997
|
locale = "en",
|
|
3224
2998
|
resolver,
|
|
2999
|
+
bundleResolver,
|
|
3225
3000
|
rootUrl,
|
|
3226
3001
|
descriptorResolver,
|
|
3227
3002
|
excludeNamespaces = []
|
|
@@ -3242,7 +3017,7 @@ const KosTranslationProvider = ({
|
|
|
3242
3017
|
const descriptorsResults = await Promise.allSettled(descriptorPromises);
|
|
3243
3018
|
const descriptors = descriptorsResults.map((d) => {
|
|
3244
3019
|
if (d.status === "rejected") {
|
|
3245
|
-
|
|
3020
|
+
log$3.warn("Failed to load localization descriptor", d.reason);
|
|
3246
3021
|
return void 0;
|
|
3247
3022
|
}
|
|
3248
3023
|
return d.value;
|
|
@@ -3261,6 +3036,7 @@ const KosTranslationProvider = ({
|
|
|
3261
3036
|
descriptor: localization,
|
|
3262
3037
|
defaultNamespace: "common",
|
|
3263
3038
|
resolver,
|
|
3039
|
+
bundleResolver,
|
|
3264
3040
|
rootUrl: _rootUrl
|
|
3265
3041
|
});
|
|
3266
3042
|
setTranslations(translations2);
|
|
@@ -3268,7 +3044,7 @@ const KosTranslationProvider = ({
|
|
|
3268
3044
|
}
|
|
3269
3045
|
}
|
|
3270
3046
|
initLocalization();
|
|
3271
|
-
}, [locale, localization, resolver, resolvedRootUrl]);
|
|
3047
|
+
}, [locale, localization, resolver, bundleResolver, resolvedRootUrl]);
|
|
3272
3048
|
const value = React.useMemo(() => {
|
|
3273
3049
|
if (ready) {
|
|
3274
3050
|
return {
|
|
@@ -3348,8 +3124,11 @@ function renderDecodedPreview({
|
|
|
3348
3124
|
ctx.clearRect(0, 0, width * pixelSize, height * pixelSize);
|
|
3349
3125
|
ctx.drawImage(tempCanvas, 0, 0, width * pixelSize, height * pixelSize);
|
|
3350
3126
|
}
|
|
3351
|
-
const log = service$8.KosLog.createLogger({
|
|
3352
|
-
|
|
3127
|
+
const log$2 = service$8.KosLog.createLogger({
|
|
3128
|
+
group: service$8.LogGroup.ui,
|
|
3129
|
+
name: "canvas-streamer"
|
|
3130
|
+
});
|
|
3131
|
+
log$2.debug("main-view component loaded");
|
|
3353
3132
|
const PIXEL_SIZE = 10;
|
|
3354
3133
|
const CanvasStreamerBase = mobxReactLite.observer(
|
|
3355
3134
|
({
|
|
@@ -3576,7 +3355,7 @@ function withStorageDeviceContainer(WrappedComponent) {
|
|
|
3576
3355
|
return /* @__PURE__ */ jsxRuntime.jsx(KosModelLoader2, { ...status, children: /* @__PURE__ */ jsxRuntime.jsx(WrappedComponent, { ...props, storageDeviceContainer: model }) });
|
|
3577
3356
|
};
|
|
3578
3357
|
}
|
|
3579
|
-
const LOG = service$8.KosLog.createLogger({ name: "use-timer" });
|
|
3358
|
+
const LOG = service$8.KosLog.createLogger({ group: service$8.LogGroup.ui, name: "use-timer" });
|
|
3580
3359
|
const useTimer = ({
|
|
3581
3360
|
timerName,
|
|
3582
3361
|
onTimerExpired,
|
|
@@ -3698,6 +3477,10 @@ const Trans = (props) => {
|
|
|
3698
3477
|
const element = substituteBlocks(translated, components || {});
|
|
3699
3478
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: props.className, children: element });
|
|
3700
3479
|
};
|
|
3480
|
+
const log$1 = service$8.KosLog.createLogger({
|
|
3481
|
+
group: service$8.LogGroup.ui,
|
|
3482
|
+
name: "use-translation"
|
|
3483
|
+
});
|
|
3701
3484
|
const cache = /* @__PURE__ */ new Map();
|
|
3702
3485
|
function fetchData(key, fetcher) {
|
|
3703
3486
|
if (cache.has(key)) {
|
|
@@ -3772,7 +3555,7 @@ const useKosTranslation = (namespace, baseOptions) => {
|
|
|
3772
3555
|
if (translationModel) {
|
|
3773
3556
|
return translationModel.resolveKey(expandedKey, options);
|
|
3774
3557
|
}
|
|
3775
|
-
|
|
3558
|
+
log$1.debug(
|
|
3776
3559
|
`Translation model ${namespace} not ready for key: ${expandedKey}`
|
|
3777
3560
|
);
|
|
3778
3561
|
return expandedKey;
|
|
@@ -4816,6 +4599,10 @@ const useKosTimeFormats = (timeFormatMap = DEFAULT_FORMAT_MAP) => {
|
|
|
4816
4599
|
};
|
|
4817
4600
|
};
|
|
4818
4601
|
const useLocalComputed = (callback, dependencies) => React.useMemo(() => service$8.kosComputed(callback), dependencies);
|
|
4602
|
+
const log = service$8.KosLog.createLogger({
|
|
4603
|
+
group: service$8.LogGroup.ui,
|
|
4604
|
+
name: "use-mutation-observer"
|
|
4605
|
+
});
|
|
4819
4606
|
const DEFAULT_OPTIONS = {
|
|
4820
4607
|
config: { attributes: true, childList: true, subtree: true }
|
|
4821
4608
|
};
|
|
@@ -4838,7 +4625,7 @@ function useMutationObserver(targetEl, cb, options = DEFAULT_OPTIONS) {
|
|
|
4838
4625
|
try {
|
|
4839
4626
|
observer.observe(targetEl, config);
|
|
4840
4627
|
} catch (e) {
|
|
4841
|
-
|
|
4628
|
+
log.error(e);
|
|
4842
4629
|
}
|
|
4843
4630
|
return () => {
|
|
4844
4631
|
if (observer) {
|
|
@@ -4859,8 +4646,8 @@ const DomIntersectionStrategy = {
|
|
|
4859
4646
|
}
|
|
4860
4647
|
};
|
|
4861
4648
|
const logger = service$8.KosLog.createLogger({
|
|
4862
|
-
|
|
4863
|
-
|
|
4649
|
+
group: service$8.LogGroup.ui,
|
|
4650
|
+
name: "usePressGesture"
|
|
4864
4651
|
});
|
|
4865
4652
|
function usePressGesture({
|
|
4866
4653
|
onPressed,
|
|
@@ -5111,7 +4898,7 @@ function withProjectReloading(WrappedComponent) {
|
|
|
5111
4898
|
return reloading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingMessage, { message: "Wait a moment while your project reloads..." }) : /* @__PURE__ */ jsxRuntime.jsx(WrappedComponent, { ...props });
|
|
5112
4899
|
};
|
|
5113
4900
|
}
|
|
5114
|
-
registerApiLevels({ "kos-ui-sdk":
|
|
4901
|
+
registerApiLevels({ "kos-ui-sdk": 26 });
|
|
5115
4902
|
exports.AuthState = service$8.AuthState;
|
|
5116
4903
|
Object.defineProperty(exports, "BASE_URL", {
|
|
5117
4904
|
enumerable: true,
|
|
@@ -5120,6 +4907,7 @@ Object.defineProperty(exports, "BASE_URL", {
|
|
|
5120
4907
|
exports.BrowserKosRouter = service$8.BrowserKosRouter;
|
|
5121
4908
|
exports.BrowserRouter = service$8.BrowserRouter;
|
|
5122
4909
|
exports.CancellableServiceManager = service$8.CancellableServiceManager;
|
|
4910
|
+
exports.CancellationBatch = service$8.CancellationBatch;
|
|
5123
4911
|
exports.CanvasDispatcher = service$8.CanvasDispatcher;
|
|
5124
4912
|
exports.CanvasRenderer = service$8.CanvasRenderer;
|
|
5125
4913
|
exports.ChildModels = service$8.ChildModels;
|
|
@@ -5218,10 +5006,11 @@ exports.LOGIN_HOST = service$8.LOGIN_HOST;
|
|
|
5218
5006
|
exports.LOGIN_URL = service$8.LOGIN_URL;
|
|
5219
5007
|
exports.LogBlock = service$8.LogBlock;
|
|
5220
5008
|
exports.LogBlockContainer = service$8.LogBlockContainer;
|
|
5221
|
-
exports.
|
|
5009
|
+
exports.LogGroup = service$8.LogGroup;
|
|
5222
5010
|
exports.LogStream = service$8.LogStream;
|
|
5223
5011
|
exports.LogStreamContainer = service$8.LogStreamContainer;
|
|
5224
5012
|
exports.LoggerSetup = service$8.LoggerSetup;
|
|
5013
|
+
exports.MESSAGE_LOGGER_NAME = service$8.MESSAGE_LOGGER_NAME;
|
|
5225
5014
|
exports.MODEL_DELETION_DELAY = service$8.MODEL_DELETION_DELAY;
|
|
5226
5015
|
exports.MixinModels = service$8.MixinModels;
|
|
5227
5016
|
exports.ModelEffects = service$8.ModelEffects;
|
|
@@ -5305,7 +5094,9 @@ exports.convert = service$8.convert;
|
|
|
5305
5094
|
exports.convertWithUnits = service$8.convertWithUnits;
|
|
5306
5095
|
exports.createBaseMessage = service$8.createBaseMessage;
|
|
5307
5096
|
exports.createBroadcastMessageResponse = service$8.createBroadcastMessageResponse;
|
|
5097
|
+
exports.createCancellablePromise = service$8.createCancellablePromise;
|
|
5308
5098
|
exports.createCancellableService = service$8.createCancellableService;
|
|
5099
|
+
exports.createCancellationBatch = service$8.createCancellationBatch;
|
|
5309
5100
|
exports.createClient = service$8.createClient;
|
|
5310
5101
|
exports.createFosBaseMessage = service$8.createFosBaseMessage;
|
|
5311
5102
|
exports.createHeaders = service$8.createHeaders;
|
|
@@ -5339,7 +5130,6 @@ exports.getHttpRouteHandlers = service$8.getHttpRouteHandlers;
|
|
|
5339
5130
|
exports.getKosCompanionModel = service$8.getKosCompanionModel;
|
|
5340
5131
|
exports.getKosConnectionId = service$8.getKosConnectionId;
|
|
5341
5132
|
exports.getKosLocalizationDescriptor = service$8.getKosLocalizationDescriptor;
|
|
5342
|
-
exports.getKosMessageLogging = service$8.getKosMessageLogging;
|
|
5343
5133
|
exports.getKosModel = service$8.getKosModel;
|
|
5344
5134
|
exports.getKosModelActivationState = service$8.getKosModelActivationState;
|
|
5345
5135
|
exports.getKosModelSync = service$8.getKosModelSync;
|
|
@@ -5347,7 +5137,6 @@ exports.getKosModelType = service$8.getKosModelType;
|
|
|
5347
5137
|
exports.getKosSessionKey = service$8.getKosSessionKey;
|
|
5348
5138
|
exports.getLocalizationDescriptor = service$8.getLocalizationDescriptor;
|
|
5349
5139
|
exports.getLogLevel = service$8.getLogLevel;
|
|
5350
|
-
exports.getLogMessageToStudio = service$8.getLogMessageToStudio;
|
|
5351
5140
|
exports.getMessageBody = service$8.getMessageBody;
|
|
5352
5141
|
exports.getObservableCompanions = service$8.getObservableCompanions;
|
|
5353
5142
|
exports.getQueryParams = service$8.getQueryParams;
|
|
@@ -5399,6 +5188,7 @@ exports.kosStateGuard = service$8.kosStateGuard;
|
|
|
5399
5188
|
exports.kosStateMachine = service$8.kosStateMachine;
|
|
5400
5189
|
exports.kosTopicHandler = service$8.kosTopicHandler;
|
|
5401
5190
|
exports.kosWhen = service$8.kosWhen;
|
|
5191
|
+
exports.makeCancellable = service$8.makeCancellable;
|
|
5402
5192
|
exports.mapConfigBeanModelToDto = service$8.mapConfigBeanModelToDto;
|
|
5403
5193
|
exports.mapDataToModel = service$8.mapDataToModel;
|
|
5404
5194
|
exports.mapDtoToConfigBeanModel = service$8.mapDtoToConfigBeanModel;
|
|
@@ -5434,21 +5224,26 @@ exports.resolveKosProfiles = service$8.resolveKosProfiles;
|
|
|
5434
5224
|
exports.resolveListDeltas = service$8.resolveListDeltas;
|
|
5435
5225
|
exports.resolveServiceRequestParameters = service$8.resolveServiceRequestParameters;
|
|
5436
5226
|
exports.resolveServiceUrl = service$8.resolveServiceUrl;
|
|
5227
|
+
exports.retryWithExponentialBackoff = service$8.retryWithExponentialBackoff;
|
|
5437
5228
|
exports.sendAsyncIntent = service$8.sendAsyncIntent;
|
|
5438
5229
|
exports.sendBroadcastMessage = service$8.sendBroadcastMessage;
|
|
5439
5230
|
exports.sendIntent = service$8.sendIntent;
|
|
5440
5231
|
exports.sendKosHttpMessageResponse = service$8.sendKosHttpMessageResponse;
|
|
5441
5232
|
exports.sendKosMessage = service$8.sendKosMessage;
|
|
5442
5233
|
exports.sendKosMessageResponse = service$8.sendKosMessageResponse;
|
|
5234
|
+
exports.sendRequest = service$8.sendRequest;
|
|
5443
5235
|
exports.sendStudioMessage = service$8.sendStudioMessage;
|
|
5444
5236
|
exports.sendStudioMessageRequest = service$8.sendStudioMessageRequest;
|
|
5237
|
+
exports.syncPublish = service$8.syncPublish;
|
|
5445
5238
|
exports.troubleByTypeReducer = service$8.troubleByTypeReducer;
|
|
5446
5239
|
exports.troubleDataFactory = service$8.troubleDataFactory;
|
|
5447
5240
|
exports.unloadKosModel = service$8.unloadKosModel;
|
|
5448
5241
|
exports.uuid = service$8.uuid;
|
|
5449
5242
|
exports.waitForAppToStart = service$8.waitForAppToStart;
|
|
5450
5243
|
exports.waitForAppsToStart = service$8.waitForAppsToStart;
|
|
5244
|
+
exports.waitForRequest = service$8.waitForRequest;
|
|
5451
5245
|
exports.whenReady = service$8.whenReady;
|
|
5246
|
+
exports.withCancellation = service$8.withCancellation;
|
|
5452
5247
|
exports.wrapWithFutureLifecycle = service$8.wrapWithFutureLifecycle;
|
|
5453
5248
|
Object.defineProperty(exports, "makeAutoObservable", {
|
|
5454
5249
|
enumerable: true,
|
|
@@ -5463,7 +5258,6 @@ Object.defineProperty(exports, "kosComponent", {
|
|
|
5463
5258
|
get: () => mobxReactLite.observer
|
|
5464
5259
|
});
|
|
5465
5260
|
exports.AncestorPathVisitor = AncestorPathVisitor;
|
|
5466
|
-
exports.CancellationBatch = CancellationBatch;
|
|
5467
5261
|
exports.CanvasDispatcherServices = index$7;
|
|
5468
5262
|
exports.CanvasStreamer = CanvasStreamer;
|
|
5469
5263
|
exports.CanvasStreamerBase = CanvasStreamerBase;
|
|
@@ -5545,9 +5339,8 @@ exports.clearPath = clearPath;
|
|
|
5545
5339
|
exports.clearServiceResponse = clearServiceResponse;
|
|
5546
5340
|
exports.collectLocaleOptions = collectLocaleOptions;
|
|
5547
5341
|
exports.convertFileSizeRaw = convertFileSizeRaw;
|
|
5548
|
-
exports.createCancellablePromise = createCancellablePromise;
|
|
5549
|
-
exports.createCancellationBatch = createCancellationBatch;
|
|
5550
5342
|
exports.debounce = debounce;
|
|
5343
|
+
exports.ensureKosMockBoot = ensureKosMockBoot;
|
|
5551
5344
|
exports.executeServiceRequest = executeServiceRequest;
|
|
5552
5345
|
exports.fetchModel = fetchModel;
|
|
5553
5346
|
exports.formatDate = formatDate;
|
|
@@ -5584,7 +5377,6 @@ exports.kosConfigProperty = kosConfigProperty;
|
|
|
5584
5377
|
exports.kosContainerIndexAware = kosContainerIndexAware;
|
|
5585
5378
|
exports.kosContext = kosContext;
|
|
5586
5379
|
exports.kosIndexAware = kosIndexAware;
|
|
5587
|
-
exports.kosLogger = kosLogger;
|
|
5588
5380
|
exports.kosMixin = kosMixin;
|
|
5589
5381
|
exports.kosMultipleFutureAware = kosMultipleFutureAware;
|
|
5590
5382
|
exports.kosReference = kosReference;
|
|
@@ -5594,15 +5386,12 @@ exports.kosSubscribe = kosSubscribe;
|
|
|
5594
5386
|
exports.kosTroubleAware = kosTroubleAware;
|
|
5595
5387
|
exports.kosViewModel = kosViewModel;
|
|
5596
5388
|
exports.login = login;
|
|
5597
|
-
exports.makeCancellable = makeCancellable;
|
|
5598
5389
|
exports.mergeLocalizationDescriptors = mergeLocalizationDescriptors;
|
|
5599
5390
|
exports.pairedClientHeartbeat = pairedClientHeartbeat;
|
|
5600
5391
|
exports.processMiddleware = processMiddleware;
|
|
5601
5392
|
exports.readModelHookEntry = readModelHookEntry;
|
|
5602
5393
|
exports.resetPassword = resetPassword;
|
|
5603
5394
|
exports.resolveVariable = resolveVariable;
|
|
5604
|
-
exports.retryWithExponentialBackoff = retryWithExponentialBackoff;
|
|
5605
|
-
exports.sendRequest = sendRequest;
|
|
5606
5395
|
exports.startPasswordReset = startPasswordReset;
|
|
5607
5396
|
exports.stringComponentInsert = stringComponentInsert;
|
|
5608
5397
|
exports.studioAcceptOrgInvitation = studioAcceptOrgInvitation;
|
|
@@ -5610,7 +5399,6 @@ exports.studioLogin = studioLogin;
|
|
|
5610
5399
|
exports.studioResetPassword = studioResetPassword;
|
|
5611
5400
|
exports.studioStartPasswordReset = studioStartPasswordReset;
|
|
5612
5401
|
exports.subscribeStore = subscribeStore;
|
|
5613
|
-
exports.syncPublish = syncPublish;
|
|
5614
5402
|
exports.updateCompanionModelRegistration = updateCompanionModelRegistration;
|
|
5615
5403
|
exports.updateModelRegistration = updateModelRegistration;
|
|
5616
5404
|
exports.updateRegion = updateRegion;
|
|
@@ -5675,8 +5463,6 @@ exports.useViewModel = useViewModel;
|
|
|
5675
5463
|
exports.useYears = useYears;
|
|
5676
5464
|
exports.useYearsOptions = useYearsOptions;
|
|
5677
5465
|
exports.variableToHex = variableToHex;
|
|
5678
|
-
exports.waitForRequest = waitForRequest;
|
|
5679
|
-
exports.withCancellation = withCancellation;
|
|
5680
5466
|
exports.withDevice = withDevice;
|
|
5681
5467
|
exports.withKosTime = withKosTime;
|
|
5682
5468
|
exports.withNetworkInterfaceContainer = withNetworkInterfaceContainer;
|