@platforma-sdk/model 1.40.6 → 1.41.1

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/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  var it = Object.defineProperty;
2
2
  var ot = (t, e, n) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var V = (t, e, n) => ot(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { isPColumn as je, mapPObjectData as Ae, isDataInfoEntries as qe, isDataInfo as pe, dataInfoToEntries as st, selectorsToPredicate as Y, resolveAnchors as xe, deriveNativeId as at, isPColumnSpec as oe, isPartitionedDataInfoEntries as lt, getAxisId as k, entriesToDataInfo as ut, canonicalizeAxisId as ct, withEnrichments as Fe, AnchoredIdDeriver as Ie, isPlRef as pt, mapValueInVOE as dt, ensurePColumn as ft, extractAllColumns as ht, mapPTableDef as mt, mapDataInfo as yt, extractConfigGeneric as gt, matchAxisId as U, getColumnIdAndSpec as _e, canonicalizeJson as D, parseJson as Le, visitDataInfo as bt, isPTableAbsent as vt, uniquePlId as Ct, PTableNA as Tt } from "@milaboratories/pl-model-common";
4
+ import { isPColumn as je, mapPObjectData as Ae, isDataInfoEntries as qe, isDataInfo as pe, dataInfoToEntries as st, selectorsToPredicate as Y, resolveAnchors as xe, deriveNativeId as at, isPColumnSpec as oe, isPartitionedDataInfoEntries as lt, getAxisId as k, entriesToDataInfo as ut, canonicalizeAxisId as ct, withEnrichments as Fe, AnchoredIdDeriver as Ie, isPlRef as pt, mapValueInVOE as dt, ensurePColumn as ft, extractAllColumns as ht, mapPTableDef as mt, mapDataInfo as gt, extractConfigGeneric as yt, matchAxisId as U, getColumnIdAndSpec as _e, canonicalizeJson as D, parseJson as Le, visitDataInfo as bt, isPTableAbsent as vt, uniquePlId as Ct, PTableNA as Tt } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
6
  import Be from "canonicalize";
7
7
  import { z as B } from "zod";
@@ -15,7 +15,7 @@ function Pt(t) {
15
15
  if (!t.ok) throw new St(t.errors, t.moreErrors);
16
16
  return t.value;
17
17
  }
18
- function mn(t) {
18
+ function hn(t) {
19
19
  return new Proxy(t, {
20
20
  get(e, n) {
21
21
  return Pt(e[n]);
@@ -28,13 +28,13 @@ function A(t) {
28
28
  function Z(t) {
29
29
  return { type: "GetFromCtx", variable: t };
30
30
  }
31
- function yn(t) {
31
+ function mn(t) {
32
32
  return {
33
33
  type: "Isolate",
34
34
  cfg: t
35
35
  };
36
36
  }
37
- const gn = Z("$args"), bn = Z("$it"), vn = Z("$prod"), Cn = Z("$staging"), Tn = Z("$ui");
37
+ const gn = Z("$args"), yn = Z("$it"), bn = Z("$prod"), vn = Z("$staging"), Cn = Z("$ui");
38
38
  function se(t) {
39
39
  return { type: "Immediate", value: t };
40
40
  }
@@ -46,7 +46,7 @@ function Je(t) {
46
46
  template: e
47
47
  };
48
48
  }
49
- function Sn(...t) {
49
+ function Tn(...t) {
50
50
  const e = [];
51
51
  for (const n of t) e.push(A(n));
52
52
  return {
@@ -61,7 +61,7 @@ function ae(t, e) {
61
61
  field: A(e)
62
62
  };
63
63
  }
64
- function Pn(t, e, n = "$it") {
64
+ function Sn(t, e, n = "$it") {
65
65
  return {
66
66
  type: "MapRecordValues",
67
67
  source: t,
@@ -69,7 +69,7 @@ function Pn(t, e, n = "$it") {
69
69
  itVar: n
70
70
  };
71
71
  }
72
- function An(t, e, n = "$it") {
72
+ function Pn(t, e, n = "$it") {
73
73
  return {
74
74
  type: "MapArrayValues",
75
75
  source: t,
@@ -77,46 +77,46 @@ function An(t, e, n = "$it") {
77
77
  itVar: n
78
78
  };
79
79
  }
80
- function wn(t) {
80
+ function An(t) {
81
81
  return {
82
82
  type: "Flatten",
83
83
  source: t
84
84
  };
85
85
  }
86
- function xn(t) {
86
+ function wn(t) {
87
87
  return {
88
88
  type: "IsEmpty",
89
89
  arg: t
90
90
  };
91
91
  }
92
- function Fn(t) {
92
+ function xn(t) {
93
93
  return {
94
94
  type: "Not",
95
95
  operand: t
96
96
  };
97
97
  }
98
- function In(t, e) {
98
+ function Fn(t, e) {
99
99
  return {
100
100
  type: "And",
101
101
  operand1: t,
102
102
  operand2: e
103
103
  };
104
104
  }
105
- function _n(t, e) {
105
+ function In(t, e) {
106
106
  return {
107
107
  type: "Or",
108
108
  operand1: t,
109
109
  operand2: e
110
110
  };
111
111
  }
112
- function Ln(t, e) {
112
+ function _n(t, e) {
113
113
  return {
114
114
  type: "GetResourceField",
115
115
  source: A(t),
116
116
  field: A(e)
117
117
  };
118
118
  }
119
- function En() {
119
+ function Ln() {
120
120
  return function(t) {
121
121
  return {
122
122
  type: "GetResourceValueAsJson",
@@ -124,7 +124,7 @@ function En() {
124
124
  };
125
125
  };
126
126
  }
127
- function Vn(t, e, n = "$it") {
127
+ function En(t, e, n = "$it") {
128
128
  return {
129
129
  type: "MapResourceFields",
130
130
  source: t,
@@ -132,21 +132,21 @@ function Vn(t, e, n = "$it") {
132
132
  itVar: n
133
133
  };
134
134
  }
135
- function kn(t, e) {
135
+ function Vn(t, e) {
136
136
  return {
137
137
  type: "GetBlobContent",
138
138
  range: e,
139
139
  source: A(t)
140
140
  };
141
141
  }
142
- function On(t, e) {
142
+ function kn(t, e) {
143
143
  return {
144
144
  type: "GetBlobContentAsString",
145
145
  range: e,
146
146
  source: A(t)
147
147
  };
148
148
  }
149
- function Dn() {
149
+ function On() {
150
150
  return function(t, e) {
151
151
  return {
152
152
  type: "GetBlobContentAsJson",
@@ -155,53 +155,53 @@ function Dn() {
155
155
  };
156
156
  };
157
157
  }
158
- function Rn(t) {
158
+ function Dn(t) {
159
159
  return {
160
160
  type: "GetDownloadedBlobContent",
161
161
  source: A(t)
162
162
  };
163
163
  }
164
- function Nn(t) {
164
+ function Rn(t) {
165
165
  return {
166
166
  type: "GetOnDemandBlobContent",
167
167
  source: A(t)
168
168
  };
169
169
  }
170
- function Un(t, e) {
170
+ function Nn(t, e) {
171
171
  return {
172
172
  type: "ExtractArchiveAndGetURL",
173
173
  format: e,
174
174
  source: A(t)
175
175
  };
176
176
  }
177
- function Kn(t) {
177
+ function Un(t) {
178
178
  return {
179
179
  type: "GetImportProgress",
180
180
  source: A(t)
181
181
  };
182
182
  }
183
- function Mn(t, e) {
183
+ function Kn(t, e) {
184
184
  return {
185
185
  type: "GetLastLogs",
186
186
  source: A(t),
187
187
  lines: e
188
188
  };
189
189
  }
190
- function jn(t, e) {
190
+ function Mn(t, e) {
191
191
  return {
192
192
  type: "GetProgressLog",
193
193
  source: A(t),
194
194
  patternToSearch: e
195
195
  };
196
196
  }
197
- function qn(t, e) {
197
+ function jn(t, e) {
198
198
  return {
199
199
  type: "GetProgressLogWithInfo",
200
200
  source: A(t),
201
201
  patternToSearch: e
202
202
  };
203
203
  }
204
- function Bn(t) {
204
+ function qn(t) {
205
205
  return {
206
206
  type: "GetLogHandle",
207
207
  source: A(t)
@@ -257,7 +257,7 @@ class L {
257
257
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
258
258
  }
259
259
  }
260
- function ge(t, e) {
260
+ function ye(t, e) {
261
261
  return t === void 0 ? void 0 : e(t);
262
262
  }
263
263
  class O {
@@ -299,7 +299,7 @@ class O {
299
299
  ...this.resolvePath,
300
300
  ...n.map((i) => typeof i == "string" ? i : i.field)
301
301
  ];
302
- return ge(
302
+ return ye(
303
303
  b().resolveWithCommon(this.handle, e, ...n),
304
304
  (i) => new O(i, r)
305
305
  );
@@ -321,7 +321,7 @@ class O {
321
321
  }
322
322
  getError() {
323
323
  const e = [...this.resolvePath, "error"];
324
- return ge(
324
+ return ye(
325
325
  b().getError(this.handle),
326
326
  (n) => new O(n, e)
327
327
  );
@@ -504,7 +504,7 @@ function It(t) {
504
504
  const e = /* @__PURE__ */ new Set();
505
505
  return be(e, /* @__PURE__ */ new Set(), t), e;
506
506
  }
507
- const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
507
+ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
508
508
  __proto__: null,
509
509
  GlobalCfgRenderCtxFeatureFlags: Ft,
510
510
  MainAccessorName: Ge,
@@ -520,11 +520,11 @@ const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
520
520
  function ze(t, e, n = {}) {
521
521
  const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s = t.map((d) => {
522
522
  var c, v;
523
- const g = e(d);
524
- let p, y, C;
525
- "spec" in g && typeof g.spec == "object" ? (p = g.spec, y = g.prefixTrace, C = g.suffixTrace) : p = g;
523
+ const y = e(d);
524
+ let p, g, C;
525
+ "spec" in y && typeof y.spec == "object" ? (p = y.spec, g = y.prefixTrace, C = y.suffixTrace) : p = y;
526
526
  const E = (c = p.annotations) == null ? void 0 : c[_t], x = (v = p.annotations) == null ? void 0 : v[Lt], S = (x ? Vt.safeParse(JSON.parse(x)).data : void 0) ?? [], P = [
527
- ...y ?? [],
527
+ ...g ?? [],
528
528
  ...S,
529
529
  ...C ?? []
530
530
  ];
@@ -552,15 +552,15 @@ function ze(t, e, n = {}) {
552
552
  fullTrace: T
553
553
  };
554
554
  }), a = [], l = [], u = [...r];
555
- u.sort(([, d], [, g]) => g - d);
555
+ u.sort(([, d], [, y]) => y - d);
556
556
  for (const [d] of u)
557
557
  d.endsWith("@1") || o.get(d) === t.length ? a.push(d) : l.push(d);
558
- const h = (d, g = !1) => {
558
+ const h = (d, y = !1) => {
559
559
  const p = [];
560
- for (let y = 0; y < s.length; y++) {
561
- const C = s[y], E = C.fullTrace.filter((P) => d.has(P.fullType) || i && i.has(P.type));
560
+ for (let g = 0; g < s.length; g++) {
561
+ const C = s[g], E = C.fullTrace.filter((P) => d.has(P.fullType) || i && i.has(P.type));
562
562
  if (E.length === 0)
563
- if (g)
563
+ if (y)
564
564
  p.push({
565
565
  label: "Unlabeled",
566
566
  value: C.value
@@ -584,8 +584,8 @@ function ze(t, e, n = {}) {
584
584
  n.includeNativeLabel && d.add(Ee);
585
585
  for (let p = 0; p < f; ++p) d.add(a[p]);
586
586
  m >= 0 && d.add(a[m]);
587
- const g = h(d);
588
- if (g !== void 0 && new Set(g.map((p) => p.label)).size === t.length) return g;
587
+ const y = h(d);
588
+ if (y !== void 0 && new Set(y.map((p) => p.label)).size === t.length) return y;
589
589
  m++, m >= a.length && (f++, m = f);
590
590
  }
591
591
  return h(/* @__PURE__ */ new Set([...a, ...l]), !0);
@@ -624,7 +624,7 @@ function Ye(t, e, n, r = [], i) {
624
624
  throw new Error(`Unknown resource type: ${t.resourceType.name}`);
625
625
  }
626
626
  }
627
- function $n(t, e, n = !1) {
627
+ function Jn(t, e, n = !1) {
628
628
  const r = [];
629
629
  return { isComplete: Ye(t, e, r, [], n), data: r };
630
630
  }
@@ -961,21 +961,21 @@ class Q {
961
961
  };
962
962
  let u = () => !1;
963
963
  if (a) {
964
- const p = (Array.isArray(a) ? a : [a]).map((y) => {
965
- if (Ve(y)) {
964
+ const p = (Array.isArray(a) ? a : [a]).map((g) => {
965
+ if (Ve(g)) {
966
966
  if (!r)
967
967
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
968
- return Y(xe(r.anchors, y, n));
968
+ return Y(xe(r.anchors, g, n));
969
969
  } else
970
- return Y(y);
970
+ return Y(g);
971
971
  });
972
- u = (y) => p.some((C) => C(y));
972
+ u = (g) => p.some((C) => C(g));
973
973
  }
974
974
  const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], m = /* @__PURE__ */ new Set();
975
975
  for (const p of h) {
976
- const y = Ve(p);
976
+ const g = Ve(p);
977
977
  let C;
978
- if (y) {
978
+ if (g) {
979
979
  if (!r)
980
980
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
981
981
  C = xe(r.anchors, p, n);
@@ -1064,8 +1064,8 @@ class Q {
1064
1064
  suffixTrace: p.type === "split" ? qt(p.axisFilters) : void 0
1065
1065
  }),
1066
1066
  l
1067
- ), g = [];
1068
- for (const { value: p, label: y } of d) {
1067
+ ), y = [];
1068
+ for (const { value: p, label: g } of d) {
1069
1069
  const { originalColumn: C, spec: E } = p, x = p.type === "split" ? p.axisFilters : void 0, S = Bt(x);
1070
1070
  let P;
1071
1071
  r ? P = r.deriveS(E, S) : P = Jt(C.id, S);
@@ -1074,16 +1074,16 @@ class Q {
1074
1074
  ...T,
1075
1075
  annotations: {
1076
1076
  ...T.annotations ?? {},
1077
- "pl7.app/label": y
1077
+ "pl7.app/label": g
1078
1078
  }
1079
- }), g.push({
1079
+ }), y.push({
1080
1080
  id: P,
1081
1081
  spec: T,
1082
1082
  data: () => p.type === "split" ? ut(Kt(p.dataEntries, S)) : p.originalColumn.data,
1083
- label: y
1083
+ label: g
1084
1084
  });
1085
1085
  }
1086
- return g;
1086
+ return y;
1087
1087
  }
1088
1088
  getColumns(e, n) {
1089
1089
  const r = this.getUniversalEntries(e, {
@@ -1149,7 +1149,7 @@ function he(t, e) {
1149
1149
  return !0;
1150
1150
  }
1151
1151
  function ke(t) {
1152
- return Ae(t, (e) => e instanceof O ? e.handle : pe(e) ? yt(e, (n) => n.handle) : e);
1152
+ return Ae(t, (e) => e instanceof O ? e.handle : pe(e) ? gt(e, (n) => n.handle) : e);
1153
1153
  }
1154
1154
  class Wt {
1155
1155
  constructor() {
@@ -1462,7 +1462,7 @@ class ne {
1462
1462
  // return this.ctx.featureFlags;
1463
1463
  // }
1464
1464
  getNamedAccessor(e) {
1465
- return ge(
1465
+ return ye(
1466
1466
  this.ctx.getAccessorHandleByName(e),
1467
1467
  (n) => new O(n, [e])
1468
1468
  );
@@ -1535,7 +1535,7 @@ class ne {
1535
1535
  this.ctx.logError(e);
1536
1536
  }
1537
1537
  }
1538
- const X = "1.40.6";
1538
+ const X = "1.41.1";
1539
1539
  function Gt(t) {
1540
1540
  return t.__renderLambda === !0;
1541
1541
  }
@@ -1543,8 +1543,8 @@ function me(t) {
1543
1543
  if (t !== void 0)
1544
1544
  return Gt(t) ? t.handle : t;
1545
1545
  }
1546
- function Wn(t) {
1547
- return gt(t);
1546
+ function $n(t) {
1547
+ return yt(t);
1548
1548
  }
1549
1549
  const w = class w {
1550
1550
  constructor(e, n, r, i, o, s, a, l, u) {
@@ -1712,6 +1712,20 @@ const w = class w {
1712
1712
  this._featureFlags
1713
1713
  );
1714
1714
  }
1715
+ /** Sets or overrides feature flags for the block. */
1716
+ withFeatureFlags(e) {
1717
+ return new w(
1718
+ this._renderingMode,
1719
+ this._initialArgs,
1720
+ this._initialUiState,
1721
+ this._outputs,
1722
+ this._inputsValid,
1723
+ this._sections,
1724
+ this._title,
1725
+ this._enrichmentTargets,
1726
+ { ...this._featureFlags, ...e }
1727
+ );
1728
+ }
1715
1729
  /**
1716
1730
  * Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
1717
1731
  * Influences dependency graph construction.
@@ -1732,9 +1746,16 @@ const w = class w {
1732
1746
  /** Renders all provided block settings into a pre-configured platforma API
1733
1747
  * instance, that can be used in frontend to interact with block state, and
1734
1748
  * other features provided by the platforma to the block. */
1735
- done() {
1749
+ done(e) {
1750
+ const n = e ?? 1;
1751
+ return this.withFeatureFlags({
1752
+ ...this._featureFlags,
1753
+ requiresUIAPIVersion: n
1754
+ })._done(n);
1755
+ }
1756
+ _done(e) {
1736
1757
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
1737
- const e = {
1758
+ const n = {
1738
1759
  v3: {
1739
1760
  sdkVersion: X,
1740
1761
  renderingMode: this._renderingMode,
@@ -1754,10 +1775,10 @@ const w = class w {
1754
1775
  inputsValid: me(this._inputsValid),
1755
1776
  sections: me(this._sections),
1756
1777
  outputs: Object.fromEntries(
1757
- Object.entries(this._outputs).map(([n, r]) => [n, me(r)])
1778
+ Object.entries(this._outputs).map(([r, i]) => [r, me(i)])
1758
1779
  )
1759
1780
  };
1760
- return At() ? $e({ sdkVersion: X }) : { config: e };
1781
+ return globalThis.platformaApiVersion = e, At() ? $e({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n };
1761
1782
  }
1762
1783
  };
1763
1784
  V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
@@ -1889,29 +1910,29 @@ function Qt(t) {
1889
1910
  var e;
1890
1911
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
1891
1912
  }
1892
- function ye(t, e) {
1913
+ function ge(t, e) {
1893
1914
  return [...new Map(t.map((n) => [e(n), n])).values()];
1894
1915
  }
1895
- function Gn(t, e, n, r) {
1916
+ function Wn(t, e, n, r) {
1896
1917
  if (e.length === 0) return;
1897
1918
  const i = e.filter((c) => Pe(c.spec) || !Yt(c.spec)), o = Ht(n), s = zt(t.resultPool);
1898
1919
  if (!s) return;
1899
1920
  const a = Re(i.map(_e), s), l = [...i, ...a], h = [
1900
- ...ye(
1921
+ ...ge(
1901
1922
  [...l.flatMap((c) => c.spec.axesSpec.map((v) => k(v)))],
1902
1923
  (c) => D(c)
1903
1924
  ).map((c) => ({ type: "axis", id: c })),
1904
1925
  ...l.map((c) => ({ type: "column", id: c.id }))
1905
- ], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full", g = o.pTableParams.partitionFilters.filter((c) => {
1926
+ ], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full", y = o.pTableParams.partitionFilters.filter((c) => {
1906
1927
  const v = m(c.column);
1907
1928
  return v || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1908
- }), p = ye(
1929
+ }), p = ge(
1909
1930
  [...(r == null ? void 0 : r.filters) ?? [], ...o.pTableParams.filters],
1910
1931
  (c) => D(c.column)
1911
1932
  ).filter((c) => {
1912
1933
  const v = m(c.column);
1913
1934
  return v || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1914
- }), y = ye(
1935
+ }), g = ge(
1915
1936
  [...(r == null ? void 0 : r.sorting) ?? [], ...o.pTableParams.sorting],
1916
1937
  (c) => D(c.column)
1917
1938
  ).filter((c) => {
@@ -1921,9 +1942,9 @@ function Gn(t, e, n, r) {
1921
1942
  columns: i,
1922
1943
  labelColumns: a,
1923
1944
  coreJoinType: d,
1924
- partitionFilters: g,
1945
+ partitionFilters: y,
1925
1946
  filters: p,
1926
- sorting: y,
1947
+ sorting: g,
1927
1948
  coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
1928
1949
  }), E = t.createPTable(C), x = new Set((() => {
1929
1950
  if (d === "inner") return [];
@@ -1933,16 +1954,16 @@ function Gn(t, e, n, r) {
1933
1954
  i.filter((c) => Pe(c.spec)).forEach((c) => x.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((v) => {
1934
1955
  var I;
1935
1956
  return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r, v.spec) ? [v.id] : [];
1936
- }).forEach((v) => x.delete(v)), [...g.map((c) => c.column), ...p.map((c) => c.column), ...y.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => x.delete(c.id));
1957
+ }).forEach((v) => x.delete(v)), [...y.map((c) => c.column), ...p.map((c) => c.column), ...g.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => x.delete(c.id));
1937
1958
  const S = i.filter((c) => !x.has(c.id)), P = Re(S.map(_e), s);
1938
1959
  if (!Xt([...S, ...P])) return;
1939
1960
  const T = Ne({
1940
1961
  columns: S,
1941
1962
  labelColumns: P,
1942
1963
  coreJoinType: d,
1943
- partitionFilters: g,
1964
+ partitionFilters: y,
1944
1965
  filters: p,
1945
- sorting: y,
1966
+ sorting: g,
1946
1967
  coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
1947
1968
  }), F = t.createPTable(T);
1948
1969
  return {
@@ -1951,7 +1972,7 @@ function Gn(t, e, n, r) {
1951
1972
  visibleTableHandle: F
1952
1973
  };
1953
1974
  }
1954
- function Hn(t, e, n) {
1975
+ function Gn(t, e, n) {
1955
1976
  const r = t.resultPool.findLabels(e);
1956
1977
  return {
1957
1978
  axis: e,
@@ -2037,10 +2058,10 @@ function sn(t, e) {
2037
2058
  }), i = en(r), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = i.map((u) => {
2038
2059
  const h = /* @__PURE__ */ new Set();
2039
2060
  return u.map((f, m) => {
2040
- const d = e.spec.axesSpec[m].domain, g = f.domain;
2041
- return Object.entries(g ?? {}).forEach(([p, y]) => {
2061
+ const d = e.spec.axesSpec[m].domain, y = f.domain;
2062
+ return Object.entries(y ?? {}).forEach(([p, g]) => {
2042
2063
  if ((d == null ? void 0 : d[p]) === void 0) {
2043
- const C = JSON.stringify([p, y]);
2064
+ const C = JSON.stringify([p, g]);
2044
2065
  h.add(C), o.add(C);
2045
2066
  }
2046
2067
  }), {
@@ -2054,22 +2075,22 @@ function sn(t, e) {
2054
2075
  });
2055
2076
  const l = i.map((u, h) => {
2056
2077
  var p;
2057
- const f = Zt(e.id, u.map((y) => y.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ue]) ?? "", d = [...a[h]].filter((y) => s.has(y)).sort().map((y) => {
2078
+ const f = Zt(e.id, u.map((g) => g.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ue]) ?? "", d = [...a[h]].filter((g) => s.has(g)).sort().map((g) => {
2058
2079
  var C;
2059
- return (C = JSON.parse(y)) == null ? void 0 : C[1];
2060
- }).join(" / "), g = {
2080
+ return (C = JSON.parse(g)) == null ? void 0 : C[1];
2081
+ }).join(" / "), y = {
2061
2082
  ...e.spec.annotations,
2062
2083
  [tn]: "true"
2063
2084
  };
2064
- return (m || d) && (g[Ue] = m && d ? m + " / " + d : m + d), {
2085
+ return (m || d) && (y[Ue] = m && d ? m + " / " + d : m + d), {
2065
2086
  id: f,
2066
2087
  spec: {
2067
2088
  ...e.spec,
2068
- axesSpec: u.map((y, C) => ({
2069
- ...y,
2089
+ axesSpec: u.map((g, C) => ({
2090
+ ...g,
2070
2091
  annotations: e.spec.axesSpec[C].annotations
2071
2092
  })),
2072
- annotations: g
2093
+ annotations: y
2073
2094
  },
2074
2095
  data: e.data
2075
2096
  };
@@ -2085,7 +2106,7 @@ function an(t) {
2085
2106
  function re(t) {
2086
2107
  return t.every(an);
2087
2108
  }
2088
- function zn(t, e) {
2109
+ function Hn(t, e) {
2089
2110
  if (!e) {
2090
2111
  const f = new Q();
2091
2112
  f.addColumnProvider(t.resultPool);
@@ -2093,10 +2114,10 @@ function zn(t, e) {
2093
2114
  if (!re(m))
2094
2115
  return;
2095
2116
  const d = new Map(m.flatMap((p) => p.spec.axesSpec).map((p) => {
2096
- const y = k(p);
2097
- return [D(y), y];
2098
- })), g = Ke(d, m);
2099
- return t.createPFrame(g);
2117
+ const g = k(p);
2118
+ return [D(g), g];
2119
+ })), y = Ke(d, m);
2120
+ return t.createPFrame(y);
2100
2121
  }
2101
2122
  if (!re(e))
2102
2123
  return;
@@ -2113,8 +2134,8 @@ function zn(t, e) {
2113
2134
  r.set(...f), i.set(...f);
2114
2135
  const a = (n.getColumns((f) => f.axesSpec.some((m) => {
2115
2136
  const d = k(m);
2116
- for (const g of r.values())
2117
- if (U(g, d))
2137
+ for (const y of r.values())
2138
+ if (U(y, d))
2118
2139
  return !0;
2119
2140
  return !1;
2120
2141
  }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !Se(f.spec));
@@ -2127,8 +2148,8 @@ function zn(t, e) {
2127
2148
  }
2128
2149
  const l = (n.getColumns((f) => f.axesSpec.some((m) => {
2129
2150
  const d = k(m);
2130
- for (const g of i.values())
2131
- if (U(g, d))
2151
+ for (const y of i.values())
2152
+ if (U(y, d))
2132
2153
  return !0;
2133
2154
  return !1;
2134
2155
  }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => Se(f.spec));
@@ -2137,7 +2158,7 @@ function zn(t, e) {
2137
2158
  const u = [...a, ...l], h = Ke(r, u);
2138
2159
  return t.createPFrame(h);
2139
2160
  }
2140
- function Xn({
2161
+ function zn({
2141
2162
  selection: t,
2142
2163
  columnId: e = Ct(),
2143
2164
  label: n = "Selection marker",
@@ -2163,7 +2184,7 @@ function Xn({
2163
2184
  data: i
2164
2185
  };
2165
2186
  }
2166
- function Yn(t) {
2187
+ function Xn(t) {
2167
2188
  return t === Tt ? (console.error("Axis value can never be N/A"), "") : t;
2168
2189
  }
2169
2190
  function ln(t) {
@@ -2539,13 +2560,13 @@ const Ze = {
2539
2560
  supportedFor: () => !1
2540
2561
  }
2541
2562
  };
2542
- function Qn(t) {
2563
+ function Yn(t) {
2543
2564
  return t ? Object.entries(Ze).filter(([e, n]) => n.supportedFor(t)).map(([e, n]) => ({
2544
2565
  label: n.label,
2545
2566
  value: e
2546
2567
  })) : [];
2547
2568
  }
2548
- function Zn(t) {
2569
+ function Qn(t) {
2549
2570
  return Ze[t];
2550
2571
  }
2551
2572
  function we(t) {
@@ -2671,7 +2692,7 @@ function we(t) {
2671
2692
  function Me(t) {
2672
2693
  return t.filter((e) => e.type !== void 0).map(we);
2673
2694
  }
2674
- function er(t) {
2695
+ function Zn(t) {
2675
2696
  return {
2676
2697
  title: t.title,
2677
2698
  mode: t.mode,
@@ -2681,7 +2702,7 @@ function er(t) {
2681
2702
  }))
2682
2703
  };
2683
2704
  }
2684
- class tr {
2705
+ class er {
2685
2706
  constructor(e) {
2686
2707
  this.handle = e;
2687
2708
  }
@@ -2712,24 +2733,20 @@ function un(t) {
2712
2733
  name: ae(t, "name")
2713
2734
  });
2714
2735
  }
2715
- function nr(t) {
2736
+ function tr(t) {
2716
2737
  return Je({
2717
2738
  ref: un(ae(t, "ref")),
2718
2739
  label: ae(t, "label")
2719
2740
  });
2720
2741
  }
2721
- const rr = {
2742
+ const nr = {
2722
2743
  sdkVersion: X
2723
2744
  };
2724
- function cn() {
2725
- return $e({ sdkVersion: X });
2745
+ function rr() {
2746
+ return platformaApiVersion ?? 1;
2726
2747
  }
2727
- function ir(t) {
2728
- try {
2729
- return cn();
2730
- } catch {
2731
- return t;
2732
- }
2748
+ function ir() {
2749
+ return $e({ sdkVersion: X, apiVersion: platformaApiVersion });
2733
2750
  }
2734
2751
  function or(t) {
2735
2752
  if (typeof globalThis.getEnvironmentValue == "function")
@@ -2738,19 +2755,19 @@ function or(t) {
2738
2755
  export {
2739
2756
  gn as Args,
2740
2757
  Oe as BlockModel,
2741
- rr as CurrentSdkInfo,
2758
+ nr as CurrentSdkInfo,
2742
2759
  L as FutureRef,
2743
2760
  tn as IS_VIRTUAL_COLUMN,
2744
- bn as It,
2745
- Jn as JsRenderInternal,
2761
+ yn as It,
2762
+ Bn as JsRenderInternal,
2746
2763
  Ue as LABEL_ANNOTATION,
2747
2764
  nn as LINKER_COLUMN_ANNOTATION,
2748
- vn as MainOutputs,
2765
+ bn as MainOutputs,
2749
2766
  St as OutputError,
2750
2767
  _t as PAnnotationLabel,
2751
2768
  Lt as PAnnotationTrace,
2752
2769
  Q as PColumnCollection,
2753
- tr as PFrameImpl,
2770
+ er as PFrameImpl,
2754
2771
  J as RT_BINARY_PARTITIONED,
2755
2772
  z as RT_BINARY_SUPER_PARTITIONED,
2756
2773
  H as RT_JSON_PARTITIONED,
@@ -2759,83 +2776,83 @@ export {
2759
2776
  ue as RT_RESOURCE_MAP_PARTITIONED,
2760
2777
  ne as RenderCtx,
2761
2778
  Wt as ResultPool,
2762
- Cn as StagingOutputs,
2779
+ vn as StagingOutputs,
2763
2780
  Vt as Trace,
2764
2781
  Et as TraceEntry,
2765
2782
  O as TreeNodeAccessor,
2766
- Tn as UiState,
2783
+ Cn as UiState,
2767
2784
  Xt as allColumnsComputed,
2768
2785
  re as allColumnsReady,
2769
- In as and,
2770
- er as compileAnnotationScript,
2786
+ Fn as and,
2787
+ Zn as compileAnnotationScript,
2771
2788
  we as compileFilter,
2772
2789
  Me as compileFilters,
2773
2790
  Ut as convertOrParsePColumnData,
2774
- zn as createPFrameForGraphs,
2775
- Hn as createPlDataTableSheet,
2791
+ Hn as createPFrameForGraphs,
2792
+ Gn as createPlDataTableSheet,
2776
2793
  De as createPlDataTableStateV2,
2777
- Gn as createPlDataTableV2,
2778
- Xn as createRowSelectionColumn,
2794
+ Wn as createPlDataTableV2,
2795
+ zn as createRowSelectionColumn,
2779
2796
  ze as deriveLabels,
2780
2797
  me as downgradeCfgOrLambda,
2781
2798
  Ke as enrichCompatible,
2782
- Un as extractArchiveAndGetURL,
2783
- Wn as extractConfig,
2799
+ Nn as extractArchiveAndGetURL,
2800
+ $n as extractConfig,
2784
2801
  Kt as filterDataInfoEntries,
2785
2802
  Ze as filterUiMetadata,
2786
- wn as flatten,
2787
- nr as fromPlOption,
2803
+ An as flatten,
2804
+ tr as fromPlOption,
2788
2805
  un as fromPlRef,
2789
2806
  zt as getAllLabelColumns,
2790
2807
  on as getAvailableWithLinkersAxes,
2791
- kn as getBlobContent,
2792
- Dn as getBlobContentAsJson,
2793
- On as getBlobContentAsString,
2794
- Rn as getDownloadedBlobContent,
2808
+ Vn as getBlobContent,
2809
+ On as getBlobContentAsJson,
2810
+ kn as getBlobContentAsString,
2811
+ Dn as getDownloadedBlobContent,
2795
2812
  or as getEnvironmentValue,
2796
- Zn as getFilterUiMetadata,
2797
- Qn as getFilterUiTypeOptions,
2813
+ Qn as getFilterUiMetadata,
2814
+ Yn as getFilterUiTypeOptions,
2798
2815
  Z as getFromCfg,
2799
2816
  se as getImmediate,
2800
- Kn as getImportProgress,
2817
+ Un as getImportProgress,
2801
2818
  ae as getJsonField,
2802
- Mn as getLastLogs,
2819
+ Kn as getLastLogs,
2803
2820
  rn as getLinkerColumnsMap,
2804
- Bn as getLogHandle,
2821
+ qn as getLogHandle,
2805
2822
  Re as getMatchingLabelColumns,
2806
- Nn as getOnDemandBlobContent,
2823
+ Rn as getOnDemandBlobContent,
2807
2824
  Dt as getPartitionKeysList,
2808
- ir as getPlatformaOrDefault,
2809
- jn as getProgressLog,
2810
- qn as getProgressLogWithInfo,
2811
- cn as getRawPlatformaInstance,
2812
- Ln as getResourceField,
2813
- En as getResourceValueAsJson,
2825
+ rr as getPlatformaApiVersion,
2826
+ Mn as getProgressLog,
2827
+ jn as getProgressLogWithInfo,
2828
+ ir as getRawPlatformaInstance,
2829
+ _n as getResourceField,
2830
+ Ln as getResourceValueAsJson,
2814
2831
  Nt as getUniquePartitionKeys,
2815
- ge as ifDef,
2832
+ ye as ifDef,
2816
2833
  Yt as isColumnHidden,
2817
2834
  Qt as isColumnOptional,
2818
2835
  an as isColumnReady,
2819
2836
  Gt as isConfigLambda,
2820
- xn as isEmpty,
2837
+ wn as isEmpty,
2821
2838
  Se as isLabelColumn,
2822
2839
  Pe as isLinkerColumn,
2823
- yn as isolate,
2824
- Sn as makeArray,
2840
+ mn as isolate,
2841
+ Tn as makeArray,
2825
2842
  Qe as makeDefaultPTableParams,
2826
2843
  Je as makeObject,
2827
- An as mapArrayValues,
2828
- Yn as mapPTableValueToAxisKey,
2829
- Pn as mapRecordValues,
2830
- Vn as mapResourceFields,
2831
- Fn as not,
2832
- _n as or,
2844
+ Pn as mapArrayValues,
2845
+ Xn as mapPTableValueToAxisKey,
2846
+ Sn as mapRecordValues,
2847
+ En as mapResourceFields,
2848
+ xn as not,
2849
+ In as or,
2833
2850
  Ce as parsePColumnData,
2834
- $n as parseResourceMap,
2851
+ Jn as parseResourceMap,
2835
2852
  Pt as readOutput,
2836
- ye as uniqueBy,
2853
+ ge as uniqueBy,
2837
2854
  ln as unreachable,
2838
2855
  Ht as upgradePlDataTableStateV2,
2839
- mn as wrapOutputs
2856
+ hn as wrapOutputs
2840
2857
  };
2841
2858
  //# sourceMappingURL=index.mjs.map