@milaboratories/milaboratories.ui-examples.model 1.3.0 → 1.3.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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +61 -38
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +5 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @milaboratories/milaboratories.ui-examples.model@1.3.
|
|
3
|
+
> @milaboratories/milaboratories.ui-examples.model@1.3.2 build /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
|
|
4
4
|
> ts-builder build --target block-model && block-tools build-model
|
|
5
5
|
|
|
6
6
|
Building block-model project...
|
|
7
7
|
↳ rollup -c /configs/rollup.block-model.config.js
|
|
8
8
|
[36m
|
|
9
9
|
[1m./src/index.ts[22m → [1mdist, dist[22m...[39m
|
|
10
|
-
[32mcreated [1mdist, dist[22m in [1m9.
|
|
10
|
+
[32mcreated [1mdist, dist[22m in [1m9.2s[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./src/index.ts[22m → [1mdist[22m...[39m
|
|
13
13
|
[1m[33m(!) Circular dependency[39m[22m
|
|
14
14
|
../../../../sdk/model/dist/components/PFrameForGraphs.js -> ../../../../sdk/model/dist/components/PlDataTable.js -> ../../../../sdk/model/dist/components/PFrameForGraphs.js
|
|
15
|
-
[32mcreated [1mdist[22m in [
|
|
15
|
+
[32mcreated [1mdist[22m in [1m5.4s[22m[39m
|
|
16
16
|
Build completed successfully
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @milaboratories/milaboratories.ui-examples.model@1.3.
|
|
3
|
+
> @milaboratories/milaboratories.ui-examples.model@1.3.2 type-check /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
|
|
4
4
|
> ts-builder types --target block-model
|
|
5
5
|
|
|
6
6
|
↳ tsc --noEmit --project ./tsconfig.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @milaboratories/milaboratories.ui-examples.model
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6f67293]
|
|
8
|
+
- @platforma-sdk/model@1.45.23
|
|
9
|
+
|
|
10
|
+
## 1.3.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [64cee78]
|
|
15
|
+
- @platforma-sdk/model@1.45.17
|
|
16
|
+
|
|
3
17
|
## 1.3.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/bundle.js
CHANGED
|
@@ -4392,6 +4392,36 @@
|
|
|
4392
4392
|
}
|
|
4393
4393
|
}
|
|
4394
4394
|
}
|
|
4395
|
+
/**
|
|
4396
|
+
* @param dataInfo - The source DataInfo object
|
|
4397
|
+
* @param cb - Callback, function that have access to every blob to visit them all
|
|
4398
|
+
* @returns Nothing
|
|
4399
|
+
*/
|
|
4400
|
+
function visitDataInfo(dataInfo, cb) {
|
|
4401
|
+
switch (dataInfo.type) {
|
|
4402
|
+
case 'Json':
|
|
4403
|
+
// Json type doesn't contain blobs, so return as is
|
|
4404
|
+
break;
|
|
4405
|
+
case 'JsonPartitioned': {
|
|
4406
|
+
// Visit each blob in parts
|
|
4407
|
+
Object.values(dataInfo.parts).forEach(cb);
|
|
4408
|
+
break;
|
|
4409
|
+
}
|
|
4410
|
+
case 'BinaryPartitioned': {
|
|
4411
|
+
// Visit each index and values blob in parts
|
|
4412
|
+
Object.values(dataInfo.parts).forEach((chunk) => {
|
|
4413
|
+
cb(chunk.index);
|
|
4414
|
+
cb(chunk.values);
|
|
4415
|
+
});
|
|
4416
|
+
break;
|
|
4417
|
+
}
|
|
4418
|
+
case 'ParquetPartitioned': {
|
|
4419
|
+
// Visit each blob in parts
|
|
4420
|
+
Object.values(dataInfo.parts).forEach(cb);
|
|
4421
|
+
break;
|
|
4422
|
+
}
|
|
4423
|
+
}
|
|
4424
|
+
}
|
|
4395
4425
|
/**
|
|
4396
4426
|
* Type guard function that checks if the given value is a valid DataInfoEntries.
|
|
4397
4427
|
*
|
|
@@ -6094,6 +6124,25 @@
|
|
|
6094
6124
|
return parsePColumnData(acc);
|
|
6095
6125
|
throw new Error(`Unexpected input type: ${typeof acc}`);
|
|
6096
6126
|
}
|
|
6127
|
+
function isPColumnReady(c) {
|
|
6128
|
+
const isValues = (d) => Array.isArray(d);
|
|
6129
|
+
const isAccessor = (d) => d instanceof TreeNodeAccessor;
|
|
6130
|
+
let ready = true;
|
|
6131
|
+
if (isAccessor(c.data)) {
|
|
6132
|
+
ready &&= c.data.getIsReadyOrError();
|
|
6133
|
+
}
|
|
6134
|
+
else if (isDataInfo(c.data)) {
|
|
6135
|
+
visitDataInfo(c.data, (v) => ready &&= v.getIsReadyOrError());
|
|
6136
|
+
}
|
|
6137
|
+
else if (!isValues(c.data)) {
|
|
6138
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
6139
|
+
throw Error(`unsupported column data type: ${c.data}`);
|
|
6140
|
+
}
|
|
6141
|
+
return ready;
|
|
6142
|
+
}
|
|
6143
|
+
function allPColumnsReady(columns) {
|
|
6144
|
+
return columns.every(isPColumnReady);
|
|
6145
|
+
}
|
|
6097
6146
|
|
|
6098
6147
|
function isPColumnValues(value) {
|
|
6099
6148
|
if (!Array.isArray(value))
|
|
@@ -6898,6 +6947,8 @@
|
|
|
6898
6947
|
// TODO remove all non-PColumn fields
|
|
6899
6948
|
createPFrame(def) {
|
|
6900
6949
|
this.verifyInlineAndExplicitColumnsSupport(def);
|
|
6950
|
+
if (!allPColumnsReady(def))
|
|
6951
|
+
return undefined;
|
|
6901
6952
|
return this.ctx.createPFrame(def.map((c) => transformPColumnData(c)));
|
|
6902
6953
|
}
|
|
6903
6954
|
createPTable(def) {
|
|
@@ -6916,7 +6967,10 @@
|
|
|
6916
6967
|
else {
|
|
6917
6968
|
rawDef = this.patchPTableDef(def);
|
|
6918
6969
|
}
|
|
6919
|
-
|
|
6970
|
+
const columns = extractAllColumns(rawDef.src);
|
|
6971
|
+
this.verifyInlineAndExplicitColumnsSupport(columns);
|
|
6972
|
+
if (!allPColumnsReady(columns))
|
|
6973
|
+
return undefined;
|
|
6920
6974
|
return this.ctx.createPTable(mapPTableDef(rawDef, (po) => transformPColumnData(po)));
|
|
6921
6975
|
}
|
|
6922
6976
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -6937,7 +6991,7 @@
|
|
|
6937
6991
|
}
|
|
6938
6992
|
}
|
|
6939
6993
|
|
|
6940
|
-
var version = "1.45.
|
|
6994
|
+
var version = "1.45.23";
|
|
6941
6995
|
|
|
6942
6996
|
const PlatformaSDKVersion = version;
|
|
6943
6997
|
|
|
@@ -7236,41 +7290,6 @@
|
|
|
7236
7290
|
}
|
|
7237
7291
|
return labelColumns;
|
|
7238
7292
|
}
|
|
7239
|
-
/** Check if all columns are computed */
|
|
7240
|
-
function allColumnsComputed(columns) {
|
|
7241
|
-
const isValues = (d) => Array.isArray(d);
|
|
7242
|
-
const isAccessor = (d) => d instanceof TreeNodeAccessor;
|
|
7243
|
-
const isDataInfo = (d) => typeof d === 'object' && 'type' in d;
|
|
7244
|
-
return columns
|
|
7245
|
-
.map((c) => c.data)
|
|
7246
|
-
.every((d) => {
|
|
7247
|
-
if (isValues(d)) {
|
|
7248
|
-
return true;
|
|
7249
|
-
}
|
|
7250
|
-
else if (isAccessor(d)) {
|
|
7251
|
-
return d.getIsReadyOrError();
|
|
7252
|
-
}
|
|
7253
|
-
else if (isDataInfo(d)) {
|
|
7254
|
-
const type = d.type;
|
|
7255
|
-
switch (type) {
|
|
7256
|
-
case 'Json':
|
|
7257
|
-
return true;
|
|
7258
|
-
case 'JsonPartitioned':
|
|
7259
|
-
return Object.values(d.parts).every((p) => p.getIsReadyOrError());
|
|
7260
|
-
case 'BinaryPartitioned':
|
|
7261
|
-
return Object.values(d.parts)
|
|
7262
|
-
.every((p) => p.index.getIsReadyOrError() && p.values.getIsReadyOrError());
|
|
7263
|
-
case 'ParquetPartitioned':
|
|
7264
|
-
return Object.values(d.parts)
|
|
7265
|
-
.every((p) => p.getIsReadyOrError());
|
|
7266
|
-
}
|
|
7267
|
-
}
|
|
7268
|
-
else {
|
|
7269
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
7270
|
-
throw Error(`unsupported column data type: ${d}`);
|
|
7271
|
-
}
|
|
7272
|
-
});
|
|
7273
|
-
}
|
|
7274
7293
|
function createPTableDef(params) {
|
|
7275
7294
|
let coreColumns = params.columns;
|
|
7276
7295
|
const secondaryColumns = [];
|
|
@@ -7360,6 +7379,8 @@
|
|
|
7360
7379
|
coreColumnPredicate: ops?.coreColumnPredicate,
|
|
7361
7380
|
});
|
|
7362
7381
|
const fullHandle = ctx.createPTable(fullDef);
|
|
7382
|
+
if (!fullHandle)
|
|
7383
|
+
return undefined;
|
|
7363
7384
|
const hiddenColumns = new Set((() => {
|
|
7364
7385
|
const hiddenColIds = tableStateNormalized.pTableParams.hiddenColIds;
|
|
7365
7386
|
if (hiddenColIds)
|
|
@@ -7381,7 +7402,7 @@
|
|
|
7381
7402
|
const visibleColumns = columns.filter((c) => !hiddenColumns.has(c.id));
|
|
7382
7403
|
const visibleLabelColumns = getMatchingLabelColumns(visibleColumns.map(getColumnIdAndSpec), allLabelColumns);
|
|
7383
7404
|
// if at least one column is not yet computed, we can't show the table
|
|
7384
|
-
if (!
|
|
7405
|
+
if (!allPColumnsReady([...visibleColumns, ...visibleLabelColumns]))
|
|
7385
7406
|
return undefined;
|
|
7386
7407
|
const visibleDef = createPTableDef({
|
|
7387
7408
|
columns: visibleColumns,
|
|
@@ -7393,6 +7414,8 @@
|
|
|
7393
7414
|
coreColumnPredicate,
|
|
7394
7415
|
});
|
|
7395
7416
|
const visibleHandle = ctx.createPTable(visibleDef);
|
|
7417
|
+
if (!visibleHandle)
|
|
7418
|
+
return undefined;
|
|
7396
7419
|
return {
|
|
7397
7420
|
sourceId: tableStateNormalized.pTableParams.sourceId,
|
|
7398
7421
|
fullTableHandle: fullHandle,
|