@platforma-sdk/ui-vue 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.
Files changed (94) hide show
  1. package/.turbo/turbo-build.log +49 -22
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +20 -0
  4. package/dist/AgGridVue/useAgGridOptions.js +54 -53
  5. package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
  6. package/dist/components/BlockLayout.vue.d.ts.map +1 -1
  7. package/dist/components/BlockLayout.vue.js +7 -50
  8. package/dist/components/BlockLayout.vue.js.map +1 -1
  9. package/dist/components/BlockLayout.vue2.js +53 -2
  10. package/dist/components/BlockLayout.vue2.js.map +1 -1
  11. package/dist/components/BlockLayout.vue3.js +9 -0
  12. package/dist/components/BlockLayout.vue3.js.map +1 -0
  13. package/dist/components/NotFound.vue.d.ts.map +1 -1
  14. package/dist/components/NotFound.vue.js +12 -14
  15. package/dist/components/NotFound.vue.js.map +1 -1
  16. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +7 -6
  17. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js.map +1 -1
  18. package/dist/components/PlAgDataTable/sources/table-source-v2.js +12 -12
  19. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +10 -9
  20. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js.map +1 -1
  21. package/dist/components/PlAgRowNumHeader.vue.js +3 -2
  22. package/dist/components/PlAgRowNumHeader.vue.js.map +1 -1
  23. package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +10 -10
  24. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.d.ts +1 -1
  25. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.d.ts.map +1 -1
  26. package/dist/components/PlMultiSequenceAlignment/data.js +51 -51
  27. package/dist/composition/fileContent.js +16 -16
  28. package/dist/defineApp.d.ts +19 -6
  29. package/dist/defineApp.d.ts.map +1 -1
  30. package/dist/defineApp.js +50 -30
  31. package/dist/defineApp.js.map +1 -1
  32. package/dist/internal/UpdateSerializer.d.ts +26 -0
  33. package/dist/internal/UpdateSerializer.d.ts.map +1 -0
  34. package/dist/internal/UpdateSerializer.js +65 -0
  35. package/dist/internal/UpdateSerializer.js.map +1 -0
  36. package/dist/internal/createAppModel.d.ts +1 -1
  37. package/dist/internal/createAppModel.d.ts.map +1 -1
  38. package/dist/internal/createAppModel.js +43 -51
  39. package/dist/internal/createAppModel.js.map +1 -1
  40. package/dist/internal/{createApp.d.ts → createAppV1.d.ts} +4 -4
  41. package/dist/internal/createAppV1.d.ts.map +1 -0
  42. package/dist/internal/{createApp.js → createAppV1.js} +17 -18
  43. package/dist/internal/createAppV1.js.map +1 -0
  44. package/dist/internal/createAppV2.d.ts +56 -0
  45. package/dist/internal/createAppV2.d.ts.map +1 -0
  46. package/dist/internal/createAppV2.js +158 -0
  47. package/dist/internal/createAppV2.js.map +1 -0
  48. package/dist/internal/test-helpers/BlockMock.d.ts +28 -0
  49. package/dist/internal/test-helpers/BlockMock.d.ts.map +1 -0
  50. package/dist/internal/test-helpers/createMockApi.d.ts +4 -0
  51. package/dist/internal/test-helpers/createMockApi.d.ts.map +1 -0
  52. package/dist/internal/test-helpers/utils.d.ts +4 -0
  53. package/dist/internal/test-helpers/utils.d.ts.map +1 -0
  54. package/dist/{types.static-test.d.ts → internal/v1.static-test.d.ts} +3 -3
  55. package/dist/internal/v1.static-test.d.ts.map +1 -0
  56. package/dist/internal/v2.static-test.d.ts +7 -0
  57. package/dist/internal/v2.static-test.d.ts.map +1 -0
  58. package/dist/lib/model/common/dist/index.js +214 -199
  59. package/dist/lib/model/common/dist/index.js.map +1 -1
  60. package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js +8 -8
  61. package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +64 -43
  62. package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js.map +1 -1
  63. package/dist/lib/util/helpers/dist/index.js +67 -56
  64. package/dist/lib/util/helpers/dist/index.js.map +1 -1
  65. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js +29 -0
  66. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js.map +1 -0
  67. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/core.js +208 -0
  68. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/core.js.map +1 -0
  69. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/duplex.js +95 -0
  70. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/duplex.js.map +1 -0
  71. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/helpers.js +112 -0
  72. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/helpers.js.map +1 -0
  73. package/dist/sdk/model/dist/index.js +151 -131
  74. package/dist/sdk/model/dist/index.js.map +1 -1
  75. package/dist/types.d.ts +2 -2
  76. package/dist/types.d.ts.map +1 -1
  77. package/package.json +9 -6
  78. package/src/components/BlockLayout.vue +9 -1
  79. package/src/components/NotFound.vue +1 -3
  80. package/src/defineApp.ts +134 -36
  81. package/src/internal/UpdateSerializer.ts +112 -0
  82. package/src/internal/createAppModel.ts +7 -20
  83. package/src/internal/{createApp.ts → createAppV1.ts} +10 -6
  84. package/src/internal/createAppV2.test.ts +158 -0
  85. package/src/internal/createAppV2.ts +309 -0
  86. package/src/internal/test-helpers/BlockMock.ts +144 -0
  87. package/src/internal/test-helpers/createMockApi.ts +92 -0
  88. package/src/internal/test-helpers/utils.ts +65 -0
  89. package/src/{types.static-test.ts → internal/v1.static-test.ts} +5 -9
  90. package/src/internal/v2.static-test.ts +98 -0
  91. package/src/types.ts +2 -2
  92. package/dist/internal/createApp.d.ts.map +0 -1
  93. package/dist/internal/createApp.js.map +0 -1
  94. package/dist/types.static-test.d.ts.map +0 -1
@@ -1,13 +1,13 @@
1
- import { isPTableAbsent as ke, uniquePlId as Ne, PTableNA as De, isDataInfo as ue, extractAllColumns as Re, mapPTableDef as Ue, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as fe, isPlRef as $e, mapValueInVOE as Ke, mapPObjectData as pe, ensurePColumn as je, isPColumnSpec as Y, isPColumn as Ce, resolveAnchors as he, deriveNativeId as Be, isPartitionedDataInfoEntries as Je, getAxisId as ge, entriesToDataInfo as qe, isDataInfoEntries as Se, dataInfoToEntries as Me, canonicalizeAxisId as We, mapDataInfo as He } from "../../../lib/model/common/dist/index.js";
2
- import { PTableAbsent as $t, PValueBytesNA as Kt, PValueIntNA as jt, PValueLongNA as Bt, PValueStringNA as Jt, PlId as qt, PlIdBytes as Mt, PlIdLength as Wt, canonicalizeJson as Ht, ensureError as Xt, getAxesId as Gt, getPTableColumnId as zt, isValueAbsent as Yt, isValueNA as Qt, mapJoinEntry as Zt, matchAxis as en, matchAxisId as tn, matchPColumn as nn, pTableValue as rn, parseJson as sn, stringifyColumnId as an } from "../../../lib/model/common/dist/index.js";
3
- import _e from "../../../_virtual/canonicalize.js";
1
+ import { isPTableAbsent as ke, uniquePlId as Ne, PTableNA as De, isDataInfo as ue, extractAllColumns as Re, mapPTableDef as Ue, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as fe, isPlRef as $e, mapValueInVOE as Ke, mapPObjectData as pe, ensurePColumn as je, isPColumnSpec as Y, isPColumn as Ce, resolveAnchors as he, deriveNativeId as Be, isPartitionedDataInfoEntries as Je, getAxisId as ge, entriesToDataInfo as qe, isDataInfoEntries as _e, dataInfoToEntries as Me, canonicalizeAxisId as We, mapDataInfo as He } from "../../../lib/model/common/dist/index.js";
2
+ import { PTableAbsent as $t, PValueBytesNA as Kt, PValueIntNA as jt, PValueLongNA as Bt, PValueStringNA as Jt, PlId as qt, PlIdBytes as Mt, PlIdLength as Wt, canonicalizeJson as Ht, deserializeError as zt, ensureError as Xt, getAxesId as Gt, getPTableColumnId as Yt, hasAbortError as Qt, isValueAbsent as Zt, isValueNA as en, mapJoinEntry as tn, matchAxis as nn, matchAxisId as rn, matchPColumn as sn, pTableValue as an, parseJson as on, stringifyColumnId as ln, unwrapResult as un } from "../../../lib/model/common/dist/index.js";
3
+ import Se from "../../../_virtual/canonicalize.js";
4
4
  import U from "../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
5
- import { BasePlErrorLike as ln, ErrorLike as un, PlErrorLike as pn, StandardErrorLike as dn, ensureErrorLike as cn } from "../../../lib/model/pl-error-like/dist/index.js";
6
- var Xe = Object.defineProperty, Ge = (n, e, t) => e in n ? Xe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, w = (n, e, t) => Ge(n, typeof e != "symbol" ? e + "" : e, t);
5
+ import { BasePlErrorLike as dn, ErrorLike as cn, PlErrorLike as fn, StandardErrorLike as hn, ensureErrorLike as gn } from "../../../lib/model/pl-error-like/dist/index.js";
6
+ var ze = Object.defineProperty, Xe = (n, e, t) => e in n ? ze(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, w = (n, e, t) => Xe(n, typeof e != "symbol" ? e + "" : e, t);
7
7
  function ee(n) {
8
8
  return { type: "Immediate", value: n };
9
9
  }
10
- function ze() {
10
+ function Ge() {
11
11
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
12
12
  }
13
13
  function we(n) {
@@ -58,7 +58,7 @@ class P {
58
58
  function ie(n, e) {
59
59
  return n === void 0 ? void 0 : e(n);
60
60
  }
61
- class I {
61
+ class A {
62
62
  constructor(e, t) {
63
63
  this.handle = e, this.resolvePath = t;
64
64
  }
@@ -99,7 +99,7 @@ class I {
99
99
  ];
100
100
  return ie(
101
101
  p().resolveWithCommon(this.handle, e, ...t),
102
- (i) => new I(i, r)
102
+ (i) => new A(i, r)
103
103
  );
104
104
  }
105
105
  get resourceType() {
@@ -121,7 +121,7 @@ class I {
121
121
  const e = [...this.resolvePath, "error"];
122
122
  return ie(
123
123
  p().getError(this.handle),
124
- (t) => new I(t, e)
124
+ (t) => new A(t, e)
125
125
  );
126
126
  }
127
127
  listInputFields() {
@@ -179,7 +179,7 @@ class I {
179
179
  const i = {};
180
180
  for (const [s, a] of Object.entries(r)) {
181
181
  const o = [...this.resolvePath, s];
182
- i[s] = pe(a, (l) => new I(l, o));
182
+ i[s] = pe(a, (l) => new A(l, o));
183
183
  }
184
184
  return i;
185
185
  }
@@ -284,33 +284,33 @@ const Ze = "staging", et = "main", tt = "pl7.app/label", nt = "pl7.app/trace", r
284
284
  id: U.string().optional(),
285
285
  label: U.string()
286
286
  }), it = U.array(rt), st = 1e-3, at = "__LABEL__", me = "__LABEL__@1";
287
- function Ie(n, e, t = {}) {
287
+ function Ae(n, e, t = {}) {
288
288
  const r = /* @__PURE__ */ new Map(), i = t.forceTraceElements !== void 0 && t.forceTraceElements.length > 0 ? new Set(t.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), a = n.map((h) => {
289
289
  var C, u;
290
290
  const d = e(h);
291
- let b, A, x;
292
- "spec" in d && typeof d.spec == "object" ? (b = d.spec, A = d.prefixTrace, x = d.suffixTrace) : b = d;
293
- const c = (C = b.annotations) == null ? void 0 : C[tt], S = (u = b.annotations) == null ? void 0 : u[nt], f = (S ? it.safeParse(JSON.parse(S)).data : void 0) ?? [], g = [
294
- ...A ?? [],
291
+ let b, I, x;
292
+ "spec" in d && typeof d.spec == "object" ? (b = d.spec, I = d.prefixTrace, x = d.suffixTrace) : b = d;
293
+ const c = (C = b.annotations) == null ? void 0 : C[tt], _ = (u = b.annotations) == null ? void 0 : u[nt], f = (_ ? it.safeParse(JSON.parse(_)).data : void 0) ?? [], g = [
294
+ ...I ?? [],
295
295
  ...f,
296
296
  ...x ?? []
297
297
  ];
298
298
  if (c !== void 0) {
299
- const _ = { label: c, type: at, importance: -2 };
300
- t.addLabelAsSuffix ? g.push(_) : g.splice(0, 0, _);
299
+ const S = { label: c, type: at, importance: -2 };
300
+ t.addLabelAsSuffix ? g.push(S) : g.splice(0, 0, S);
301
301
  }
302
302
  const m = [], L = /* @__PURE__ */ new Map();
303
- for (let _ = g.length - 1; _ >= 0; --_) {
304
- const { type: j } = g[_], k = g[_].importance ?? 0, D = (L.get(j) ?? 0) + 1;
303
+ for (let S = g.length - 1; S >= 0; --S) {
304
+ const { type: j } = g[S], k = g[S].importance ?? 0, D = (L.get(j) ?? 0) + 1;
305
305
  L.set(j, D);
306
306
  const O = `${j}@${D}`;
307
307
  s.set(O, (s.get(O) ?? 0) + 1), r.set(
308
308
  O,
309
309
  Math.max(
310
310
  r.get(O) ?? Number.NEGATIVE_INFINITY,
311
- k - (g.length - _) * st
311
+ k - (g.length - S) * st
312
312
  )
313
- ), m.push({ ...g[_], fullType: O, occurrenceIndex: D });
313
+ ), m.push({ ...g[S], fullType: O, occurrenceIndex: D });
314
314
  }
315
315
  return m.reverse(), {
316
316
  value: h,
@@ -325,15 +325,15 @@ function Ie(n, e, t = {}) {
325
325
  const K = (h, C = !1) => {
326
326
  const u = [];
327
327
  for (let d = 0; d < a.length; d++) {
328
- const b = a[d], A = b.fullTrace.filter((S) => h.has(S.fullType) || i && i.has(S.type));
329
- if (A.length === 0)
328
+ const b = a[d], I = b.fullTrace.filter((_) => h.has(_.fullType) || i && i.has(_.type));
329
+ if (I.length === 0)
330
330
  if (C)
331
331
  u.push({
332
332
  label: "Unlabeled",
333
333
  value: b.value
334
334
  });
335
335
  else return;
336
- const x = A.map((S) => S.label), c = t.separator ?? " / ";
336
+ const x = I.map((_) => _.label), c = t.separator ?? " / ";
337
337
  u.push({
338
338
  label: x.join(c),
339
339
  value: b.value
@@ -357,7 +357,7 @@ function Ie(n, e, t = {}) {
357
357
  }
358
358
  return K(/* @__PURE__ */ new Set([...o, ...l]), !0);
359
359
  }
360
- const H = "PColumnData/", se = H + "ResourceMap", ae = H + "Partitioned/ResourceMap", q = H + "JsonPartitioned", $ = H + "BinaryPartitioned", Ae = H + "Partitioned/", Z = Ae + "JsonPartitioned", M = Ae + "BinaryPartitioned", oe = (n) => {
360
+ const H = "PColumnData/", se = H + "ResourceMap", ae = H + "Partitioned/ResourceMap", q = H + "JsonPartitioned", $ = H + "BinaryPartitioned", Ie = H + "Partitioned/", Z = Ie + "JsonPartitioned", M = Ie + "BinaryPartitioned", oe = (n) => {
361
361
  if (n.endsWith(".index"))
362
362
  return { baseKey: n.substring(0, n.length - 6), type: "index" };
363
363
  if (n.endsWith(".values"))
@@ -431,7 +431,7 @@ function lt(n) {
431
431
  }
432
432
  function ut(n) {
433
433
  if (n === void 0) return;
434
- if (Se(n))
434
+ if (_e(n))
435
435
  return lt(n);
436
436
  const e = ot(n);
437
437
  if (!e) return;
@@ -546,9 +546,9 @@ function le(n, e = []) {
546
546
  }
547
547
  function pt(n) {
548
548
  if (n !== void 0) {
549
- if (Se(n)) return n;
549
+ if (_e(n)) return n;
550
550
  if (ue(n)) return Me(n);
551
- if (n instanceof I) return le(n);
551
+ if (n instanceof A) return le(n);
552
552
  throw new Error(`Unexpected input type: ${typeof n}`);
553
553
  }
554
554
  }
@@ -643,7 +643,7 @@ function gt(n) {
643
643
  function mt(n, e) {
644
644
  if (!e || e.length === 0) return n;
645
645
  const t = [...e].sort((r, i) => r[0] - i[0]);
646
- return _e({ id: n, axisFilters: t });
646
+ return Se({ id: n, axisFilters: t });
647
647
  }
648
648
  function ye(n) {
649
649
  if (!n || typeof n != "object") return !1;
@@ -708,23 +708,23 @@ class be {
708
708
  b = he(r.anchors, u, t);
709
709
  } else
710
710
  b = u;
711
- const A = /* @__PURE__ */ new Set(), x = [];
711
+ const I = /* @__PURE__ */ new Set(), x = [];
712
712
  for (const f of this.providers) {
713
713
  const g = f.selectColumns(b);
714
714
  for (const m of g) {
715
715
  if (y(m.spec)) continue;
716
- if (A.has(m.id))
716
+ if (I.has(m.id))
717
717
  throw new Error(`Duplicate column id ${m.id} in provider ${f.constructor.name}`);
718
718
  const L = Be(m.spec);
719
- V.has(L) || (A.add(m.id), V.add(L), x.push(m));
719
+ V.has(L) || (I.add(m.id), V.add(L), x.push(m));
720
720
  }
721
721
  }
722
722
  if (x.length === 0) continue;
723
- const c = yt(u), S = c.length > 0;
723
+ const c = yt(u), _ = c.length > 0;
724
724
  for (const f of x) {
725
725
  if (!Y(f.spec)) continue;
726
726
  const g = f.spec;
727
- if (S) {
727
+ if (_) {
728
728
  if (ct(f.data))
729
729
  throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${f.id}`);
730
730
  const m = pt(f.data);
@@ -734,12 +734,12 @@ class be {
734
734
  }
735
735
  if (!Je(m))
736
736
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${m.type} for column ${f.id}`);
737
- const L = ut(m), _ = c[c.length - 1];
738
- if (_ >= m.partitionKeyLength)
739
- throw new Error(`Not enough partition keys (${m.partitionKeyLength}) for requested split axes (max index ${_}) in column ${g.name}`);
740
- const j = c.map((v) => this.findLabels(ge(g.axesSpec[v]))), k = [], D = (v, B) => {
737
+ const L = ut(m), S = c[c.length - 1];
738
+ if (S >= m.partitionKeyLength)
739
+ throw new Error(`Not enough partition keys (${m.partitionKeyLength}) for requested split axes (max index ${S}) in column ${g.name}`);
740
+ const j = c.map((T) => this.findLabels(ge(g.axesSpec[T]))), k = [], D = (T, B) => {
741
741
  if (B >= c.length) {
742
- if (k.push([...v]), k.length > 1e4)
742
+ if (k.push([...T]), k.length > 1e4)
743
743
  throw new Error("Too many key combinations, aborting.");
744
744
  return;
745
745
  }
@@ -751,19 +751,19 @@ class be {
751
751
  k.length = 0;
752
752
  return;
753
753
  }
754
- for (const X of R)
755
- v.push(X), D(v, B + 1), v.pop();
754
+ for (const z of R)
755
+ T.push(z), D(T, B + 1), T.pop();
756
756
  };
757
757
  if (D([], 0), k.length === 0)
758
758
  continue;
759
- const O = [...g.axesSpec], Ee = c.map((v) => v);
760
- for (let v = c.length - 1; v >= 0; v--)
761
- O.splice(c[v], 1);
759
+ const O = [...g.axesSpec], Ee = c.map((T) => T);
760
+ for (let T = c.length - 1; T >= 0; T--)
761
+ O.splice(c[T], 1);
762
762
  const Le = { ...g, axesSpec: O };
763
- for (const v of k) {
764
- const B = v.map((N, R) => {
765
- const X = Ee[R], Ve = ge(g.axesSpec[X]), de = j[R], Oe = (de == null ? void 0 : de[N]) ?? String(N);
766
- return { axisIdx: X, axisId: Ve, value: N, label: Oe };
763
+ for (const T of k) {
764
+ const B = T.map((N, R) => {
765
+ const z = Ee[R], Ve = ge(g.axesSpec[z]), de = j[R], Oe = (de == null ? void 0 : de[N]) ?? String(N);
766
+ return { axisIdx: z, axisId: Ve, value: N, label: Oe };
767
767
  });
768
768
  E.push({
769
769
  type: "split",
@@ -784,7 +784,7 @@ class be {
784
784
  }
785
785
  }
786
786
  if (E.length === 0) return [];
787
- const h = Ie(
787
+ const h = Ae(
788
788
  E,
789
789
  (u) => ({
790
790
  spec: u.spec,
@@ -793,9 +793,9 @@ class be {
793
793
  l
794
794
  ), C = [];
795
795
  for (const { value: u, label: d } of h) {
796
- const { originalColumn: b, spec: A } = u, x = u.type === "split" ? u.axisFilters : void 0, c = gt(x);
797
- let S;
798
- r ? S = r.deriveS(A, c) : S = mt(b.id, c);
796
+ const { originalColumn: b, spec: I } = u, x = u.type === "split" ? u.axisFilters : void 0, c = gt(x);
797
+ let _;
798
+ r ? _ = r.deriveS(I, c) : _ = mt(b.id, c);
799
799
  let f = { ...u.adjustedSpec };
800
800
  a && (f = {
801
801
  ...f,
@@ -804,7 +804,7 @@ class be {
804
804
  "pl7.app/label": d
805
805
  }
806
806
  }), C.push({
807
- id: S,
807
+ id: _,
808
808
  spec: f,
809
809
  data: () => u.type === "split" ? qe(dt(u.dataEntries, c)) : u.originalColumn.data,
810
810
  label: d
@@ -876,7 +876,7 @@ function ne(n, e) {
876
876
  return !0;
877
877
  }
878
878
  function Te(n) {
879
- return pe(n, (e) => e instanceof I ? e.handle : ue(e) ? He(e, (t) => t.handle) : e);
879
+ return pe(n, (e) => e instanceof A ? e.handle : ue(e) ? He(e, (t) => t.handle) : e);
880
880
  }
881
881
  class bt {
882
882
  constructor() {
@@ -891,7 +891,7 @@ class bt {
891
891
  getOptions(e, t) {
892
892
  const r = typeof e == "function" ? e : W(e), i = this.getSpecs().entries.filter((o) => r(o.obj));
893
893
  let s = {}, a = !1;
894
- return typeof t < "u" && (typeof t == "function" ? s = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? s = t : (t = t, s = t.label ?? {}, a = t.refsWithEnrichments ?? !1))), typeof s == "object" ? Ie(i, (o) => o.obj, s ?? {}).map(({ value: { ref: o }, label: l }) => ({
894
+ return typeof t < "u" && (typeof t == "function" ? s = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? s = t : (t = t, s = t.label ?? {}, a = t.refsWithEnrichments ?? !1))), typeof s == "object" ? Ae(i, (o) => o.obj, s ?? {}).map(({ value: { ref: o }, label: l }) => ({
895
895
  ref: ce(o, a),
896
896
  label: l
897
897
  })) : i.map(({ ref: o, obj: l }) => ({
@@ -984,7 +984,7 @@ class bt {
984
984
  ref: t.ref,
985
985
  obj: {
986
986
  ...t.obj,
987
- data: new I(t.obj.data, [t.ref.blockId, t.ref.name])
987
+ data: new A(t.obj.data, [t.ref.blockId, t.ref.name])
988
988
  }
989
989
  }))
990
990
  };
@@ -1005,7 +1005,7 @@ class bt {
1005
1005
  ...t.obj,
1006
1006
  data: Ke(
1007
1007
  t.obj.data,
1008
- (r) => new I(r, [t.ref.blockId, t.ref.name])
1008
+ (r) => new A(r, [t.ref.blockId, t.ref.name])
1009
1009
  )
1010
1010
  }
1011
1011
  }))
@@ -1034,7 +1034,7 @@ class bt {
1034
1034
  if (r)
1035
1035
  return pe(
1036
1036
  r,
1037
- (i) => new I(i, [e.blockId, e.name])
1037
+ (i) => new A(i, [e.blockId, e.name])
1038
1038
  );
1039
1039
  }
1040
1040
  /**
@@ -1122,7 +1122,7 @@ class bt {
1122
1122
  let a = null;
1123
1123
  const o = this;
1124
1124
  return {
1125
- id: _e(r),
1125
+ id: Se(r),
1126
1126
  spec: s,
1127
1127
  get data() {
1128
1128
  var l;
@@ -1147,7 +1147,7 @@ class bt {
1147
1147
  return i;
1148
1148
  }
1149
1149
  }
1150
- class G {
1150
+ class X {
1151
1151
  constructor() {
1152
1152
  w(this, "ctx"), w(this, "_argsCache"), w(this, "_uiStateCache"), w(this, "_activeArgsCache"), w(this, "resultPool", new bt()), this.ctx = p();
1153
1153
  }
@@ -1185,7 +1185,7 @@ class G {
1185
1185
  getNamedAccessor(e) {
1186
1186
  return ie(
1187
1187
  this.ctx.getAccessorHandleByName(e),
1188
- (t) => new I(t, [e])
1188
+ (t) => new A(t, [e])
1189
1189
  );
1190
1190
  }
1191
1191
  get prerun() {
@@ -1204,7 +1204,7 @@ class G {
1204
1204
  }
1205
1205
  verifyInlineAndExplicitColumnsSupport(e) {
1206
1206
  var t;
1207
- const r = e.some((s) => !(s.data instanceof I) || ue(s.data)), i = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
1207
+ const r = e.some((s) => !(s.data instanceof A) || ue(s.data)), i = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
1208
1208
  if (r && !i) throw Error("Inline or explicit columns not supported");
1209
1209
  }
1210
1210
  patchPTableDef(e) {
@@ -1256,7 +1256,7 @@ class G {
1256
1256
  this.ctx.logError(e);
1257
1257
  }
1258
1258
  }
1259
- const Q = "1.40.6";
1259
+ const Q = "1.41.1";
1260
1260
  function vt(n) {
1261
1261
  return n.__renderLambda === !0;
1262
1262
  }
@@ -1264,12 +1264,12 @@ function re(n) {
1264
1264
  if (n !== void 0)
1265
1265
  return vt(n) ? n.handle : n;
1266
1266
  }
1267
- const Tt = class T {
1267
+ const Tt = class v {
1268
1268
  constructor(e, t, r, i, s, a, o, l, y) {
1269
1269
  this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = a, this._title = o, this._enrichmentTargets = l, this._featureFlags = y;
1270
1270
  }
1271
1271
  static create(e = "Heavy") {
1272
- return new T(
1272
+ return new v(
1273
1273
  e,
1274
1274
  void 0,
1275
1275
  {},
@@ -1278,13 +1278,13 @@ const Tt = class T {
1278
1278
  ee([]),
1279
1279
  void 0,
1280
1280
  void 0,
1281
- { ...T.INITIAL_BLOCK_FEATURE_FLAGS }
1281
+ { ...v.INITIAL_BLOCK_FEATURE_FLAGS }
1282
1282
  );
1283
1283
  }
1284
1284
  output(e, t, r = {}) {
1285
1285
  if (typeof t == "function") {
1286
1286
  const i = `output#${e}`;
1287
- return J(i, () => t(new G())), new T(
1287
+ return J(i, () => t(new X())), new v(
1288
1288
  this._renderingMode,
1289
1289
  this._initialArgs,
1290
1290
  this._initialUiState,
@@ -1303,7 +1303,7 @@ const Tt = class T {
1303
1303
  this._featureFlags
1304
1304
  );
1305
1305
  } else
1306
- return new T(
1306
+ return new v(
1307
1307
  this._renderingMode,
1308
1308
  this._initialArgs,
1309
1309
  this._initialUiState,
@@ -1323,7 +1323,7 @@ const Tt = class T {
1323
1323
  return this.output(e, t, { retentive: !0 });
1324
1324
  }
1325
1325
  argsValid(e) {
1326
- return typeof e == "function" ? (J("inputsValid", () => e(new G())), new T(
1326
+ return typeof e == "function" ? (J("inputsValid", () => e(new X())), new v(
1327
1327
  this._renderingMode,
1328
1328
  this._initialArgs,
1329
1329
  this._initialUiState,
@@ -1336,7 +1336,7 @@ const Tt = class T {
1336
1336
  this._title,
1337
1337
  this._enrichmentTargets,
1338
1338
  this._featureFlags
1339
- )) : new T(
1339
+ )) : new v(
1340
1340
  this._renderingMode,
1341
1341
  this._initialArgs,
1342
1342
  this._initialUiState,
@@ -1349,7 +1349,7 @@ const Tt = class T {
1349
1349
  );
1350
1350
  }
1351
1351
  sections(e) {
1352
- return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (J("sections", () => e(new G())), new T(
1352
+ return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (J("sections", () => e(new X())), new v(
1353
1353
  this._renderingMode,
1354
1354
  this._initialArgs,
1355
1355
  this._initialUiState,
@@ -1359,7 +1359,7 @@ const Tt = class T {
1359
1359
  this._title,
1360
1360
  this._enrichmentTargets,
1361
1361
  this._featureFlags
1362
- )) : new T(
1362
+ )) : new v(
1363
1363
  this._renderingMode,
1364
1364
  this._initialArgs,
1365
1365
  this._initialUiState,
@@ -1373,7 +1373,7 @@ const Tt = class T {
1373
1373
  }
1374
1374
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
1375
1375
  title(e) {
1376
- return J("title", () => e(new G())), new T(
1376
+ return J("title", () => e(new X())), new v(
1377
1377
  this._renderingMode,
1378
1378
  this._initialArgs,
1379
1379
  this._initialUiState,
@@ -1390,7 +1390,7 @@ const Tt = class T {
1390
1390
  * @deprecated use {@link withArgs}
1391
1391
  * */
1392
1392
  initialArgs(e) {
1393
- return new T(
1393
+ return new v(
1394
1394
  this._renderingMode,
1395
1395
  e,
1396
1396
  this._initialUiState,
@@ -1404,7 +1404,7 @@ const Tt = class T {
1404
1404
  }
1405
1405
  /** Sets initial args for the block, this value must be specified. */
1406
1406
  withArgs(e) {
1407
- return new T(
1407
+ return new v(
1408
1408
  this._renderingMode,
1409
1409
  e,
1410
1410
  this._initialUiState,
@@ -1418,7 +1418,7 @@ const Tt = class T {
1418
1418
  }
1419
1419
  /** Defines type and sets initial value for block UiState. */
1420
1420
  withUiState(e) {
1421
- return new T(
1421
+ return new v(
1422
1422
  this._renderingMode,
1423
1423
  this._initialArgs,
1424
1424
  e,
@@ -1430,12 +1430,26 @@ const Tt = class T {
1430
1430
  this._featureFlags
1431
1431
  );
1432
1432
  }
1433
+ /** Sets or overrides feature flags for the block. */
1434
+ withFeatureFlags(e) {
1435
+ return new v(
1436
+ this._renderingMode,
1437
+ this._initialArgs,
1438
+ this._initialUiState,
1439
+ this._outputs,
1440
+ this._inputsValid,
1441
+ this._sections,
1442
+ this._title,
1443
+ this._enrichmentTargets,
1444
+ { ...this._featureFlags, ...e }
1445
+ );
1446
+ }
1433
1447
  /**
1434
1448
  * Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
1435
1449
  * Influences dependency graph construction.
1436
1450
  */
1437
1451
  enriches(e) {
1438
- return J("enrichmentTargets", e), new T(
1452
+ return J("enrichmentTargets", e), new v(
1439
1453
  this._renderingMode,
1440
1454
  this._initialArgs,
1441
1455
  this._initialUiState,
@@ -1450,9 +1464,16 @@ const Tt = class T {
1450
1464
  /** Renders all provided block settings into a pre-configured platforma API
1451
1465
  * instance, that can be used in frontend to interact with block state, and
1452
1466
  * other features provided by the platforma to the block. */
1453
- done() {
1467
+ done(e) {
1468
+ const t = e ?? 1;
1469
+ return this.withFeatureFlags({
1470
+ ...this._featureFlags,
1471
+ requiresUIAPIVersion: t
1472
+ })._done(t);
1473
+ }
1474
+ _done(e) {
1454
1475
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
1455
- const e = {
1476
+ const t = {
1456
1477
  v3: {
1457
1478
  sdkVersion: Q,
1458
1479
  renderingMode: this._renderingMode,
@@ -1472,10 +1493,10 @@ const Tt = class T {
1472
1493
  inputsValid: re(this._inputsValid),
1473
1494
  sections: re(this._sections),
1474
1495
  outputs: Object.fromEntries(
1475
- Object.entries(this._outputs).map(([t, r]) => [t, re(r)])
1496
+ Object.entries(this._outputs).map(([r, i]) => [r, re(i)])
1476
1497
  )
1477
1498
  };
1478
- return ze() ? we({ sdkVersion: Q }) : { config: e };
1499
+ return globalThis.platformaApiVersion = e, Ge() ? we({ sdkVersion: Q, apiVersion: platformaApiVersion }) : { config: t };
1479
1500
  }
1480
1501
  };
1481
1502
  w(Tt, "INITIAL_BLOCK_FEATURE_FLAGS", {
@@ -1499,7 +1520,7 @@ function Pe() {
1499
1520
  pTableParams: xe()
1500
1521
  };
1501
1522
  }
1502
- function It(n) {
1523
+ function wt(n) {
1503
1524
  return "version" in n || (n = Pe()), n.version === 2 && (n = {
1504
1525
  version: 3,
1505
1526
  stateCache: n.stateCache.map((e) => ({
@@ -1512,20 +1533,20 @@ function It(n) {
1512
1533
  function At(n) {
1513
1534
  return n.axesSpec.length === 1 && n.name === "pl7.app/label";
1514
1535
  }
1515
- function xt(n) {
1536
+ function It(n) {
1516
1537
  var e;
1517
1538
  return ((e = n.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
1518
1539
  }
1519
- function Ft(n) {
1540
+ function xt(n) {
1520
1541
  var e;
1521
1542
  return ((e = n.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
1522
1543
  }
1523
- function Et(n) {
1544
+ function Ft(n) {
1524
1545
  var e;
1525
1546
  return n.axesSpec.length === 2 && ((e = n.annotations) == null ? void 0 : e[Pt]) === "true";
1526
1547
  }
1527
1548
  const Pt = "pl7.app/isLinkerColumn";
1528
- function Lt({
1549
+ function Et({
1529
1550
  selection: n,
1530
1551
  columnId: e = Ne(),
1531
1552
  label: t = "Selection marker",
@@ -1551,13 +1572,13 @@ function Lt({
1551
1572
  data: i
1552
1573
  };
1553
1574
  }
1554
- function Vt(n) {
1575
+ function Lt(n) {
1555
1576
  return n === De ? (console.error("Axis value can never be N/A"), "") : n;
1556
1577
  }
1557
1578
  function F(n) {
1558
1579
  return n.valueType === "Int" || n.valueType === "Long" || n.valueType === "Float" || n.valueType === "Double";
1559
1580
  }
1560
- function z(n) {
1581
+ function G(n) {
1561
1582
  return n.valueType === "String";
1562
1583
  }
1563
1584
  const Fe = {
@@ -1771,7 +1792,7 @@ const Fe = {
1771
1792
  defaultValue: () => ""
1772
1793
  }
1773
1794
  },
1774
- supportedFor: z
1795
+ supportedFor: G
1775
1796
  },
1776
1797
  patternNotContainSubsequence: {
1777
1798
  label: "Col ≁ Seq (Not Contain Subsequence)",
@@ -1793,7 +1814,7 @@ const Fe = {
1793
1814
  defaultValue: () => ""
1794
1815
  }
1795
1816
  },
1796
- supportedFor: z
1817
+ supportedFor: G
1797
1818
  },
1798
1819
  patternEquals: {
1799
1820
  label: "Col = Seq (Equals)",
@@ -1815,7 +1836,7 @@ const Fe = {
1815
1836
  defaultValue: () => ""
1816
1837
  }
1817
1838
  },
1818
- supportedFor: z
1839
+ supportedFor: G
1819
1840
  },
1820
1841
  patternNotEquals: {
1821
1842
  label: "Col ≠ Seq (Not Equal)",
@@ -1837,7 +1858,7 @@ const Fe = {
1837
1858
  defaultValue: () => ""
1838
1859
  }
1839
1860
  },
1840
- supportedFor: z
1861
+ supportedFor: G
1841
1862
  },
1842
1863
  isNA: {
1843
1864
  label: "Is NA",
@@ -1924,24 +1945,20 @@ const Fe = {
1924
1945
  supportedFor: () => !1
1925
1946
  }
1926
1947
  };
1927
- function Ot(n) {
1948
+ function Vt(n) {
1928
1949
  return n ? Object.entries(Fe).filter(([e, t]) => t.supportedFor(n)).map(([e, t]) => ({
1929
1950
  label: t.label,
1930
1951
  value: e
1931
1952
  })) : [];
1932
1953
  }
1933
- function kt(n) {
1954
+ function Ot(n) {
1934
1955
  return Fe[n];
1935
1956
  }
1936
- function Ct() {
1937
- return we({ sdkVersion: Q });
1957
+ function kt() {
1958
+ return platformaApiVersion ?? 1;
1938
1959
  }
1939
- function Nt(n) {
1940
- try {
1941
- return Ct();
1942
- } catch {
1943
- return n;
1944
- }
1960
+ function Nt() {
1961
+ return we({ sdkVersion: Q, apiVersion: platformaApiVersion });
1945
1962
  }
1946
1963
  function Dt(n) {
1947
1964
  if (typeof globalThis.getEnvironmentValue == "function")
@@ -1949,8 +1966,8 @@ function Dt(n) {
1949
1966
  }
1950
1967
  export {
1951
1968
  fe as AnchoredIdDeriver,
1952
- ln as BasePlErrorLike,
1953
- un as ErrorLike,
1969
+ dn as BasePlErrorLike,
1970
+ cn as ErrorLike,
1954
1971
  P as FutureRef,
1955
1972
  Pt as LINKER_COLUMN_ANNOTATION,
1956
1973
  tt as PAnnotationLabel,
@@ -1962,7 +1979,7 @@ export {
1962
1979
  jt as PValueIntNA,
1963
1980
  Bt as PValueLongNA,
1964
1981
  Jt as PValueStringNA,
1965
- pn as PlErrorLike,
1982
+ fn as PlErrorLike,
1966
1983
  qt as PlId,
1967
1984
  Mt as PlIdBytes,
1968
1985
  Wt as PlIdLength,
@@ -1972,23 +1989,24 @@ export {
1972
1989
  Z as RT_JSON_SUPER_PARTITIONED,
1973
1990
  se as RT_RESOURCE_MAP,
1974
1991
  ae as RT_RESOURCE_MAP_PARTITIONED,
1975
- G as RenderCtx,
1992
+ X as RenderCtx,
1976
1993
  bt as ResultPool,
1977
- dn as StandardErrorLike,
1994
+ hn as StandardErrorLike,
1978
1995
  it as Trace,
1979
1996
  rt as TraceEntry,
1980
- I as TreeNodeAccessor,
1997
+ A as TreeNodeAccessor,
1981
1998
  We as canonicalizeAxisId,
1982
1999
  Ht as canonicalizeJson,
1983
2000
  pt as convertOrParsePColumnData,
1984
2001
  Pe as createPlDataTableStateV2,
1985
- Lt as createRowSelectionColumn,
2002
+ Et as createRowSelectionColumn,
1986
2003
  Me as dataInfoToEntries,
1987
- Ie as deriveLabels,
2004
+ Ae as deriveLabels,
1988
2005
  Be as deriveNativeId,
2006
+ zt as deserializeError,
1989
2007
  re as downgradeCfgOrLambda,
1990
2008
  Xt as ensureError,
1991
- cn as ensureErrorLike,
2009
+ gn as ensureErrorLike,
1992
2010
  je as ensurePColumn,
1993
2011
  qe as entriesToDataInfo,
1994
2012
  Re as extractAllColumns,
@@ -1997,47 +2015,49 @@ export {
1997
2015
  Gt as getAxesId,
1998
2016
  ge as getAxisId,
1999
2017
  Dt as getEnvironmentValue,
2000
- kt as getFilterUiMetadata,
2001
- Ot as getFilterUiTypeOptions,
2018
+ Ot as getFilterUiMetadata,
2019
+ Vt as getFilterUiTypeOptions,
2002
2020
  ee as getImmediate,
2003
- zt as getPTableColumnId,
2021
+ Yt as getPTableColumnId,
2004
2022
  ot as getPartitionKeysList,
2005
- Nt as getPlatformaOrDefault,
2006
- Ct as getRawPlatformaInstance,
2023
+ kt as getPlatformaApiVersion,
2024
+ Nt as getRawPlatformaInstance,
2007
2025
  ut as getUniquePartitionKeys,
2026
+ Qt as hasAbortError,
2008
2027
  ie as ifDef,
2009
- xt as isColumnHidden,
2010
- Ft as isColumnOptional,
2028
+ It as isColumnHidden,
2029
+ xt as isColumnOptional,
2011
2030
  vt as isConfigLambda,
2012
2031
  ue as isDataInfo,
2013
- Se as isDataInfoEntries,
2032
+ _e as isDataInfoEntries,
2014
2033
  At as isLabelColumn,
2015
- Et as isLinkerColumn,
2034
+ Ft as isLinkerColumn,
2016
2035
  Ce as isPColumn,
2017
2036
  Y as isPColumnSpec,
2018
2037
  ke as isPTableAbsent,
2019
2038
  Je as isPartitionedDataInfoEntries,
2020
2039
  $e as isPlRef,
2021
- Yt as isValueAbsent,
2022
- Qt as isValueNA,
2040
+ Zt as isValueAbsent,
2041
+ en as isValueNA,
2023
2042
  xe as makeDefaultPTableParams,
2024
2043
  He as mapDataInfo,
2025
- Zt as mapJoinEntry,
2044
+ tn as mapJoinEntry,
2026
2045
  pe as mapPObjectData,
2027
2046
  Ue as mapPTableDef,
2028
- Vt as mapPTableValueToAxisKey,
2047
+ Lt as mapPTableValueToAxisKey,
2029
2048
  Ke as mapValueInVOE,
2030
- en as matchAxis,
2031
- tn as matchAxisId,
2032
- nn as matchPColumn,
2033
- rn as pTableValue,
2034
- sn as parseJson,
2049
+ nn as matchAxis,
2050
+ rn as matchAxisId,
2051
+ sn as matchPColumn,
2052
+ an as pTableValue,
2053
+ on as parseJson,
2035
2054
  le as parsePColumnData,
2036
2055
  he as resolveAnchors,
2037
2056
  W as selectorsToPredicate,
2038
- an as stringifyColumnId,
2057
+ ln as stringifyColumnId,
2039
2058
  Ne as uniquePlId,
2040
- It as upgradePlDataTableStateV2,
2059
+ un as unwrapResult,
2060
+ wt as upgradePlDataTableStateV2,
2041
2061
  ce as withEnrichments
2042
2062
  };
2043
2063
  //# sourceMappingURL=index.js.map