@milaboratories/milaboratories.pool-explorer.model 1.0.40 → 1.0.42

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.40 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.42 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
@@ -13,12 +13,12 @@
13
13
  ESM Build start
14
14
  CJS dist/index.cjs 436.00 B
15
15
  CJS dist/index.cjs.map 1013.00 B
16
- CJS ⚡️ Build success in 190ms
16
+ CJS ⚡️ Build success in 201ms
17
17
  ESM dist/index.js 410.00 B
18
18
  ESM dist/index.js.map 996.00 B
19
- ESM ⚡️ Build success in 190ms
19
+ ESM ⚡️ Build success in 201ms
20
20
  DTS Build start
21
- DTS ⚡️ Build success in 3786ms
21
+ DTS ⚡️ Build success in 3874ms
22
22
  DTS dist/index.d.cts 1.14 KB
23
23
  DTS dist/index.d.ts 1.14 KB
24
24
  vite v5.4.11 building for production...
@@ -26,6 +26,6 @@ transforming...
26
26
  ✓ 9 modules transformed.
27
27
  rendering chunks...
28
28
  computing gzip size...
29
- dist/bundle.js 178.09 kB │ gzip: 34.15 kB │ map: 386.86 kB
30
- dist/bundle.js 190.30 kB │ gzip: 34.75 kB │ map: 388.32 kB
29
+ dist/bundle.js 178.10 kB │ gzip: 34.15 kB │ map: 387.23 kB
30
+ dist/bundle.js 190.31 kB │ gzip: 34.75 kB │ map: 388.70 kB
31
31
  ✓ built in 2.19s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @milaboratories/milaboratories.pool-explorer.model
2
2
 
3
+ ## 1.0.42
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e25600e]
8
+ - @platforma-sdk/model@1.31.14
9
+
10
+ ## 1.0.41
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [89fd5d3]
15
+ - @platforma-sdk/model@1.31.6
16
+
3
17
  ## 1.0.40
4
18
 
5
19
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -3948,13 +3948,13 @@
3948
3948
  quotelessJson,
3949
3949
  ZodError
3950
3950
  });
3951
- var $ = Object.defineProperty;
3952
- var D = (n2, e, t) => e in n2 ? $(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
3951
+ var I$1 = Object.defineProperty;
3952
+ var D = (n2, e, t) => e in n2 ? I$1(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
3953
3953
  var l$1 = (n2, e, t) => D(n2, typeof e != "symbol" ? e + "" : e, t);
3954
3954
  function w(n2) {
3955
3955
  throw new Error("Unexpected object: " + n2);
3956
3956
  }
3957
- function pn(n2) {
3957
+ function yn(n2) {
3958
3958
  if (!n2 || typeof n2 != "object")
3959
3959
  return false;
3960
3960
  const e = n2;
@@ -3971,7 +3971,7 @@
3971
3971
  return false;
3972
3972
  }
3973
3973
  }
3974
- function ln(n2, e) {
3974
+ function hn(n2, e) {
3975
3975
  if (n2 !== void 0)
3976
3976
  switch (n2.type) {
3977
3977
  case "Json":
@@ -4016,10 +4016,10 @@
4016
4016
  return false;
4017
4017
  }
4018
4018
  }
4019
- function yn(n2) {
4019
+ function gn(n2) {
4020
4020
  return F$1(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4021
4021
  }
4022
- function hn(n2) {
4022
+ function bn(n2) {
4023
4023
  switch (n2.type) {
4024
4024
  case "Json": {
4025
4025
  const e = Object.entries(n2.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
@@ -4047,7 +4047,7 @@
4047
4047
  }
4048
4048
  }
4049
4049
  }
4050
- function gn(n2) {
4050
+ function wn(n2) {
4051
4051
  switch (n2.type) {
4052
4052
  case "Json": {
4053
4053
  const e = {};
@@ -4088,7 +4088,7 @@
4088
4088
  function C(n2) {
4089
4089
  return n2.map(p$1);
4090
4090
  }
4091
- function Jn(n2) {
4091
+ function $n(n2) {
4092
4092
  return De(p$1(n2));
4093
4093
  }
4094
4094
  function z$1(n2, e) {
@@ -4101,7 +4101,7 @@
4101
4101
  function X(n2, e) {
4102
4102
  return n2.name === e.name && z$1(n2.domain, e.domain);
4103
4103
  }
4104
- function On(n2, e) {
4104
+ function In(n2, e) {
4105
4105
  return { ...n2, src: h(n2.src, e) };
4106
4106
  }
4107
4107
  function h(n2, e) {
@@ -4145,7 +4145,7 @@
4145
4145
  function A(n2, e) {
4146
4146
  return JSON.stringify([n2, e]);
4147
4147
  }
4148
- class $n {
4148
+ class Ln {
4149
4149
  /**
4150
4150
  * Creates a new anchor context from a set of anchor column specifications
4151
4151
  * @param anchors Record of anchor column specifications indexed by anchor ID
@@ -4239,7 +4239,7 @@
4239
4239
  return G(this.derive(e, t));
4240
4240
  }
4241
4241
  }
4242
- function Dn(n2, e, t) {
4242
+ function Vn(n2, e, t) {
4243
4243
  const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
4244
4244
  if (r.domainAnchor !== void 0) {
4245
4245
  const s2 = n2[r.domainAnchor];
@@ -4304,17 +4304,17 @@
4304
4304
  function Z$1(n2) {
4305
4305
  return f$1(n2.spec);
4306
4306
  }
4307
- function jn(n2) {
4307
+ function Un(n2) {
4308
4308
  if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4309
4309
  return n2;
4310
4310
  }
4311
- function Fn(n2, e) {
4311
+ function Kn(n2, e) {
4312
4312
  return n2 === void 0 ? void 0 : {
4313
4313
  ...n2,
4314
4314
  data: e(n2.data)
4315
4315
  };
4316
4316
  }
4317
- function Un(n2) {
4317
+ function Rn(n2) {
4318
4318
  const e = /* @__PURE__ */ new Map(), t = (r) => {
4319
4319
  switch (r.type) {
4320
4320
  case "column":
@@ -4403,10 +4403,10 @@
4403
4403
  }
4404
4404
  return true;
4405
4405
  }
4406
- function Kn(n2) {
4406
+ function vn(n2) {
4407
4407
  return Array.isArray(n2) ? (e) => n2.some((t) => f$1(e) && N(e, t)) : (e) => f$1(e) && N(e, n2);
4408
4408
  }
4409
- function Rn(n2) {
4409
+ function _n(n2) {
4410
4410
  const e = {
4411
4411
  kind: n2.kind,
4412
4412
  name: n2.name
@@ -4421,10 +4421,10 @@
4421
4421
  }).describe(
4422
4422
  "Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
4423
4423
  ).readonly();
4424
- function Mn(n2) {
4424
+ function Hn(n2) {
4425
4425
  return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4426
4426
  }
4427
- function Hn(n2, e = true) {
4427
+ function Wn(n2, e = true) {
4428
4428
  if (e)
4429
4429
  return {
4430
4430
  ...n2,
@@ -4435,7 +4435,7 @@
4435
4435
  return r;
4436
4436
  }
4437
4437
  }
4438
- function Wn(n2, e) {
4438
+ function Xn(n2, e) {
4439
4439
  return n2.ok ? { ok: true, value: e(n2.value) } : n2;
4440
4440
  }
4441
4441
  const sn = 24;
@@ -4672,20 +4672,20 @@
4672
4672
  const i = {};
4673
4673
  for (const [s2, o] of Object.entries(r)) {
4674
4674
  const a = [...this.resolvePath, s2];
4675
- i[s2] = Fn(o, (l2) => new E(l2, a));
4675
+ i[s2] = Kn(o, (l2) => new E(l2, a));
4676
4676
  }
4677
4677
  return i;
4678
4678
  }
4679
- getFileContentAsBase64() {
4680
- return new I(f().getBlobContentAsBase64(this.handle));
4679
+ getFileContentAsBase64(e) {
4680
+ return new I(f().getBlobContentAsBase64(this.handle, e));
4681
4681
  }
4682
- getFileContentAsString() {
4683
- return new I(f().getBlobContentAsString(this.handle));
4682
+ getFileContentAsString(e) {
4683
+ return new I(f().getBlobContentAsString(this.handle, e));
4684
4684
  }
4685
- getFileContentAsJson() {
4685
+ getFileContentAsJson(e) {
4686
4686
  return new I(
4687
- f().getBlobContentAsString(this.handle)
4688
- ).mapDefined((e) => JSON.parse(e));
4687
+ f().getBlobContentAsString(this.handle, e)
4688
+ ).mapDefined((n2) => JSON.parse(n2));
4689
4689
  }
4690
4690
  /**
4691
4691
  * @deprecated use getFileContentAsBase64
@@ -4795,16 +4795,16 @@
4795
4795
  }
4796
4796
  const P = [], T = /* @__PURE__ */ new Map();
4797
4797
  for (let D2 = y.length - 1; D2 >= 0; --D2) {
4798
- const { type: W } = y[D2], j = y[D2].importance ?? 0, $2 = (T.get(W) ?? 0) + 1;
4799
- T.set(W, $2);
4800
- const k2 = `${W}@${$2}`;
4798
+ const { type: W } = y[D2], j = y[D2].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
4799
+ T.set(W, $);
4800
+ const k2 = `${W}@${$}`;
4801
4801
  s2.set(k2, (s2.get(k2) ?? 0) + 1), r.set(
4802
4802
  k2,
4803
4803
  Math.max(
4804
4804
  r.get(k2) ?? Number.NEGATIVE_INFINITY,
4805
4805
  j - (y.length - D2) * xt
4806
4806
  )
4807
- ), P.push({ ...y[D2], fullType: k2, occurrenceIndex: $2 });
4807
+ ), P.push({ ...y[D2], fullType: k2, occurrenceIndex: $ });
4808
4808
  }
4809
4809
  return P.reverse(), {
4810
4810
  value: g,
@@ -5042,7 +5042,7 @@
5042
5042
  function It(t) {
5043
5043
  if (t !== void 0) {
5044
5044
  if (F$1(t)) return t;
5045
- if (pn(t)) return hn(t);
5045
+ if (yn(t)) return bn(t);
5046
5046
  if (t instanceof E) return ge(t);
5047
5047
  throw new Error(`Unexpected input type: ${typeof t}`);
5048
5048
  }
@@ -5112,14 +5112,14 @@
5112
5112
  this.columns = e;
5113
5113
  }
5114
5114
  selectColumns(e) {
5115
- const n2 = typeof e == "function" ? e : Kn(e);
5115
+ const n2 = typeof e == "function" ? e : vn(e);
5116
5116
  return this.columns.filter((r) => n2(r.spec));
5117
5117
  }
5118
5118
  }
5119
5119
  function Et(t) {
5120
5120
  if (t)
5121
5121
  return t.map((e) => ({
5122
- type: `split:${Jn(e.axisId)}`,
5122
+ type: `split:${$n(e.axisId)}`,
5123
5123
  label: e.label,
5124
5124
  importance: 1e6
5125
5125
  // High importance for split filters in labels
@@ -5183,9 +5183,9 @@
5183
5183
  if (Se(v)) {
5184
5184
  if (!r)
5185
5185
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
5186
- return Kn(Dn(r.anchors, v, n2));
5186
+ return vn(Vn(r.anchors, v, n2));
5187
5187
  } else
5188
- return Kn(v);
5188
+ return vn(v);
5189
5189
  });
5190
5190
  u2 = (v) => c2.some((b) => b(v));
5191
5191
  }
@@ -5196,7 +5196,7 @@
5196
5196
  if (v) {
5197
5197
  if (!r)
5198
5198
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5199
- b = Dn(r.anchors, c2, n2);
5199
+ b = Vn(r.anchors, c2, n2);
5200
5200
  } else
5201
5201
  b = c2;
5202
5202
  const p2 = /* @__PURE__ */ new Set(), A2 = [];
@@ -5206,7 +5206,7 @@
5206
5206
  if (u2(S.spec)) continue;
5207
5207
  if (p2.has(S.id))
5208
5208
  throw new Error(`Duplicate column id ${S.id} in provider ${P.constructor.name}`);
5209
- const O = Rn(S.spec);
5209
+ const O = _n(S.spec);
5210
5210
  w2.has(O) || (p2.add(S.id), w2.add(O), A2.push(S));
5211
5211
  }
5212
5212
  }
@@ -5221,12 +5221,12 @@
5221
5221
  if (s2) continue;
5222
5222
  return;
5223
5223
  }
5224
- if (!yn(S))
5224
+ if (!gn(S))
5225
5225
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${P.id}`);
5226
5226
  const O = _t(S), D2 = x2[x2.length - 1];
5227
5227
  if (D2 >= S.partitionKeyLength)
5228
5228
  throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D2}) in column ${T.name}`);
5229
- const W = x2.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j = [], $2 = (_, G2) => {
5229
+ const W = x2.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j = [], $ = (_, G2) => {
5230
5230
  if (G2 >= x2.length) {
5231
5231
  if (j.push([..._]), j.length > 1e4)
5232
5232
  throw new Error("Too many key combinations, aborting.");
@@ -5241,9 +5241,9 @@
5241
5241
  return;
5242
5242
  }
5243
5243
  for (const ee of J)
5244
- _.push(ee), $2(_, G2 + 1), _.pop();
5244
+ _.push(ee), $(_, G2 + 1), _.pop();
5245
5245
  };
5246
- if ($2([], 0), j.length === 0)
5246
+ if ($([], 0), j.length === 0)
5247
5247
  continue;
5248
5248
  const k2 = [...T.axesSpec], We = x2.map((_) => _);
5249
5249
  for (let _ = x2.length - 1; _ >= 0; _--)
@@ -5295,7 +5295,7 @@
5295
5295
  }), m2.push({
5296
5296
  id: y,
5297
5297
  spec: P,
5298
- data: () => c2.type === "split" ? gn(Tt(c2.dataEntries, x2)) : c2.originalColumn.data,
5298
+ data: () => c2.type === "split" ? wn(Tt(c2.dataEntries, x2)) : c2.originalColumn.data,
5299
5299
  label: v
5300
5300
  });
5301
5301
  }
@@ -5332,7 +5332,7 @@
5332
5332
  return true;
5333
5333
  }
5334
5334
  function _e(t) {
5335
- return Fn(t, (e) => e instanceof E ? e.handle : pn(e) ? ln(e, (n2) => n2.handle) : e);
5335
+ return Kn(t, (e) => e instanceof E ? e.handle : yn(e) ? hn(e, (n2) => n2.handle) : e);
5336
5336
  }
5337
5337
  class Ot {
5338
5338
  constructor() {
@@ -5345,28 +5345,28 @@
5345
5345
  return this.ctx.calculateOptions(e);
5346
5346
  }
5347
5347
  getOptions(e, n2) {
5348
- const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5348
+ const r = typeof e == "function" ? e : vn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5349
5349
  let s2 = {}, o = false;
5350
5350
  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 }) => ({
5351
- ref: Hn(a, o),
5351
+ ref: Wn(a, o),
5352
5352
  label: l2
5353
5353
  })) : i.map(({ ref: a, obj: l2 }) => ({
5354
- ref: Hn(a, o),
5354
+ ref: Wn(a, o),
5355
5355
  label: s2(l2, a)
5356
5356
  }));
5357
5357
  }
5358
5358
  resolveAnchorCtx(e) {
5359
- if (e instanceof $n) return e;
5359
+ if (e instanceof Ln) return e;
5360
5360
  const n2 = {};
5361
5361
  for (const [r, i] of Object.entries(e))
5362
- if (Mn(i)) {
5362
+ if (Hn(i)) {
5363
5363
  const s2 = this.getPColumnSpecByRef(i);
5364
5364
  if (!s2)
5365
5365
  return;
5366
5366
  n2[r] = s2;
5367
5367
  } else
5368
5368
  n2[r] = i;
5369
- return new $n(n2);
5369
+ return new Ln(n2);
5370
5370
  }
5371
5371
  /**
5372
5372
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -5459,7 +5459,7 @@
5459
5459
  ref: n2.ref,
5460
5460
  obj: {
5461
5461
  ...n2.obj,
5462
- data: Wn(
5462
+ data: Xn(
5463
5463
  n2.obj.data,
5464
5464
  (r) => new E(r, [n2.ref.blockId, n2.ref.name])
5465
5465
  )
@@ -5488,7 +5488,7 @@
5488
5488
  )) == null ? void 0 : r.obj;
5489
5489
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5490
5490
  if (n2)
5491
- return Fn(
5491
+ return Kn(
5492
5492
  n2,
5493
5493
  (i) => new E(i, [e.blockId, e.name])
5494
5494
  );
@@ -5501,7 +5501,7 @@
5501
5501
  getPColumnByRef(e) {
5502
5502
  const n2 = this.getDataByRef(e);
5503
5503
  if (n2)
5504
- return jn(n2);
5504
+ return Un(n2);
5505
5505
  }
5506
5506
  /**
5507
5507
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -5572,7 +5572,7 @@
5572
5572
  * @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
5573
5573
  */
5574
5574
  selectColumns(e) {
5575
- const n2 = typeof e == "function" ? e : Kn(e);
5575
+ const n2 = typeof e == "function" ? e : vn(e);
5576
5576
  return this.getSpecs().entries.filter(({ obj: i }) => f$1(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5577
5577
  const o = s2;
5578
5578
  let a = null;
@@ -5647,7 +5647,7 @@
5647
5647
  }
5648
5648
  verifyInlineAndExplicitColumnsSupport(e) {
5649
5649
  var i;
5650
- const n2 = e.some((s2) => !(s2.data instanceof E) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5650
+ const n2 = e.some((s2) => !(s2.data instanceof E) || yn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5651
5651
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5652
5652
  }
5653
5653
  // TODO remove all non-PColumn fields
@@ -5665,8 +5665,8 @@
5665
5665
  },
5666
5666
  filters: e.filters ?? [],
5667
5667
  sorting: e.sorting ?? []
5668
- } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
5669
- On(n2, (r) => _e(r))
5668
+ } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Rn(n2.src)), this.ctx.createPTable(
5669
+ In(n2, (r) => _e(r))
5670
5670
  );
5671
5671
  }
5672
5672
  /** @deprecated scheduled for removal from SDK */
@@ -5677,7 +5677,7 @@
5677
5677
  return this.ctx.getCurrentUnstableMarker();
5678
5678
  }
5679
5679
  }
5680
- const Y = "1.30.37";
5680
+ const Y = "1.31.14";
5681
5681
  function kt(t) {
5682
5682
  return t.__renderLambda === true;
5683
5683
  }