@vuu-ui/vuu-data-local 4.0.0-alpha.22 → 4.0.0-alpha.24
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.0.0-alpha.
|
|
2
|
+
"version": "4.0.0-alpha.24",
|
|
3
3
|
"main": "./src/index.js",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"type": "module",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"type-defs": "node ../../scripts/build-type-defs.mjs"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@vuu-ui/vuu-data-types": "4.0.0-alpha.
|
|
15
|
-
"@vuu-ui/vuu-table-types": "4.0.0-alpha.
|
|
16
|
-
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.
|
|
17
|
-
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.
|
|
14
|
+
"@vuu-ui/vuu-data-types": "4.0.0-alpha.24",
|
|
15
|
+
"@vuu-ui/vuu-table-types": "4.0.0-alpha.24",
|
|
16
|
+
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.24",
|
|
17
|
+
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.24"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@vuu-ui/vuu-filter-parser": "4.0.0-alpha.
|
|
21
|
-
"@vuu-ui/vuu-utils": "4.0.0-alpha.
|
|
20
|
+
"@vuu-ui/vuu-filter-parser": "4.0.0-alpha.24",
|
|
21
|
+
"@vuu-ui/vuu-utils": "4.0.0-alpha.24"
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"files": [
|
|
@@ -71,7 +71,7 @@ class ArrayDataSource extends EventEmitter {
|
|
|
71
71
|
this.columnDescriptors = columnDescriptors;
|
|
72
72
|
this.#filterColumnsByName = getColumnsByName(columnDescriptors);
|
|
73
73
|
this.dataMap = dataMap;
|
|
74
|
-
this.key = keyColumn ? this.columnDescriptors.findIndex((col)=>col.name === keyColumn) : 0;
|
|
74
|
+
this.key = keyColumn ? dataMap?.[keyColumn] ?? this.columnDescriptors.findIndex((col)=>col.name === keyColumn) : 0;
|
|
75
75
|
this.rangeChangeRowset = rangeChangeRowset;
|
|
76
76
|
this.tableSchema = buildTableSchema(columnDescriptors, keyColumn);
|
|
77
77
|
this.viewport = viewport || uuid();
|
|
@@ -120,8 +120,15 @@ class ArrayDataSource extends EventEmitter {
|
|
|
120
120
|
};
|
|
121
121
|
this.clientCallback?.(subscribedMessage);
|
|
122
122
|
this.emit("subscribed", subscribedMessage);
|
|
123
|
-
if (hasConfigProps)
|
|
124
|
-
|
|
123
|
+
if (hasConfigProps) {
|
|
124
|
+
if (range) {
|
|
125
|
+
this.constrainRangeToMaxRangeEnd(range);
|
|
126
|
+
this.#range = range;
|
|
127
|
+
this.#keys.reset(this.rangeWithBufferWithinMaxRangeEnd);
|
|
128
|
+
}
|
|
129
|
+
this.config = config;
|
|
130
|
+
this.sendRowsToClient(true);
|
|
131
|
+
} else {
|
|
125
132
|
this.sendSizeUpdateToClient();
|
|
126
133
|
this.emit("resize", this.processedData ? this.processedData.length : this.#data.length, this.#maxRangeEnd);
|
|
127
134
|
if (range && !this.#range.equals(range)) this.range = range;
|
|
@@ -461,7 +468,7 @@ class ArrayDataSource extends EventEmitter {
|
|
|
461
468
|
if (-1 !== dataIndex) {
|
|
462
469
|
const dataSourceRow = toDataSourceRow(this.key)(row, dataIndex);
|
|
463
470
|
this.#data[dataIndex] = dataSourceRow;
|
|
464
|
-
const { from, to } = this
|
|
471
|
+
const { from, to } = this.rangeWithBufferWithinMaxRangeEnd;
|
|
465
472
|
const isFiltered = hasFilter(this.config) || hasBaseFilter(this.config);
|
|
466
473
|
const isSorted = hasSort(this.config);
|
|
467
474
|
if (isFiltered) {
|