@milaboratories/milaboratories.pool-explorer.model 1.0.124 → 1.0.126

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.
@@ -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.pool-explorer.model@1.0.124 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.126 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/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
  
9
9
  ./src/index.ts → dist, dist...
10
- created dist, dist in 2.2s
10
+ created dist, dist in 2.5s
11
11
  
12
12
  ./src/index.ts → dist...
13
13
  (!) Circular dependency
14
14
  ../../../../sdk/model/dist/components/PFrameForGraphs.js -> ../../../../sdk/model/dist/pframe_utils/columns.js -> ../../../../sdk/model/dist/components/PFrameForGraphs.js
15
- created dist in 4.3s
15
+ created dist in 3.4s
16
16
  Build completed successfully
@@ -1,5 +1,5 @@
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.pool-explorer.model@1.0.124 lint /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.126 lint /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
4
4
  > eslint .
5
5
 
@@ -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.pool-explorer.model@1.0.124 type-check /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.126 type-check /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
4
4
  > ts-builder types --target block-model
5
5
 
6
6
  ↳ tsc --noEmit --project ./tsconfig.json --customConditions ,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @milaboratories/milaboratories.pool-explorer.model
2
2
 
3
+ ## 1.0.126
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [38534c5]
8
+ - @platforma-sdk/model@1.51.9
9
+
10
+ ## 1.0.125
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [b0ceca1]
15
+ - @platforma-sdk/model@1.51.6
16
+
3
17
  ## 1.0.124
4
18
 
5
19
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -6088,6 +6088,30 @@
6088
6088
  }
6089
6089
  return result;
6090
6090
  };
6091
+ const countUniqueLabels = (result) => result === undefined ? 0 : new Set(result.map((c) => c.label)).size;
6092
+ // Post-processing: try removing types one by one (lowest importance first) to minimize the label set
6093
+ // Accepts removal if it doesn't decrease the number of unique labels (cardinality)
6094
+ const minimizeTypeSet = (typeSet) => {
6095
+ const initialResult = calculate(typeSet);
6096
+ if (initialResult === undefined) {
6097
+ return typeSet;
6098
+ }
6099
+ const currentCardinality = countUniqueLabels(initialResult);
6100
+ // Get types sorted by importance ascending (lowest first), excluding forced elements
6101
+ const removableSorted = [...typeSet]
6102
+ .filter((t) => !forceTraceElements?.has(t.split('@')[0])
6103
+ && !(ops.includeNativeLabel && t === LabelTypeFull))
6104
+ .sort((a, b) => (importances.get(a) ?? 0) - (importances.get(b) ?? 0));
6105
+ for (const typeToRemove of removableSorted) {
6106
+ const reducedSet = new Set(typeSet);
6107
+ reducedSet.delete(typeToRemove);
6108
+ const candidateResult = calculate(reducedSet);
6109
+ if (candidateResult !== undefined && countUniqueLabels(candidateResult) >= currentCardinality) {
6110
+ typeSet.delete(typeToRemove);
6111
+ }
6112
+ }
6113
+ return typeSet;
6114
+ };
6091
6115
  if (mainTypes.length === 0) {
6092
6116
  if (secondaryTypes.length !== 0)
6093
6117
  throw new Error('Non-empty secondary types list while main types list is empty.');
@@ -6113,16 +6137,20 @@
6113
6137
  if (additionalType >= 0)
6114
6138
  currentSet.add(mainTypes[additionalType]);
6115
6139
  const candidateResult = calculate(currentSet);
6116
- // checking if labels uniquely separate our records
6117
- if (candidateResult !== undefined && new Set(candidateResult.map((c) => c.label)).size === values.length)
6118
- return candidateResult;
6140
+ if (candidateResult !== undefined && countUniqueLabels(candidateResult) === values.length) {
6141
+ minimizeTypeSet(currentSet);
6142
+ return calculate(currentSet);
6143
+ }
6119
6144
  additionalType++;
6120
6145
  if (additionalType >= mainTypes.length) {
6121
6146
  includedTypes++;
6122
6147
  additionalType = includedTypes;
6123
6148
  }
6124
6149
  }
6125
- return calculate(new Set([...mainTypes, ...secondaryTypes]), true);
6150
+ // Fallback: include all types, then try to minimize
6151
+ const fallbackSet = new Set([...mainTypes, ...secondaryTypes]);
6152
+ minimizeTypeSet(fallbackSet);
6153
+ return calculate(fallbackSet, true);
6126
6154
  }
6127
6155
 
6128
6156
  const PCD_PREFIX = 'PColumnData/';
@@ -7358,7 +7386,7 @@
7358
7386
  }
7359
7387
  }
7360
7388
 
7361
- var version = "1.51.5";
7389
+ var version = "1.51.9";
7362
7390
 
7363
7391
  const PlatformaSDKVersion = version;
7364
7392