@milaboratories/milaboratories.ui-examples.model 1.2.14 → 1.2.15

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.14 build /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
3
+ > @milaboratories/milaboratories.ui-examples.model@1.2.15 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.48 KB
15
- ESM dist/index.js.map 19.17 KB
16
- ESM ⚡️ Build success in 147ms
17
- CJS dist/index.cjs 8.60 KB
18
- CJS dist/index.cjs.map 19.25 KB
19
- CJS ⚡️ Build success in 147ms
14
+ ESM dist/index.js 8.46 KB
15
+ ESM dist/index.js.map 19.15 KB
16
+ ESM ⚡️ Build success in 221ms
17
+ CJS dist/index.cjs 8.57 KB
18
+ CJS dist/index.cjs.map 19.23 KB
19
+ CJS ⚡️ Build success in 221ms
20
20
  DTS Build start
21
- DTS ⚡️ Build success in 1541ms
22
- DTS dist/index.d.cts 2.98 KB
23
- DTS dist/index.d.ts 2.98 KB
21
+ DTS ⚡️ Build success in 5093ms
22
+ DTS dist/index.d.cts 2.87 KB
23
+ DTS dist/index.d.ts 2.87 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 196.25 kB │ gzip: 38.12 kB │ map: 438.51 kB
30
- dist/bundle.js 209.82 kB │ gzip: 38.81 kB │ map: 440.12 kB
31
- ✓ built in 1.01s
29
+ dist/bundle.js 196.22 kB │ gzip: 38.10 kB │ map: 438.60 kB
30
+ dist/bundle.js 209.80 kB │ gzip: 38.80 kB │ map: 440.22 kB
31
+ ✓ built in 2.72s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @milaboratories/milaboratories.ui-examples.model
2
2
 
3
+ ## 1.2.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 41140f4: PlAgDataTableV2 - selection & focusRow updated
8
+ - Updated dependencies [41140f4]
9
+ - @platforma-sdk/model@1.41.4
10
+
3
11
  ## 1.2.14
4
12
 
5
13
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -4551,7 +4551,7 @@
4551
4551
  return n2.callbackRegistry[t] = e, true;
4552
4552
  }
4553
4553
  const fe = /* @__PURE__ */ new Map();
4554
- function Ft(t, e) {
4554
+ function xt(t, e) {
4555
4555
  t in b().callbackRegistry || (b().callbackRegistry[t] = (n2) => {
4556
4556
  for (const r of fe.get(t))
4557
4557
  r(n2);
@@ -4561,7 +4561,7 @@
4561
4561
  constructor(e, n2 = (r) => r) {
4562
4562
  V(this, "isResolved", false);
4563
4563
  V(this, "resolvedValue");
4564
- this.handle = e, this.postProcess = n2, Ft(e, (r) => {
4564
+ this.handle = e, this.postProcess = n2, xt(e, (r) => {
4565
4565
  this.resolvedValue = n2(r), this.isResolved = true;
4566
4566
  });
4567
4567
  }
@@ -4814,7 +4814,7 @@
4814
4814
  const y2 = e(d2);
4815
4815
  let p2, g2, C;
4816
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], F2 = (v2 = p2.annotations) == null ? void 0 : v2[Lt], S2 = (F2 ? Vt.safeParse(JSON.parse(F2)).data : void 0) ?? [], P = [
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
4818
  ...g2 ?? [],
4819
4819
  ...S2,
4820
4820
  ...C ?? []
@@ -4823,10 +4823,10 @@
4823
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 = [], x2 = /* @__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 = (x2.get($) ?? 0) + 1;
4829
- x2.set($, j);
4828
+ const { type: $ } = P[I], K = P[I].importance ?? 0, j = (F2.get($) ?? 0) + 1;
4829
+ F2.set($, j);
4830
4830
  const N2 = `${$}@${j}`;
4831
4831
  o.set(N2, (o.get(N2) ?? 0) + 1), r.set(
4832
4832
  N2,
@@ -4857,9 +4857,9 @@
4857
4857
  value: C.value
4858
4858
  });
4859
4859
  else return;
4860
- const F2 = E.map((P) => P.label), S2 = n2.separator ?? " / ";
4860
+ const x2 = E.map((P) => P.label), S2 = n2.separator ?? " / ";
4861
4861
  p2.push({
4862
- label: F2.join(S2),
4862
+ label: x2.join(S2),
4863
4863
  value: C.value
4864
4864
  });
4865
4865
  }
@@ -5235,22 +5235,22 @@
5235
5235
  C = Xe$1(r.anchors, p2, n2);
5236
5236
  } else
5237
5237
  C = p2;
5238
- const E = /* @__PURE__ */ new Set(), F2 = [];
5238
+ const E = /* @__PURE__ */ new Set(), x2 = [];
5239
5239
  for (const T of this.providers) {
5240
- const x2 = T.selectColumns(C);
5241
- for (const c2 of x2) {
5240
+ const F2 = T.selectColumns(C);
5241
+ for (const c2 of F2) {
5242
5242
  if (u2(c2.spec)) continue;
5243
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) || (E.add(c2.id), m2.add(v2), F2.push(c2));
5246
+ m2.has(v2) || (E.add(c2.id), m2.add(v2), x2.push(c2));
5247
5247
  }
5248
5248
  }
5249
- if (F2.length === 0) continue;
5249
+ if (x2.length === 0) continue;
5250
5250
  const S2 = $t(p2), P = S2.length > 0;
5251
- for (const T of F2) {
5251
+ for (const T of x2) {
5252
5252
  if (!l$1(T.spec)) continue;
5253
- const x2 = 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 ${x2.name}`);
5267
- const $ = S2.map((_2) => this.findLabels(y(x2.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 N2 = [...x2.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
5288
  N2.splice(S2[_2], 1);
5289
- const tt = { ...x2, axesSpec: N2 };
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(x2.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: x2,
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: x2,
5309
- adjustedSpec: x2
5308
+ spec: F2,
5309
+ adjustedSpec: F2
5310
5310
  });
5311
5311
  }
5312
5312
  }
@@ -5320,7 +5320,7 @@
5320
5320
  l2
5321
5321
  ), y$1 = [];
5322
5322
  for (const { value: p2, label: g2 } of d2) {
5323
- const { originalColumn: C, spec: E } = p2, F2 = p2.type === "split" ? p2.axisFilters : void 0, S2 = Bt(F2);
5323
+ const { originalColumn: C, spec: E } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, S2 = Bt(x2);
5324
5324
  let P;
5325
5325
  r ? P = r.deriveS(E, S2) : P = Jt(C.id, S2);
5326
5326
  let T = { ...p2.adjustedSpec };
@@ -5788,7 +5788,7 @@
5788
5788
  this.ctx.logError(e);
5789
5789
  }
5790
5790
  }
5791
- const Gt = "1.41.3", X = Gt;
5791
+ const Gt = "1.41.4", X = Gt;
5792
5792
  function Ht(t) {
5793
5793
  return t.__renderLambda === true;
5794
5794
  }
@@ -6196,12 +6196,12 @@
6196
6196
  filters: p2,
6197
6197
  sorting: g2,
6198
6198
  coreColumnPredicate: void 0
6199
- }), E = t.createPTable(C), F2 = new Set((() => {
6199
+ }), E = t.createPTable(C), x2 = new Set((() => {
6200
6200
  const c2 = o.pTableParams.hiddenColIds;
6201
6201
  return c2 || i.filter((v2) => Zt(v2.spec)).map((v2) => v2.id);
6202
6202
  })());
6203
- i.filter((c2) => Pe(c2.spec)).forEach((c2) => F2.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) => F2.delete(c2.id));
6204
- const S2 = i.filter((c2) => !F2.has(c2.id)), P = Re(S2.map(qe), s2);
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));
6204
+ const S2 = i.filter((c2) => !x2.has(c2.id)), P = Re(S2.map(qe), s2);
6205
6205
  if (!Yt([...S2, ...P])) return;
6206
6206
  const T = Ne({
6207
6207
  columns: S2,
@@ -6211,11 +6211,11 @@
6211
6211
  filters: p2,
6212
6212
  sorting: g2,
6213
6213
  coreColumnPredicate: void 0
6214
- }), x2 = t.createPTable(T);
6214
+ }), F2 = t.createPTable(T);
6215
6215
  return {
6216
6216
  sourceId: o.pTableParams.sourceId,
6217
6217
  fullTableHandle: E,
6218
- visibleTableHandle: x2
6218
+ visibleTableHandle: F2
6219
6219
  };
6220
6220
  }
6221
6221
  function Pe(t) {
@@ -6242,13 +6242,13 @@
6242
6242
  return toList(range(0, n2)).map(cb);
6243
6243
  }
6244
6244
  const $BlockArgs = z$1.object({
6245
- tableNumRows: z$1.number().default(100),
6246
6245
  numbers: z$1.array(z$1.coerce.number()),
6247
6246
  handles: z$1.array(ImportFileHandleSchema)
6248
6247
  });
6249
- const platforma = Oe.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({
6248
+ const platforma = Oe.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], handles: [] }).withUiState({
6250
6249
  dataTableV2: {
6251
6250
  sourceId: "source_1",
6251
+ numRows: 200,
6252
6252
  state: De()
6253
6253
  },
6254
6254
  dynamicSections: [],
@@ -6267,7 +6267,7 @@
6267
6267
  const progresses = m2 == null ? void 0 : m2.mapFields((name, val) => [name, val == null ? void 0 : val.getImportProgress()]);
6268
6268
  return Object.fromEntries(progresses ?? []);
6269
6269
  }).output("ptV2Sheets", (ctx) => {
6270
- const rowCount = ctx.args.tableNumRows ?? 0;
6270
+ const rowCount = ctx.uiState.dataTableV2.numRows ?? 0;
6271
6271
  const sheets = [
6272
6272
  {
6273
6273
  axis: {
@@ -6286,7 +6286,7 @@
6286
6286
  ];
6287
6287
  return rowCount > 0 ? sheets : [];
6288
6288
  }).output("ptV2", (ctx) => {
6289
- const rowCount = ctx.args.tableNumRows ?? 0;
6289
+ const rowCount = ctx.uiState.dataTableV2.numRows ?? 0;
6290
6290
  const makePartitionId = (rowCount2, i) => Math.floor(2 * i / (rowCount2 + 1));
6291
6291
  const columns = [
6292
6292
  {