@milaboratories/milaboratories.ui-examples.model 1.2.46 → 1.3.0

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.ui-examples.model@1.2.46 build /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
3
+ > @milaboratories/milaboratories.ui-examples.model@1.3.0 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
  
9
9
  ./src/index.ts → dist, dist...
10
- created dist, dist in 5.3s
10
+ created dist, dist in 9.9s
11
11
  
12
12
  ./src/index.ts → dist...
13
13
  (!) Circular dependency
14
14
  ../../../../sdk/model/dist/components/PFrameForGraphs.js -> ../../../../sdk/model/dist/components/PlDataTable.js -> ../../../../sdk/model/dist/components/PFrameForGraphs.js
15
- created dist in 2.8s
15
+ created dist in 7.7s
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.2.46 type-check /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
3
+ > @milaboratories/milaboratories.ui-examples.model@1.3.0 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,16 @@
1
1
  # @milaboratories/milaboratories.ui-examples.model
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3ef2381: Generelazation filters and annotations
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [3ef2381]
12
+ - @platforma-sdk/model@1.45.0
13
+
3
14
  ## 1.2.46
4
15
 
5
16
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -5528,6 +5528,89 @@
5528
5528
  const StagingAccessorName = 'staging';
5529
5529
  const MainAccessorName = 'main';
5530
5530
 
5531
+ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
5532
+ // Sort filters by axis index in descending order to safely remove elements from arrays
5533
+ const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
5534
+ // Check for invalid filter axes
5535
+ const { type } = dataInfoEntries;
5536
+ switch (type) {
5537
+ case 'Json': {
5538
+ const { keyLength } = dataInfoEntries;
5539
+ for (const [axisIdx] of axisFilters)
5540
+ if (axisIdx >= keyLength)
5541
+ throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
5542
+ break;
5543
+ }
5544
+ case 'JsonPartitioned':
5545
+ case 'BinaryPartitioned':
5546
+ case 'ParquetPartitioned': {
5547
+ const { partitionKeyLength } = dataInfoEntries;
5548
+ for (const [axisIdx] of axisFilters)
5549
+ if (axisIdx >= partitionKeyLength)
5550
+ throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
5551
+ break;
5552
+ }
5553
+ default:
5554
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
5555
+ throw new Error(`Unsupported data info type: ${type}`);
5556
+ }
5557
+ const keyMatchesFilters = (key) => {
5558
+ for (const [axisIdx, axisValue] of sortedFilters)
5559
+ if (key[axisIdx] !== axisValue)
5560
+ return false;
5561
+ return true;
5562
+ };
5563
+ const removeFilteredAxes = (key) => {
5564
+ const newKey = [...key];
5565
+ // Remove axes in descending order to maintain correct indices
5566
+ for (const [axisIdx] of sortedFilters)
5567
+ newKey.splice(axisIdx, 1);
5568
+ return newKey;
5569
+ };
5570
+ switch (dataInfoEntries.type) {
5571
+ case 'Json': return {
5572
+ type: 'Json',
5573
+ keyLength: dataInfoEntries.keyLength - axisFilters.length,
5574
+ data: dataInfoEntries.data
5575
+ .filter((entry) => keyMatchesFilters(entry.key))
5576
+ .map((entry) => ({
5577
+ key: removeFilteredAxes(entry.key),
5578
+ value: entry.value,
5579
+ })),
5580
+ };
5581
+ case 'JsonPartitioned': return {
5582
+ type: 'JsonPartitioned',
5583
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5584
+ parts: dataInfoEntries.parts
5585
+ .filter((entry) => keyMatchesFilters(entry.key))
5586
+ .map((entry) => ({
5587
+ key: removeFilteredAxes(entry.key),
5588
+ value: entry.value,
5589
+ })),
5590
+ };
5591
+ case 'BinaryPartitioned': return {
5592
+ type: 'BinaryPartitioned',
5593
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5594
+ parts: dataInfoEntries.parts
5595
+ .filter((entry) => keyMatchesFilters(entry.key))
5596
+ .map((entry) => ({
5597
+ key: removeFilteredAxes(entry.key),
5598
+ value: entry.value,
5599
+ })),
5600
+ };
5601
+ case 'ParquetPartitioned': return {
5602
+ type: 'ParquetPartitioned',
5603
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5604
+ parts: dataInfoEntries.parts
5605
+ .filter((entry) => keyMatchesFilters(entry.key))
5606
+ .map((entry) => ({
5607
+ key: removeFilteredAxes(entry.key),
5608
+ value: entry.value,
5609
+ })),
5610
+ };
5611
+ }
5612
+ }
5613
+
5531
5614
  const TraceEntry = z.object({
5532
5615
  type: z.string(),
5533
5616
  importance: z.number().optional(),
@@ -6012,89 +6095,6 @@
6012
6095
  throw new Error(`Unexpected input type: ${typeof acc}`);
6013
6096
  }
6014
6097
 
6015
- function filterDataInfoEntries(dataInfoEntries, axisFilters) {
6016
- // Sort filters by axis index in descending order to safely remove elements from arrays
6017
- const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
6018
- // Check for invalid filter axes
6019
- const { type } = dataInfoEntries;
6020
- switch (type) {
6021
- case 'Json': {
6022
- const { keyLength } = dataInfoEntries;
6023
- for (const [axisIdx] of axisFilters)
6024
- if (axisIdx >= keyLength)
6025
- throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
6026
- break;
6027
- }
6028
- case 'JsonPartitioned':
6029
- case 'BinaryPartitioned':
6030
- case 'ParquetPartitioned': {
6031
- const { partitionKeyLength } = dataInfoEntries;
6032
- for (const [axisIdx] of axisFilters)
6033
- if (axisIdx >= partitionKeyLength)
6034
- throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
6035
- break;
6036
- }
6037
- default:
6038
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
6039
- throw new Error(`Unsupported data info type: ${type}`);
6040
- }
6041
- const keyMatchesFilters = (key) => {
6042
- for (const [axisIdx, axisValue] of sortedFilters)
6043
- if (key[axisIdx] !== axisValue)
6044
- return false;
6045
- return true;
6046
- };
6047
- const removeFilteredAxes = (key) => {
6048
- const newKey = [...key];
6049
- // Remove axes in descending order to maintain correct indices
6050
- for (const [axisIdx] of sortedFilters)
6051
- newKey.splice(axisIdx, 1);
6052
- return newKey;
6053
- };
6054
- switch (dataInfoEntries.type) {
6055
- case 'Json': return {
6056
- type: 'Json',
6057
- keyLength: dataInfoEntries.keyLength - axisFilters.length,
6058
- data: dataInfoEntries.data
6059
- .filter((entry) => keyMatchesFilters(entry.key))
6060
- .map((entry) => ({
6061
- key: removeFilteredAxes(entry.key),
6062
- value: entry.value,
6063
- })),
6064
- };
6065
- case 'JsonPartitioned': return {
6066
- type: 'JsonPartitioned',
6067
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
6068
- parts: dataInfoEntries.parts
6069
- .filter((entry) => keyMatchesFilters(entry.key))
6070
- .map((entry) => ({
6071
- key: removeFilteredAxes(entry.key),
6072
- value: entry.value,
6073
- })),
6074
- };
6075
- case 'BinaryPartitioned': return {
6076
- type: 'BinaryPartitioned',
6077
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
6078
- parts: dataInfoEntries.parts
6079
- .filter((entry) => keyMatchesFilters(entry.key))
6080
- .map((entry) => ({
6081
- key: removeFilteredAxes(entry.key),
6082
- value: entry.value,
6083
- })),
6084
- };
6085
- case 'ParquetPartitioned': return {
6086
- type: 'ParquetPartitioned',
6087
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
6088
- parts: dataInfoEntries.parts
6089
- .filter((entry) => keyMatchesFilters(entry.key))
6090
- .map((entry) => ({
6091
- key: removeFilteredAxes(entry.key),
6092
- value: entry.value,
6093
- })),
6094
- };
6095
- }
6096
- }
6097
-
6098
6098
  function isPColumnValues(value) {
6099
6099
  if (!Array.isArray(value))
6100
6100
  return false;
@@ -6937,7 +6937,7 @@
6937
6937
  }
6938
6938
  }
6939
6939
 
6940
- var version = "1.44.14";
6940
+ var version = "1.45.0";
6941
6941
 
6942
6942
  const PlatformaSDKVersion = version;
6943
6943
 
@@ -7757,6 +7757,7 @@
7757
7757
  { type: 'link', href: '/typography', label: 'Typography' },
7758
7758
  { type: 'link', href: '/ag-grid-vue', label: 'AgGridVue' },
7759
7759
  { type: 'link', href: '/ag-grid-vue-with-builder', label: 'AgGridVue with builder' },
7760
+ { type: 'link', href: '/pl-annotations', label: 'PlAnnotations' },
7760
7761
  { type: 'link', href: '/pl-ag-data-table-v2', label: 'PlAgDataTableV2' },
7761
7762
  { type: 'link', href: '/pl-splash-page', label: 'PlSplashPage' },
7762
7763
  { type: 'link', href: '/pl-file-input-page', label: 'PlFileInputPage' },