@milaboratories/milaboratories.ui-examples.model 1.2.45 → 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.45 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 9.2s
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 8.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.45 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,23 @@
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
+
14
+ ## 1.2.46
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [31a1ac2]
19
+ - @platforma-sdk/model@1.44.14
20
+
3
21
  ## 1.2.45
4
22
 
5
23
  ### 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(),
@@ -5712,10 +5795,12 @@
5712
5795
  break;
5713
5796
  case RT_JSON_PARTITIONED:
5714
5797
  case RT_BINARY_PARTITIONED:
5798
+ case RT_PARQUET_PARTITIONED:
5715
5799
  keyLength = meta['partitionKeyLength'];
5716
5800
  break;
5717
5801
  case RT_BINARY_SUPER_PARTITIONED:
5718
5802
  case RT_JSON_SUPER_PARTITIONED:
5803
+ case RT_PARQUET_SUPER_PARTITIONED:
5719
5804
  keyLength = meta['superPartitionKeyLength'] + meta['partitionKeyLength'];
5720
5805
  break;
5721
5806
  }
@@ -5723,6 +5808,7 @@
5723
5808
  case RT_RESOURCE_MAP:
5724
5809
  case RT_JSON_PARTITIONED:
5725
5810
  case RT_BINARY_PARTITIONED:
5811
+ case RT_PARQUET_PARTITIONED:
5726
5812
  for (let keyStr of acc.listInputFields()) {
5727
5813
  if (rt === RT_BINARY_PARTITIONED) {
5728
5814
  keyStr = removeIndexSuffix(keyStr).baseKey;
@@ -5734,6 +5820,7 @@
5734
5820
  case RT_RESOURCE_MAP_PARTITIONED:
5735
5821
  case RT_BINARY_SUPER_PARTITIONED:
5736
5822
  case RT_JSON_SUPER_PARTITIONED:
5823
+ case RT_PARQUET_SUPER_PARTITIONED:
5737
5824
  for (const supKeyStr of acc.listInputFields()) {
5738
5825
  const keyPrefix = [...JSON.parse(supKeyStr)];
5739
5826
  const value = acc.resolve({ field: supKeyStr, assertFieldType: 'Input' });
@@ -6008,89 +6095,6 @@
6008
6095
  throw new Error(`Unexpected input type: ${typeof acc}`);
6009
6096
  }
6010
6097
 
6011
- function filterDataInfoEntries(dataInfoEntries, axisFilters) {
6012
- // Sort filters by axis index in descending order to safely remove elements from arrays
6013
- const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
6014
- // Check for invalid filter axes
6015
- const { type } = dataInfoEntries;
6016
- switch (type) {
6017
- case 'Json': {
6018
- const { keyLength } = dataInfoEntries;
6019
- for (const [axisIdx] of axisFilters)
6020
- if (axisIdx >= keyLength)
6021
- throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
6022
- break;
6023
- }
6024
- case 'JsonPartitioned':
6025
- case 'BinaryPartitioned':
6026
- case 'ParquetPartitioned': {
6027
- const { partitionKeyLength } = dataInfoEntries;
6028
- for (const [axisIdx] of axisFilters)
6029
- if (axisIdx >= partitionKeyLength)
6030
- throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
6031
- break;
6032
- }
6033
- default:
6034
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
6035
- throw new Error(`Unsupported data info type: ${type}`);
6036
- }
6037
- const keyMatchesFilters = (key) => {
6038
- for (const [axisIdx, axisValue] of sortedFilters)
6039
- if (key[axisIdx] !== axisValue)
6040
- return false;
6041
- return true;
6042
- };
6043
- const removeFilteredAxes = (key) => {
6044
- const newKey = [...key];
6045
- // Remove axes in descending order to maintain correct indices
6046
- for (const [axisIdx] of sortedFilters)
6047
- newKey.splice(axisIdx, 1);
6048
- return newKey;
6049
- };
6050
- switch (dataInfoEntries.type) {
6051
- case 'Json': return {
6052
- type: 'Json',
6053
- keyLength: dataInfoEntries.keyLength - axisFilters.length,
6054
- data: dataInfoEntries.data
6055
- .filter((entry) => keyMatchesFilters(entry.key))
6056
- .map((entry) => ({
6057
- key: removeFilteredAxes(entry.key),
6058
- value: entry.value,
6059
- })),
6060
- };
6061
- case 'JsonPartitioned': return {
6062
- type: 'JsonPartitioned',
6063
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
6064
- parts: dataInfoEntries.parts
6065
- .filter((entry) => keyMatchesFilters(entry.key))
6066
- .map((entry) => ({
6067
- key: removeFilteredAxes(entry.key),
6068
- value: entry.value,
6069
- })),
6070
- };
6071
- case 'BinaryPartitioned': return {
6072
- type: 'BinaryPartitioned',
6073
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
6074
- parts: dataInfoEntries.parts
6075
- .filter((entry) => keyMatchesFilters(entry.key))
6076
- .map((entry) => ({
6077
- key: removeFilteredAxes(entry.key),
6078
- value: entry.value,
6079
- })),
6080
- };
6081
- case 'ParquetPartitioned': return {
6082
- type: 'ParquetPartitioned',
6083
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
6084
- parts: dataInfoEntries.parts
6085
- .filter((entry) => keyMatchesFilters(entry.key))
6086
- .map((entry) => ({
6087
- key: removeFilteredAxes(entry.key),
6088
- value: entry.value,
6089
- })),
6090
- };
6091
- }
6092
- }
6093
-
6094
6098
  function isPColumnValues(value) {
6095
6099
  if (!Array.isArray(value))
6096
6100
  return false;
@@ -6933,7 +6937,7 @@
6933
6937
  }
6934
6938
  }
6935
6939
 
6936
- var version = "1.44.13";
6940
+ var version = "1.45.0";
6937
6941
 
6938
6942
  const PlatformaSDKVersion = version;
6939
6943
 
@@ -7753,6 +7757,7 @@
7753
7757
  { type: 'link', href: '/typography', label: 'Typography' },
7754
7758
  { type: 'link', href: '/ag-grid-vue', label: 'AgGridVue' },
7755
7759
  { type: 'link', href: '/ag-grid-vue-with-builder', label: 'AgGridVue with builder' },
7760
+ { type: 'link', href: '/pl-annotations', label: 'PlAnnotations' },
7756
7761
  { type: 'link', href: '/pl-ag-data-table-v2', label: 'PlAgDataTableV2' },
7757
7762
  { type: 'link', href: '/pl-splash-page', label: 'PlSplashPage' },
7758
7763
  { type: 'link', href: '/pl-file-input-page', label: 'PlFileInputPage' },