@kosdev-code/kos-ui-sdk 3.0.24 → 3.0.26
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/.kos.json +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +10 -46
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +6 -4
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts +3 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +13 -35
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +21 -10
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +28 -28
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +4 -2
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +3 -12
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/kosCore.d.ts +15 -0
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +5 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/model/kos-model-component-factory.d.ts +1 -1
- package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
- package/core/core/model/kos-service-request-manager.d.ts +7 -2
- package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +2 -2
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/model/service-response-store.d.ts +2 -1
- package/core/core/model/service-response-store.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +13 -4
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +0 -4
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/util/model-utils.d.ts.map +1 -1
- package/{index-YzHb2lnB.js → index-Csq0zQtb.js} +358 -647
- package/index-Csq0zQtb.js.map +1 -0
- package/{index-CRb8ucfF.cjs → index-D52vEGXT.cjs} +287 -576
- package/index-D52vEGXT.cjs.map +1 -0
- package/index.cjs +317 -37
- package/index.cjs.map +1 -1
- package/index.js +382 -102
- package/index.js.map +1 -1
- package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
- package/models/utils/services/kos/daily/service.d.ts +1 -1
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/daily/service.d.ts +1 -1
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/package.json +2 -2
- package/testing/index.d.ts +23 -2
- package/testing/index.d.ts.map +1 -1
- package/testing.cjs +22 -2
- package/testing.cjs.map +1 -1
- package/testing.js +22 -2
- package/testing.js.map +1 -1
- package/index-CRb8ucfF.cjs.map +0 -1
- package/index-YzHb2lnB.js.map +0 -1
package/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const service$8 = require("./index-
|
|
3
|
+
const service$8 = require("./index-D52vEGXT.cjs");
|
|
4
4
|
const mobx = require("mobx");
|
|
5
5
|
const log$s = require("loglevel");
|
|
6
6
|
const dateFns = require("date-fns");
|
|
@@ -26,6 +26,279 @@ const _registry = {};
|
|
|
26
26
|
function registerApiLevels(levels) {
|
|
27
27
|
Object.assign(_registry, levels);
|
|
28
28
|
}
|
|
29
|
+
function once(eventType, callback) {
|
|
30
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
31
|
+
subscription.unsubscribe();
|
|
32
|
+
callback(msg);
|
|
33
|
+
});
|
|
34
|
+
return subscription.unsubscribe;
|
|
35
|
+
}
|
|
36
|
+
function waitFor(eventType, timeout) {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
let timeoutId = null;
|
|
39
|
+
const unsubscribe = once(eventType, (msg) => {
|
|
40
|
+
if (timeoutId) {
|
|
41
|
+
clearTimeout(timeoutId);
|
|
42
|
+
}
|
|
43
|
+
resolve(msg);
|
|
44
|
+
});
|
|
45
|
+
if (timeout) {
|
|
46
|
+
timeoutId = setTimeout(() => {
|
|
47
|
+
unsubscribe();
|
|
48
|
+
reject(new Error(`Timeout waiting for event: ${eventType}`));
|
|
49
|
+
}, timeout);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function waitForAll(eventTypes, timeout) {
|
|
54
|
+
const promises = eventTypes.map(
|
|
55
|
+
(eventType) => waitFor(eventType, timeout)
|
|
56
|
+
);
|
|
57
|
+
return Promise.all(promises);
|
|
58
|
+
}
|
|
59
|
+
function race(eventTypes, timeout) {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
const unsubscribers = [];
|
|
62
|
+
let timeoutId = null;
|
|
63
|
+
let resolved = false;
|
|
64
|
+
const cleanup = () => {
|
|
65
|
+
unsubscribers.forEach((unsub) => unsub());
|
|
66
|
+
if (timeoutId) {
|
|
67
|
+
clearTimeout(timeoutId);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
eventTypes.forEach((eventType) => {
|
|
71
|
+
const unsubscribe = once(eventType, (msg) => {
|
|
72
|
+
if (!resolved) {
|
|
73
|
+
resolved = true;
|
|
74
|
+
cleanup();
|
|
75
|
+
resolve({ eventType, data: msg });
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
unsubscribers.push(unsubscribe);
|
|
79
|
+
});
|
|
80
|
+
if (timeout) {
|
|
81
|
+
timeoutId = setTimeout(() => {
|
|
82
|
+
if (!resolved) {
|
|
83
|
+
resolved = true;
|
|
84
|
+
cleanup();
|
|
85
|
+
reject(
|
|
86
|
+
new Error(`Timeout waiting for any event: ${eventTypes.join(", ")}`)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}, timeout);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function filter(eventType, predicate, callback) {
|
|
94
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
95
|
+
if (msg && predicate(msg)) {
|
|
96
|
+
callback(msg);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return subscription.unsubscribe;
|
|
100
|
+
}
|
|
101
|
+
function map(eventType, transform, callback) {
|
|
102
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
103
|
+
if (msg) {
|
|
104
|
+
const transformed = transform(msg);
|
|
105
|
+
callback(transformed);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return subscription.unsubscribe;
|
|
109
|
+
}
|
|
110
|
+
function debounce$1(eventType, delay, callback) {
|
|
111
|
+
let timeoutId = null;
|
|
112
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
113
|
+
if (timeoutId) {
|
|
114
|
+
clearTimeout(timeoutId);
|
|
115
|
+
}
|
|
116
|
+
timeoutId = setTimeout(() => {
|
|
117
|
+
callback(msg);
|
|
118
|
+
}, delay);
|
|
119
|
+
});
|
|
120
|
+
return () => {
|
|
121
|
+
if (timeoutId) {
|
|
122
|
+
clearTimeout(timeoutId);
|
|
123
|
+
}
|
|
124
|
+
subscription.unsubscribe();
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function throttle(eventType, interval, callback) {
|
|
128
|
+
let lastEmit = 0;
|
|
129
|
+
let pendingTimeout = null;
|
|
130
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
131
|
+
const now = Date.now();
|
|
132
|
+
const timeSinceLastEmit = now - lastEmit;
|
|
133
|
+
if (timeSinceLastEmit >= interval) {
|
|
134
|
+
lastEmit = now;
|
|
135
|
+
callback(msg);
|
|
136
|
+
} else if (!pendingTimeout) {
|
|
137
|
+
pendingTimeout = setTimeout(() => {
|
|
138
|
+
lastEmit = Date.now();
|
|
139
|
+
callback(msg);
|
|
140
|
+
pendingTimeout = null;
|
|
141
|
+
}, interval - timeSinceLastEmit);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return () => {
|
|
145
|
+
if (pendingTimeout) {
|
|
146
|
+
clearTimeout(pendingTimeout);
|
|
147
|
+
}
|
|
148
|
+
subscription.unsubscribe();
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function buffer(eventType, bufferTime, callback) {
|
|
152
|
+
let buffer2 = [];
|
|
153
|
+
let timeoutId = null;
|
|
154
|
+
const flush = () => {
|
|
155
|
+
if (buffer2.length > 0) {
|
|
156
|
+
callback([...buffer2]);
|
|
157
|
+
buffer2 = [];
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
161
|
+
if (msg) {
|
|
162
|
+
buffer2.push(msg);
|
|
163
|
+
if (!timeoutId) {
|
|
164
|
+
timeoutId = setTimeout(() => {
|
|
165
|
+
flush();
|
|
166
|
+
timeoutId = null;
|
|
167
|
+
}, bufferTime);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
return () => {
|
|
172
|
+
if (timeoutId) {
|
|
173
|
+
clearTimeout(timeoutId);
|
|
174
|
+
flush();
|
|
175
|
+
}
|
|
176
|
+
subscription.unsubscribe();
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function replay(eventType, bufferSize = 1) {
|
|
180
|
+
const buffer2 = [];
|
|
181
|
+
service$8.subscribe(eventType, (msg) => {
|
|
182
|
+
if (msg) {
|
|
183
|
+
buffer2.push(msg);
|
|
184
|
+
if (buffer2.length > bufferSize) {
|
|
185
|
+
buffer2.shift();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return {
|
|
190
|
+
subscribe: (callback) => {
|
|
191
|
+
buffer2.forEach((event) => callback(event));
|
|
192
|
+
return service$8.subscribe(eventType, callback);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function merge(eventTypes, callback) {
|
|
197
|
+
const subscriptions = eventTypes.map(
|
|
198
|
+
(eventType) => service$8.subscribe(eventType, (msg) => {
|
|
199
|
+
if (msg) {
|
|
200
|
+
callback(eventType, msg);
|
|
201
|
+
}
|
|
202
|
+
})
|
|
203
|
+
);
|
|
204
|
+
return () => {
|
|
205
|
+
subscriptions.forEach((sub2) => sub2.unsubscribe());
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function stateMachine(initialState, transitions) {
|
|
209
|
+
let currentState = initialState;
|
|
210
|
+
const subscriptions = [];
|
|
211
|
+
const allEvents = /* @__PURE__ */ new Set();
|
|
212
|
+
Object.values(transitions).forEach((stateTransitions) => {
|
|
213
|
+
Object.keys(stateTransitions).forEach((event) => {
|
|
214
|
+
allEvents.add(event);
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
allEvents.forEach((eventType) => {
|
|
218
|
+
const { unsubscribe } = service$8.subscribe(eventType, (msg) => {
|
|
219
|
+
const stateTransitions = transitions[currentState];
|
|
220
|
+
if (stateTransitions && stateTransitions[eventType]) {
|
|
221
|
+
const nextState = stateTransitions[eventType](msg);
|
|
222
|
+
currentState = nextState;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
subscriptions.push(unsubscribe);
|
|
226
|
+
});
|
|
227
|
+
return {
|
|
228
|
+
get state() {
|
|
229
|
+
return currentState;
|
|
230
|
+
},
|
|
231
|
+
unsubscribe: () => {
|
|
232
|
+
subscriptions.forEach((unsub) => unsub());
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function request(requestEvent, responseEvent, request2, timeout) {
|
|
237
|
+
const responsePromise = waitFor(responseEvent, timeout);
|
|
238
|
+
service$8.publish(requestEvent, request2);
|
|
239
|
+
return responsePromise;
|
|
240
|
+
}
|
|
241
|
+
async function* eventIterator(eventType) {
|
|
242
|
+
const queue = [];
|
|
243
|
+
const waiters = [];
|
|
244
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
245
|
+
if (msg) {
|
|
246
|
+
if (waiters.length > 0) {
|
|
247
|
+
const waiter = waiters.shift();
|
|
248
|
+
waiter(msg);
|
|
249
|
+
} else {
|
|
250
|
+
queue.push(msg);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
try {
|
|
255
|
+
while (true) {
|
|
256
|
+
if (queue.length > 0) {
|
|
257
|
+
yield queue.shift();
|
|
258
|
+
} else {
|
|
259
|
+
yield await new Promise((resolve) => {
|
|
260
|
+
waiters.push(resolve);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} finally {
|
|
265
|
+
subscription.unsubscribe();
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const EventBusFunctional = {
|
|
269
|
+
once,
|
|
270
|
+
waitFor,
|
|
271
|
+
waitForAll,
|
|
272
|
+
race,
|
|
273
|
+
filter,
|
|
274
|
+
map,
|
|
275
|
+
debounce: debounce$1,
|
|
276
|
+
throttle,
|
|
277
|
+
buffer,
|
|
278
|
+
replay,
|
|
279
|
+
merge,
|
|
280
|
+
stateMachine,
|
|
281
|
+
request,
|
|
282
|
+
eventIterator
|
|
283
|
+
};
|
|
284
|
+
const eventBus_functional = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
285
|
+
__proto__: null,
|
|
286
|
+
EventBusFunctional,
|
|
287
|
+
buffer,
|
|
288
|
+
debounce: debounce$1,
|
|
289
|
+
eventIterator,
|
|
290
|
+
filter,
|
|
291
|
+
map,
|
|
292
|
+
merge,
|
|
293
|
+
once,
|
|
294
|
+
race,
|
|
295
|
+
replay,
|
|
296
|
+
request,
|
|
297
|
+
stateMachine,
|
|
298
|
+
throttle,
|
|
299
|
+
waitFor,
|
|
300
|
+
waitForAll
|
|
301
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
29
302
|
const convertFileSizeRaw = (bytes, decimals = 0) => {
|
|
30
303
|
if (!+bytes)
|
|
31
304
|
return {
|
|
@@ -178,7 +451,7 @@ function kosLoggerAware(options) {
|
|
|
178
451
|
loggerProperty,
|
|
179
452
|
loggerContext
|
|
180
453
|
};
|
|
181
|
-
const getModelType = () => target.prototype[service$8.
|
|
454
|
+
const getModelType = () => target.prototype.modelTypeId ?? target.prototype[service$8.KosViewModelSymbol]?.type;
|
|
182
455
|
let sharedLogger;
|
|
183
456
|
Object.defineProperty(target.prototype, loggerProperty, {
|
|
184
457
|
get() {
|
|
@@ -410,13 +683,14 @@ function injectViewModelEffects(instance, typeId) {
|
|
|
410
683
|
function injectViewModelStateMachine(instance, typeId) {
|
|
411
684
|
const fsmSetup = instance[service$8.StateMachineSetup];
|
|
412
685
|
if (!fsmSetup) return;
|
|
413
|
-
const { config } = fsmSetup;
|
|
414
|
-
if (
|
|
686
|
+
const { config, initializeAtExplicit } = fsmSetup;
|
|
687
|
+
if (initializeAtExplicit && config.initializeAt !== service$8.DependencyLifecycle.INIT) {
|
|
415
688
|
console.warn(
|
|
416
689
|
`[kosViewModel] ViewModel "${typeId}" has @kosStateMachine with initializeAt: ${config.initializeAt}. ViewModels do not have lifecycle phases, so the FSM will initialize immediately. Consider removing initializeAt or using @kosModel if lifecycle-aware FSM initialization is required.`
|
|
417
690
|
);
|
|
418
691
|
}
|
|
419
692
|
service$8.injectStateMachineSupport(instance);
|
|
693
|
+
service$8.initializeStateMachine(instance, config.initializeAt);
|
|
420
694
|
}
|
|
421
695
|
function makeSafeObservable(instance) {
|
|
422
696
|
try {
|
|
@@ -1615,10 +1889,10 @@ let ConfigBeanModelImpl = class {
|
|
|
1615
1889
|
* @see modifyConfigBeanService
|
|
1616
1890
|
*/
|
|
1617
1891
|
async updateConfigBean() {
|
|
1618
|
-
const
|
|
1892
|
+
const request2 = mapConfigBeanModelToDto(this);
|
|
1619
1893
|
await this._modifyConfigBean(
|
|
1620
1894
|
this.path,
|
|
1621
|
-
|
|
1895
|
+
request2,
|
|
1622
1896
|
this.serviceBasePath,
|
|
1623
1897
|
this.destinationAddress
|
|
1624
1898
|
);
|
|
@@ -2744,7 +3018,7 @@ let KosConfigPropertyImpl = class {
|
|
|
2744
3018
|
const result = this.regionInfo.convert(Number(_val), backend, display);
|
|
2745
3019
|
return result;
|
|
2746
3020
|
}
|
|
2747
|
-
return _val
|
|
3021
|
+
return _val ?? "";
|
|
2748
3022
|
}
|
|
2749
3023
|
/**
|
|
2750
3024
|
* @internal
|
|
@@ -3494,7 +3768,7 @@ let StatePropModelImpl = class {
|
|
|
3494
3768
|
__decorateClass$w([
|
|
3495
3769
|
kosDependency({
|
|
3496
3770
|
modelType: StateBean.type,
|
|
3497
|
-
id:
|
|
3771
|
+
id: `${StateBean.type}-${PATH_PROP}`,
|
|
3498
3772
|
options: { path: PATH_PROP }
|
|
3499
3773
|
})
|
|
3500
3774
|
], StatePropModelImpl.prototype, "stateBean", 2);
|
|
@@ -4825,43 +5099,43 @@ TokenStream.prototype.unescape = function(v) {
|
|
|
4825
5099
|
if (index2 < 0) {
|
|
4826
5100
|
return v;
|
|
4827
5101
|
}
|
|
4828
|
-
var
|
|
5102
|
+
var buffer2 = v.substring(0, index2);
|
|
4829
5103
|
while (index2 >= 0) {
|
|
4830
5104
|
var c = v.charAt(++index2);
|
|
4831
5105
|
switch (c) {
|
|
4832
5106
|
case "'":
|
|
4833
|
-
|
|
5107
|
+
buffer2 += "'";
|
|
4834
5108
|
break;
|
|
4835
5109
|
case '"':
|
|
4836
|
-
|
|
5110
|
+
buffer2 += '"';
|
|
4837
5111
|
break;
|
|
4838
5112
|
case "\\":
|
|
4839
|
-
|
|
5113
|
+
buffer2 += "\\";
|
|
4840
5114
|
break;
|
|
4841
5115
|
case "/":
|
|
4842
|
-
|
|
5116
|
+
buffer2 += "/";
|
|
4843
5117
|
break;
|
|
4844
5118
|
case "b":
|
|
4845
|
-
|
|
5119
|
+
buffer2 += "\b";
|
|
4846
5120
|
break;
|
|
4847
5121
|
case "f":
|
|
4848
|
-
|
|
5122
|
+
buffer2 += "\f";
|
|
4849
5123
|
break;
|
|
4850
5124
|
case "n":
|
|
4851
|
-
|
|
5125
|
+
buffer2 += "\n";
|
|
4852
5126
|
break;
|
|
4853
5127
|
case "r":
|
|
4854
|
-
|
|
5128
|
+
buffer2 += "\r";
|
|
4855
5129
|
break;
|
|
4856
5130
|
case "t":
|
|
4857
|
-
|
|
5131
|
+
buffer2 += " ";
|
|
4858
5132
|
break;
|
|
4859
5133
|
case "u":
|
|
4860
5134
|
var codePoint = v.substring(index2 + 1, index2 + 5);
|
|
4861
5135
|
if (!codePointPattern.test(codePoint)) {
|
|
4862
5136
|
this.parseError("Illegal escape sequence: \\u" + codePoint);
|
|
4863
5137
|
}
|
|
4864
|
-
|
|
5138
|
+
buffer2 += String.fromCharCode(parseInt(codePoint, 16));
|
|
4865
5139
|
index2 += 4;
|
|
4866
5140
|
break;
|
|
4867
5141
|
default:
|
|
@@ -4869,10 +5143,10 @@ TokenStream.prototype.unescape = function(v) {
|
|
|
4869
5143
|
}
|
|
4870
5144
|
++index2;
|
|
4871
5145
|
var backslash = v.indexOf("\\", index2);
|
|
4872
|
-
|
|
5146
|
+
buffer2 += v.substring(index2, backslash < 0 ? v.length : backslash);
|
|
4873
5147
|
index2 = backslash;
|
|
4874
5148
|
}
|
|
4875
|
-
return
|
|
5149
|
+
return buffer2;
|
|
4876
5150
|
};
|
|
4877
5151
|
TokenStream.prototype.isComment = function() {
|
|
4878
5152
|
var c = this.expression.charAt(this.pos);
|
|
@@ -6434,10 +6708,16 @@ let KosTimeModelImpl = class {
|
|
|
6434
6708
|
}
|
|
6435
6709
|
async retrieveTimezone() {
|
|
6436
6710
|
const tz = await getTimezone();
|
|
6711
|
+
if (!tz) {
|
|
6712
|
+
this.logger.warn(
|
|
6713
|
+
`Failed to retrieve timezone from system. Timezone is undefined.`
|
|
6714
|
+
);
|
|
6715
|
+
return;
|
|
6716
|
+
}
|
|
6437
6717
|
this.setTimezone(tz);
|
|
6438
6718
|
}
|
|
6439
6719
|
setTimezone(tz) {
|
|
6440
|
-
this.timezone = tz;
|
|
6720
|
+
this.timezone = tz ?? "";
|
|
6441
6721
|
}
|
|
6442
6722
|
/**
|
|
6443
6723
|
* @internal
|
|
@@ -9602,26 +9882,26 @@ class ScrollingImageRenderer extends Canvas2DRendererBase {
|
|
|
9602
9882
|
break;
|
|
9603
9883
|
}
|
|
9604
9884
|
let isOffScreen = false;
|
|
9605
|
-
const
|
|
9885
|
+
const buffer2 = 1;
|
|
9606
9886
|
switch (direction) {
|
|
9607
9887
|
case "left": {
|
|
9608
9888
|
const xPosLeft = width - this.position;
|
|
9609
|
-
isOffScreen = xPosLeft < -drawWidth -
|
|
9889
|
+
isOffScreen = xPosLeft < -drawWidth - buffer2;
|
|
9610
9890
|
break;
|
|
9611
9891
|
}
|
|
9612
9892
|
case "right": {
|
|
9613
9893
|
const xPosRight = -drawWidth + this.position;
|
|
9614
|
-
isOffScreen = xPosRight > width +
|
|
9894
|
+
isOffScreen = xPosRight > width + buffer2;
|
|
9615
9895
|
break;
|
|
9616
9896
|
}
|
|
9617
9897
|
case "up": {
|
|
9618
9898
|
const yPosUp = height - this.position;
|
|
9619
|
-
isOffScreen = yPosUp < -drawHeight -
|
|
9899
|
+
isOffScreen = yPosUp < -drawHeight - buffer2;
|
|
9620
9900
|
break;
|
|
9621
9901
|
}
|
|
9622
9902
|
case "down": {
|
|
9623
9903
|
const yPosDown = -drawHeight + this.position;
|
|
9624
|
-
isOffScreen = yPosDown > height +
|
|
9904
|
+
isOffScreen = yPosDown > height + buffer2;
|
|
9625
9905
|
break;
|
|
9626
9906
|
}
|
|
9627
9907
|
}
|
|
@@ -9937,26 +10217,26 @@ class ScrollingTextRenderer extends Canvas2DRendererBase {
|
|
|
9937
10217
|
checkScrollCompletion(width, height, direction) {
|
|
9938
10218
|
if (!this.isPlaying) return;
|
|
9939
10219
|
let isOffScreen = false;
|
|
9940
|
-
const
|
|
10220
|
+
const buffer2 = 1;
|
|
9941
10221
|
switch (direction) {
|
|
9942
10222
|
case "left": {
|
|
9943
10223
|
const xPosLeft = width - this.position;
|
|
9944
|
-
isOffScreen = xPosLeft < -this.textWidth -
|
|
10224
|
+
isOffScreen = xPosLeft < -this.textWidth - buffer2;
|
|
9945
10225
|
break;
|
|
9946
10226
|
}
|
|
9947
10227
|
case "right": {
|
|
9948
10228
|
const xPosRight = -this.textWidth + this.position;
|
|
9949
|
-
isOffScreen = xPosRight > width +
|
|
10229
|
+
isOffScreen = xPosRight > width + buffer2;
|
|
9950
10230
|
break;
|
|
9951
10231
|
}
|
|
9952
10232
|
case "up": {
|
|
9953
10233
|
const yPosUp = height - this.position;
|
|
9954
|
-
isOffScreen = yPosUp < -this.textHeight -
|
|
10234
|
+
isOffScreen = yPosUp < -this.textHeight - buffer2;
|
|
9955
10235
|
break;
|
|
9956
10236
|
}
|
|
9957
10237
|
case "down": {
|
|
9958
10238
|
const yPosDown = -this.textHeight + this.position;
|
|
9959
|
-
isOffScreen = yPosDown > height +
|
|
10239
|
+
isOffScreen = yPosDown > height + buffer2;
|
|
9960
10240
|
break;
|
|
9961
10241
|
}
|
|
9962
10242
|
}
|
|
@@ -12294,7 +12574,7 @@ const updateRegion = async (region) => {
|
|
|
12294
12574
|
regionInfo.updateProperty(region);
|
|
12295
12575
|
};
|
|
12296
12576
|
async function getKosServiceApi() {
|
|
12297
|
-
const { default: API } = await Promise.resolve().then(() => require("./index-
|
|
12577
|
+
const { default: API } = await Promise.resolve().then(() => require("./index-D52vEGXT.cjs")).then((n) => n.service);
|
|
12298
12578
|
return API;
|
|
12299
12579
|
}
|
|
12300
12580
|
function kosServiceRequest$7(params2) {
|
|
@@ -13515,10 +13795,10 @@ const useContextModelHierarchy = (props) => {
|
|
|
13515
13795
|
`useContextModelHierarchy must be used within a KosModelCollectionProvider`
|
|
13516
13796
|
);
|
|
13517
13797
|
}
|
|
13518
|
-
const
|
|
13798
|
+
const filter2 = props?.filter || DEFAULT_FILTER;
|
|
13519
13799
|
const filteredModels = React.useMemo(
|
|
13520
|
-
() => context.models.filter(
|
|
13521
|
-
[context.models,
|
|
13800
|
+
() => context.models.filter(filter2),
|
|
13801
|
+
[context.models, filter2]
|
|
13522
13802
|
);
|
|
13523
13803
|
return filteredModels;
|
|
13524
13804
|
};
|
|
@@ -15925,7 +16205,6 @@ exports.EXTENSION_CANVAS_RENDERER = service$8.EXTENSION_CANVAS_RENDERER;
|
|
|
15925
16205
|
exports.EXTENSION_FEATURE_FLAG_RESOLVER = service$8.EXTENSION_FEATURE_FLAG_RESOLVER;
|
|
15926
16206
|
exports.EXTENSION_FUTURE_LIFECYCLE_WRAPPER = service$8.EXTENSION_FUTURE_LIFECYCLE_WRAPPER;
|
|
15927
16207
|
exports.EventBus = service$8.eventBus;
|
|
15928
|
-
exports.EventBusFunctional = service$8.eventBus_functional;
|
|
15929
16208
|
exports.EventBusState = service$8.eventBus_state;
|
|
15930
16209
|
exports.ExtensionException = service$8.ExtensionException;
|
|
15931
16210
|
exports.ExtensionManager = service$8.ExtensionManager;
|
|
@@ -16174,6 +16453,7 @@ exports.EVENT_TROUBLE_REMOVED = EVENT_TROUBLE_REMOVED;
|
|
|
16174
16453
|
exports.EXTENSION_TROUBLE_DATA_MAPPER = EXTENSION_TROUBLE_DATA_MAPPER;
|
|
16175
16454
|
exports.EXTENSION_TROUBLE_MAPPER = EXTENSION_TROUBLE_MAPPER;
|
|
16176
16455
|
exports.ErrorBoundaryWithFallback = ErrorBoundary;
|
|
16456
|
+
exports.EventBusFunctional = eventBus_functional;
|
|
16177
16457
|
exports.FUTURE_CONTAINER_MODEL_TYPE = FUTURE_CONTAINER_MODEL_TYPE;
|
|
16178
16458
|
exports.FUTURE_MODEL_TYPE = FUTURE_MODEL_TYPE;
|
|
16179
16459
|
exports.FUTURE_NOT_ASSIGNED = FUTURE_NOT_ASSIGNED;
|