@lexriver/dome 2.0.2 → 2.0.4
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/out/index.cjs +994 -0
- package/out/index.mjs +2164 -0
- package/out/src/AnimatedArray.d.ts +29 -0
- package/out/src/AnimatedTable.d.mts +2 -1
- package/out/src/AnimatedTable.d.ts +39 -0
- package/out/src/AnimatedTable.mjs +2 -1
- package/out/src/AnimatedText.d.mts +1 -1
- package/out/src/AnimatedText.d.ts +13 -0
- package/out/src/AnimatedText.mjs +1 -1
- package/out/src/Animation.d.ts +4 -0
- package/out/src/Dome.d.ts +9 -0
- package/out/src/Dome.mjs +1 -1
- package/out/src/DomeComponent.d.ts +25 -0
- package/out/src/DomeManipulator.d.ts +52 -0
- package/out/src/DomeRouter.d.ts +32 -0
- package/out/src/LongestCommonSubsequence.d.ts +15 -0
- package/out/src/index.d.mts +5 -1
- package/out/src/index.d.ts +15 -0
- package/out/src/index.mjs +5 -1
- package/package.json +21 -3
- package/out/src/DomeRouter.console-test.d.mts +0 -1
- package/out/src/DomeRouter.console-test.mjs +0 -44
- package/out/src/concurrent-updates.test.d.mts +0 -1
- package/out/src/concurrent-updates.test.mjs +0 -203
- package/out/src/temp-test.d.mts +0 -1
- package/out/src/temp-test.mjs +0 -20
- package/out/vitest.config.d.ts +0 -2
- package/out/vitest.config.js +0 -9
- package/src/AnimatedArray.mts +0 -74
- package/src/AnimatedTable.mts +0 -120
- package/src/AnimatedText.mts +0 -30
- package/src/Animation.mts +0 -4
- package/src/Dome.mts +0 -346
- package/src/DomeComponent.mts +0 -84
- package/src/DomeManipulator.mts +0 -391
- package/src/DomeRouter.console-test.mts +0 -52
- package/src/DomeRouter.mts +0 -287
- package/src/LongestCommonSubsequence.mts +0 -201
- package/src/concurrent-updates.test.mts +0 -252
- package/src/index.mts +0 -12
- package/src/temp-test.mts +0 -23
- package/tsconfig.json +0 -59
- package/vitest.config.ts +0 -10
package/out/index.mjs
ADDED
|
@@ -0,0 +1,2164 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
|
|
5
|
+
// node_modules/@lexriver/async/out/src/Async.mjs
|
|
6
|
+
var Async;
|
|
7
|
+
(function(Async2) {
|
|
8
|
+
async function waitMsAsync(millisecondsToWait) {
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
setTimeout(() => {
|
|
11
|
+
resolve();
|
|
12
|
+
}, millisecondsToWait);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
Async2.waitMsAsync = waitMsAsync;
|
|
16
|
+
async function waitForFunctionToReturnTrueAsync(functionToReturnTrue, msStep = 50, maxMsToWait = 0) {
|
|
17
|
+
if (msStep <= 0)
|
|
18
|
+
throw new Error(`msStep=${msStep}<=0`);
|
|
19
|
+
if (maxMsToWait < 0)
|
|
20
|
+
throw new Error(`maxMsToWait=${maxMsToWait}`);
|
|
21
|
+
let maxSteps = 0;
|
|
22
|
+
if (maxMsToWait) {
|
|
23
|
+
maxSteps = maxMsToWait / msStep;
|
|
24
|
+
if (maxSteps < 1) {
|
|
25
|
+
maxSteps = 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
let currentStep = 0;
|
|
29
|
+
while (true) {
|
|
30
|
+
if (functionToReturnTrue()) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (maxSteps > 0 && currentStep > maxSteps) {
|
|
34
|
+
throw new Error(`waitForFunctionToReturnTrue failed after timeout ${maxMsToWait}ms`);
|
|
35
|
+
}
|
|
36
|
+
await waitMsAsync(msStep);
|
|
37
|
+
currentStep++;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
Async2.waitForFunctionToReturnTrueAsync = waitForFunctionToReturnTrueAsync;
|
|
41
|
+
})(Async || (Async = {}));
|
|
42
|
+
|
|
43
|
+
// node_modules/@lexriver/async/out/src/Lock.mjs
|
|
44
|
+
var Lock = class {
|
|
45
|
+
constructor() {
|
|
46
|
+
__publicField(this, "isLocked", false);
|
|
47
|
+
}
|
|
48
|
+
async waitForUnlockAndLockAsync(msStep = 50, maxMsToWait = 0) {
|
|
49
|
+
if (this.isLocked) {
|
|
50
|
+
try {
|
|
51
|
+
await Async.waitForFunctionToReturnTrueAsync(() => this.isLocked === false, msStep, maxMsToWait);
|
|
52
|
+
} catch (x) {
|
|
53
|
+
throw new Error(`Unable to unlock the lock. Timeout ${maxMsToWait} ms`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (this.isLocked)
|
|
57
|
+
throw new Error("unable to unlock");
|
|
58
|
+
this.isLocked = true;
|
|
59
|
+
}
|
|
60
|
+
async unlockAsync() {
|
|
61
|
+
if (!this.isLocked)
|
|
62
|
+
throw new Error("unlock failed, not locked");
|
|
63
|
+
this.isLocked = false;
|
|
64
|
+
}
|
|
65
|
+
async lockAndExecuteAsync(action, msStep = 50, maxMsToWait = 0) {
|
|
66
|
+
await this.waitForUnlockAndLockAsync(msStep, maxMsToWait);
|
|
67
|
+
await action();
|
|
68
|
+
await this.unlockAsync();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// node_modules/@lexriver/data-types/out/src/DataTypes.mjs
|
|
73
|
+
var DataTypes;
|
|
74
|
+
(function(DataTypes2) {
|
|
75
|
+
function isFunction(x) {
|
|
76
|
+
return typeof x === "function";
|
|
77
|
+
}
|
|
78
|
+
DataTypes2.isFunction = isFunction;
|
|
79
|
+
function isClass(x) {
|
|
80
|
+
return typeof x === "function" && /^\s*class\s+/.test(x.toString());
|
|
81
|
+
}
|
|
82
|
+
DataTypes2.isClass = isClass;
|
|
83
|
+
function isClassInstance(classInstance, className) {
|
|
84
|
+
return classInstance instanceof className;
|
|
85
|
+
}
|
|
86
|
+
DataTypes2.isClassInstance = isClassInstance;
|
|
87
|
+
function isDate(date) {
|
|
88
|
+
return Object.prototype.toString.call(date) === "[object Date]";
|
|
89
|
+
}
|
|
90
|
+
DataTypes2.isDate = isDate;
|
|
91
|
+
function isObject(o) {
|
|
92
|
+
return o === Object(o) && Object.prototype.toString.call(o) === "[object Object]";
|
|
93
|
+
}
|
|
94
|
+
DataTypes2.isObject = isObject;
|
|
95
|
+
function isObjectWithKeys(o) {
|
|
96
|
+
return isObject(o) && Object.keys(o).length > 0;
|
|
97
|
+
}
|
|
98
|
+
DataTypes2.isObjectWithKeys = isObjectWithKeys;
|
|
99
|
+
function isIterableObject(o) {
|
|
100
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
101
|
+
}
|
|
102
|
+
function isString(x) {
|
|
103
|
+
return typeof x === "string";
|
|
104
|
+
}
|
|
105
|
+
DataTypes2.isString = isString;
|
|
106
|
+
function isNumber(x) {
|
|
107
|
+
return typeof x === "number";
|
|
108
|
+
}
|
|
109
|
+
DataTypes2.isNumber = isNumber;
|
|
110
|
+
function isNullOrUndefined(x) {
|
|
111
|
+
return x == null;
|
|
112
|
+
}
|
|
113
|
+
DataTypes2.isNullOrUndefined = isNullOrUndefined;
|
|
114
|
+
function isBoolean(x) {
|
|
115
|
+
return typeof x === "boolean";
|
|
116
|
+
}
|
|
117
|
+
DataTypes2.isBoolean = isBoolean;
|
|
118
|
+
function isArray(x) {
|
|
119
|
+
return Array.isArray(x);
|
|
120
|
+
}
|
|
121
|
+
DataTypes2.isArray = isArray;
|
|
122
|
+
function isPrimitive(x) {
|
|
123
|
+
return x === null || typeof x === "boolean" || typeof x === "number" || typeof x === "string" || typeof x === "symbol" || // ES6 symbol
|
|
124
|
+
typeof x === "undefined";
|
|
125
|
+
}
|
|
126
|
+
DataTypes2.isPrimitive = isPrimitive;
|
|
127
|
+
function isEqual(x, y, options) {
|
|
128
|
+
if (x === y)
|
|
129
|
+
return true;
|
|
130
|
+
if (isPrimitive(x)) {
|
|
131
|
+
if (isPrimitive(y)) {
|
|
132
|
+
if (typeof x === "string" && typeof y === "string" && (options == null ? void 0 : options.ignoreCaseInStrings)) {
|
|
133
|
+
return x.toLocaleLowerCase() === y.toLocaleLowerCase();
|
|
134
|
+
}
|
|
135
|
+
return x === y;
|
|
136
|
+
}
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
if (isPrimitive(y))
|
|
140
|
+
return false;
|
|
141
|
+
if (typeof x !== typeof y)
|
|
142
|
+
return false;
|
|
143
|
+
if (isDate(x) && isDate(y)) {
|
|
144
|
+
return x.getTime() == y.getTime();
|
|
145
|
+
}
|
|
146
|
+
if (isArray(x) && isArray(y) && x.length == y.length) {
|
|
147
|
+
for (let i = 0; i < x.length; i++) {
|
|
148
|
+
if (isEqual(x[i], y[i]) == false)
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
if (isIterableObject(x) && isIterableObject(y)) {
|
|
154
|
+
if (Object.keys(x).length !== Object.keys(y).length)
|
|
155
|
+
return false;
|
|
156
|
+
for (let [k, v] of Object.entries(x)) {
|
|
157
|
+
if (isEqual(v, y[k], options) == false)
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
DataTypes2.isEqual = isEqual;
|
|
165
|
+
function isObjectContainsObject(p) {
|
|
166
|
+
var _a;
|
|
167
|
+
if (isIterableObject(p.smallObject) && isIterableObject(p.bigObject)) {
|
|
168
|
+
} else
|
|
169
|
+
return false;
|
|
170
|
+
if (Object.entries(p.smallObject).length == 0) {
|
|
171
|
+
if (p.ignoreEmptySmallObject) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
for (let [smallKey, smallValue] of Object.entries(p.smallObject)) {
|
|
177
|
+
if (p.bigObject.hasOwnProperty(smallKey) == false)
|
|
178
|
+
return false;
|
|
179
|
+
if (isIterableObject(smallValue)) {
|
|
180
|
+
if (isObjectContainsObject({
|
|
181
|
+
bigObject: p.bigObject[smallKey],
|
|
182
|
+
smallObject: smallValue,
|
|
183
|
+
ignoreCaseInStringValues: p.ignoreCaseInStringValues,
|
|
184
|
+
ignoreEmptySmallObject: p.ignoreEmptySmallObject
|
|
185
|
+
}) === false)
|
|
186
|
+
return false;
|
|
187
|
+
} else {
|
|
188
|
+
if (isEqual(smallValue, p.bigObject[smallKey], { ignoreCaseInStrings: (_a = p.ignoreCaseInStringValues) != null ? _a : false }) === false)
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
DataTypes2.isObjectContainsObject = isObjectContainsObject;
|
|
195
|
+
function filterObjectByKeys(o, keysToCopy, recursive) {
|
|
196
|
+
if (!o)
|
|
197
|
+
throw new Error(`filterObjectByKeys failed, o=${o}`);
|
|
198
|
+
if (isValidJsonObject(o) == false) {
|
|
199
|
+
console.warn("filterObjectByKeys is trying to filter not a valid json object", "o=", o);
|
|
200
|
+
}
|
|
201
|
+
try {
|
|
202
|
+
if (isArray(o)) {
|
|
203
|
+
return o.map((x) => filterObjectByKeys(x, keysToCopy, recursive));
|
|
204
|
+
}
|
|
205
|
+
if (isDate(o)) {
|
|
206
|
+
return o;
|
|
207
|
+
}
|
|
208
|
+
if (isObject(o)) {
|
|
209
|
+
let result = {};
|
|
210
|
+
Object.entries(o).forEach(([key, value]) => {
|
|
211
|
+
if (keysToCopy(key)) {
|
|
212
|
+
if (recursive && value) {
|
|
213
|
+
value = filterObjectByKeys(value, keysToCopy, recursive);
|
|
214
|
+
}
|
|
215
|
+
result[key] = value;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
return o;
|
|
221
|
+
} catch (x) {
|
|
222
|
+
console.error("filterObjectByKeys failed", "o=", o);
|
|
223
|
+
throw x;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
DataTypes2.filterObjectByKeys = filterObjectByKeys;
|
|
227
|
+
function isValidJsonObject(json) {
|
|
228
|
+
if (json === null || json === void 0)
|
|
229
|
+
return true;
|
|
230
|
+
const typeName = json.constructor.name;
|
|
231
|
+
switch (typeName) {
|
|
232
|
+
case "Boolean":
|
|
233
|
+
case "Number":
|
|
234
|
+
case "String":
|
|
235
|
+
case "Date":
|
|
236
|
+
return true;
|
|
237
|
+
case "Object":
|
|
238
|
+
for (let [k, v] of Object.entries(json)) {
|
|
239
|
+
if (isValidJsonObject(v) == false)
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
return true;
|
|
243
|
+
case "Array":
|
|
244
|
+
for (let v of json) {
|
|
245
|
+
if (isValidJsonObject(v) == false)
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
return true;
|
|
249
|
+
default:
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
DataTypes2.isValidJsonObject = isValidJsonObject;
|
|
254
|
+
function toJson(o) {
|
|
255
|
+
return JSON.parse(JSON.stringify(o));
|
|
256
|
+
}
|
|
257
|
+
DataTypes2.toJson = toJson;
|
|
258
|
+
function isValueExistsInEnum(value, EnumType) {
|
|
259
|
+
for (let enumValue in EnumType) {
|
|
260
|
+
if (value == EnumType[enumValue])
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
DataTypes2.isValueExistsInEnum = isValueExistsInEnum;
|
|
266
|
+
})(DataTypes || (DataTypes = {}));
|
|
267
|
+
|
|
268
|
+
// node_modules/@lexriver/type-event/out/src/TypeEvent.mjs
|
|
269
|
+
var TypeEvent = class {
|
|
270
|
+
//protected _maxCountOfSubscribers:number|undefined = undefined
|
|
271
|
+
//public maxSubscribers:number = 100
|
|
272
|
+
constructor(maxCountOfSubscribers = void 0) {
|
|
273
|
+
__publicField(this, "maxCountOfSubscribers");
|
|
274
|
+
__publicField(this, "_actions", []);
|
|
275
|
+
__publicField(this, "_onceActions", []);
|
|
276
|
+
this.maxCountOfSubscribers = maxCountOfSubscribers;
|
|
277
|
+
}
|
|
278
|
+
subscribe(action) {
|
|
279
|
+
if (this.maxCountOfSubscribers && this.maxCountOfSubscribers > 0 && this._actions.length > this.maxCountOfSubscribers)
|
|
280
|
+
throw new Error(`too much susbcribers: limit is ${this.maxCountOfSubscribers}`);
|
|
281
|
+
this._actions.push(action);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* subscribe to event and delete this subscriber after first execution
|
|
285
|
+
* @param onceAction
|
|
286
|
+
*/
|
|
287
|
+
once(onceAction) {
|
|
288
|
+
this._onceActions.push(onceAction);
|
|
289
|
+
}
|
|
290
|
+
unsubscribe(action) {
|
|
291
|
+
this._actions = this._actions.filter((x) => x !== action);
|
|
292
|
+
this._onceActions = this._onceActions.filter((x) => x !== action);
|
|
293
|
+
}
|
|
294
|
+
unsubscribeAll() {
|
|
295
|
+
this._actions = [];
|
|
296
|
+
this._onceActions = [];
|
|
297
|
+
}
|
|
298
|
+
async triggerAsync(...p) {
|
|
299
|
+
const actionsToDelete = [];
|
|
300
|
+
for (let action of this._actions) {
|
|
301
|
+
let result = await action(...p);
|
|
302
|
+
if (result && result.unsubscribe) {
|
|
303
|
+
actionsToDelete.push(action);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
for (let onceAction of this._onceActions) {
|
|
307
|
+
onceAction(...p);
|
|
308
|
+
}
|
|
309
|
+
this._onceActions = [];
|
|
310
|
+
if (actionsToDelete.length > 0) {
|
|
311
|
+
this._actions = this._actions.filter((x) => actionsToDelete.indexOf(x) < 0);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
get countOfSubscribers() {
|
|
315
|
+
return this._actions.length;
|
|
316
|
+
}
|
|
317
|
+
get countOfOnceSubscribers() {
|
|
318
|
+
return this._onceActions.length;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
// node_modules/@lexriver/observable/out/src/ObservableArray.mjs
|
|
323
|
+
var ObservableArray = class {
|
|
324
|
+
constructor(initialArray) {
|
|
325
|
+
__publicField(this, "eventOnChange", new TypeEvent());
|
|
326
|
+
//eventOnAdd:TypeEvent<(item:T, index:number)=>void> = new TypeEvent()
|
|
327
|
+
//eventOnRemove:TypeEvent<(item:T, index:number)=>void> = new TypeEvent()
|
|
328
|
+
__publicField(this, "items", []);
|
|
329
|
+
//#region iterator
|
|
330
|
+
// *[Symbol.iterator]() {
|
|
331
|
+
// for(let i of this.items) {
|
|
332
|
+
// yield i;
|
|
333
|
+
// }
|
|
334
|
+
// }
|
|
335
|
+
__publicField(this, "iteratorIndex", 0);
|
|
336
|
+
if (initialArray) {
|
|
337
|
+
this.items = initialArray;
|
|
338
|
+
}
|
|
339
|
+
let proxySettings = {
|
|
340
|
+
get: (target, prop, receiver) => {
|
|
341
|
+
let propNumber = parseInt(prop);
|
|
342
|
+
if (propNumber >= 0) {
|
|
343
|
+
return this.items[propNumber];
|
|
344
|
+
}
|
|
345
|
+
const result = Reflect.get(target, prop, receiver);
|
|
346
|
+
return result;
|
|
347
|
+
},
|
|
348
|
+
set: (target, prop, value, receiver) => {
|
|
349
|
+
if (prop === "items") {
|
|
350
|
+
this.items = value;
|
|
351
|
+
return true;
|
|
352
|
+
}
|
|
353
|
+
let propNumber = parseInt(prop);
|
|
354
|
+
if (propNumber >= 0) {
|
|
355
|
+
this.items[propNumber] = value;
|
|
356
|
+
this.eventOnChange.triggerAsync(value);
|
|
357
|
+
}
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
return new Proxy(this, proxySettings);
|
|
362
|
+
}
|
|
363
|
+
getItemsCopy() {
|
|
364
|
+
return this.items.slice(0);
|
|
365
|
+
}
|
|
366
|
+
get length() {
|
|
367
|
+
return this.items.length;
|
|
368
|
+
}
|
|
369
|
+
getInternalArray() {
|
|
370
|
+
return this.items;
|
|
371
|
+
}
|
|
372
|
+
getAsArray() {
|
|
373
|
+
return this.getItemsCopy();
|
|
374
|
+
}
|
|
375
|
+
toArray() {
|
|
376
|
+
return this.getAsArray();
|
|
377
|
+
}
|
|
378
|
+
set(items) {
|
|
379
|
+
this.items = items;
|
|
380
|
+
this.eventOnChange.triggerAsync();
|
|
381
|
+
}
|
|
382
|
+
setByPrevious(setter) {
|
|
383
|
+
const prevItems = this.items;
|
|
384
|
+
const nextItems = setter(prevItems);
|
|
385
|
+
this.items = nextItems;
|
|
386
|
+
this.eventOnChange.triggerAsync();
|
|
387
|
+
}
|
|
388
|
+
appendArray(arrayToAppend) {
|
|
389
|
+
this.items = this.items.concat(arrayToAppend);
|
|
390
|
+
this.eventOnChange.triggerAsync();
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* The every() method tests whether all elements in the array pass the test implemented by the provided function. It returns a Boolean value.
|
|
394
|
+
*/
|
|
395
|
+
every(conditionToCheck) {
|
|
396
|
+
return this.items.every(conditionToCheck);
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* The fill() method changes all elements in an array to a static value, from a start index (default 0) to an end index (default array.length). It returns the modified array.
|
|
400
|
+
*/
|
|
401
|
+
fill(value, start, end) {
|
|
402
|
+
const result = this.items.fill(value, start, end);
|
|
403
|
+
this.eventOnChange.triggerAsync();
|
|
404
|
+
return result;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* The filter() method creates a new array with all elements that pass the test implemented by the provided function.
|
|
408
|
+
*/
|
|
409
|
+
filter(action) {
|
|
410
|
+
return this.items.filter(action);
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* The find() method returns the value of the first element in the provided array that satisfies the provided testing function.
|
|
414
|
+
*/
|
|
415
|
+
find(predicate) {
|
|
416
|
+
return this.items.find(predicate);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* The findIndex() method returns the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns -1, indicating that no element passed the test.
|
|
420
|
+
*/
|
|
421
|
+
findIndex(predicate) {
|
|
422
|
+
return this.items.findIndex(predicate);
|
|
423
|
+
}
|
|
424
|
+
// /**
|
|
425
|
+
// * The flat() method creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.
|
|
426
|
+
// */
|
|
427
|
+
// flat(){
|
|
428
|
+
// this.items.flat()
|
|
429
|
+
// }
|
|
430
|
+
/**
|
|
431
|
+
* The forEach() method executes a provided function once for each array element.
|
|
432
|
+
*/
|
|
433
|
+
forEach(action, thisArg) {
|
|
434
|
+
return this.items.forEach(action, thisArg);
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* The includes() method determines whether an array includes a certain value among its entries, returning true or false as appropriate.
|
|
438
|
+
*/
|
|
439
|
+
includes(searchElement, fromIndex) {
|
|
440
|
+
return this.items.includes(searchElement, fromIndex);
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
|
|
444
|
+
*/
|
|
445
|
+
indexOf(searchElement, fromIndex) {
|
|
446
|
+
return this.items.indexOf(searchElement, fromIndex);
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* The join() method creates and returns a new string by concatenating all of the elements in an array, separated by commas or a specified separator string. If the array has only one item, then that item will be returned without using the separator.
|
|
450
|
+
*/
|
|
451
|
+
join(separator) {
|
|
452
|
+
return this.items.join(separator);
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* The keys() method returns a new Array Iterator object that contains the keys for each index in the array
|
|
456
|
+
*/
|
|
457
|
+
keys() {
|
|
458
|
+
return this.items.keys();
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The lastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex.
|
|
462
|
+
*/
|
|
463
|
+
lastIndexOf(searchElement, fromIndex) {
|
|
464
|
+
return this.items.lastIndexOf(searchElement, fromIndex);
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.
|
|
468
|
+
* @param action
|
|
469
|
+
*/
|
|
470
|
+
map(action, thisArg) {
|
|
471
|
+
return this.items.map(action, thisArg);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* The pop() method removes the last element from an array and returns that element. This method changes the length of the array.
|
|
475
|
+
*/
|
|
476
|
+
pop() {
|
|
477
|
+
const result = this.items.pop();
|
|
478
|
+
this.eventOnChange.triggerAsync();
|
|
479
|
+
return result;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* The push() method adds zero or more elements to the end of an array and returns the new length of the array.
|
|
483
|
+
* @param item
|
|
484
|
+
*/
|
|
485
|
+
push(item) {
|
|
486
|
+
this.items.push(item);
|
|
487
|
+
this.eventOnChange.triggerAsync(item);
|
|
488
|
+
return this.items.length;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* The reduce() method executes a reducer function (that you provide) on each element of the array, resulting in single output value.
|
|
492
|
+
*/
|
|
493
|
+
reduce(action, initValue) {
|
|
494
|
+
return this.items.reduce(action, initValue);
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* The reduceRight() method applies a function against an accumulator and each value of the array (from right-to-left) to reduce it to a single value.
|
|
498
|
+
*/
|
|
499
|
+
reduceRight(action, initValue) {
|
|
500
|
+
return this.items.reduceRight(action, initValue);
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* The reverse() method reverses an array in place. The first array element becomes the last, and the last array element becomes the first.
|
|
504
|
+
*/
|
|
505
|
+
reverse() {
|
|
506
|
+
this.items.reverse();
|
|
507
|
+
this.eventOnChange.triggerAsync();
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Removes the first element from an array and returns it.
|
|
511
|
+
*/
|
|
512
|
+
shift() {
|
|
513
|
+
const result = this.items.shift();
|
|
514
|
+
this.eventOnChange.triggerAsync(result);
|
|
515
|
+
return result;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Returns a section of an array.
|
|
519
|
+
* @param start The beginning of the specified portion of the array.
|
|
520
|
+
* @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
|
521
|
+
*/
|
|
522
|
+
slice(start, end) {
|
|
523
|
+
return this.items.slice(start, end);
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Determines whether the specified callback function returns true for any element of an array.
|
|
527
|
+
* @param callbackfn A function that accepts up to three arguments. The some method calls
|
|
528
|
+
* the callbackfn function for each element in the array until the callbackfn returns a value
|
|
529
|
+
* which is coercible to the Boolean value true, or until the end of the array.
|
|
530
|
+
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
531
|
+
* If thisArg is omitted, undefined is used as the this value.
|
|
532
|
+
*/
|
|
533
|
+
some(predicate, thisArg) {
|
|
534
|
+
return this.items.some(predicate, thisArg);
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Sorts an array.
|
|
538
|
+
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
539
|
+
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
|
540
|
+
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
|
541
|
+
* ```ts
|
|
542
|
+
* [11,2,22,1].sort((a, b) => a - b)
|
|
543
|
+
* ```
|
|
544
|
+
*/
|
|
545
|
+
sort(compareFn) {
|
|
546
|
+
const result = this.items.sort(compareFn);
|
|
547
|
+
this.eventOnChange.triggerAsync();
|
|
548
|
+
return result;
|
|
549
|
+
}
|
|
550
|
+
splice(start, deleteCount, ...items) {
|
|
551
|
+
const result = typeof deleteCount === "number" ? this.items.splice(start, deleteCount, ...items) : this.items.splice(start, deleteCount);
|
|
552
|
+
this.eventOnChange.triggerAsync();
|
|
553
|
+
return result;
|
|
554
|
+
}
|
|
555
|
+
// /**
|
|
556
|
+
// * The toLocaleString() method returns a string representing the elements of the array. The elements are converted to Strings using their toLocaleString methods and these Strings are separated by a locale-specific String (such as a comma “,”).
|
|
557
|
+
// */
|
|
558
|
+
// toLocaleString(locales?:string, options?:any){
|
|
559
|
+
// //return this.items.toLocaleString(locales, options)
|
|
560
|
+
// }
|
|
561
|
+
/**
|
|
562
|
+
* A string representing the elements of the array.
|
|
563
|
+
*/
|
|
564
|
+
toString() {
|
|
565
|
+
return `ObservableArray:` + this.items.toString();
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Inserts new elements at the start of an array.
|
|
569
|
+
* @param items Elements to insert at the start of the Array.
|
|
570
|
+
*/
|
|
571
|
+
unshift(...items) {
|
|
572
|
+
const result = this.items.unshift(...items);
|
|
573
|
+
this.eventOnChange.triggerAsync();
|
|
574
|
+
return result;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Returns an iterable of values in the array
|
|
578
|
+
*/
|
|
579
|
+
values() {
|
|
580
|
+
return this.items.values();
|
|
581
|
+
}
|
|
582
|
+
getByIndex(index) {
|
|
583
|
+
return this.items[index];
|
|
584
|
+
}
|
|
585
|
+
setByIndex(index, value) {
|
|
586
|
+
this.items[index] = value;
|
|
587
|
+
this.eventOnChange.triggerAsync(value);
|
|
588
|
+
}
|
|
589
|
+
removeItemByIndex(index) {
|
|
590
|
+
const itemToBeRemoved = this.items[index];
|
|
591
|
+
this.items.splice(index, 1);
|
|
592
|
+
this.eventOnChange.triggerAsync(itemToBeRemoved);
|
|
593
|
+
}
|
|
594
|
+
[Symbol.iterator]() {
|
|
595
|
+
return this;
|
|
596
|
+
}
|
|
597
|
+
next() {
|
|
598
|
+
if (this.iteratorIndex < this.items.length) {
|
|
599
|
+
return { value: this.items[this.iteratorIndex], done: false };
|
|
600
|
+
}
|
|
601
|
+
return { value: null, done: true };
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
// node_modules/@lexriver/observable/out/src/ObservableMap.mjs
|
|
606
|
+
var ObservableMap = class {
|
|
607
|
+
constructor(mapEntries) {
|
|
608
|
+
__publicField(this, "eventOnChange", new TypeEvent());
|
|
609
|
+
__publicField(this, "eventOnChangeKey", new TypeEvent());
|
|
610
|
+
__publicField(this, "eventOnDeleteKey", new TypeEvent());
|
|
611
|
+
__publicField(this, "eventOnClear", new TypeEvent());
|
|
612
|
+
__publicField(this, "internalMap", /* @__PURE__ */ new Map());
|
|
613
|
+
if (mapEntries) {
|
|
614
|
+
this.internalMap = new Map(mapEntries);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* The entries() method returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order.
|
|
619
|
+
*/
|
|
620
|
+
entries() {
|
|
621
|
+
return this.internalMap.entries();
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* The has() method returns a boolean indicating whether an element with the specified key exists or not.
|
|
625
|
+
*/
|
|
626
|
+
has(key) {
|
|
627
|
+
return this.internalMap.has(key);
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* The forEach() method executes a provided function once per each key/value pair in the Map object, in insertion order.
|
|
631
|
+
* @param callbackfn
|
|
632
|
+
* @param thisArg
|
|
633
|
+
*/
|
|
634
|
+
forEach(callbackfn, thisArg) {
|
|
635
|
+
return this.internalMap.forEach(callbackfn, thisArg);
|
|
636
|
+
}
|
|
637
|
+
set(key, value) {
|
|
638
|
+
this.internalMap.set(key, value);
|
|
639
|
+
this.eventOnChangeKey.triggerAsync(key, value);
|
|
640
|
+
this.eventOnChange.triggerAsync(key, value);
|
|
641
|
+
}
|
|
642
|
+
get(key) {
|
|
643
|
+
return this.internalMap.get(key);
|
|
644
|
+
}
|
|
645
|
+
toArray() {
|
|
646
|
+
return Array.from(this.internalMap.entries());
|
|
647
|
+
}
|
|
648
|
+
initFromArray(mapEntries) {
|
|
649
|
+
this.internalMap = new Map(mapEntries);
|
|
650
|
+
this.eventOnChange.triggerAsync();
|
|
651
|
+
}
|
|
652
|
+
delete(key) {
|
|
653
|
+
const result = this.internalMap.delete(key);
|
|
654
|
+
if (result) {
|
|
655
|
+
this.eventOnDeleteKey.triggerAsync(key);
|
|
656
|
+
this.eventOnChange.triggerAsync(key);
|
|
657
|
+
}
|
|
658
|
+
return result;
|
|
659
|
+
}
|
|
660
|
+
clear() {
|
|
661
|
+
this.internalMap.clear();
|
|
662
|
+
this.eventOnClear.triggerAsync();
|
|
663
|
+
this.eventOnChange.triggerAsync();
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* The keys() method returns a new Iterator object that contains the keys for each element in the Map object in insertion order.
|
|
667
|
+
*/
|
|
668
|
+
keys() {
|
|
669
|
+
return this.internalMap.keys();
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* The values() method returns a new Iterator object that contains the values for each element in the Map object in insertion order.
|
|
673
|
+
*/
|
|
674
|
+
values() {
|
|
675
|
+
return this.internalMap.values();
|
|
676
|
+
}
|
|
677
|
+
isEmpty() {
|
|
678
|
+
return this.internalMap.size == 0;
|
|
679
|
+
}
|
|
680
|
+
get size() {
|
|
681
|
+
return this.internalMap.size;
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
// node_modules/@lexriver/observable/out/src/ObservableVariable.mjs
|
|
686
|
+
var ObservableVariable = class {
|
|
687
|
+
constructor(value) {
|
|
688
|
+
__publicField(this, "value");
|
|
689
|
+
__publicField(this, "eventOnChange", new TypeEvent());
|
|
690
|
+
this.value = value;
|
|
691
|
+
}
|
|
692
|
+
set(value) {
|
|
693
|
+
const prevValue = this.value;
|
|
694
|
+
this.value = value;
|
|
695
|
+
this.eventOnChange.triggerAsync(this.value, prevValue);
|
|
696
|
+
}
|
|
697
|
+
setByPrevious(setter) {
|
|
698
|
+
const prevValue = this.value;
|
|
699
|
+
const newValue = setter(this.value);
|
|
700
|
+
this.value = newValue;
|
|
701
|
+
this.eventOnChange.triggerAsync(this.value, prevValue);
|
|
702
|
+
}
|
|
703
|
+
get() {
|
|
704
|
+
return this.value;
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
// node_modules/@lexriver/observable/out/src/Functions.mjs
|
|
709
|
+
function createObservable(x) {
|
|
710
|
+
if (typeof x === "string") {
|
|
711
|
+
return new ObservableVariable(x);
|
|
712
|
+
}
|
|
713
|
+
if (typeof x === "number") {
|
|
714
|
+
return new ObservableVariable(x);
|
|
715
|
+
}
|
|
716
|
+
if (typeof x === "boolean") {
|
|
717
|
+
return new ObservableVariable(x);
|
|
718
|
+
}
|
|
719
|
+
if (Array.isArray(x)) {
|
|
720
|
+
return new ObservableArray(x);
|
|
721
|
+
}
|
|
722
|
+
if (x instanceof Map) {
|
|
723
|
+
return new ObservableMap(x);
|
|
724
|
+
}
|
|
725
|
+
console.error("argument=", x, typeof x);
|
|
726
|
+
throw new Error("unable to create Observable from this argument type");
|
|
727
|
+
}
|
|
728
|
+
function checkIfObservable(o) {
|
|
729
|
+
return o instanceof ObservableVariable || o instanceof ObservableArray || o instanceof ObservableMap;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
// node_modules/@lexriver/observable/out/src/ObservableLocalStorageArray.mjs
|
|
733
|
+
var ObservableLocalStorageArray = class {
|
|
734
|
+
constructor(p) {
|
|
735
|
+
__publicField(this, "p");
|
|
736
|
+
//protected observableVariable:Observable<T|undefined>
|
|
737
|
+
//protected localStorageKey:string
|
|
738
|
+
__publicField(this, "items", []);
|
|
739
|
+
__publicField(this, "eventOnChange", new TypeEvent());
|
|
740
|
+
//#region iterator
|
|
741
|
+
// *[Symbol.iterator]() {
|
|
742
|
+
// for(let i of this.items) {
|
|
743
|
+
// yield i;
|
|
744
|
+
// }
|
|
745
|
+
// }
|
|
746
|
+
__publicField(this, "iteratorIndex", 0);
|
|
747
|
+
this.p = p;
|
|
748
|
+
this.assignCurrentValue(false);
|
|
749
|
+
this.subscribeToWindowEvent();
|
|
750
|
+
}
|
|
751
|
+
subscribeToWindowEvent() {
|
|
752
|
+
window.addEventListener("storage", (e) => {
|
|
753
|
+
if (e.key != this.p.localStorageKey)
|
|
754
|
+
return;
|
|
755
|
+
this.assignCurrentValue(true);
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
getInternalArray() {
|
|
759
|
+
return this.items;
|
|
760
|
+
}
|
|
761
|
+
getAsCopy() {
|
|
762
|
+
return this.items.slice(0);
|
|
763
|
+
}
|
|
764
|
+
toArray() {
|
|
765
|
+
return this.getAsCopy();
|
|
766
|
+
}
|
|
767
|
+
get length() {
|
|
768
|
+
return this.items.length;
|
|
769
|
+
}
|
|
770
|
+
appendArray(arrayToAppend) {
|
|
771
|
+
this.items = this.items.concat(arrayToAppend);
|
|
772
|
+
this.set(this.items);
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* The every() method tests whether all elements in the array pass the test implemented by the provided function. It returns a Boolean value.
|
|
776
|
+
*/
|
|
777
|
+
every(conditionToCheck) {
|
|
778
|
+
return this.items.every(conditionToCheck);
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* The fill() method changes all elements in an array to a static value, from a start index (default 0) to an end index (default array.length). It returns the modified array.
|
|
782
|
+
*/
|
|
783
|
+
fill(value, start, end) {
|
|
784
|
+
const result = this.items.fill(value, start, end);
|
|
785
|
+
this.set(result);
|
|
786
|
+
return result;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* The filter() method creates a new array with all elements that pass the test implemented by the provided function.
|
|
790
|
+
*/
|
|
791
|
+
filter(action) {
|
|
792
|
+
return this.items.filter(action);
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* The find() method returns the value of the first element in the provided array that satisfies the provided testing function.
|
|
796
|
+
*/
|
|
797
|
+
find(predicate) {
|
|
798
|
+
return this.items.find(predicate);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* The findIndex() method returns the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns -1, indicating that no element passed the test.
|
|
802
|
+
*/
|
|
803
|
+
findIndex(predicate) {
|
|
804
|
+
return this.items.findIndex(predicate);
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* The forEach() method executes a provided function once for each array element.
|
|
808
|
+
*/
|
|
809
|
+
forEach(action, thisArg) {
|
|
810
|
+
return this.items.forEach(action, thisArg);
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* The includes() method determines whether an array includes a certain value among its entries, returning true or false as appropriate.
|
|
814
|
+
*/
|
|
815
|
+
includes(searchElement, fromIndex) {
|
|
816
|
+
return this.items.includes(searchElement, fromIndex);
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
|
|
820
|
+
*/
|
|
821
|
+
indexOf(searchElement, fromIndex) {
|
|
822
|
+
return this.items.indexOf(searchElement, fromIndex);
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* The join() method creates and returns a new string by concatenating all of the elements in an array, separated by commas or a specified separator string. If the array has only one item, then that item will be returned without using the separator.
|
|
826
|
+
*/
|
|
827
|
+
join(separator) {
|
|
828
|
+
return this.items.join(separator);
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* The keys() method returns a new Array Iterator object that contains the keys for each index in the array
|
|
832
|
+
*/
|
|
833
|
+
keys() {
|
|
834
|
+
return this.items.keys();
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* The lastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex.
|
|
838
|
+
*/
|
|
839
|
+
lastIndexOf(searchElement, fromIndex) {
|
|
840
|
+
return this.items.lastIndexOf(searchElement, fromIndex);
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.
|
|
844
|
+
* @param action
|
|
845
|
+
*/
|
|
846
|
+
map(action, thisArg) {
|
|
847
|
+
return this.items.map(action, thisArg);
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* The pop() method removes the last element from an array and returns that element. This method changes the length of the array.
|
|
851
|
+
*/
|
|
852
|
+
pop() {
|
|
853
|
+
const result = this.items.pop();
|
|
854
|
+
this.set(this.items);
|
|
855
|
+
return result;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* The push() method adds zero or more elements to the end of an array and returns the new length of the array.
|
|
859
|
+
* @param item
|
|
860
|
+
*/
|
|
861
|
+
push(item) {
|
|
862
|
+
this.items.push(item);
|
|
863
|
+
this.set(this.items);
|
|
864
|
+
return this.items.length;
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* The reduce() method executes a reducer function (that you provide) on each element of the array, resulting in single output value.
|
|
868
|
+
*/
|
|
869
|
+
reduce(action, initValue) {
|
|
870
|
+
return this.items.reduce(action, initValue);
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* The reduceRight() method applies a function against an accumulator and each value of the array (from right-to-left) to reduce it to a single value.
|
|
874
|
+
*/
|
|
875
|
+
reduceRight(action, initValue) {
|
|
876
|
+
return this.items.reduceRight(action, initValue);
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* The reverse() method reverses an array in place. The first array element becomes the last, and the last array element becomes the first.
|
|
880
|
+
*/
|
|
881
|
+
reverse() {
|
|
882
|
+
this.items.reverse();
|
|
883
|
+
this.set(this.items);
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Removes the first element from an array and returns it.
|
|
887
|
+
*/
|
|
888
|
+
shift() {
|
|
889
|
+
const result = this.items.shift();
|
|
890
|
+
this.set(this.items);
|
|
891
|
+
return result;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Returns a section of an array.
|
|
895
|
+
* @param start The beginning of the specified portion of the array.
|
|
896
|
+
* @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
|
897
|
+
*/
|
|
898
|
+
slice(start, end) {
|
|
899
|
+
return this.items.slice(start, end);
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Determines whether the specified callback function returns true for any element of an array.
|
|
903
|
+
* @param callbackfn A function that accepts up to three arguments. The some method calls
|
|
904
|
+
* the callbackfn function for each element in the array until the callbackfn returns a value
|
|
905
|
+
* which is coercible to the Boolean value true, or until the end of the array.
|
|
906
|
+
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
907
|
+
* If thisArg is omitted, undefined is used as the this value.
|
|
908
|
+
*/
|
|
909
|
+
some(predicate, thisArg) {
|
|
910
|
+
return this.items.some(predicate, thisArg);
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Sorts an array.
|
|
914
|
+
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
915
|
+
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
|
916
|
+
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
|
917
|
+
* ```ts
|
|
918
|
+
* [11,2,22,1].sort((a, b) => a - b)
|
|
919
|
+
* ```
|
|
920
|
+
*/
|
|
921
|
+
sort(compareFn) {
|
|
922
|
+
const result = this.items.sort(compareFn);
|
|
923
|
+
this.set(this.items);
|
|
924
|
+
return result;
|
|
925
|
+
}
|
|
926
|
+
splice(start, deleteCount, ...items) {
|
|
927
|
+
const result = typeof deleteCount === "number" ? this.items.splice(start, deleteCount, ...items) : this.items.splice(start, deleteCount);
|
|
928
|
+
this.set(this.items);
|
|
929
|
+
return result;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* A string representing the elements of the array.
|
|
933
|
+
*/
|
|
934
|
+
toString() {
|
|
935
|
+
return `ObservableLocalStorageArray:` + this.items.toString();
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* Inserts new elements at the start of an array.
|
|
939
|
+
* @param items Elements to insert at the start of the Array.
|
|
940
|
+
*/
|
|
941
|
+
unshift(...items) {
|
|
942
|
+
const result = this.items.unshift(...items);
|
|
943
|
+
this.set(this.items);
|
|
944
|
+
return result;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Returns an iterable of values in the array
|
|
948
|
+
*/
|
|
949
|
+
values() {
|
|
950
|
+
return this.items.values();
|
|
951
|
+
}
|
|
952
|
+
getByIndex(index) {
|
|
953
|
+
return this.items[index];
|
|
954
|
+
}
|
|
955
|
+
setByIndex(index, value) {
|
|
956
|
+
this.items[index] = value;
|
|
957
|
+
this.set(this.items);
|
|
958
|
+
}
|
|
959
|
+
removeItemByIndex(index) {
|
|
960
|
+
this.items.splice(index, 1);
|
|
961
|
+
this.set(this.items);
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Removes first item in array.
|
|
965
|
+
* Returns true if successful.
|
|
966
|
+
* @param item
|
|
967
|
+
* @returns
|
|
968
|
+
*/
|
|
969
|
+
removeFirst(item) {
|
|
970
|
+
const index = this.items.indexOf(item);
|
|
971
|
+
if (index >= 0) {
|
|
972
|
+
this.removeItemByIndex(index);
|
|
973
|
+
return true;
|
|
974
|
+
}
|
|
975
|
+
return false;
|
|
976
|
+
}
|
|
977
|
+
[Symbol.iterator]() {
|
|
978
|
+
return this;
|
|
979
|
+
}
|
|
980
|
+
next() {
|
|
981
|
+
if (this.iteratorIndex < this.items.length) {
|
|
982
|
+
return { value: this.items[this.iteratorIndex], done: false };
|
|
983
|
+
}
|
|
984
|
+
return { value: null, done: true };
|
|
985
|
+
}
|
|
986
|
+
//#endregion iterator
|
|
987
|
+
set(items) {
|
|
988
|
+
const valueToPut = JSON.stringify(items);
|
|
989
|
+
const valueInLocalStorageAsString = window.localStorage.getItem(this.p.localStorageKey);
|
|
990
|
+
if (valueToPut !== valueInLocalStorageAsString) {
|
|
991
|
+
window.localStorage.setItem(this.p.localStorageKey, valueToPut);
|
|
992
|
+
this.assignCurrentValue(true);
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
getValueFromLocalStorage() {
|
|
996
|
+
const valueInLocalStorageAsString = window.localStorage.getItem(this.p.localStorageKey);
|
|
997
|
+
if (valueInLocalStorageAsString == null || valueInLocalStorageAsString === "undefined") {
|
|
998
|
+
window.localStorage.removeItem(this.p.localStorageKey);
|
|
999
|
+
return void 0;
|
|
1000
|
+
}
|
|
1001
|
+
return valueInLocalStorageAsString;
|
|
1002
|
+
}
|
|
1003
|
+
assignCurrentValue(triggerEventIfNew) {
|
|
1004
|
+
const previousItemsAsString = JSON.stringify(this.items);
|
|
1005
|
+
const newItemsAsString = this.getValueFromLocalStorage();
|
|
1006
|
+
if (newItemsAsString === previousItemsAsString)
|
|
1007
|
+
return;
|
|
1008
|
+
this.items = this.p.defaultValueIfNotInLocalStorage || [];
|
|
1009
|
+
if (newItemsAsString) {
|
|
1010
|
+
try {
|
|
1011
|
+
this.items = JSON.parse(newItemsAsString);
|
|
1012
|
+
if (triggerEventIfNew) {
|
|
1013
|
+
this.eventOnChange.triggerAsync(this.items);
|
|
1014
|
+
}
|
|
1015
|
+
} catch (x) {
|
|
1016
|
+
console.warn("unable to parse", newItemsAsString);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
// node_modules/@lexriver/observable/out/src/ObservableLocalStorageVariable.mjs
|
|
1023
|
+
var ObservableLocalStorageVariable = class {
|
|
1024
|
+
constructor(p) {
|
|
1025
|
+
__publicField(this, "p");
|
|
1026
|
+
//protected observableVariable:Observable<T|undefined>
|
|
1027
|
+
//protected localStorageKey:string
|
|
1028
|
+
__publicField(this, "currentValue");
|
|
1029
|
+
__publicField(this, "eventOnChange", new TypeEvent());
|
|
1030
|
+
this.p = p;
|
|
1031
|
+
this.assignCurrentValue();
|
|
1032
|
+
this.subscribeToWindowEvent();
|
|
1033
|
+
}
|
|
1034
|
+
subscribeToWindowEvent() {
|
|
1035
|
+
window.addEventListener("storage", (e) => {
|
|
1036
|
+
if (e.key != this.p.localStorageKey)
|
|
1037
|
+
return;
|
|
1038
|
+
const oldValue = this.currentValue;
|
|
1039
|
+
this.assignCurrentValue();
|
|
1040
|
+
this.eventOnChange.triggerAsync(this.currentValue, oldValue);
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
get() {
|
|
1044
|
+
return this.currentValue;
|
|
1045
|
+
}
|
|
1046
|
+
set(value) {
|
|
1047
|
+
const valueToPut = JSON.stringify(value);
|
|
1048
|
+
const valueInLocalStorageAsString = window.localStorage.getItem(this.p.localStorageKey);
|
|
1049
|
+
if (valueToPut !== valueInLocalStorageAsString) {
|
|
1050
|
+
const prevValue = this.currentValue;
|
|
1051
|
+
window.localStorage.setItem(this.p.localStorageKey, valueToPut);
|
|
1052
|
+
this.assignCurrentValue();
|
|
1053
|
+
this.eventOnChange.triggerAsync(value, prevValue);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
getValueFromLocalStorage() {
|
|
1057
|
+
const valueInLocalStorageAsString = window.localStorage.getItem(this.p.localStorageKey);
|
|
1058
|
+
if (valueInLocalStorageAsString == null || valueInLocalStorageAsString === "undefined") {
|
|
1059
|
+
window.localStorage.removeItem(this.p.localStorageKey);
|
|
1060
|
+
return void 0;
|
|
1061
|
+
}
|
|
1062
|
+
return valueInLocalStorageAsString;
|
|
1063
|
+
}
|
|
1064
|
+
assignCurrentValue() {
|
|
1065
|
+
this.currentValue = this.p.defaultValueIfNotInLocalStorage || void 0;
|
|
1066
|
+
let stringValue = this.getValueFromLocalStorage();
|
|
1067
|
+
if (stringValue) {
|
|
1068
|
+
try {
|
|
1069
|
+
this.currentValue = JSON.parse(stringValue);
|
|
1070
|
+
} catch (x) {
|
|
1071
|
+
console.warn("unable to parse", stringValue);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
// src/DomeManipulator.mts
|
|
1078
|
+
var replacementPromiseByElement = /* @__PURE__ */ new WeakMap();
|
|
1079
|
+
var DomeManipulator;
|
|
1080
|
+
((DomeManipulator2) => {
|
|
1081
|
+
async function hideElementAsync(element, animation) {
|
|
1082
|
+
if (!element) throw new Error("hideElementAsync failed, no element");
|
|
1083
|
+
if (element.hidden) return;
|
|
1084
|
+
if (animation) {
|
|
1085
|
+
await addCssClassAsync(element, animation.cssClassName, animation.timeMs);
|
|
1086
|
+
}
|
|
1087
|
+
element.style.display = "none";
|
|
1088
|
+
element.hidden = true;
|
|
1089
|
+
}
|
|
1090
|
+
DomeManipulator2.hideElementAsync = hideElementAsync;
|
|
1091
|
+
async function unhideElementAsync(element, animation) {
|
|
1092
|
+
if (!element) throw new Error("unhideElementAsync failed, no element");
|
|
1093
|
+
if (!element.hidden) return;
|
|
1094
|
+
element.style.display = "";
|
|
1095
|
+
element.hidden = false;
|
|
1096
|
+
if (animation) {
|
|
1097
|
+
await addCssClassAsync(element, animation.cssClassName, animation.timeMs);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
DomeManipulator2.unhideElementAsync = unhideElementAsync;
|
|
1101
|
+
async function insertAsFirstChildAsync(elementToInsert, parentElement, animation) {
|
|
1102
|
+
parentElement.insertBefore(elementToInsert, parentElement.firstChild);
|
|
1103
|
+
if (animation) {
|
|
1104
|
+
await addCssClassAsync(elementToInsert, animation.cssClassName, animation.timeMs);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
DomeManipulator2.insertAsFirstChildAsync = insertAsFirstChildAsync;
|
|
1108
|
+
async function insertBeforeAsync(elementToInsert, refElement, parentElement, animation) {
|
|
1109
|
+
parentElement.insertBefore(elementToInsert, refElement);
|
|
1110
|
+
if (animation) {
|
|
1111
|
+
await addCssClassAsync(elementToInsert, animation.cssClassName, animation.timeMs);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
DomeManipulator2.insertBeforeAsync = insertBeforeAsync;
|
|
1115
|
+
async function insertAfterAsync(elementToInsert, refElement, parentElement, animation) {
|
|
1116
|
+
if (refElement) {
|
|
1117
|
+
parentElement.insertBefore(elementToInsert, refElement.nextSibling);
|
|
1118
|
+
} else {
|
|
1119
|
+
parentElement.appendChild(elementToInsert);
|
|
1120
|
+
}
|
|
1121
|
+
if (animation) {
|
|
1122
|
+
await addCssClassAsync(elementToInsert, animation.cssClassName, animation.timeMs);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
DomeManipulator2.insertAfterAsync = insertAfterAsync;
|
|
1126
|
+
async function insertByIndexAsync(elementToInsert, index, parentElement, animation) {
|
|
1127
|
+
if (index == 0) {
|
|
1128
|
+
parentElement.appendChild(elementToInsert);
|
|
1129
|
+
if (animation) {
|
|
1130
|
+
await addCssClassAsync(elementToInsert, animation.cssClassName, animation.timeMs);
|
|
1131
|
+
}
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
await insertAfterAsync(elementToInsert, parentElement.children[index], parentElement, animation);
|
|
1135
|
+
}
|
|
1136
|
+
DomeManipulator2.insertByIndexAsync = insertByIndexAsync;
|
|
1137
|
+
async function replaceAsync(oldElement, newElement, animationHide, animationShow) {
|
|
1138
|
+
if (!oldElement.parentNode) {
|
|
1139
|
+
console.error("replaceAsync() failed, no parentNode.", "oldElement=", oldElement);
|
|
1140
|
+
throw new Error("no parent node for replaceAsync");
|
|
1141
|
+
}
|
|
1142
|
+
if (animationHide) {
|
|
1143
|
+
await addCssClassAsync(oldElement, animationHide.cssClassName, animationHide.timeMs);
|
|
1144
|
+
}
|
|
1145
|
+
const parent = oldElement.parentNode;
|
|
1146
|
+
if (!parent) {
|
|
1147
|
+
console.error("replaceAsync() failed, no parent. Probably node was deleted while hide animation.", "oldElement=", oldElement, "type=", typeof oldElement, "parent=", oldElement.parentElement, oldElement.parentNode);
|
|
1148
|
+
throw new Error("no parent for replaceAsync()");
|
|
1149
|
+
}
|
|
1150
|
+
parent.replaceChild(newElement, oldElement);
|
|
1151
|
+
if (animationShow) {
|
|
1152
|
+
await addCssClassAsync(newElement, animationShow.cssClassName, animationShow.timeMs);
|
|
1153
|
+
}
|
|
1154
|
+
return newElement;
|
|
1155
|
+
}
|
|
1156
|
+
DomeManipulator2.replaceAsync = replaceAsync;
|
|
1157
|
+
async function removeElementAsync(element, animation) {
|
|
1158
|
+
if (animation) {
|
|
1159
|
+
await addCssClassAsync(element, animation.cssClassName, animation.timeMs);
|
|
1160
|
+
}
|
|
1161
|
+
element.remove();
|
|
1162
|
+
}
|
|
1163
|
+
DomeManipulator2.removeElementAsync = removeElementAsync;
|
|
1164
|
+
function forEachChildrenOf(element, action) {
|
|
1165
|
+
for (let i = 0; i < element.childNodes.length; i++) {
|
|
1166
|
+
action(element.childNodes[i]);
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
DomeManipulator2.forEachChildrenOf = forEachChildrenOf;
|
|
1170
|
+
async function removeAllChildrenAsync(element, animation) {
|
|
1171
|
+
if (!animation) {
|
|
1172
|
+
while (element.firstChild) {
|
|
1173
|
+
element.firstChild.remove();
|
|
1174
|
+
}
|
|
1175
|
+
} else {
|
|
1176
|
+
forEachChildrenOf(element, (child) => child.nodeType == Node.ELEMENT_NODE && child.classList.add(animation.cssClassName));
|
|
1177
|
+
await Async.waitMsAsync(animation.timeMs);
|
|
1178
|
+
Array.from(element.childNodes).forEach((child) => child.remove());
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
DomeManipulator2.removeAllChildrenAsync = removeAllChildrenAsync;
|
|
1182
|
+
async function appendChildAsync(containerElement, child, animation) {
|
|
1183
|
+
containerElement.appendChild(child);
|
|
1184
|
+
if (animation) {
|
|
1185
|
+
await addCssClassAsync(child, animation.cssClassName, animation.timeMs);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
DomeManipulator2.appendChildAsync = appendChildAsync;
|
|
1189
|
+
async function appendChildrenAsync(containerElement, children, animation) {
|
|
1190
|
+
if (DataTypes.isString(children)) {
|
|
1191
|
+
containerElement.appendChild(document.createTextNode(children));
|
|
1192
|
+
} else if (DataTypes.isArray(children)) {
|
|
1193
|
+
await Promise.all(
|
|
1194
|
+
children.map((child) => appendChildAsync(containerElement, child, animation))
|
|
1195
|
+
);
|
|
1196
|
+
} else if (children) {
|
|
1197
|
+
await appendChildAsync(containerElement, children, animation);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
DomeManipulator2.appendChildrenAsync = appendChildrenAsync;
|
|
1201
|
+
async function replaceAllChildrenAsync(containerElement, childrenToInsert, animationForHide, animationForShow) {
|
|
1202
|
+
const previousReplacement = replacementPromiseByElement.get(containerElement);
|
|
1203
|
+
const replacement = (previousReplacement != null ? previousReplacement : Promise.resolve()).catch(() => void 0).then(async () => {
|
|
1204
|
+
if (containerElement.childNodes.length > 0) {
|
|
1205
|
+
await removeAllChildrenAsync(containerElement, animationForHide);
|
|
1206
|
+
}
|
|
1207
|
+
await appendChildrenAsync(containerElement, childrenToInsert, animationForShow);
|
|
1208
|
+
});
|
|
1209
|
+
replacementPromiseByElement.set(containerElement, replacement);
|
|
1210
|
+
try {
|
|
1211
|
+
await replacement;
|
|
1212
|
+
} finally {
|
|
1213
|
+
if (replacementPromiseByElement.get(containerElement) === replacement) {
|
|
1214
|
+
replacementPromiseByElement.delete(containerElement);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
DomeManipulator2.replaceAllChildrenAsync = replaceAllChildrenAsync;
|
|
1219
|
+
function isInDom(el) {
|
|
1220
|
+
if (!el) return false;
|
|
1221
|
+
return document.body.contains(el);
|
|
1222
|
+
}
|
|
1223
|
+
DomeManipulator2.isInDom = isInDom;
|
|
1224
|
+
function isOnScreen(el) {
|
|
1225
|
+
if (!el) return false;
|
|
1226
|
+
var rect = el.getBoundingClientRect();
|
|
1227
|
+
var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
|
|
1228
|
+
return !(rect.bottom < 0 || rect.top - viewHeight >= 0);
|
|
1229
|
+
}
|
|
1230
|
+
DomeManipulator2.isOnScreen = isOnScreen;
|
|
1231
|
+
async function addCssClassAsync(element, cssClassName, removeAfterMs) {
|
|
1232
|
+
if (element.nodeType !== Node.ELEMENT_NODE) return;
|
|
1233
|
+
element.classList.add(cssClassName);
|
|
1234
|
+
if (removeAfterMs && removeAfterMs > 0) {
|
|
1235
|
+
await Async.waitMsAsync(removeAfterMs);
|
|
1236
|
+
element.classList.remove(cssClassName);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
DomeManipulator2.addCssClassAsync = addCssClassAsync;
|
|
1240
|
+
async function addCssClassesAsync(element, cssClassNames, removeAfterMs) {
|
|
1241
|
+
await Promise.all(cssClassNames.map((cssClassName) => addCssClassAsync(element, cssClassName, removeAfterMs)));
|
|
1242
|
+
}
|
|
1243
|
+
DomeManipulator2.addCssClassesAsync = addCssClassesAsync;
|
|
1244
|
+
function removeCssClass(element, cssClassName) {
|
|
1245
|
+
element.classList.remove(cssClassName);
|
|
1246
|
+
}
|
|
1247
|
+
DomeManipulator2.removeCssClass = removeCssClass;
|
|
1248
|
+
function removeCssClasses(element, cssClassNames) {
|
|
1249
|
+
for (let cssClassName of cssClassNames) {
|
|
1250
|
+
element.classList.remove(cssClassName);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
DomeManipulator2.removeCssClasses = removeCssClasses;
|
|
1254
|
+
function setCssClasses(element, value) {
|
|
1255
|
+
if (!value) return;
|
|
1256
|
+
if (DataTypes.isArray(value)) {
|
|
1257
|
+
setAttribute(element, "class", value.join(" "));
|
|
1258
|
+
} else if (DataTypes.isObjectWithKeys(value)) {
|
|
1259
|
+
let classNameArray = [];
|
|
1260
|
+
for (let [k, v] of Object.entries(value)) {
|
|
1261
|
+
if (checkIfObservable(v)) {
|
|
1262
|
+
if (v.get()) {
|
|
1263
|
+
classNameArray.push(k);
|
|
1264
|
+
}
|
|
1265
|
+
} else if (v) {
|
|
1266
|
+
classNameArray.push(k);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
setAttribute(element, "class", classNameArray.join(" "));
|
|
1270
|
+
} else {
|
|
1271
|
+
setAttribute(element, "class", value);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
DomeManipulator2.setCssClasses = setCssClasses;
|
|
1275
|
+
function setAttribute(element, name, value) {
|
|
1276
|
+
if (value === void 0 || value === null) {
|
|
1277
|
+
return;
|
|
1278
|
+
}
|
|
1279
|
+
if (/^xlink[AHRST]/.test(name)) {
|
|
1280
|
+
element.setAttributeNS("http://www.w3.org/1999/xlink", name.replace("xlink", "xlink:").toLowerCase(), value);
|
|
1281
|
+
} else {
|
|
1282
|
+
element.setAttribute(name, value);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
DomeManipulator2.setAttribute = setAttribute;
|
|
1286
|
+
function hasFocus(el) {
|
|
1287
|
+
return document.activeElement == el;
|
|
1288
|
+
}
|
|
1289
|
+
DomeManipulator2.hasFocus = hasFocus;
|
|
1290
|
+
function scrollIntoView(element, paddingFromTop = 100) {
|
|
1291
|
+
if (isOnScreen(element)) {
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
let expectedPosition = element.getBoundingClientRect().top + window.pageYOffset;
|
|
1295
|
+
expectedPosition -= paddingFromTop;
|
|
1296
|
+
window.scrollTo({ top: expectedPosition, behavior: "smooth" });
|
|
1297
|
+
}
|
|
1298
|
+
DomeManipulator2.scrollIntoView = scrollIntoView;
|
|
1299
|
+
DomeManipulator2.scrollToTop = () => {
|
|
1300
|
+
let position = getCurrentScrollPosition();
|
|
1301
|
+
if (position > 0) {
|
|
1302
|
+
window.requestAnimationFrame(DomeManipulator2.scrollToTop);
|
|
1303
|
+
if (position < 20) {
|
|
1304
|
+
window.scrollTo(0, 0);
|
|
1305
|
+
} else {
|
|
1306
|
+
window.scrollTo(0, position - position / 9);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
};
|
|
1310
|
+
function getCurrentScrollPosition() {
|
|
1311
|
+
return document.documentElement.scrollTop || document.body.scrollTop;
|
|
1312
|
+
}
|
|
1313
|
+
DomeManipulator2.getCurrentScrollPosition = getCurrentScrollPosition;
|
|
1314
|
+
async function scrollToAsync(p) {
|
|
1315
|
+
var _a, _b;
|
|
1316
|
+
const msStep = (_a = p.msStep) != null ? _a : 50;
|
|
1317
|
+
const maxMsToWait = (_b = p.maxMsToWait) != null ? _b : 5e3;
|
|
1318
|
+
let scrollOptions = {};
|
|
1319
|
+
if (p.pxFromTop) {
|
|
1320
|
+
scrollOptions.top = p.pxFromTop;
|
|
1321
|
+
}
|
|
1322
|
+
if (p.pxFromLeft) {
|
|
1323
|
+
scrollOptions.left = p.pxFromLeft;
|
|
1324
|
+
}
|
|
1325
|
+
if (p.smooth) {
|
|
1326
|
+
scrollOptions.behavior = "smooth";
|
|
1327
|
+
}
|
|
1328
|
+
try {
|
|
1329
|
+
if (p.pxFromLeft || p.pxFromTop) {
|
|
1330
|
+
await Async.waitForFunctionToReturnTrueAsync(() => {
|
|
1331
|
+
if (p.pxFromTop) {
|
|
1332
|
+
return document.body.scrollHeight >= p.pxFromTop;
|
|
1333
|
+
}
|
|
1334
|
+
if (p.pxFromLeft) {
|
|
1335
|
+
return document.body.scrollWidth >= p.pxFromLeft;
|
|
1336
|
+
}
|
|
1337
|
+
return false;
|
|
1338
|
+
}, msStep, maxMsToWait);
|
|
1339
|
+
}
|
|
1340
|
+
} catch (error) {
|
|
1341
|
+
}
|
|
1342
|
+
window.scrollTo(scrollOptions);
|
|
1343
|
+
}
|
|
1344
|
+
DomeManipulator2.scrollToAsync = scrollToAsync;
|
|
1345
|
+
})(DomeManipulator || (DomeManipulator = {}));
|
|
1346
|
+
|
|
1347
|
+
// src/LongestCommonSubsequence.mts
|
|
1348
|
+
var LongestCommonSubsequence;
|
|
1349
|
+
((LongestCommonSubsequence2) => {
|
|
1350
|
+
function getLongestCommonSubsequence(set1, set2) {
|
|
1351
|
+
const lcsMatrix = Array(set2.length + 1).fill(null).map(() => Array(set1.length + 1).fill(null));
|
|
1352
|
+
for (let columnIndex2 = 0; columnIndex2 <= set1.length; columnIndex2 += 1) {
|
|
1353
|
+
lcsMatrix[0][columnIndex2] = 0;
|
|
1354
|
+
}
|
|
1355
|
+
for (let rowIndex2 = 0; rowIndex2 <= set2.length; rowIndex2 += 1) {
|
|
1356
|
+
lcsMatrix[rowIndex2][0] = 0;
|
|
1357
|
+
}
|
|
1358
|
+
for (let rowIndex2 = 1; rowIndex2 <= set2.length; rowIndex2 += 1) {
|
|
1359
|
+
for (let columnIndex2 = 1; columnIndex2 <= set1.length; columnIndex2 += 1) {
|
|
1360
|
+
if (set1[columnIndex2 - 1] === set2[rowIndex2 - 1]) {
|
|
1361
|
+
lcsMatrix[rowIndex2][columnIndex2] = lcsMatrix[rowIndex2 - 1][columnIndex2 - 1] + 1;
|
|
1362
|
+
} else {
|
|
1363
|
+
lcsMatrix[rowIndex2][columnIndex2] = Math.max(
|
|
1364
|
+
lcsMatrix[rowIndex2 - 1][columnIndex2],
|
|
1365
|
+
lcsMatrix[rowIndex2][columnIndex2 - 1]
|
|
1366
|
+
);
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
if (!lcsMatrix[set2.length][set1.length]) {
|
|
1371
|
+
return [""];
|
|
1372
|
+
}
|
|
1373
|
+
const longestSequence = [];
|
|
1374
|
+
let columnIndex = set1.length;
|
|
1375
|
+
let rowIndex = set2.length;
|
|
1376
|
+
while (columnIndex > 0 || rowIndex > 0) {
|
|
1377
|
+
if (set1[columnIndex - 1] === set2[rowIndex - 1]) {
|
|
1378
|
+
longestSequence.unshift(set1[columnIndex - 1]);
|
|
1379
|
+
columnIndex -= 1;
|
|
1380
|
+
rowIndex -= 1;
|
|
1381
|
+
} else if (lcsMatrix[rowIndex][columnIndex] === lcsMatrix[rowIndex][columnIndex - 1]) {
|
|
1382
|
+
columnIndex -= 1;
|
|
1383
|
+
} else {
|
|
1384
|
+
rowIndex -= 1;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
return longestSequence;
|
|
1388
|
+
}
|
|
1389
|
+
LongestCommonSubsequence2.getLongestCommonSubsequence = getLongestCommonSubsequence;
|
|
1390
|
+
function getPatch({ oldArray, newArray, onRemove, onAdd }) {
|
|
1391
|
+
const lcsArray = getLongestCommonSubsequence(oldArray, newArray);
|
|
1392
|
+
let countOfOperations = 0;
|
|
1393
|
+
let lcsIndex = 0;
|
|
1394
|
+
for (let oldIndex = 0; oldIndex < oldArray.length; oldIndex++) {
|
|
1395
|
+
let oldItem = oldArray[oldIndex];
|
|
1396
|
+
let oldItemInLcs = lcsArray[lcsIndex] == oldItem;
|
|
1397
|
+
if (oldItemInLcs) {
|
|
1398
|
+
lcsIndex++;
|
|
1399
|
+
} else {
|
|
1400
|
+
onRemove(oldIndex - countOfOperations, oldItem);
|
|
1401
|
+
countOfOperations++;
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
lcsIndex = 0;
|
|
1405
|
+
for (let newIndex = 0; newIndex < newArray.length; newIndex++) {
|
|
1406
|
+
let newItem = newArray[newIndex];
|
|
1407
|
+
let newItemInLcs = lcsArray[lcsIndex] == newItem;
|
|
1408
|
+
if (newItemInLcs) {
|
|
1409
|
+
lcsIndex++;
|
|
1410
|
+
} else {
|
|
1411
|
+
onAdd(newIndex, newItem);
|
|
1412
|
+
countOfOperations++;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
return countOfOperations;
|
|
1416
|
+
}
|
|
1417
|
+
LongestCommonSubsequence2.getPatch = getPatch;
|
|
1418
|
+
function getPatchOrdered({ oldArray, newArray, onRemove, onAdd }) {
|
|
1419
|
+
const lcsArray = getLongestCommonSubsequence(oldArray, newArray);
|
|
1420
|
+
let lcsIndexForOld = 0;
|
|
1421
|
+
let lcsIndexForNew = 0;
|
|
1422
|
+
let oldIndex = 0;
|
|
1423
|
+
let newIndex = 0;
|
|
1424
|
+
let countOfRemoveOperations = 0;
|
|
1425
|
+
let countOfAddOperations = 0;
|
|
1426
|
+
let indexForOperation = 0;
|
|
1427
|
+
while (oldIndex < oldArray.length || newIndex < newArray.length) {
|
|
1428
|
+
while (oldIndex < oldArray.length) {
|
|
1429
|
+
let oldItem = oldArray[oldIndex];
|
|
1430
|
+
let oldItemInLcs = lcsArray[lcsIndexForOld] == oldItem;
|
|
1431
|
+
if (oldItemInLcs) {
|
|
1432
|
+
lcsIndexForOld++;
|
|
1433
|
+
oldIndex++;
|
|
1434
|
+
break;
|
|
1435
|
+
} else {
|
|
1436
|
+
onRemove(indexForOperation, oldItem);
|
|
1437
|
+
countOfRemoveOperations++;
|
|
1438
|
+
oldIndex++;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
while (newIndex < newArray.length) {
|
|
1442
|
+
let newItem = newArray[newIndex];
|
|
1443
|
+
let newItemInLcs = lcsArray[lcsIndexForNew] == newItem;
|
|
1444
|
+
if (newItemInLcs) {
|
|
1445
|
+
lcsIndexForNew++;
|
|
1446
|
+
indexForOperation++;
|
|
1447
|
+
newIndex++;
|
|
1448
|
+
break;
|
|
1449
|
+
} else {
|
|
1450
|
+
onAdd(indexForOperation, newItem);
|
|
1451
|
+
indexForOperation++;
|
|
1452
|
+
countOfAddOperations++;
|
|
1453
|
+
newIndex++;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
return countOfAddOperations + countOfRemoveOperations;
|
|
1458
|
+
}
|
|
1459
|
+
LongestCommonSubsequence2.getPatchOrdered = getPatchOrdered;
|
|
1460
|
+
})(LongestCommonSubsequence || (LongestCommonSubsequence = {}));
|
|
1461
|
+
|
|
1462
|
+
// src/AnimatedArray.mts
|
|
1463
|
+
var AnimatedArray = class {
|
|
1464
|
+
constructor(params) {
|
|
1465
|
+
this.params = params;
|
|
1466
|
+
__publicField(this, "arrayOfKeyToElement", []);
|
|
1467
|
+
if (params.array && params.parentElement) {
|
|
1468
|
+
this.update(params.array);
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
get size() {
|
|
1472
|
+
return this.arrayOfKeyToElement.length;
|
|
1473
|
+
}
|
|
1474
|
+
update(array, parentElement) {
|
|
1475
|
+
parentElement = parentElement || this.params.parentElement;
|
|
1476
|
+
if (!parentElement) {
|
|
1477
|
+
console.warn("AnimatedArray unable to update, no parentElement");
|
|
1478
|
+
return;
|
|
1479
|
+
}
|
|
1480
|
+
if (array.length == 0 && this.params.emptyList) {
|
|
1481
|
+
DomeManipulator.replaceAllChildrenAsync(parentElement, this.params.emptyList);
|
|
1482
|
+
return;
|
|
1483
|
+
}
|
|
1484
|
+
if (array.length > 0 && this.params.emptyList) {
|
|
1485
|
+
DomeManipulator.removeElementAsync(this.params.emptyList, this.params.animationHide);
|
|
1486
|
+
}
|
|
1487
|
+
let newArrayOfKeys = array.map((item) => this.params.getKey(item));
|
|
1488
|
+
let oldArrayOfKeys = this.arrayOfKeyToElement.map((x) => x.key);
|
|
1489
|
+
LongestCommonSubsequence.getPatchOrdered({
|
|
1490
|
+
oldArray: oldArrayOfKeys,
|
|
1491
|
+
newArray: newArrayOfKeys,
|
|
1492
|
+
onAdd: (index, key) => {
|
|
1493
|
+
if (!parentElement) throw new Error("no parent element");
|
|
1494
|
+
let itemIndex = newArrayOfKeys.indexOf(key);
|
|
1495
|
+
if (itemIndex == -1) throw new Error("no itemIndex");
|
|
1496
|
+
let item = array[itemIndex];
|
|
1497
|
+
let element = this.params.getHtmlElement(item);
|
|
1498
|
+
this.arrayOfKeyToElement.splice(index, 0, { key, element });
|
|
1499
|
+
DomeManipulator.insertByIndexAsync(element, index, parentElement, this.params.animationShow);
|
|
1500
|
+
},
|
|
1501
|
+
onRemove: (index, key) => {
|
|
1502
|
+
DomeManipulator.removeElementAsync(this.arrayOfKeyToElement[index].element, this.params.animationHide);
|
|
1503
|
+
this.arrayOfKeyToElement.splice(index, 1);
|
|
1504
|
+
}
|
|
1505
|
+
});
|
|
1506
|
+
}
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1509
|
+
// node_modules/ts-debounce/dist/src/index.esm.js
|
|
1510
|
+
function r(r2, e, n) {
|
|
1511
|
+
var i, t, o;
|
|
1512
|
+
void 0 === e && (e = 50), void 0 === n && (n = {});
|
|
1513
|
+
var a = null != (i = n.isImmediate) && i, u = null != (t = n.callback) && t, c = n.maxWait, v = Date.now(), l = [];
|
|
1514
|
+
function f() {
|
|
1515
|
+
if (void 0 !== c) {
|
|
1516
|
+
var r3 = Date.now() - v;
|
|
1517
|
+
if (r3 + e >= c) return c - r3;
|
|
1518
|
+
}
|
|
1519
|
+
return e;
|
|
1520
|
+
}
|
|
1521
|
+
var d = function() {
|
|
1522
|
+
var e2 = [].slice.call(arguments), n2 = this;
|
|
1523
|
+
return new Promise(function(i2, t2) {
|
|
1524
|
+
var c2 = a && void 0 === o;
|
|
1525
|
+
if (void 0 !== o && clearTimeout(o), o = setTimeout(function() {
|
|
1526
|
+
if (o = void 0, v = Date.now(), !a) {
|
|
1527
|
+
var i3 = r2.apply(n2, e2);
|
|
1528
|
+
u && u(i3), l.forEach(function(r3) {
|
|
1529
|
+
return (0, r3.resolve)(i3);
|
|
1530
|
+
}), l = [];
|
|
1531
|
+
}
|
|
1532
|
+
}, f()), c2) {
|
|
1533
|
+
var d2 = r2.apply(n2, e2);
|
|
1534
|
+
return u && u(d2), i2(d2);
|
|
1535
|
+
}
|
|
1536
|
+
l.push({ resolve: i2, reject: t2 });
|
|
1537
|
+
});
|
|
1538
|
+
};
|
|
1539
|
+
return d.cancel = function(r3) {
|
|
1540
|
+
void 0 !== o && clearTimeout(o), l.forEach(function(e2) {
|
|
1541
|
+
return (0, e2.reject)(r3);
|
|
1542
|
+
}), l = [];
|
|
1543
|
+
}, d;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
// src/DomeComponent.mts
|
|
1547
|
+
var DomeComponent = class {
|
|
1548
|
+
constructor(attrs, children) {
|
|
1549
|
+
this.attrs = attrs;
|
|
1550
|
+
this.children = children;
|
|
1551
|
+
__publicField(this, "rootElement");
|
|
1552
|
+
__publicField(this, "updateInProgress", false);
|
|
1553
|
+
__publicField(this, "updateRequested", false);
|
|
1554
|
+
__publicField(this, "scheduleUpdate", r(() => this.runScheduledUpdateAsync(), 5));
|
|
1555
|
+
}
|
|
1556
|
+
//abstract render(attrs:Attrs, children:any):HTMLElement
|
|
1557
|
+
init() {
|
|
1558
|
+
}
|
|
1559
|
+
afterRender() {
|
|
1560
|
+
}
|
|
1561
|
+
// protected onMount(){
|
|
1562
|
+
// }
|
|
1563
|
+
async updateAsync() {
|
|
1564
|
+
if (!this.rootElement) {
|
|
1565
|
+
console.error("DomeComponent: unable to update, no rootElement", "this=", this);
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1568
|
+
if (!this.rootElement.parentNode) {
|
|
1569
|
+
console.error("DomeComponent: unable to update, no parent for rootElement, not mounted?", "this=", this);
|
|
1570
|
+
return;
|
|
1571
|
+
}
|
|
1572
|
+
const newEl = this.render();
|
|
1573
|
+
await DomeManipulator.replaceAsync(this.rootElement, newEl, this.attrs.onHideAnimation, this.attrs.onShowAnimation);
|
|
1574
|
+
this.rootElement = newEl;
|
|
1575
|
+
this.afterUpdate();
|
|
1576
|
+
}
|
|
1577
|
+
async runScheduledUpdateAsync() {
|
|
1578
|
+
if (this.updateInProgress) {
|
|
1579
|
+
this.updateRequested = true;
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
this.updateInProgress = true;
|
|
1583
|
+
try {
|
|
1584
|
+
do {
|
|
1585
|
+
this.updateRequested = false;
|
|
1586
|
+
try {
|
|
1587
|
+
await this.updateAsync();
|
|
1588
|
+
} catch (error) {
|
|
1589
|
+
console.error("DomeComponent: scheduled update failed", error);
|
|
1590
|
+
}
|
|
1591
|
+
} while (this.updateRequested);
|
|
1592
|
+
} finally {
|
|
1593
|
+
this.updateInProgress = false;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
afterUpdate() {
|
|
1597
|
+
}
|
|
1598
|
+
};
|
|
1599
|
+
DomeComponent.prototype["__DomeComponent"] = true;
|
|
1600
|
+
|
|
1601
|
+
// src/AnimatedTable.mts
|
|
1602
|
+
var AnimatedTable = class extends DomeComponent {
|
|
1603
|
+
constructor() {
|
|
1604
|
+
super(...arguments);
|
|
1605
|
+
// rootElement
|
|
1606
|
+
// table
|
|
1607
|
+
// thead
|
|
1608
|
+
// tbody
|
|
1609
|
+
// tfooter
|
|
1610
|
+
// emptyList
|
|
1611
|
+
__publicField(this, "refRoot", this.attrs.rootElement || document.createElement("div"));
|
|
1612
|
+
__publicField(this, "refTable", this.attrs.tableElement || document.createElement("table"));
|
|
1613
|
+
__publicField(this, "refTableHead", this.attrs.renderTableHead ? this.attrs.renderTableHead(this.attrs.itemsO.get()) : document.createElement("thead"));
|
|
1614
|
+
__publicField(this, "refTableBody", this.attrs.tableBody || document.createElement("tbody"));
|
|
1615
|
+
__publicField(this, "refTableFooter", this.attrs.renderTableFooter ? this.attrs.renderTableFooter(this.attrs.itemsO.get()) : document.createElement("tfoot"));
|
|
1616
|
+
__publicField(this, "refEmptyList", this.attrs.renderEmptyList ? this.attrs.renderEmptyList() : document.createElement("div"));
|
|
1617
|
+
__publicField(this, "refLoading", this.attrs.renderLoading ? this.attrs.renderLoading() : document.createElement("div"));
|
|
1618
|
+
__publicField(this, "animatedArray", new AnimatedArray({
|
|
1619
|
+
animationHide: this.attrs.animationHideRow,
|
|
1620
|
+
animationShow: this.attrs.animationShowRow,
|
|
1621
|
+
array: [],
|
|
1622
|
+
getKey: this.attrs.getKey,
|
|
1623
|
+
getHtmlElement: this.attrs.renderTableRow
|
|
1624
|
+
}));
|
|
1625
|
+
}
|
|
1626
|
+
render() {
|
|
1627
|
+
this.refRoot.appendChild(this.refTable);
|
|
1628
|
+
this.refRoot.appendChild(this.refEmptyList);
|
|
1629
|
+
this.refRoot.appendChild(this.refLoading);
|
|
1630
|
+
if (this.refTableHead) this.refTable.appendChild(this.refTableHead);
|
|
1631
|
+
if (this.refTableBody) this.refTable.appendChild(this.refTableBody);
|
|
1632
|
+
if (this.refTableFooter) this.refTable.appendChild(this.refTableFooter);
|
|
1633
|
+
console.log("AnimatedTable render()", "refRoot=", this.refRoot);
|
|
1634
|
+
return this.refRoot;
|
|
1635
|
+
}
|
|
1636
|
+
afterRender() {
|
|
1637
|
+
this.updateAsync();
|
|
1638
|
+
}
|
|
1639
|
+
async updateAsync() {
|
|
1640
|
+
try {
|
|
1641
|
+
if (this.attrs.renderLoading) {
|
|
1642
|
+
this.refLoading = await DomeManipulator.replaceAsync(this.refLoading, this.attrs.renderLoading());
|
|
1643
|
+
}
|
|
1644
|
+
if (this.attrs.isLoadingO && this.attrs.isLoadingO.get()) {
|
|
1645
|
+
await DomeManipulator.unhideElementAsync(this.refLoading, this.attrs.animationShowLoading);
|
|
1646
|
+
} else {
|
|
1647
|
+
await DomeManipulator.hideElementAsync(this.refLoading, this.attrs.animationHideLoading);
|
|
1648
|
+
}
|
|
1649
|
+
const items = this.attrs.itemsO.get();
|
|
1650
|
+
const currentCount = items.length;
|
|
1651
|
+
if (currentCount == 0) {
|
|
1652
|
+
await DomeManipulator.hideElementAsync(this.refTable, this.attrs.animationHideTable);
|
|
1653
|
+
if (this.attrs.renderEmptyList) {
|
|
1654
|
+
this.refEmptyList = await DomeManipulator.replaceAsync(this.refEmptyList, this.attrs.renderEmptyList());
|
|
1655
|
+
}
|
|
1656
|
+
await DomeManipulator.unhideElementAsync(this.refEmptyList, this.attrs.animationShowEmptyList);
|
|
1657
|
+
} else {
|
|
1658
|
+
await DomeManipulator.hideElementAsync(this.refEmptyList, this.attrs.animationHideEmptyList);
|
|
1659
|
+
if (this.attrs.renderTableHead) {
|
|
1660
|
+
this.refTableHead = await DomeManipulator.replaceAsync(this.refTableHead, this.attrs.renderTableHead(items));
|
|
1661
|
+
}
|
|
1662
|
+
if (this.attrs.renderTableFooter) {
|
|
1663
|
+
this.refTableFooter = await DomeManipulator.replaceAsync(this.refTableFooter, this.attrs.renderTableFooter(items));
|
|
1664
|
+
}
|
|
1665
|
+
await DomeManipulator.unhideElementAsync(this.refTable, this.attrs.animationShowTable);
|
|
1666
|
+
this.animatedArray.update(items, this.refTableBody);
|
|
1667
|
+
}
|
|
1668
|
+
} catch (x) {
|
|
1669
|
+
console.error("AnimatedTable update failed", x);
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
// src/AnimatedText.mts
|
|
1675
|
+
var AnimatedText = class extends DomeComponent {
|
|
1676
|
+
render() {
|
|
1677
|
+
const result = document.createElement(this.attrs.tag || "span");
|
|
1678
|
+
if (this.attrs.class) {
|
|
1679
|
+
DomeManipulator.setCssClasses(result, this.attrs.class);
|
|
1680
|
+
}
|
|
1681
|
+
result.append(this.attrs.textO.get());
|
|
1682
|
+
return result;
|
|
1683
|
+
}
|
|
1684
|
+
async updateAsync() {
|
|
1685
|
+
if (!this.rootElement) return;
|
|
1686
|
+
try {
|
|
1687
|
+
this.rootElement = await DomeManipulator.replaceAsync(this.rootElement, this.render(), this.attrs.onHideAnimation, this.attrs.onShowAnimation);
|
|
1688
|
+
} catch (x) {
|
|
1689
|
+
console.error("AnimatedText update failed", x);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1693
|
+
|
|
1694
|
+
// node_modules/svg-tag-names/index.js
|
|
1695
|
+
var svgTagNames = [
|
|
1696
|
+
"a",
|
|
1697
|
+
"altGlyph",
|
|
1698
|
+
"altGlyphDef",
|
|
1699
|
+
"altGlyphItem",
|
|
1700
|
+
"animate",
|
|
1701
|
+
"animateColor",
|
|
1702
|
+
"animateMotion",
|
|
1703
|
+
"animateTransform",
|
|
1704
|
+
"animation",
|
|
1705
|
+
"audio",
|
|
1706
|
+
"canvas",
|
|
1707
|
+
"circle",
|
|
1708
|
+
"clipPath",
|
|
1709
|
+
"color-profile",
|
|
1710
|
+
"cursor",
|
|
1711
|
+
"defs",
|
|
1712
|
+
"desc",
|
|
1713
|
+
"discard",
|
|
1714
|
+
"ellipse",
|
|
1715
|
+
"feBlend",
|
|
1716
|
+
"feColorMatrix",
|
|
1717
|
+
"feComponentTransfer",
|
|
1718
|
+
"feComposite",
|
|
1719
|
+
"feConvolveMatrix",
|
|
1720
|
+
"feDiffuseLighting",
|
|
1721
|
+
"feDisplacementMap",
|
|
1722
|
+
"feDistantLight",
|
|
1723
|
+
"feDropShadow",
|
|
1724
|
+
"feFlood",
|
|
1725
|
+
"feFuncA",
|
|
1726
|
+
"feFuncB",
|
|
1727
|
+
"feFuncG",
|
|
1728
|
+
"feFuncR",
|
|
1729
|
+
"feGaussianBlur",
|
|
1730
|
+
"feImage",
|
|
1731
|
+
"feMerge",
|
|
1732
|
+
"feMergeNode",
|
|
1733
|
+
"feMorphology",
|
|
1734
|
+
"feOffset",
|
|
1735
|
+
"fePointLight",
|
|
1736
|
+
"feSpecularLighting",
|
|
1737
|
+
"feSpotLight",
|
|
1738
|
+
"feTile",
|
|
1739
|
+
"feTurbulence",
|
|
1740
|
+
"filter",
|
|
1741
|
+
"font",
|
|
1742
|
+
"font-face",
|
|
1743
|
+
"font-face-format",
|
|
1744
|
+
"font-face-name",
|
|
1745
|
+
"font-face-src",
|
|
1746
|
+
"font-face-uri",
|
|
1747
|
+
"foreignObject",
|
|
1748
|
+
"g",
|
|
1749
|
+
"glyph",
|
|
1750
|
+
"glyphRef",
|
|
1751
|
+
"handler",
|
|
1752
|
+
"hkern",
|
|
1753
|
+
"iframe",
|
|
1754
|
+
"image",
|
|
1755
|
+
"line",
|
|
1756
|
+
"linearGradient",
|
|
1757
|
+
"listener",
|
|
1758
|
+
"marker",
|
|
1759
|
+
"mask",
|
|
1760
|
+
"metadata",
|
|
1761
|
+
"missing-glyph",
|
|
1762
|
+
"mpath",
|
|
1763
|
+
"path",
|
|
1764
|
+
"pattern",
|
|
1765
|
+
"polygon",
|
|
1766
|
+
"polyline",
|
|
1767
|
+
"prefetch",
|
|
1768
|
+
"radialGradient",
|
|
1769
|
+
"rect",
|
|
1770
|
+
"script",
|
|
1771
|
+
"set",
|
|
1772
|
+
"solidColor",
|
|
1773
|
+
"stop",
|
|
1774
|
+
"style",
|
|
1775
|
+
"svg",
|
|
1776
|
+
"switch",
|
|
1777
|
+
"symbol",
|
|
1778
|
+
"tbreak",
|
|
1779
|
+
"text",
|
|
1780
|
+
"textArea",
|
|
1781
|
+
"textPath",
|
|
1782
|
+
"title",
|
|
1783
|
+
"tref",
|
|
1784
|
+
"tspan",
|
|
1785
|
+
"unknown",
|
|
1786
|
+
"use",
|
|
1787
|
+
"video",
|
|
1788
|
+
"view",
|
|
1789
|
+
"vkern"
|
|
1790
|
+
];
|
|
1791
|
+
|
|
1792
|
+
// src/Dome.mts
|
|
1793
|
+
function flattenArray(arr, res = []) {
|
|
1794
|
+
var i = 0, cur;
|
|
1795
|
+
var len = arr.length;
|
|
1796
|
+
for (; i < len; i++) {
|
|
1797
|
+
cur = arr[i];
|
|
1798
|
+
Array.isArray(cur) ? flattenArray(cur, res) : res.push(cur);
|
|
1799
|
+
}
|
|
1800
|
+
return res;
|
|
1801
|
+
}
|
|
1802
|
+
function checkIfNonDimensionalCssName(name) {
|
|
1803
|
+
const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;
|
|
1804
|
+
return IS_NON_DIMENSIONAL.test(name);
|
|
1805
|
+
}
|
|
1806
|
+
var excludeSvgTags = [
|
|
1807
|
+
"a",
|
|
1808
|
+
"audio",
|
|
1809
|
+
"canvas",
|
|
1810
|
+
"iframe",
|
|
1811
|
+
"script",
|
|
1812
|
+
"video"
|
|
1813
|
+
];
|
|
1814
|
+
var svgTags = svgTagNames.filter((name) => !excludeSvgTags.includes(name));
|
|
1815
|
+
var isSVG = (tagName) => svgTags.includes(tagName);
|
|
1816
|
+
var setCSSProps = (el, style) => {
|
|
1817
|
+
if (DataTypes.isString(style)) {
|
|
1818
|
+
el.style = style;
|
|
1819
|
+
} else if (DataTypes.isObjectWithKeys(style)) {
|
|
1820
|
+
Object.keys(style).forEach((name) => {
|
|
1821
|
+
let value = style[name];
|
|
1822
|
+
if (typeof value === "number" && !checkIfNonDimensionalCssName(name)) {
|
|
1823
|
+
value = `${value}px`;
|
|
1824
|
+
}
|
|
1825
|
+
el.style[name] = value;
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
var createElement = (tagName) => {
|
|
1830
|
+
if (isSVG(tagName)) {
|
|
1831
|
+
return document.createElementNS("http://www.w3.org/2000/svg", tagName);
|
|
1832
|
+
}
|
|
1833
|
+
if (tagName === DocumentFragment) {
|
|
1834
|
+
return document.createDocumentFragment();
|
|
1835
|
+
}
|
|
1836
|
+
return document.createElement(tagName);
|
|
1837
|
+
};
|
|
1838
|
+
var build = (tagName, attrs, children) => {
|
|
1839
|
+
if (!tagName) {
|
|
1840
|
+
console.trace();
|
|
1841
|
+
throw new Error("tagName=" + tagName);
|
|
1842
|
+
}
|
|
1843
|
+
if (tagName == DocumentFragment) {
|
|
1844
|
+
const el = createElement(tagName);
|
|
1845
|
+
el.appendChild(children);
|
|
1846
|
+
return el;
|
|
1847
|
+
}
|
|
1848
|
+
if (tagName.prototype && tagName.prototype["__DomeComponent"]) {
|
|
1849
|
+
try {
|
|
1850
|
+
const instance = new tagName(attrs, children);
|
|
1851
|
+
if (instance["render"] && DataTypes.isFunction(instance["render"])) {
|
|
1852
|
+
if (attrs.ref && DataTypes.isFunction(attrs.ref)) {
|
|
1853
|
+
attrs.ref(instance);
|
|
1854
|
+
}
|
|
1855
|
+
instance["init"]();
|
|
1856
|
+
instance.rootElement = instance["render"]();
|
|
1857
|
+
for (let attribute of Object.values(attrs)) {
|
|
1858
|
+
if (checkIfObservable(attribute)) {
|
|
1859
|
+
attribute.eventOnChange.subscribe(() => {
|
|
1860
|
+
instance.scheduleUpdate();
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
instance["afterRender"]();
|
|
1865
|
+
return instance.rootElement;
|
|
1866
|
+
}
|
|
1867
|
+
} catch (error) {
|
|
1868
|
+
console.error("error while creating DomeComponent class", error);
|
|
1869
|
+
}
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1872
|
+
if (DataTypes.isFunction(tagName)) {
|
|
1873
|
+
return tagName(attrs, children);
|
|
1874
|
+
} else if (DataTypes.isString(tagName)) {
|
|
1875
|
+
const el = createElement(tagName);
|
|
1876
|
+
Object.keys(attrs).forEach((name) => {
|
|
1877
|
+
const value = attrs[name];
|
|
1878
|
+
if (name === "class" || name === "className" || name === "cssClasses") {
|
|
1879
|
+
assignDynamicCssClasses(name, value, el);
|
|
1880
|
+
} else if (name === "style") {
|
|
1881
|
+
setCSSProps(el, value);
|
|
1882
|
+
} else if (["disabled", "autocomplete", "selected", "checked"].indexOf(name) >= 0) {
|
|
1883
|
+
if (attrs[name]) {
|
|
1884
|
+
DomeManipulator.setAttribute(el, name, name);
|
|
1885
|
+
}
|
|
1886
|
+
} else if (name === "onCreate" || name === "ref") {
|
|
1887
|
+
if (DataTypes.isFunction(value) == false) throw new Error(`Please provide function <${tagName} ${name}={ref => myRef=ref} />`);
|
|
1888
|
+
value(el);
|
|
1889
|
+
} else if (name == "visibleIf") {
|
|
1890
|
+
if (checkIfObservable(value) == false) {
|
|
1891
|
+
console.error("value=", value);
|
|
1892
|
+
throw new Error("Please provide Observable<boolean> as argument for visibleIf");
|
|
1893
|
+
}
|
|
1894
|
+
let obs = value;
|
|
1895
|
+
obs.eventOnChange.subscribe((isVisible) => {
|
|
1896
|
+
if (isVisible) {
|
|
1897
|
+
DomeManipulator.unhideElementAsync(el);
|
|
1898
|
+
} else {
|
|
1899
|
+
DomeManipulator.hideElementAsync(el);
|
|
1900
|
+
}
|
|
1901
|
+
});
|
|
1902
|
+
setTimeout(() => {
|
|
1903
|
+
obs.eventOnChange.triggerAsync(obs.get());
|
|
1904
|
+
}, 1);
|
|
1905
|
+
} else if (name.indexOf("on") === 0 && value) {
|
|
1906
|
+
const eventName = name.slice(2).toLowerCase();
|
|
1907
|
+
if (DataTypes.isFunction(value) == false) {
|
|
1908
|
+
console.error("unable to subscribe for event", eventName, "listener is not a function", "element=", el, "listener=", value);
|
|
1909
|
+
return;
|
|
1910
|
+
}
|
|
1911
|
+
el.addEventListener(eventName, value);
|
|
1912
|
+
} else if (name === "innerHtml") {
|
|
1913
|
+
el.innerHTML = value;
|
|
1914
|
+
} else if (name !== "key" && value !== false) {
|
|
1915
|
+
DomeManipulator.setAttribute(el, name, value === true ? "" : value);
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
if (!attrs.innerHtml) {
|
|
1919
|
+
el.appendChild(children);
|
|
1920
|
+
}
|
|
1921
|
+
return el;
|
|
1922
|
+
} else throw new Error("not implemented");
|
|
1923
|
+
};
|
|
1924
|
+
function assignDynamicCssClasses(name, value, element) {
|
|
1925
|
+
if (DataTypes.isObjectWithKeys(value) == false) {
|
|
1926
|
+
DomeManipulator.setCssClasses(element, value);
|
|
1927
|
+
return;
|
|
1928
|
+
}
|
|
1929
|
+
let resultArray = [];
|
|
1930
|
+
for (let [k, v] of Object.entries(value)) {
|
|
1931
|
+
if (v === void 0) {
|
|
1932
|
+
} else if (DataTypes.isBoolean(v)) {
|
|
1933
|
+
if (v) {
|
|
1934
|
+
resultArray.push(k);
|
|
1935
|
+
}
|
|
1936
|
+
} else if (checkIfObservable(v)) {
|
|
1937
|
+
let o = v;
|
|
1938
|
+
o.eventOnChange.subscribe((showThiCssClass) => {
|
|
1939
|
+
if (!DomeManipulator.isInDom(element)) return { unsubscribe: true };
|
|
1940
|
+
DomeManipulator.setCssClasses(element, value);
|
|
1941
|
+
});
|
|
1942
|
+
if (o.get()) {
|
|
1943
|
+
resultArray.push(k);
|
|
1944
|
+
}
|
|
1945
|
+
} else {
|
|
1946
|
+
console.error(`Please provide classNames as a keys and boolean or Observable<boolean> for values., ex: {class1:true, class2:myVarO}`, "name=", name, "value=", value, "typeof value =", typeof value);
|
|
1947
|
+
throw new Error("Wrong value for `class` attribute");
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
DomeManipulator.setCssClasses(element, resultArray);
|
|
1951
|
+
}
|
|
1952
|
+
function h(tagName, attrs, ...childrenArgs) {
|
|
1953
|
+
const children = document.createDocumentFragment();
|
|
1954
|
+
flattenArray(childrenArgs).forEach((child) => {
|
|
1955
|
+
if (child instanceof Node) {
|
|
1956
|
+
children.appendChild(child);
|
|
1957
|
+
} else if (typeof child !== "boolean" && typeof child !== "undefined" && child !== null) {
|
|
1958
|
+
children.appendChild(document.createTextNode(child));
|
|
1959
|
+
}
|
|
1960
|
+
});
|
|
1961
|
+
return build(tagName, attrs || {}, children);
|
|
1962
|
+
}
|
|
1963
|
+
var React = {
|
|
1964
|
+
createElement: h,
|
|
1965
|
+
Fragment: typeof DocumentFragment === "function" ? DocumentFragment : () => {
|
|
1966
|
+
}
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1969
|
+
// src/DomeRouter.mts
|
|
1970
|
+
var DomeRouter;
|
|
1971
|
+
((DomeRouter2) => {
|
|
1972
|
+
const historyUrls = [];
|
|
1973
|
+
const scrollPositionByUrl = /* @__PURE__ */ new Map();
|
|
1974
|
+
DomeRouter2.maxHistoryUrlsCount = 20;
|
|
1975
|
+
const allRoutes = [];
|
|
1976
|
+
let onNotFoundAction = void 0;
|
|
1977
|
+
window.addEventListener("popstate", async (e) => {
|
|
1978
|
+
const url = window.location.pathname;
|
|
1979
|
+
await executeAsync(url, getScrollPositionForUrl(url));
|
|
1980
|
+
await DomeManipulator.scrollToAsync({
|
|
1981
|
+
pxFromTop: getScrollPositionForUrl(window.location.pathname)
|
|
1982
|
+
});
|
|
1983
|
+
});
|
|
1984
|
+
function getScrollPositionForUrl(url) {
|
|
1985
|
+
var _a;
|
|
1986
|
+
return (_a = scrollPositionByUrl.get(url)) != null ? _a : 0;
|
|
1987
|
+
}
|
|
1988
|
+
function saveScrollPositionForUrl(url) {
|
|
1989
|
+
scrollPositionByUrl.set(url, DomeManipulator.getCurrentScrollPosition());
|
|
1990
|
+
}
|
|
1991
|
+
function saveScrollPositionForCurrentUrl() {
|
|
1992
|
+
scrollPositionByUrl.set(getCurrentUrl(), DomeManipulator.getCurrentScrollPosition());
|
|
1993
|
+
}
|
|
1994
|
+
function navigate(url) {
|
|
1995
|
+
addUrlToHistory(getCurrentUrl());
|
|
1996
|
+
saveScrollPositionForCurrentUrl();
|
|
1997
|
+
window.history.pushState(null, "", url);
|
|
1998
|
+
executeAsync(url, 0);
|
|
1999
|
+
DomeManipulator.scrollToTop();
|
|
2000
|
+
}
|
|
2001
|
+
DomeRouter2.navigate = navigate;
|
|
2002
|
+
function goBack() {
|
|
2003
|
+
window.history.go(-1);
|
|
2004
|
+
}
|
|
2005
|
+
DomeRouter2.goBack = goBack;
|
|
2006
|
+
function goForward() {
|
|
2007
|
+
window.history.go(1);
|
|
2008
|
+
}
|
|
2009
|
+
DomeRouter2.goForward = goForward;
|
|
2010
|
+
function changeUrl(url) {
|
|
2011
|
+
window.history.replaceState(null, "", url);
|
|
2012
|
+
}
|
|
2013
|
+
DomeRouter2.changeUrl = changeUrl;
|
|
2014
|
+
function addUrlToHistory(url) {
|
|
2015
|
+
historyUrls.push({ url, scroll: 0 });
|
|
2016
|
+
while (historyUrls.length > DomeRouter2.maxHistoryUrlsCount) {
|
|
2017
|
+
historyUrls.shift();
|
|
2018
|
+
}
|
|
2019
|
+
if (historyUrls.length > 1) {
|
|
2020
|
+
historyUrls[historyUrls.length - 2].scroll = DomeManipulator.getCurrentScrollPosition();
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
function getCurrentUrl() {
|
|
2024
|
+
return window.location.pathname;
|
|
2025
|
+
}
|
|
2026
|
+
DomeRouter2.getCurrentUrl = getCurrentUrl;
|
|
2027
|
+
function getPreviousPageUrl(previousPageIndex = 0) {
|
|
2028
|
+
let index = historyUrls.length - 2 - previousPageIndex;
|
|
2029
|
+
if (index >= 0 && index < historyUrls.length) return historyUrls[index].url;
|
|
2030
|
+
return void 0;
|
|
2031
|
+
}
|
|
2032
|
+
DomeRouter2.getPreviousPageUrl = getPreviousPageUrl;
|
|
2033
|
+
function resolveUrl(url = window.location.pathname, addToHistory = true) {
|
|
2034
|
+
if (addToHistory) addUrlToHistory(window.location.pathname);
|
|
2035
|
+
executeAsync(url, getScrollPositionForUrl(url));
|
|
2036
|
+
}
|
|
2037
|
+
DomeRouter2.resolveUrl = resolveUrl;
|
|
2038
|
+
function onRoute(route, exactMatch, action) {
|
|
2039
|
+
if (route[0] !== "/") throw new Error("Please provide correct route. route=" + route);
|
|
2040
|
+
let routeSlices = getRouteSlices(route);
|
|
2041
|
+
allRoutes.push({ routeSlices, exactMatch, action });
|
|
2042
|
+
}
|
|
2043
|
+
DomeRouter2.onRoute = onRoute;
|
|
2044
|
+
function getRouteSlices(route) {
|
|
2045
|
+
return route.split("/").map((x) => decodeURIComponent(x));
|
|
2046
|
+
}
|
|
2047
|
+
function onNotFound(action) {
|
|
2048
|
+
onNotFoundAction = action;
|
|
2049
|
+
}
|
|
2050
|
+
DomeRouter2.onNotFound = onNotFound;
|
|
2051
|
+
function checkUrlMatchRouteAndGetParameters(url, route, exactMatch = true) {
|
|
2052
|
+
const urlSlices = getRouteSlices(url);
|
|
2053
|
+
const routeSlices = getRouteSlices(route);
|
|
2054
|
+
if (exactMatch && routeSlices.length !== urlSlices.length) return void 0;
|
|
2055
|
+
const extractedParameters = {};
|
|
2056
|
+
for (let i = 0; i < routeSlices.length; i++) {
|
|
2057
|
+
let cRouteSlice = routeSlices[i];
|
|
2058
|
+
let cUrlSlice = urlSlices[i];
|
|
2059
|
+
if (cRouteSlice.startsWith(":")) {
|
|
2060
|
+
if (cUrlSlice === void 0) {
|
|
2061
|
+
return void 0;
|
|
2062
|
+
}
|
|
2063
|
+
const [name, value] = parseToNameAndValue(cRouteSlice, cUrlSlice);
|
|
2064
|
+
extractedParameters[name] = value;
|
|
2065
|
+
} else {
|
|
2066
|
+
if (cRouteSlice !== cUrlSlice) {
|
|
2067
|
+
return void 0;
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
return extractedParameters;
|
|
2072
|
+
}
|
|
2073
|
+
DomeRouter2.checkUrlMatchRouteAndGetParameters = checkUrlMatchRouteAndGetParameters;
|
|
2074
|
+
function parseToNameAndValue(name, value) {
|
|
2075
|
+
if (!name) throw new Error("no name");
|
|
2076
|
+
const haveMatch = name.match(/:(.+)<(.+)>/);
|
|
2077
|
+
if (haveMatch) {
|
|
2078
|
+
const paramName = haveMatch[1];
|
|
2079
|
+
const paramType = haveMatch[2].toLowerCase();
|
|
2080
|
+
if (paramType == "int") {
|
|
2081
|
+
return [paramName, parseInt(value)];
|
|
2082
|
+
} else if (paramType == "float") {
|
|
2083
|
+
return [paramName, parseFloat(value)];
|
|
2084
|
+
} else if (paramType == "number") {
|
|
2085
|
+
return [paramName, Number(value)];
|
|
2086
|
+
} else {
|
|
2087
|
+
return [paramName, value];
|
|
2088
|
+
}
|
|
2089
|
+
} else {
|
|
2090
|
+
return [name.substring(1), value];
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
function parseQueryString(search) {
|
|
2094
|
+
const query = {};
|
|
2095
|
+
if (!search || search[0] !== "?") return query;
|
|
2096
|
+
const params = new URLSearchParams(search.substring(1));
|
|
2097
|
+
for (const [key, value] of params.entries()) {
|
|
2098
|
+
query[key] = value;
|
|
2099
|
+
}
|
|
2100
|
+
return query;
|
|
2101
|
+
}
|
|
2102
|
+
async function executeAsync(url = window.location.pathname, scrollToPosition) {
|
|
2103
|
+
const queryString = window.location.search;
|
|
2104
|
+
const query = parseQueryString(queryString);
|
|
2105
|
+
url = url.split("?")[0];
|
|
2106
|
+
const urlSlices = getRouteSlices(url);
|
|
2107
|
+
let countOfFoundRoutes = 0;
|
|
2108
|
+
for (let route of allRoutes) {
|
|
2109
|
+
if (route.exactMatch && route.routeSlices.length != urlSlices.length) continue;
|
|
2110
|
+
let matched = true;
|
|
2111
|
+
const extractedParameters = {};
|
|
2112
|
+
for (let i = 0; i < route.routeSlices.length; i++) {
|
|
2113
|
+
let cRouteSlice = route.routeSlices[i];
|
|
2114
|
+
let cUrlSlice = urlSlices[i];
|
|
2115
|
+
if (cRouteSlice && typeof cRouteSlice === "string" && cRouteSlice.startsWith(":")) {
|
|
2116
|
+
if (cUrlSlice === void 0) {
|
|
2117
|
+
matched = false;
|
|
2118
|
+
continue;
|
|
2119
|
+
}
|
|
2120
|
+
const [name, value] = parseToNameAndValue(cRouteSlice, cUrlSlice);
|
|
2121
|
+
extractedParameters[name] = value;
|
|
2122
|
+
} else {
|
|
2123
|
+
if (cRouteSlice !== cUrlSlice) {
|
|
2124
|
+
matched = false;
|
|
2125
|
+
continue;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
if (matched) {
|
|
2130
|
+
countOfFoundRoutes++;
|
|
2131
|
+
await route.action(extractedParameters, url, async () => {
|
|
2132
|
+
await DomeManipulator.scrollToAsync({
|
|
2133
|
+
pxFromTop: scrollToPosition
|
|
2134
|
+
});
|
|
2135
|
+
}, query);
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
if (countOfFoundRoutes == 0 && onNotFoundAction) {
|
|
2139
|
+
onNotFoundAction();
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
})(DomeRouter || (DomeRouter = {}));
|
|
2143
|
+
export {
|
|
2144
|
+
AnimatedArray,
|
|
2145
|
+
AnimatedTable,
|
|
2146
|
+
AnimatedText,
|
|
2147
|
+
Async,
|
|
2148
|
+
DataTypes,
|
|
2149
|
+
DomeComponent,
|
|
2150
|
+
DomeManipulator,
|
|
2151
|
+
DomeRouter,
|
|
2152
|
+
Lock,
|
|
2153
|
+
ObservableArray,
|
|
2154
|
+
ObservableLocalStorageArray,
|
|
2155
|
+
ObservableLocalStorageVariable,
|
|
2156
|
+
ObservableMap,
|
|
2157
|
+
ObservableVariable as ObservableValue,
|
|
2158
|
+
ObservableVariable,
|
|
2159
|
+
React,
|
|
2160
|
+
TypeEvent,
|
|
2161
|
+
checkIfObservable,
|
|
2162
|
+
createObservable,
|
|
2163
|
+
h
|
|
2164
|
+
};
|