@dereekb/util 9.23.0 → 9.23.2
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/CHANGELOG.md +8 -0
- package/fetch/CHANGELOG.md +8 -0
- package/fetch/package.json +2 -2
- package/package.json +1 -1
- package/src/lib/iterable/iterable.d.ts +3 -1
- package/src/lib/iterable/iterable.js +7 -7
- package/src/lib/iterable/iterable.js.map +1 -1
- package/src/lib/set/set.delta.d.ts +73 -0
- package/src/lib/set/set.delta.js +91 -0
- package/src/lib/set/set.delta.js.map +1 -0
- package/src/lib/value/indexed.d.ts +9 -4
- package/src/lib/value/indexed.js +26 -5
- package/src/lib/value/indexed.js.map +1 -1
- package/src/lib/value/sync.d.ts +6 -0
- package/src/lib/value/zoom.d.ts +6 -0
- package/test/CHANGELOG.md +8 -0
- package/test/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [9.23.2](https://github.com/dereekb/dbx-components/compare/v9.23.1-dev...v9.23.2) (2023-03-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [9.23.1](https://github.com/dereekb/dbx-components/compare/v9.23.0-dev...v9.23.1) (2023-03-30)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
# [9.23.0](https://github.com/dereekb/dbx-components/compare/v9.22.11-dev...v9.23.0) (2023-03-28)
|
|
6
14
|
|
|
7
15
|
|
package/fetch/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [9.23.2](https://github.com/dereekb/dbx-components/compare/v9.23.1-dev...v9.23.2) (2023-03-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [9.23.1](https://github.com/dereekb/dbx-components/compare/v9.23.0-dev...v9.23.1) (2023-03-30)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
# [9.23.0](https://github.com/dereekb/dbx-components/compare/v9.22.11-dev...v9.23.0) (2023-03-28)
|
|
6
14
|
|
|
7
15
|
|
package/fetch/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/util/fetch",
|
|
3
|
-
"version": "9.23.
|
|
3
|
+
"version": "9.23.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"dependencies": {},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@dereekb/util": "9.23.
|
|
8
|
+
"@dereekb/util": "9.23.2",
|
|
9
9
|
"lodash.isequal": "^4.5.0",
|
|
10
10
|
"make-error": "^1.3.0",
|
|
11
11
|
"class-validator": "^0.13.2",
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PrimativeKey, ReadKeyFunction } from '../key';
|
|
1
2
|
import { Maybe } from '../value/maybe.type';
|
|
2
3
|
/**
|
|
3
4
|
* An Iterable or a value.
|
|
@@ -6,7 +7,8 @@ import { Maybe } from '../value/maybe.type';
|
|
|
6
7
|
*/
|
|
7
8
|
export declare type IterableOrValue<T> = T | Iterable<T>;
|
|
8
9
|
export declare function asIterable<T = unknown>(values: IterableOrValue<T>, treatStringAsIterable?: boolean): Iterable<T>;
|
|
9
|
-
export declare function iterableToArray<T = unknown>(values: IterableOrValue<T>, treatStringAsIterable?: boolean):
|
|
10
|
+
export declare function iterableToArray<T = unknown>(values: IterableOrValue<T>, treatStringAsIterable?: boolean): T[];
|
|
11
|
+
export declare function iterableToMap<T, K extends PrimativeKey = PrimativeKey>(values: IterableOrValue<T>, readKey: ReadKeyFunction<T, K>): Map<Maybe<K>, T>;
|
|
10
12
|
/**
|
|
11
13
|
* Returns true if the input is an Iterable.
|
|
12
14
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.existsInIterable = exports.findInIterable = exports.useIterableOrValue = exports.forEachInIterable = exports.takeValuesFromIterable = exports.firstValueFromIterable = exports.isEmptyIterable = exports.isIterable = exports.iterableToArray = exports.asIterable = void 0;
|
|
3
|
+
exports.existsInIterable = exports.findInIterable = exports.useIterableOrValue = exports.forEachInIterable = exports.takeValuesFromIterable = exports.firstValueFromIterable = exports.isEmptyIterable = exports.isIterable = exports.iterableToMap = exports.iterableToArray = exports.asIterable = void 0;
|
|
4
4
|
// MARK: Functions
|
|
5
5
|
function asIterable(values, treatStringAsIterable) {
|
|
6
6
|
let iterable;
|
|
@@ -19,12 +19,7 @@ function iterableToArray(values, treatStringAsIterable) {
|
|
|
19
19
|
iterable = [values];
|
|
20
20
|
}
|
|
21
21
|
else if (isIterable(values)) {
|
|
22
|
-
|
|
23
|
-
iterable = values;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
iterable = Array.from(values);
|
|
27
|
-
}
|
|
22
|
+
iterable = Array.from(values); // copy the array
|
|
28
23
|
}
|
|
29
24
|
else {
|
|
30
25
|
iterable = [values];
|
|
@@ -32,6 +27,11 @@ function iterableToArray(values, treatStringAsIterable) {
|
|
|
32
27
|
return iterable;
|
|
33
28
|
}
|
|
34
29
|
exports.iterableToArray = iterableToArray;
|
|
30
|
+
function iterableToMap(values, readKey) {
|
|
31
|
+
const map = new Map(iterableToArray(values).map((value) => [readKey(value), value]));
|
|
32
|
+
return map;
|
|
33
|
+
}
|
|
34
|
+
exports.iterableToMap = iterableToMap;
|
|
35
35
|
/**
|
|
36
36
|
* Returns true if the input is an Iterable.
|
|
37
37
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iterable.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/iterable/iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"iterable.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/iterable/iterable.ts"],"names":[],"mappings":";;;AAWA,kBAAkB;AAClB,SAAgB,UAAU,CAAc,MAA0B,EAAE,qBAA+B;IACjG,IAAI,QAAqB,CAAC;IAE1B,IAAI,UAAU,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAAE;QAC7C,QAAQ,GAAG,MAAM,CAAC;KACnB;SAAM;QACL,QAAQ,GAAG,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAVD,gCAUC;AAED,SAAgB,eAAe,CAAc,MAA0B,EAAE,qBAA+B;IACtG,IAAI,QAAkB,CAAC;IAEvB,IAAI,qBAAqB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QACvD,QAAQ,GAAG,CAAC,MAAM,CAAC,CAAC;KACrB;SAAM,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE;QAC7B,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB;KACjD;SAAM;QACL,QAAQ,GAAG,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAZD,0CAYC;AAED,SAAgB,aAAa,CAA2C,MAA0B,EAAE,OAA8B;IAChI,MAAM,GAAG,GAAG,IAAI,GAAG,CAAc,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAClG,OAAO,GAAG,CAAC;AACb,CAAC;AAHD,sCAGC;AAED;;;;;;;;GAQG;AACH,SAAgB,UAAU,CAAc,MAAe,EAAE,qBAAqB,GAAG,KAAK;IACpF,IAAI,MAAM,IAAK,MAAsB,CAAC,MAAM,CAAC,QAAQ,CAAC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SAC/B;aAAM;YACL,EAAE,CAAC,MAAM,CAAC,CAAC;SACZ;KACF;AACH,CAAC;AARD,gDAQC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAI,MAAmB,EAAE,EAAyB;IAC9E,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AARD,wCAQC;AAED;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAI,MAAmB,EAAE,EAAyB;IAChF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,4CAQC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PrimativeKey, ReadKeyFunction } from '../key';
|
|
2
|
+
/**
|
|
3
|
+
* How the value's presence changed from one set to the next.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum SetDeltaChange {
|
|
6
|
+
REMOVED = -1,
|
|
7
|
+
NONE = 0,
|
|
8
|
+
ADDED = 1
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns true if the next value has been modified compared to the past value.
|
|
12
|
+
*/
|
|
13
|
+
export declare type SetValueIsModifiedFunction<T> = (past: T, next: T) => boolean;
|
|
14
|
+
export interface SetDeltaChangePair<T, K extends PrimativeKey = PrimativeKey> {
|
|
15
|
+
/**
|
|
16
|
+
* Key for this pair
|
|
17
|
+
*/
|
|
18
|
+
readonly key: K;
|
|
19
|
+
/**
|
|
20
|
+
* Value as it was in the past set, if applicable.
|
|
21
|
+
*/
|
|
22
|
+
readonly pastValue?: T;
|
|
23
|
+
/**
|
|
24
|
+
* Value as it was in the next set, if applicable.
|
|
25
|
+
*/
|
|
26
|
+
readonly nextValue?: T;
|
|
27
|
+
/**
|
|
28
|
+
* Evaluated value.
|
|
29
|
+
*/
|
|
30
|
+
readonly value: T;
|
|
31
|
+
/**
|
|
32
|
+
* How the value changed.
|
|
33
|
+
*/
|
|
34
|
+
readonly change: SetDeltaChange;
|
|
35
|
+
/**
|
|
36
|
+
* Whether or not the value was modified.
|
|
37
|
+
*/
|
|
38
|
+
readonly isModified?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Function that builds an array of changes based on the values in the past array to the next array.
|
|
42
|
+
*/
|
|
43
|
+
export declare type SetDeltaFunction<T, K extends PrimativeKey = PrimativeKey> = (past: Iterable<T>, next: Iterable<T>) => SetDeltaChangePair<T, K>[];
|
|
44
|
+
export interface SetDeltaFunctionConfig<T, K extends PrimativeKey = PrimativeKey> {
|
|
45
|
+
/**
|
|
46
|
+
* Reads the identifying key from each input value.
|
|
47
|
+
*/
|
|
48
|
+
readKey: ReadKeyFunction<T, K>;
|
|
49
|
+
/**
|
|
50
|
+
* Whether or not the value is modified.
|
|
51
|
+
*/
|
|
52
|
+
isModifiedFunction?: SetValueIsModifiedFunction<T>;
|
|
53
|
+
}
|
|
54
|
+
export declare function setDeltaFunction<T>(config: SetDeltaFunctionConfig<T>): SetDeltaFunction<T>;
|
|
55
|
+
/**
|
|
56
|
+
* Keys mapped by their change type.
|
|
57
|
+
*/
|
|
58
|
+
export interface SetDeltaChangeKeys<K extends PrimativeKey = PrimativeKey> {
|
|
59
|
+
readonly removed: K[];
|
|
60
|
+
readonly none: K[];
|
|
61
|
+
readonly added: K[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Creates a SetDeltaChangeKeys from the input SetDeltaChangePair values.
|
|
65
|
+
*
|
|
66
|
+
* @param pairs
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
export declare function setDeltaChangeKeys<T, K extends PrimativeKey = PrimativeKey>(pairs: SetDeltaChangePair<T, K>[]): SetDeltaChangeKeys<K>;
|
|
70
|
+
/**
|
|
71
|
+
* Pre-configured SetDeltaFunction for PrimativeKey values.
|
|
72
|
+
*/
|
|
73
|
+
export declare const primativeValuesDelta: <T extends PrimativeKey>(past: Iterable<T>, next: Iterable<T>) => SetDeltaChangePair<T, PrimativeKey>[];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.primativeValuesDelta = exports.setDeltaChangeKeys = exports.setDeltaFunction = exports.SetDeltaChange = void 0;
|
|
4
|
+
const iterable_1 = require("../iterable");
|
|
5
|
+
const set_1 = require("./set");
|
|
6
|
+
/**
|
|
7
|
+
* How the value's presence changed from one set to the next.
|
|
8
|
+
*/
|
|
9
|
+
var SetDeltaChange;
|
|
10
|
+
(function (SetDeltaChange) {
|
|
11
|
+
SetDeltaChange[SetDeltaChange["REMOVED"] = -1] = "REMOVED";
|
|
12
|
+
SetDeltaChange[SetDeltaChange["NONE"] = 0] = "NONE";
|
|
13
|
+
SetDeltaChange[SetDeltaChange["ADDED"] = 1] = "ADDED";
|
|
14
|
+
})(SetDeltaChange = exports.SetDeltaChange || (exports.SetDeltaChange = {}));
|
|
15
|
+
function setDeltaFunction(config) {
|
|
16
|
+
const { readKey, isModifiedFunction = () => undefined } = config;
|
|
17
|
+
return (past, next) => {
|
|
18
|
+
const result = [];
|
|
19
|
+
const pastMap = (0, iterable_1.iterableToMap)(past, readKey);
|
|
20
|
+
const nextMap = (0, iterable_1.iterableToMap)(next, readKey);
|
|
21
|
+
const pastMapKeys = new Set(pastMap.keys());
|
|
22
|
+
const nextMapKeys = new Set(nextMap.keys());
|
|
23
|
+
const allKeys = (0, set_1.addToSetCopy)(pastMapKeys, nextMapKeys);
|
|
24
|
+
(0, iterable_1.forEachInIterable)(allKeys, (key) => {
|
|
25
|
+
// skip values with no key
|
|
26
|
+
if (key == null) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const inPast = pastMapKeys.has(key);
|
|
30
|
+
const inNext = nextMapKeys.has(key);
|
|
31
|
+
let change;
|
|
32
|
+
if (inNext && inPast) {
|
|
33
|
+
change = SetDeltaChange.NONE;
|
|
34
|
+
}
|
|
35
|
+
else if (inPast) {
|
|
36
|
+
change = SetDeltaChange.REMOVED;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
change = SetDeltaChange.ADDED;
|
|
40
|
+
}
|
|
41
|
+
const pastValue = inPast ? pastMap.get(key) : undefined;
|
|
42
|
+
const nextValue = inNext ? nextMap.get(key) : undefined;
|
|
43
|
+
const isModified = pastValue && nextValue ? isModifiedFunction(pastValue, nextValue) : undefined;
|
|
44
|
+
result.push({
|
|
45
|
+
key,
|
|
46
|
+
pastValue,
|
|
47
|
+
nextValue,
|
|
48
|
+
change,
|
|
49
|
+
isModified,
|
|
50
|
+
value: (nextValue !== null && nextValue !== void 0 ? nextValue : pastValue)
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.setDeltaFunction = setDeltaFunction;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a SetDeltaChangeKeys from the input SetDeltaChangePair values.
|
|
59
|
+
*
|
|
60
|
+
* @param pairs
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
function setDeltaChangeKeys(pairs) {
|
|
64
|
+
const removed = [];
|
|
65
|
+
const none = [];
|
|
66
|
+
const added = [];
|
|
67
|
+
pairs.forEach((x) => {
|
|
68
|
+
switch (x.change) {
|
|
69
|
+
case SetDeltaChange.ADDED:
|
|
70
|
+
added.push(x.key);
|
|
71
|
+
break;
|
|
72
|
+
case SetDeltaChange.NONE:
|
|
73
|
+
none.push(x.key);
|
|
74
|
+
break;
|
|
75
|
+
case SetDeltaChange.REMOVED:
|
|
76
|
+
removed.push(x.key);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return {
|
|
81
|
+
removed,
|
|
82
|
+
none,
|
|
83
|
+
added
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
exports.setDeltaChangeKeys = setDeltaChangeKeys;
|
|
87
|
+
/**
|
|
88
|
+
* Pre-configured SetDeltaFunction for PrimativeKey values.
|
|
89
|
+
*/
|
|
90
|
+
exports.primativeValuesDelta = setDeltaFunction({ readKey: (x) => x });
|
|
91
|
+
//# sourceMappingURL=set.delta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.delta.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/set/set.delta.ts"],"names":[],"mappings":";;;AAAA,0CAA+D;AAE/D,+BAAqC;AAErC;;GAEG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,0DAAY,CAAA;IACZ,mDAAQ,CAAA;IACR,qDAAS,CAAA;AACX,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAkDD,SAAgB,gBAAgB,CAAI,MAAiC;IACnE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC;IAEjE,OAAO,CAAC,IAAiB,EAAE,IAAiB,EAAE,EAAE;QAC9C,MAAM,MAAM,GAA4B,EAAE,CAAC;QAE3C,MAAM,OAAO,GAAG,IAAA,wBAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7C,MAAM,OAAO,GAAG,IAAA,wBAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE7C,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5C,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAE5C,MAAM,OAAO,GAAG,IAAA,kBAAY,EAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAEvD,IAAA,4BAAiB,EAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAA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AAE,CAAC;IAEtB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QAClB,QAAQ,CAAC,CAAC,MAAM,EAAE;YAChB,KAAK,cAAc,CAAC,KAAK;gBACvB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBAClB,MAAM;YACR,KAAK,cAAc,CAAC,IAAI;gBACtB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBACjB,MAAM;YACR,KAAK,cAAc,CAAC,OAAO;gBACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBACpB,MAAM;SACT;IACH,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,OAAO;QACP,IAAI;QACJ,KAAK;KACN,CAAC;AACJ,CAAC;AAxBD,gDAwBC;AAED;;GAEG;AACU,QAAA,oBAAoB,GAAG,gBAAgB,CAAe,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAA8F,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FindValuesFromInput } from '
|
|
2
|
-
import { ArrayOrValue } from '
|
|
1
|
+
import { FindValuesFromInput } from '../set/set';
|
|
2
|
+
import { ArrayOrValue } from '../array/array';
|
|
3
3
|
import { HashSet } from '../set/set.hashset';
|
|
4
4
|
import { SortCompareFunction } from '../sort';
|
|
5
|
-
import { FactoryWithRequiredInput } from '../getter';
|
|
5
|
+
import { FactoryWithRequiredInput } from '../getter/getter';
|
|
6
6
|
import { Maybe } from './maybe.type';
|
|
7
7
|
/**
|
|
8
8
|
* A number that denotes which index an item is at.
|
|
@@ -88,6 +88,11 @@ export interface FindItemsByIndexInput<T extends IndexRef> extends Pick<FindValu
|
|
|
88
88
|
* @param values
|
|
89
89
|
*/
|
|
90
90
|
export declare function findItemsByIndex<T extends IndexRef>(config: FindItemsByIndexInput<T>): T[];
|
|
91
|
+
/**
|
|
92
|
+
* Finds the best index match given the configured objects and returns the best match.
|
|
93
|
+
*/
|
|
94
|
+
export declare type FindBestIndexMatchFunction<T> = <I extends IndexRef>(value: I) => T;
|
|
95
|
+
export declare function findBestIndexMatchFunction<T extends IndexRef>(items: Iterable<T>): FindBestIndexMatchFunction<T>;
|
|
91
96
|
/**
|
|
92
97
|
* A min and max value that denote the maximum edges of a range of index values.
|
|
93
98
|
*/
|
|
@@ -210,4 +215,4 @@ export declare function indexRangeOverlapsIndexRange(compareIndexRange: IndexRan
|
|
|
210
215
|
* @returns
|
|
211
216
|
*/
|
|
212
217
|
export declare function indexRangeOverlapsIndexRangeFunction(input: IndexRangeFunctionInput): IndexRangeOverlapsIndexRangeFunction;
|
|
213
|
-
export declare const isSelectedIndexDecisionFunction: import("../set").IsSelectedDecisionFunctionFactory<IndexRef, number>;
|
|
218
|
+
export declare const isSelectedIndexDecisionFunction: import("../set/set.selection").IsSelectedDecisionFunctionFactory<IndexRef, number>;
|
package/src/lib/value/indexed.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSelectedIndexDecisionFunction = exports.indexRangeOverlapsIndexRangeFunction = exports.indexRangeOverlapsIndexRange = exports.isIndexRangeInIndexRangeFunction = exports.isIndexRangeInIndexRange = exports.isIndexNumberInIndexRangeFunction = exports.isIndexNumberInIndexRange = exports.indexRangeCheckFunction = exports.asIndexRangeCheckFunctionConfig = exports.indexRangeCheckReaderFunction = exports.indexRange = exports.indexRangeReaderPairFactory = exports.sortByIndexRangeAscendingCompareFunction = exports.findItemsByIndex = exports.hashSetForIndexed = exports.sortByIndexAscendingCompareFunction = exports.indexDeltaGroup = exports.indexDeltaGroupFunction = exports.readIndexNumber = exports.sortAscendingIndexNumberRefFunction = void 0;
|
|
4
|
-
const set_1 = require("
|
|
5
|
-
const array_1 = require("
|
|
3
|
+
exports.isSelectedIndexDecisionFunction = exports.indexRangeOverlapsIndexRangeFunction = exports.indexRangeOverlapsIndexRange = exports.isIndexRangeInIndexRangeFunction = exports.isIndexRangeInIndexRange = exports.isIndexNumberInIndexRangeFunction = exports.isIndexNumberInIndexRange = exports.indexRangeCheckFunction = exports.asIndexRangeCheckFunctionConfig = exports.indexRangeCheckReaderFunction = exports.indexRange = exports.indexRangeReaderPairFactory = exports.sortByIndexRangeAscendingCompareFunction = exports.findBestIndexMatchFunction = exports.findItemsByIndex = exports.hashSetForIndexed = exports.sortByIndexAscendingCompareFunction = exports.indexDeltaGroup = exports.indexDeltaGroupFunction = exports.readIndexNumber = exports.sortAscendingIndexNumberRefFunction = void 0;
|
|
4
|
+
const set_1 = require("../set/set");
|
|
5
|
+
const array_1 = require("../array/array");
|
|
6
6
|
const object_1 = require("../object/object");
|
|
7
7
|
const set_hashset_1 = require("../set/set.hashset");
|
|
8
|
+
const sort_1 = require("../sort");
|
|
8
9
|
const grouping_1 = require("../grouping");
|
|
9
10
|
const map_key_1 = require("../map/map.key");
|
|
10
|
-
const
|
|
11
|
+
const set_selection_1 = require("../set/set.selection");
|
|
12
|
+
const iterable_1 = require("../iterable/iterable");
|
|
11
13
|
/**
|
|
12
14
|
* Creates a SortCompareFunction<T> that sorts by index on IndexRef values.
|
|
13
15
|
*
|
|
@@ -94,6 +96,25 @@ function findItemsByIndex(config) {
|
|
|
94
96
|
});
|
|
95
97
|
}
|
|
96
98
|
exports.findItemsByIndex = findItemsByIndex;
|
|
99
|
+
function findBestIndexMatchFunction(items) {
|
|
100
|
+
// reverse the order so we can return the first item that is less than or equal to the input i
|
|
101
|
+
const bestMatchArray = (0, iterable_1.iterableToArray)(items, false).sort((0, sort_1.reverseCompareFn)(sortAscendingIndexNumberRefFunction()));
|
|
102
|
+
const defaultMatch = (0, array_1.lastValue)(bestMatchArray);
|
|
103
|
+
if (bestMatchArray.length === 0) {
|
|
104
|
+
throw new Error('findBestIndexMatchFunction() input array cannot be empty.');
|
|
105
|
+
}
|
|
106
|
+
else if (bestMatchArray.length === 1) {
|
|
107
|
+
return () => defaultMatch;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return (input) => {
|
|
111
|
+
const { i } = input;
|
|
112
|
+
const bestMatch = bestMatchArray.find((matchOption) => i >= matchOption.i);
|
|
113
|
+
return (bestMatch !== null && bestMatch !== void 0 ? bestMatch : defaultMatch);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.findBestIndexMatchFunction = findBestIndexMatchFunction;
|
|
97
118
|
/**
|
|
98
119
|
* Creates a SortCompareFunction<T> that sorts by the read index.
|
|
99
120
|
*
|
|
@@ -226,5 +247,5 @@ function indexRangeOverlapsIndexRangeFunction(input) {
|
|
|
226
247
|
}
|
|
227
248
|
exports.indexRangeOverlapsIndexRangeFunction = indexRangeOverlapsIndexRangeFunction;
|
|
228
249
|
// MARK: Selection
|
|
229
|
-
exports.isSelectedIndexDecisionFunction = (0,
|
|
250
|
+
exports.isSelectedIndexDecisionFunction = (0, set_selection_1.isSelectedDecisionFunctionFactory)({ readKey: readIndexNumber });
|
|
230
251
|
//# sourceMappingURL=indexed.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexed.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/indexed.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"indexed.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/indexed.ts"],"names":[],"mappings":";;;AAAA,oCAAiE;AACjE,0CAAkE;AAClE,6CAAgD;AAChD,oDAA6C;AAC7C,kCAAgE;AAGhE,0CAA6C;AAC7C,4CAA+C;AAC/C,wDAAyE;AACzE,mDAAuD;AAsBvD;;;;;GAKG;AACH,SAAgB,mCAAmC;IACjD,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAFD,kFAEC;A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AACJ,CAAC;AALD,oFAKC;AAED,kBAAkB;AACL,QAAA,+BAA+B,GAAG,IAAA,iDAAiC,EAAwB,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC"}
|
package/src/lib/value/sync.d.ts
CHANGED
|
@@ -15,3 +15,9 @@ export declare enum SyncState {
|
|
|
15
15
|
* Whether or not the object is synchronized.
|
|
16
16
|
*/
|
|
17
17
|
export declare type SyncStateBoolean = boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether or not the object needs to be synchronized.
|
|
20
|
+
*
|
|
21
|
+
* This is used in cases where the boolean is only ever true, and is generally undefined on the object when false.
|
|
22
|
+
*/
|
|
23
|
+
export declare type NeedsSyncBoolean = boolean;
|
package/src/lib/value/zoom.d.ts
CHANGED
package/test/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [9.23.2](https://github.com/dereekb/dbx-components/compare/v9.23.1-dev...v9.23.2) (2023-03-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [9.23.1](https://github.com/dereekb/dbx-components/compare/v9.23.0-dev...v9.23.1) (2023-03-30)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
# [9.23.0](https://github.com/dereekb/dbx-components/compare/v9.22.11-dev...v9.23.0) (2023-03-28)
|
|
6
14
|
|
|
7
15
|
|
package/test/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/util/test",
|
|
3
|
-
"version": "9.23.
|
|
3
|
+
"version": "9.23.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"dependencies": {},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@dereekb/util": "9.23.
|
|
9
|
+
"@dereekb/util": "9.23.2",
|
|
10
10
|
"lodash.isequal": "^4.5.0",
|
|
11
11
|
"make-error": "^1.3.0",
|
|
12
12
|
"class-validator": "^0.13.2",
|