@milaboratories/milaboratories.ui-examples.model 1.2.10 → 1.2.12

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,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.10 build /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
3
+ > @milaboratories/milaboratories.ui-examples.model@1.2.12 build /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
4
4
  > tsup && vite build && block-tools build-model
5
5
 
6
6
  CLI Building entry: src/index.ts
@@ -11,21 +11,21 @@
11
11
  CLI Cleaning output folder
12
12
  CJS Build start
13
13
  ESM Build start
14
- ESM dist/index.js 8.41 KB
15
- ESM dist/index.js.map 18.92 KB
16
- ESM ⚡️ Build success in 299ms
17
- CJS dist/index.cjs 8.53 KB
18
- CJS dist/index.cjs.map 19.00 KB
19
- CJS ⚡️ Build success in 299ms
14
+ CJS dist/index.cjs 8.60 KB
15
+ CJS dist/index.cjs.map 19.25 KB
16
+ CJS ⚡️ Build success in 416ms
17
+ ESM dist/index.js 8.48 KB
18
+ ESM dist/index.js.map 19.17 KB
19
+ ESM ⚡️ Build success in 416ms
20
20
  DTS Build start
21
- DTS ⚡️ Build success in 4701ms
22
- DTS dist/index.d.cts 2.90 KB
23
- DTS dist/index.d.ts 2.90 KB
21
+ DTS ⚡️ Build success in 3884ms
22
+ DTS dist/index.d.cts 2.98 KB
23
+ DTS dist/index.d.ts 2.98 KB
24
24
  vite v6.3.5 building for production...
25
25
  transforming...
26
26
  ✓ 11 modules transformed.
27
27
  rendering chunks...
28
28
  computing gzip size...
29
- dist/bundle.js 195.63 kB │ gzip: 38.00 kB │ map: 437.28 kB
30
- dist/bundle.js 209.16 kB │ gzip: 38.68 kB │ map: 438.90 kB
31
- ✓ built in 2.33s
29
+ dist/bundle.js 196.26 kB │ gzip: 38.12 kB │ map: 438.54 kB
30
+ dist/bundle.js 209.84 kB │ gzip: 38.82 kB │ map: 440.15 kB
31
+ ✓ built in 2.30s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @milaboratories/milaboratories.ui-examples.model
2
2
 
3
+ ## 1.2.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e48177a]
8
+ - @platforma-sdk/model@1.41.1
9
+
10
+ ## 1.2.11
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [e7c0edb]
15
+ - @platforma-sdk/model@1.41.0
16
+
3
17
  ## 1.2.10
4
18
 
5
19
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -4105,7 +4105,7 @@
4105
4105
  const { type: n2, name: t, domain: r } = e, o = { type: n2, name: t };
4106
4106
  return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
4107
4107
  }
4108
- function C(e) {
4108
+ function F(e) {
4109
4109
  return e.map(y);
4110
4110
  }
4111
4111
  function Te$1(e) {
@@ -4159,10 +4159,10 @@
4159
4159
  function te(e) {
4160
4160
  return Be(e);
4161
4161
  }
4162
- function E(e) {
4162
+ function x(e) {
4163
4163
  return Be(y(e));
4164
4164
  }
4165
- function x(e, n2) {
4165
+ function S(e, n2) {
4166
4166
  return JSON.stringify([e, n2]);
4167
4167
  }
4168
4168
  let Ge$1 = class Ge {
@@ -4180,14 +4180,14 @@
4180
4180
  t.sort((r, o) => r[0].localeCompare(o[0]));
4181
4181
  for (const [r, o] of t) {
4182
4182
  for (let i = 0; i < o.axesSpec.length; i++) {
4183
- const a = o.axesSpec[i], s2 = E(a);
4183
+ const a = o.axesSpec[i], s2 = x(a);
4184
4184
  this.axes.set(s2, { anchor: r, idx: i });
4185
4185
  }
4186
4186
  if (o.domain !== void 0) {
4187
4187
  const i = Object.entries(o.domain);
4188
4188
  i.sort((a, s2) => a[0].localeCompare(s2[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
4189
4189
  for (const [a, s2] of i) {
4190
- const u2 = x(a, s2);
4190
+ const u2 = S(a, s2);
4191
4191
  this.domains.set(u2, r);
4192
4192
  }
4193
4193
  }
@@ -4222,11 +4222,11 @@
4222
4222
  for (const [a, s2] of Object.entries(n2.domain ?? {})) {
4223
4223
  if (o !== void 0 && o.has(a))
4224
4224
  continue;
4225
- const u2 = x(a, s2), c2 = this.domains.get(u2);
4225
+ const u2 = S(a, s2), c2 = this.domains.get(u2);
4226
4226
  r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : s2;
4227
4227
  }
4228
4228
  if (r.axes = n2.axesSpec.map((a) => {
4229
- const s2 = E(a), u2 = this.axes.get(s2);
4229
+ const s2 = x(a), u2 = this.axes.get(s2);
4230
4230
  return u2 === void 0 ? y(a) : u2;
4231
4231
  }), !t || t.length === 0)
4232
4232
  return r;
@@ -4359,7 +4359,7 @@
4359
4359
  };
4360
4360
  return t(e), [...n2.values()];
4361
4361
  }
4362
- function S(e, n2) {
4362
+ function v(e, n2) {
4363
4363
  if (e.name !== void 0 && e.name !== n2.name)
4364
4364
  return false;
4365
4365
  if (e.type !== void 0) {
@@ -4377,7 +4377,7 @@
4377
4377
  }
4378
4378
  return true;
4379
4379
  }
4380
- function v(e, n2) {
4380
+ function N(e, n2) {
4381
4381
  if (n2.name !== void 0 && e.name !== n2.name || n2.namePattern !== void 0 && !new RegExp(n2.namePattern).test(e.name))
4382
4382
  return false;
4383
4383
  if (n2.type !== void 0) {
@@ -4397,13 +4397,13 @@
4397
4397
  const t = e.axesSpec.map(y);
4398
4398
  if (n2.partialAxesMatch) {
4399
4399
  for (const r of n2.axes)
4400
- if (!t.some((o) => S(r, o)))
4400
+ if (!t.some((o) => v(r, o)))
4401
4401
  return false;
4402
4402
  } else {
4403
4403
  if (t.length !== n2.axes.length)
4404
4404
  return false;
4405
4405
  for (let r = 0; r < n2.axes.length; r++)
4406
- if (!S(n2.axes[r], t[r]))
4406
+ if (!v(n2.axes[r], t[r]))
4407
4407
  return false;
4408
4408
  }
4409
4409
  }
@@ -4424,14 +4424,14 @@
4424
4424
  return true;
4425
4425
  }
4426
4426
  function rn(e) {
4427
- return Array.isArray(e) ? (n2) => e.some((t) => l$1(n2) && v(n2, t)) : (n2) => l$1(n2) && v(n2, e);
4427
+ return Array.isArray(e) ? (n2) => e.some((t) => l$1(n2) && N(n2, t)) : (n2) => l$1(n2) && N(n2, e);
4428
4428
  }
4429
4429
  function on(e) {
4430
4430
  const n2 = {
4431
4431
  kind: e.kind,
4432
4432
  name: e.name
4433
4433
  };
4434
- return e.domain !== void 0 && (n2.domain = e.domain), l$1(e) && (n2.axesSpec = C(e.axesSpec)), Be(n2);
4434
+ return e.domain !== void 0 && (n2.domain = e.domain), l$1(e) && (n2.axesSpec = F(e.axesSpec)), Be(n2);
4435
4435
  }
4436
4436
  z$1.object({
4437
4437
  __isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
@@ -4578,7 +4578,7 @@
4578
4578
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4579
4579
  }
4580
4580
  }
4581
- function ge(t, e) {
4581
+ function ye(t, e) {
4582
4582
  return t === void 0 ? void 0 : e(t);
4583
4583
  }
4584
4584
  class O {
@@ -4620,7 +4620,7 @@
4620
4620
  ...this.resolvePath,
4621
4621
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4622
4622
  ];
4623
- return ge(
4623
+ return ye(
4624
4624
  b().resolveWithCommon(this.handle, e, ...n2),
4625
4625
  (i) => new O(i, r)
4626
4626
  );
@@ -4642,7 +4642,7 @@
4642
4642
  }
4643
4643
  getError() {
4644
4644
  const e = [...this.resolvePath, "error"];
4645
- return ge(
4645
+ return ye(
4646
4646
  b().getError(this.handle),
4647
4647
  (n2) => new O(n2, e)
4648
4648
  );
@@ -4811,56 +4811,56 @@
4811
4811
  function ze(t, e, n2 = {}) {
4812
4812
  const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s2 = t.map((d2) => {
4813
4813
  var c2, v2;
4814
- const g2 = e(d2);
4815
- let p2, y2, C2;
4816
- "spec" in g2 && typeof g2.spec == "object" ? (p2 = g2.spec, y2 = g2.prefixTrace, C2 = g2.suffixTrace) : p2 = g2;
4817
- const E2 = (c2 = p2.annotations) == null ? void 0 : c2[_t], x2 = (v2 = p2.annotations) == null ? void 0 : v2[Lt], S2 = (x2 ? Vt.safeParse(JSON.parse(x2)).data : void 0) ?? [], P = [
4818
- ...y2 ?? [],
4814
+ const y2 = e(d2);
4815
+ let p2, g2, C;
4816
+ "spec" in y2 && typeof y2.spec == "object" ? (p2 = y2.spec, g2 = y2.prefixTrace, C = y2.suffixTrace) : p2 = y2;
4817
+ const E = (c2 = p2.annotations) == null ? void 0 : c2[_t], x2 = (v2 = p2.annotations) == null ? void 0 : v2[Lt], S2 = (x2 ? Vt.safeParse(JSON.parse(x2)).data : void 0) ?? [], P = [
4818
+ ...g2 ?? [],
4819
4819
  ...S2,
4820
- ...C2 ?? []
4820
+ ...C ?? []
4821
4821
  ];
4822
- if (E2 !== void 0) {
4823
- const I = { label: E2, type: Ot, importance: -2 };
4822
+ if (E !== void 0) {
4823
+ const I = { label: E, type: Ot, importance: -2 };
4824
4824
  n2.addLabelAsSuffix ? P.push(I) : P.splice(0, 0, I);
4825
4825
  }
4826
- const T = [], F = /* @__PURE__ */ new Map();
4826
+ const T = [], F2 = /* @__PURE__ */ new Map();
4827
4827
  for (let I = P.length - 1; I >= 0; --I) {
4828
- const { type: $ } = P[I], K = P[I].importance ?? 0, j = (F.get($) ?? 0) + 1;
4829
- F.set($, j);
4830
- const N = `${$}@${j}`;
4831
- o.set(N, (o.get(N) ?? 0) + 1), r.set(
4832
- N,
4828
+ const { type: $ } = P[I], K = P[I].importance ?? 0, j = (F2.get($) ?? 0) + 1;
4829
+ F2.set($, j);
4830
+ const N2 = `${$}@${j}`;
4831
+ o.set(N2, (o.get(N2) ?? 0) + 1), r.set(
4832
+ N2,
4833
4833
  Math.max(
4834
- r.get(N) ?? Number.NEGATIVE_INFINITY,
4834
+ r.get(N2) ?? Number.NEGATIVE_INFINITY,
4835
4835
  K - (P.length - I) * kt
4836
4836
  )
4837
- ), T.push({ ...P[I], fullType: N, occurrenceIndex: j });
4837
+ ), T.push({ ...P[I], fullType: N2, occurrenceIndex: j });
4838
4838
  }
4839
4839
  return T.reverse(), {
4840
4840
  value: d2,
4841
4841
  spec: p2,
4842
- label: E2,
4842
+ label: E,
4843
4843
  fullTrace: T
4844
4844
  };
4845
4845
  }), a = [], l2 = [], u2 = [...r];
4846
- u2.sort(([, d2], [, g2]) => g2 - d2);
4846
+ u2.sort(([, d2], [, y2]) => y2 - d2);
4847
4847
  for (const [d2] of u2)
4848
4848
  d2.endsWith("@1") || o.get(d2) === t.length ? a.push(d2) : l2.push(d2);
4849
- const h = (d2, g2 = false) => {
4849
+ const h = (d2, y2 = false) => {
4850
4850
  const p2 = [];
4851
- for (let y2 = 0; y2 < s2.length; y2++) {
4852
- const C2 = s2[y2], E2 = C2.fullTrace.filter((P) => d2.has(P.fullType) || i && i.has(P.type));
4853
- if (E2.length === 0)
4854
- if (g2)
4851
+ for (let g2 = 0; g2 < s2.length; g2++) {
4852
+ const C = s2[g2], E = C.fullTrace.filter((P) => d2.has(P.fullType) || i && i.has(P.type));
4853
+ if (E.length === 0)
4854
+ if (y2)
4855
4855
  p2.push({
4856
4856
  label: "Unlabeled",
4857
- value: C2.value
4857
+ value: C.value
4858
4858
  });
4859
4859
  else return;
4860
- const x2 = E2.map((P) => P.label), S2 = n2.separator ?? " / ";
4860
+ const x2 = E.map((P) => P.label), S2 = n2.separator ?? " / ";
4861
4861
  p2.push({
4862
4862
  label: x2.join(S2),
4863
- value: C2.value
4863
+ value: C.value
4864
4864
  });
4865
4865
  }
4866
4866
  return p2;
@@ -4875,8 +4875,8 @@
4875
4875
  n2.includeNativeLabel && d2.add(Ee);
4876
4876
  for (let p2 = 0; p2 < f; ++p2) d2.add(a[p2]);
4877
4877
  m2 >= 0 && d2.add(a[m2]);
4878
- const g2 = h(d2);
4879
- if (g2 !== void 0 && new Set(g2.map((p2) => p2.label)).size === t.length) return g2;
4878
+ const y2 = h(d2);
4879
+ if (y2 !== void 0 && new Set(y2.map((p2) => p2.label)).size === t.length) return y2;
4880
4880
  m2++, m2 >= a.length && (f++, m2 = f);
4881
4881
  }
4882
4882
  return h(/* @__PURE__ */ new Set([...a, ...l2]), true);
@@ -5215,42 +5215,42 @@
5215
5215
  };
5216
5216
  let u2 = () => false;
5217
5217
  if (a) {
5218
- const p2 = (Array.isArray(a) ? a : [a]).map((y2) => {
5219
- if (Ve(y2)) {
5218
+ const p2 = (Array.isArray(a) ? a : [a]).map((g2) => {
5219
+ if (Ve(g2)) {
5220
5220
  if (!r)
5221
5221
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
5222
- return rn(Xe$1(r.anchors, y2, n2));
5222
+ return rn(Xe$1(r.anchors, g2, n2));
5223
5223
  } else
5224
- return rn(y2);
5224
+ return rn(g2);
5225
5225
  });
5226
- u2 = (y2) => p2.some((C2) => C2(y2));
5226
+ u2 = (g2) => p2.some((C) => C(g2));
5227
5227
  }
5228
5228
  const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], m2 = /* @__PURE__ */ new Set();
5229
5229
  for (const p2 of h) {
5230
- const y$1 = Ve(p2);
5231
- let C2;
5232
- if (y$1) {
5230
+ const g2 = Ve(p2);
5231
+ let C;
5232
+ if (g2) {
5233
5233
  if (!r)
5234
5234
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5235
- C2 = Xe$1(r.anchors, p2, n2);
5235
+ C = Xe$1(r.anchors, p2, n2);
5236
5236
  } else
5237
- C2 = p2;
5238
- const E2 = /* @__PURE__ */ new Set(), x2 = [];
5237
+ C = p2;
5238
+ const E = /* @__PURE__ */ new Set(), x2 = [];
5239
5239
  for (const T of this.providers) {
5240
- const F = T.selectColumns(C2);
5241
- for (const c2 of F) {
5240
+ const F2 = T.selectColumns(C);
5241
+ for (const c2 of F2) {
5242
5242
  if (u2(c2.spec)) continue;
5243
- if (E2.has(c2.id))
5243
+ if (E.has(c2.id))
5244
5244
  throw new Error(`Duplicate column id ${c2.id} in provider ${T.constructor.name}`);
5245
5245
  const v2 = on(c2.spec);
5246
- m2.has(v2) || (E2.add(c2.id), m2.add(v2), x2.push(c2));
5246
+ m2.has(v2) || (E.add(c2.id), m2.add(v2), x2.push(c2));
5247
5247
  }
5248
5248
  }
5249
5249
  if (x2.length === 0) continue;
5250
5250
  const S2 = $t(p2), P = S2.length > 0;
5251
5251
  for (const T of x2) {
5252
5252
  if (!l$1(T.spec)) continue;
5253
- const F = T.spec;
5253
+ const F2 = T.spec;
5254
5254
  if (P) {
5255
5255
  if (Mt(T.data))
5256
5256
  throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${T.id}`);
@@ -5263,8 +5263,8 @@
5263
5263
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c2.type} for column ${T.id}`);
5264
5264
  const v2 = Nt(c2), I = S2[S2.length - 1];
5265
5265
  if (I >= c2.partitionKeyLength)
5266
- throw new Error(`Not enough partition keys (${c2.partitionKeyLength}) for requested split axes (max index ${I}) in column ${F.name}`);
5267
- const $ = S2.map((_2) => this.findLabels(y(F.axesSpec[_2]))), K = [], j = (_2, W) => {
5266
+ throw new Error(`Not enough partition keys (${c2.partitionKeyLength}) for requested split axes (max index ${I}) in column ${F2.name}`);
5267
+ const $ = S2.map((_2) => this.findLabels(y(F2.axesSpec[_2]))), K = [], j = (_2, W) => {
5268
5268
  if (W >= S2.length) {
5269
5269
  if (K.push([..._2]), K.length > 1e4)
5270
5270
  throw new Error("Too many key combinations, aborting.");
@@ -5283,19 +5283,19 @@
5283
5283
  };
5284
5284
  if (j([], 0), K.length === 0)
5285
5285
  continue;
5286
- const N = [...F.axesSpec], et = S2.map((_2) => _2);
5286
+ const N2 = [...F2.axesSpec], et = S2.map((_2) => _2);
5287
5287
  for (let _2 = S2.length - 1; _2 >= 0; _2--)
5288
- N.splice(S2[_2], 1);
5289
- const tt = { ...F, axesSpec: N };
5288
+ N2.splice(S2[_2], 1);
5289
+ const tt = { ...F2, axesSpec: N2 };
5290
5290
  for (const _2 of K) {
5291
5291
  const W = _2.map((M, q) => {
5292
- const te2 = et[q], nt = y(F.axesSpec[te2]), de2 = $[q], rt = (de2 == null ? void 0 : de2[M]) ?? String(M);
5292
+ const te2 = et[q], nt = y(F2.axesSpec[te2]), de2 = $[q], rt = (de2 == null ? void 0 : de2[M]) ?? String(M);
5293
5293
  return { axisIdx: te2, axisId: nt, value: M, label: rt };
5294
5294
  });
5295
5295
  f.push({
5296
5296
  type: "split",
5297
5297
  originalColumn: T,
5298
- spec: F,
5298
+ spec: F2,
5299
5299
  adjustedSpec: tt,
5300
5300
  dataEntries: c2,
5301
5301
  axisFilters: W
@@ -5305,8 +5305,8 @@
5305
5305
  f.push({
5306
5306
  type: "direct",
5307
5307
  originalColumn: T,
5308
- spec: F,
5309
- adjustedSpec: F
5308
+ spec: F2,
5309
+ adjustedSpec: F2
5310
5310
  });
5311
5311
  }
5312
5312
  }
@@ -5318,26 +5318,26 @@
5318
5318
  suffixTrace: p2.type === "split" ? qt(p2.axisFilters) : void 0
5319
5319
  }),
5320
5320
  l2
5321
- ), g2 = [];
5322
- for (const { value: p2, label: y2 } of d2) {
5323
- const { originalColumn: C2, spec: E2 } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, S2 = Bt(x2);
5321
+ ), y$1 = [];
5322
+ for (const { value: p2, label: g2 } of d2) {
5323
+ const { originalColumn: C, spec: E } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, S2 = Bt(x2);
5324
5324
  let P;
5325
- r ? P = r.deriveS(E2, S2) : P = Jt(C2.id, S2);
5325
+ r ? P = r.deriveS(E, S2) : P = Jt(C.id, S2);
5326
5326
  let T = { ...p2.adjustedSpec };
5327
5327
  s2 && (T = {
5328
5328
  ...T,
5329
5329
  annotations: {
5330
5330
  ...T.annotations ?? {},
5331
- "pl7.app/label": y2
5331
+ "pl7.app/label": g2
5332
5332
  }
5333
- }), g2.push({
5333
+ }), y$1.push({
5334
5334
  id: P,
5335
5335
  spec: T,
5336
5336
  data: () => p2.type === "split" ? Ie(Kt(p2.dataEntries, S2)) : p2.originalColumn.data,
5337
- label: y2
5337
+ label: g2
5338
5338
  });
5339
5339
  }
5340
- return g2;
5340
+ return y$1;
5341
5341
  }
5342
5342
  getColumns(e, n2) {
5343
5343
  const r = this.getUniversalEntries(e, {
@@ -5715,7 +5715,7 @@
5715
5715
  // return this.ctx.featureFlags;
5716
5716
  // }
5717
5717
  getNamedAccessor(e) {
5718
- return ge(
5718
+ return ye(
5719
5719
  this.ctx.getAccessorHandleByName(e),
5720
5720
  (n2) => new O(n2, [e])
5721
5721
  );
@@ -5788,7 +5788,7 @@
5788
5788
  this.ctx.logError(e);
5789
5789
  }
5790
5790
  }
5791
- const X = "1.40.6";
5791
+ const X = "1.41.1";
5792
5792
  function Gt(t) {
5793
5793
  return t.__renderLambda === true;
5794
5794
  }
@@ -5962,6 +5962,20 @@
5962
5962
  this._featureFlags
5963
5963
  );
5964
5964
  }
5965
+ /** Sets or overrides feature flags for the block. */
5966
+ withFeatureFlags(e) {
5967
+ return new w2(
5968
+ this._renderingMode,
5969
+ this._initialArgs,
5970
+ this._initialUiState,
5971
+ this._outputs,
5972
+ this._inputsValid,
5973
+ this._sections,
5974
+ this._title,
5975
+ this._enrichmentTargets,
5976
+ { ...this._featureFlags, ...e }
5977
+ );
5978
+ }
5965
5979
  /**
5966
5980
  * Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
5967
5981
  * Influences dependency graph construction.
@@ -5982,9 +5996,16 @@
5982
5996
  /** Renders all provided block settings into a pre-configured platforma API
5983
5997
  * instance, that can be used in frontend to interact with block state, and
5984
5998
  * other features provided by the platforma to the block. */
5985
- done() {
5999
+ done(e) {
6000
+ const n2 = e ?? 1;
6001
+ return this.withFeatureFlags({
6002
+ ...this._featureFlags,
6003
+ requiresUIAPIVersion: n2
6004
+ })._done(n2);
6005
+ }
6006
+ _done(e) {
5986
6007
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
5987
- const e = {
6008
+ const n2 = {
5988
6009
  v3: {
5989
6010
  sdkVersion: X,
5990
6011
  renderingMode: this._renderingMode,
@@ -6004,10 +6025,10 @@
6004
6025
  inputsValid: me(this._inputsValid),
6005
6026
  sections: me(this._sections),
6006
6027
  outputs: Object.fromEntries(
6007
- Object.entries(this._outputs).map(([n2, r]) => [n2, me(r)])
6028
+ Object.entries(this._outputs).map(([r, i]) => [r, me(i)])
6008
6029
  )
6009
6030
  };
6010
- return At() ? $e({ sdkVersion: X }) : { config: e };
6031
+ return globalThis.platformaApiVersion = e, At() ? $e({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n2 };
6011
6032
  }
6012
6033
  };
6013
6034
  V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
@@ -6139,62 +6160,62 @@
6139
6160
  var e;
6140
6161
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
6141
6162
  }
6142
- function ye(t, e) {
6163
+ function ge(t, e) {
6143
6164
  return [...new Map(t.map((n2) => [e(n2), n2])).values()];
6144
6165
  }
6145
- function Gn(t, e, n2, r) {
6166
+ function Wn(t, e, n2, r) {
6146
6167
  if (e.length === 0) return;
6147
6168
  const i = e.filter((c2) => Pe(c2.spec) || !Yt(c2.spec)), o = Ht(n2), s2 = zt(t.resultPool);
6148
6169
  if (!s2) return;
6149
6170
  const a = Re(i.map(qe), s2), l2 = [...i, ...a], h = [
6150
- ...ye(
6171
+ ...ge(
6151
6172
  [...l2.flatMap((c2) => c2.spec.axesSpec.map((v2) => y(v2)))],
6152
6173
  (c2) => hn(c2)
6153
6174
  ).map((c2) => ({ type: "axis", id: c2 })),
6154
6175
  ...l2.map((c2) => ({ type: "column", id: c2.id }))
6155
- ], f = new Set(h.map((c2) => hn(c2))), m2 = (c2) => f.has(hn(c2)), d2 = "full", g2 = o.pTableParams.partitionFilters.filter((c2) => {
6176
+ ], f = new Set(h.map((c2) => hn(c2))), m2 = (c2) => f.has(hn(c2)), d2 = "full", y$1 = o.pTableParams.partitionFilters.filter((c2) => {
6156
6177
  const v2 = m2(c2.column);
6157
6178
  return v2 || t.logWarn(`Partition filter ${JSON.stringify(c2)} does not match provided columns, skipping`), v2;
6158
- }), p2 = ye(
6179
+ }), p2 = ge(
6159
6180
  [...[], ...o.pTableParams.filters],
6160
6181
  (c2) => hn(c2.column)
6161
6182
  ).filter((c2) => {
6162
6183
  const v2 = m2(c2.column);
6163
6184
  return v2 || t.logWarn(`Filter ${JSON.stringify(c2)} does not match provided columns, skipping`), v2;
6164
- }), y$1 = ye(
6185
+ }), g2 = ge(
6165
6186
  [...[], ...o.pTableParams.sorting],
6166
6187
  (c2) => hn(c2.column)
6167
6188
  ).filter((c2) => {
6168
6189
  const v2 = m2(c2.column);
6169
6190
  return v2 || t.logWarn(`Sorting ${JSON.stringify(c2)} does not match provided columns, skipping`), v2;
6170
- }), C2 = Ne({
6191
+ }), C = Ne({
6171
6192
  columns: i,
6172
6193
  labelColumns: a,
6173
6194
  coreJoinType: d2,
6174
- partitionFilters: g2,
6195
+ partitionFilters: y$1,
6175
6196
  filters: p2,
6176
- sorting: y$1,
6197
+ sorting: g2,
6177
6198
  coreColumnPredicate: void 0
6178
- }), E2 = t.createPTable(C2), x2 = new Set((() => {
6199
+ }), E = t.createPTable(C), x2 = new Set((() => {
6179
6200
  const c2 = o.pTableParams.hiddenColIds;
6180
6201
  return c2 || i.filter((v2) => Qt(v2.spec)).map((v2) => v2.id);
6181
6202
  })());
6182
- i.filter((c2) => Pe(c2.spec)).forEach((c2) => x2.delete(c2.id)), [...g2.map((c2) => c2.column), ...p2.map((c2) => c2.column), ...y$1.map((c2) => c2.column)].filter((c2) => c2.type === "column").forEach((c2) => x2.delete(c2.id));
6203
+ i.filter((c2) => Pe(c2.spec)).forEach((c2) => x2.delete(c2.id)), [...y$1.map((c2) => c2.column), ...p2.map((c2) => c2.column), ...g2.map((c2) => c2.column)].filter((c2) => c2.type === "column").forEach((c2) => x2.delete(c2.id));
6183
6204
  const S2 = i.filter((c2) => !x2.has(c2.id)), P = Re(S2.map(qe), s2);
6184
6205
  if (!Xt([...S2, ...P])) return;
6185
6206
  const T = Ne({
6186
6207
  columns: S2,
6187
6208
  labelColumns: P,
6188
6209
  coreJoinType: d2,
6189
- partitionFilters: g2,
6210
+ partitionFilters: y$1,
6190
6211
  filters: p2,
6191
- sorting: y$1,
6212
+ sorting: g2,
6192
6213
  coreColumnPredicate: void 0
6193
- }), F = t.createPTable(T);
6214
+ }), F2 = t.createPTable(T);
6194
6215
  return {
6195
6216
  sourceId: o.pTableParams.sourceId,
6196
- fullTableHandle: E2,
6197
- visibleTableHandle: F
6217
+ fullTableHandle: E,
6218
+ visibleTableHandle: F2
6198
6219
  };
6199
6220
  }
6200
6221
  function Pe(t) {
@@ -6230,7 +6251,8 @@
6230
6251
  sourceId: "source_1",
6231
6252
  state: De()
6232
6253
  },
6233
- dynamicSections: []
6254
+ dynamicSections: [],
6255
+ datasets: []
6234
6256
  }).argsValid((ctx) => {
6235
6257
  if (ctx.args.numbers.length === 5) {
6236
6258
  throw new Error("argsValid: test error");
@@ -6436,7 +6458,7 @@
6436
6458
  })
6437
6459
  });
6438
6460
  }
6439
- return Gn(
6461
+ return Wn(
6440
6462
  ctx,
6441
6463
  columns,
6442
6464
  ctx.uiState.dataTableV2.state
@@ -6458,6 +6480,7 @@
6458
6480
  return [
6459
6481
  { type: "link", href: "/loaders", label: "Loaders" },
6460
6482
  { type: "link", href: "/", label: "Icons/Masks" },
6483
+ { type: "link", href: "/state", label: "State" },
6461
6484
  { type: "link", href: "/layout", label: "Layout" },
6462
6485
  { type: "link", href: "/form-components", label: "Form Components" },
6463
6486
  { type: "link", href: "/log-view", label: "PlLogView" },
@@ -6495,7 +6518,7 @@
6495
6518
  label: "New Dynamic section"
6496
6519
  }
6497
6520
  ];
6498
- }).done();
6521
+ }).done(2);
6499
6522
  exports2.$BlockArgs = $BlockArgs;
6500
6523
  exports2.ImportFileHandleSchema = ImportFileHandleSchema;
6501
6524
  exports2.platforma = platforma;