@milaboratories/milaboratories.pool-explorer.model 1.0.52 → 1.0.53

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.pool-explorer.model@1.0.52 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.53 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
4
4
  > tsup && vite build && block-tools build-model
5
5
 
6
6
  CLI Building entry: src/index.ts
@@ -11,14 +11,14 @@
11
11
  CLI Cleaning output folder
12
12
  CJS Build start
13
13
  ESM Build start
14
- CJS dist/index.cjs 436.00 B
15
- CJS dist/index.cjs.map 1013.00 B
16
- CJS ⚡️ Build success in 210ms
17
14
  ESM dist/index.js 410.00 B
18
15
  ESM dist/index.js.map 996.00 B
19
- ESM ⚡️ Build success in 210ms
16
+ ESM ⚡️ Build success in 195ms
17
+ CJS dist/index.cjs 436.00 B
18
+ CJS dist/index.cjs.map 1013.00 B
19
+ CJS ⚡️ Build success in 195ms
20
20
  DTS Build start
21
- DTS ⚡️ Build success in 4112ms
21
+ DTS ⚡️ Build success in 3169ms
22
22
  DTS dist/index.d.cts 1.14 KB
23
23
  DTS dist/index.d.ts 1.14 KB
24
24
  vite v6.3.5 building for production...
@@ -26,6 +26,6 @@ transforming...
26
26
  ✓ 11 modules transformed.
27
27
  rendering chunks...
28
28
  computing gzip size...
29
- dist/bundle.js 179.27 kB │ gzip: 34.39 kB │ map: 392.15 kB
30
- dist/bundle.js 191.55 kB │ gzip: 35.00 kB │ map: 393.62 kB
31
- ✓ built in 2.22s
29
+ dist/bundle.js 179.26 kB │ gzip: 34.38 kB │ map: 392.03 kB
30
+ dist/bundle.js 191.54 kB │ gzip: 34.99 kB │ map: 393.51 kB
31
+ ✓ built in 2.00s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @milaboratories/milaboratories.pool-explorer.model
2
2
 
3
+ ## 1.0.53
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [35ce863]
8
+ - @platforma-sdk/model@1.34.0
9
+
3
10
  ## 1.0.52
4
11
 
5
12
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -4519,7 +4519,7 @@
4519
4519
  function re(t) {
4520
4520
  return { type: "Immediate", value: t };
4521
4521
  }
4522
- function dt() {
4522
+ function pt() {
4523
4523
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4524
4524
  }
4525
4525
  function De(t) {
@@ -4528,7 +4528,7 @@
4528
4528
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4529
4529
  throw new Error("Can't get platforma instance.");
4530
4530
  }
4531
- function pt() {
4531
+ function ft() {
4532
4532
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4533
4533
  }
4534
4534
  function m() {
@@ -4536,13 +4536,13 @@
4536
4536
  throw new Error("Not in config rendering context");
4537
4537
  }
4538
4538
  function H(t, e) {
4539
- const n2 = pt();
4539
+ const n2 = ft();
4540
4540
  if (n2 === void 0) return false;
4541
4541
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4542
4542
  return n2.callbackRegistry[t] = e, true;
4543
4543
  }
4544
4544
  const ce = /* @__PURE__ */ new Map();
4545
- function ft(t, e) {
4545
+ function ht(t, e) {
4546
4546
  t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
4547
4547
  for (const r of ce.get(t))
4548
4548
  r(n2);
@@ -4552,7 +4552,7 @@
4552
4552
  constructor(e, n2 = (r) => r) {
4553
4553
  O(this, "isResolved", false);
4554
4554
  O(this, "resolvedValue");
4555
- this.handle = e, this.postProcess = n2, ft(e, (r) => {
4555
+ this.handle = e, this.postProcess = n2, ht(e, (r) => {
4556
4556
  this.resolvedValue = n2(r), this.isResolved = true;
4557
4557
  });
4558
4558
  }
@@ -4793,39 +4793,39 @@
4793
4793
  }
4794
4794
  }
4795
4795
  const Re = "staging", Fe = "main";
4796
- const mt = "pl7.app/label", yt = "pl7.app/trace", vt = z$1.object({
4796
+ const yt = "pl7.app/label", vt = "pl7.app/trace", bt = z$1.object({
4797
4797
  type: z$1.string(),
4798
4798
  importance: z$1.number().optional(),
4799
4799
  id: z$1.string().optional(),
4800
4800
  label: z$1.string()
4801
- }), bt = z$1.array(vt), wt = 1e-3, At = "__LABEL__", Pe = "__LABEL__@1";
4802
- function Ve(t, e, n2 = {}) {
4801
+ }), wt = z$1.array(bt), At = 1e-3, xt = "__LABEL__", Pe = "__LABEL__@1";
4802
+ function je(t, e, n2 = {}) {
4803
4803
  const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((f2) => {
4804
- var P2, F;
4804
+ var P2, R;
4805
4805
  const w2 = e(f2);
4806
4806
  let p2, g, b;
4807
4807
  "spec" in w2 && typeof w2.spec == "object" ? (p2 = w2.spec, g = w2.prefixTrace, b = w2.suffixTrace) : p2 = w2;
4808
- const h2 = (P2 = p2.annotations) == null ? void 0 : P2[mt], I = (F = p2.annotations) == null ? void 0 : F[yt], x = (I ? bt.safeParse(JSON.parse(I)).data : void 0) ?? [], v = [
4808
+ const h2 = (P2 = p2.annotations) == null ? void 0 : P2[yt], I = (R = p2.annotations) == null ? void 0 : R[vt], x = (I ? wt.safeParse(JSON.parse(I)).data : void 0) ?? [], v = [
4809
4809
  ...g ?? [],
4810
4810
  ...x,
4811
4811
  ...b ?? []
4812
4812
  ];
4813
4813
  if (h2 !== void 0) {
4814
- const k2 = { label: h2, type: At, importance: -2 };
4814
+ const k2 = { label: h2, type: xt, importance: -2 };
4815
4815
  n2.addLabelAsSuffix ? v.push(k2) : v.splice(0, 0, k2);
4816
4816
  }
4817
4817
  const A = [], L = /* @__PURE__ */ new Map();
4818
4818
  for (let k2 = v.length - 1; k2 >= 0; --k2) {
4819
- const { type: W } = v[k2], V = v[k2].importance ?? 0, $ = (L.get(W) ?? 0) + 1;
4819
+ const { type: W } = v[k2], j2 = v[k2].importance ?? 0, $ = (L.get(W) ?? 0) + 1;
4820
4820
  L.set(W, $);
4821
- const K2 = `${W}@${$}`;
4822
- s2.set(K2, (s2.get(K2) ?? 0) + 1), r.set(
4823
- K2,
4821
+ const F = `${W}@${$}`;
4822
+ s2.set(F, (s2.get(F) ?? 0) + 1), r.set(
4823
+ F,
4824
4824
  Math.max(
4825
- r.get(K2) ?? Number.NEGATIVE_INFINITY,
4826
- V - (v.length - k2) * wt
4825
+ r.get(F) ?? Number.NEGATIVE_INFINITY,
4826
+ j2 - (v.length - k2) * At
4827
4827
  )
4828
- ), A.push({ ...v[k2], fullType: K2, occurrenceIndex: $ });
4828
+ ), A.push({ ...v[k2], fullType: F, occurrenceIndex: $ });
4829
4829
  }
4830
4830
  return A.reverse(), {
4831
4831
  value: f2,
@@ -4872,7 +4872,7 @@
4872
4872
  }
4873
4873
  return c2(/* @__PURE__ */ new Set([...a, ...l2]), true);
4874
4874
  }
4875
- const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", je = Z + "Partitioned/", ae = je + "JsonPartitioned", z = je + "BinaryPartitioned";
4875
+ const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Ve = Z + "Partitioned/", ae = Ve + "JsonPartitioned", z = Ve + "BinaryPartitioned";
4876
4876
  const me = (t) => {
4877
4877
  if (t.endsWith(".index"))
4878
4878
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
@@ -4880,7 +4880,7 @@
4880
4880
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4881
4881
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4882
4882
  };
4883
- function xt(t) {
4883
+ function Ct(t) {
4884
4884
  if (!t) return;
4885
4885
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4886
4886
  let i = 0;
@@ -4926,7 +4926,7 @@
4926
4926
  }
4927
4927
  return { data: r, keyLength: i };
4928
4928
  }
4929
- function Ct(t) {
4929
+ function Pt(t) {
4930
4930
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4931
4931
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4932
4932
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4945,11 +4945,11 @@
4945
4945
  }
4946
4946
  return r.map((i) => Array.from(i.values()));
4947
4947
  }
4948
- function Pt(t) {
4948
+ function St(t) {
4949
4949
  if (t === void 0) return;
4950
4950
  if (K(t))
4951
- return Ct(t);
4952
- const e = xt(t);
4951
+ return Pt(t);
4952
+ const e = Ct(t);
4953
4953
  if (!e) return;
4954
4954
  const { data: n2, keyLength: r } = e, i = [];
4955
4955
  for (let s2 = 0; s2 < r; ++s2)
@@ -5060,7 +5060,7 @@
5060
5060
  throw new Error(`Unknown resource type: ${n2}`);
5061
5061
  }
5062
5062
  }
5063
- function St(t) {
5063
+ function _t(t) {
5064
5064
  if (t !== void 0) {
5065
5065
  if (K(t)) return t;
5066
5066
  if (En(t)) return Cn(t);
@@ -5068,7 +5068,7 @@
5068
5068
  throw new Error(`Unexpected input type: ${typeof t}`);
5069
5069
  }
5070
5070
  }
5071
- function _t(t, e) {
5071
+ function It(t, e) {
5072
5072
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5073
5073
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5074
5074
  const { partitionKeyLength: s2 } = t;
@@ -5128,13 +5128,13 @@
5128
5128
  }
5129
5129
  }
5130
5130
  }
5131
- function It(t) {
5131
+ function Lt(t) {
5132
5132
  if (!Array.isArray(t)) return false;
5133
5133
  if (t.length === 0) return true;
5134
5134
  const e = t[0];
5135
5135
  return typeof e == "object" && e !== null && "key" in e && "val" in e;
5136
5136
  }
5137
- class Lt {
5137
+ class Tt {
5138
5138
  constructor(e) {
5139
5139
  this.columns = e;
5140
5140
  }
@@ -5143,7 +5143,7 @@
5143
5143
  return this.columns.filter((r) => n2(r.spec));
5144
5144
  }
5145
5145
  }
5146
- function Tt(t) {
5146
+ function Et(t) {
5147
5147
  if (t)
5148
5148
  return t.map((e) => ({
5149
5149
  type: `split:${Rn(e.axisId)}`,
@@ -5152,11 +5152,11 @@
5152
5152
  // High importance for split filters in labels
5153
5153
  }));
5154
5154
  }
5155
- function Et(t) {
5155
+ function kt(t) {
5156
5156
  if (t)
5157
5157
  return t.map((e) => [e.axisIdx, e.value]);
5158
5158
  }
5159
- function kt(t, e) {
5159
+ function Ot(t, e) {
5160
5160
  if (!e || e.length === 0) return t;
5161
5161
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5162
5162
  return ke({ id: t, axisFilters: n2 });
@@ -5166,7 +5166,7 @@
5166
5166
  const e = t, n2 = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
5167
5167
  return !!e.domainAnchor || n2 || r;
5168
5168
  }
5169
- function Ot(t) {
5169
+ function Dt(t) {
5170
5170
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5171
5171
  return [];
5172
5172
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5177,7 +5177,7 @@
5177
5177
  class le {
5178
5178
  constructor() {
5179
5179
  O(this, "defaultProviderStore", []);
5180
- O(this, "providers", [new Lt(this.defaultProviderStore)]);
5180
+ O(this, "providers", [new Tt(this.defaultProviderStore)]);
5181
5181
  O(this, "axisLabelProviders", []);
5182
5182
  }
5183
5183
  addColumnProvider(e) {
@@ -5233,55 +5233,55 @@
5233
5233
  if (u2(P2.spec)) continue;
5234
5234
  if (h2.has(P2.id))
5235
5235
  throw new Error(`Duplicate column id ${P2.id} in provider ${A.constructor.name}`);
5236
- const F = Qn(P2.spec);
5237
- y.has(F) || (h2.add(P2.id), y.add(F), I.push(P2));
5236
+ const R = Qn(P2.spec);
5237
+ y.has(R) || (h2.add(P2.id), y.add(R), I.push(P2));
5238
5238
  }
5239
5239
  }
5240
5240
  if (I.length === 0) continue;
5241
- const x = Ot(p2), v = x.length > 0;
5241
+ const x = Dt(p2), v = x.length > 0;
5242
5242
  for (const A of I) {
5243
5243
  if (!f(A.spec)) continue;
5244
5244
  const L = A.spec;
5245
5245
  if (v) {
5246
- if (It(A.data))
5246
+ if (Lt(A.data))
5247
5247
  throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${A.id}`);
5248
- const P2 = St(A.data);
5248
+ const P2 = _t(A.data);
5249
5249
  if (!P2) {
5250
5250
  if (s2) continue;
5251
5251
  return;
5252
5252
  }
5253
5253
  if (!Sn(P2))
5254
5254
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${P2.type} for column ${A.id}`);
5255
- const F = Pt(P2), k2 = x[x.length - 1];
5255
+ const R = St(P2), k2 = x[x.length - 1];
5256
5256
  if (k2 >= P2.partitionKeyLength)
5257
5257
  throw new Error(`Not enough partition keys (${P2.partitionKeyLength}) for requested split axes (max index ${k2}) in column ${L.name}`);
5258
- const W = x.map((S) => this.findLabels(p$1(L.axesSpec[S]))), V = [], $ = (S, G) => {
5258
+ const W = x.map((S) => this.findLabels(p$1(L.axesSpec[S]))), j2 = [], $ = (S, G) => {
5259
5259
  if (G >= x.length) {
5260
- if (V.push([...S]), V.length > 1e4)
5260
+ if (j2.push([...S]), j2.length > 1e4)
5261
5261
  throw new Error("Too many key combinations, aborting.");
5262
5262
  return;
5263
5263
  }
5264
- const j2 = x[G];
5265
- if (j2 >= F.length)
5266
- throw new Error(`Axis index ${j2} out of bounds for unique keys array (length ${F.length}) during split key generation for column ${A.id}`);
5267
- const N2 = F[j2];
5264
+ const V = x[G];
5265
+ if (V >= R.length)
5266
+ throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${A.id}`);
5267
+ const N2 = R[V];
5268
5268
  if (!N2 || N2.length === 0) {
5269
- V.length = 0;
5269
+ j2.length = 0;
5270
5270
  return;
5271
5271
  }
5272
5272
  for (const ee of N2)
5273
5273
  S.push(ee), $(S, G + 1), S.pop();
5274
5274
  };
5275
- if ($([], 0), V.length === 0)
5275
+ if ($([], 0), j2.length === 0)
5276
5276
  continue;
5277
- const K2 = [...L.axesSpec], Be = x.map((S) => S);
5277
+ const F = [...L.axesSpec], Be = x.map((S) => S);
5278
5278
  for (let S = x.length - 1; S >= 0; S--)
5279
- K2.splice(x[S], 1);
5280
- const We = { ...L, axesSpec: K2 };
5281
- for (const S of V) {
5282
- const G = S.map((j2, N2) => {
5283
- const ee = Be[N2], Ge = p$1(L.axesSpec[ee]), ue = W[N2], He = (ue == null ? void 0 : ue[j2]) ?? String(j2);
5284
- return { axisIdx: ee, axisId: Ge, value: j2, label: He };
5279
+ F.splice(x[S], 1);
5280
+ const We = { ...L, axesSpec: F };
5281
+ for (const S of j2) {
5282
+ const G = S.map((V, N2) => {
5283
+ const ee = Be[N2], Ge = p$1(L.axesSpec[ee]), ue = W[N2], He = (ue == null ? void 0 : ue[V]) ?? String(V);
5284
+ return { axisIdx: ee, axisId: Ge, value: V, label: He };
5285
5285
  });
5286
5286
  d.push({
5287
5287
  type: "split",
@@ -5302,18 +5302,18 @@
5302
5302
  }
5303
5303
  }
5304
5304
  if (d.length === 0) return [];
5305
- const f$1 = Ve(
5305
+ const f$1 = je(
5306
5306
  d,
5307
5307
  (p2) => ({
5308
5308
  spec: p2.spec,
5309
- suffixTrace: p2.type === "split" ? Tt(p2.axisFilters) : void 0
5309
+ suffixTrace: p2.type === "split" ? Et(p2.axisFilters) : void 0
5310
5310
  }),
5311
5311
  l2
5312
5312
  ), w2 = [];
5313
5313
  for (const { value: p2, label: g } of f$1) {
5314
- const { originalColumn: b, spec: h2 } = p2, I = p2.type === "split" ? p2.axisFilters : void 0, x = Et(I);
5314
+ const { originalColumn: b, spec: h2 } = p2, I = p2.type === "split" ? p2.axisFilters : void 0, x = kt(I);
5315
5315
  let v;
5316
- r ? v = r.deriveS(h2, x) : v = kt(b.id, x);
5316
+ r ? v = r.deriveS(h2, x) : v = Ot(b.id, x);
5317
5317
  let A = { ...p2.adjustedSpec };
5318
5318
  o && (A = {
5319
5319
  ...A,
@@ -5324,7 +5324,7 @@
5324
5324
  }), w2.push({
5325
5325
  id: v,
5326
5326
  spec: A,
5327
- data: () => p2.type === "split" ? Jn(_t(p2.dataEntries, x)) : p2.originalColumn.data,
5327
+ data: () => p2.type === "split" ? Jn(It(p2.dataEntries, x)) : p2.originalColumn.data,
5328
5328
  label: g
5329
5329
  });
5330
5330
  }
@@ -5363,7 +5363,7 @@
5363
5363
  function _e(t) {
5364
5364
  return Wn(t, (e) => e instanceof E ? e.handle : En(e) ? Nn(e, (n2) => n2.handle) : e);
5365
5365
  }
5366
- class Dt {
5366
+ class Rt {
5367
5367
  constructor() {
5368
5368
  O(this, "ctx", m());
5369
5369
  }
@@ -5376,7 +5376,7 @@
5376
5376
  getOptions(e, n2) {
5377
5377
  const r = typeof e == "function" ? e : Gn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5378
5378
  let s2 = {}, o = false;
5379
- return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? Ve(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5379
+ return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? je(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5380
5380
  ref: te$1(a, o),
5381
5381
  label: l2
5382
5382
  })) : i.map(({ ref: a, obj: l2 }) => ({
@@ -5638,7 +5638,7 @@
5638
5638
  O(this, "args");
5639
5639
  O(this, "uiState");
5640
5640
  O(this, "_activeArgsCache");
5641
- O(this, "resultPool", new Dt());
5641
+ O(this, "resultPool", new Rt());
5642
5642
  this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5643
5643
  }
5644
5644
  /**
@@ -5715,13 +5715,13 @@
5715
5715
  this.ctx.logError(e);
5716
5716
  }
5717
5717
  }
5718
- const Y = "1.33.17";
5719
- function Rt(t) {
5718
+ const Y = "1.34.0";
5719
+ function Ft(t) {
5720
5720
  return t.__renderLambda === true;
5721
5721
  }
5722
5722
  function pe(t) {
5723
5723
  if (t !== void 0)
5724
- return Rt(t) ? t.handle : t;
5724
+ return Ft(t) ? t.handle : t;
5725
5725
  }
5726
5726
  class T {
5727
5727
  constructor(e, n2, r, i, s2, o, a, l2) {
@@ -5921,7 +5921,7 @@
5921
5921
  Object.entries(this._outputs).map(([n2, r]) => [n2, pe(r)])
5922
5922
  )
5923
5923
  };
5924
- return dt() ? De({ sdkVersion: Y }) : { config: e };
5924
+ return pt() ? De({ sdkVersion: Y }) : { config: e };
5925
5925
  }
5926
5926
  }
5927
5927
  const platforma = T.create("Heavy").withArgs({ titleArg: "The title" }).output("allSpecs", (ctx) => ctx.resultPool.getSpecs()).sections((ctx) => {