@ai-matrx/records-ui 0.109.6 → 0.109.7

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.109.7
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records-ui/v0.109.6..npm/records-ui/v0.109.7 -- apps/shared/records-ui`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.109.6
4
10
  ### lane SORT-REACTS (follow-up)
5
11
 
@@ -394,6 +394,12 @@ async function firstGridPageRequest(client, tableId, options = {}) {
394
394
  const shown = view ? applyLook(view, looks.data[view.id]) : null;
395
395
  return firstGridPageArgs({ tableId, table: table.data, fields: fields.data, shown, ...options.pageSize ? { pageSize: options.pageSize } : {} });
396
396
  }
397
+ function serverRowsOf(seed) {
398
+ const found = seed?.answers.find((a) => a.door === "server_rows");
399
+ const data = found?.data;
400
+ if (!data || typeof data !== "object") return null;
401
+ return { on: data.on === true, budgetMs: typeof data.budget_ms === "number" && data.budget_ms > 0 ? data.budget_ms : null };
402
+ }
397
403
  async function askTablePageSeed(input) {
398
404
  const recording = core.recordingDataSource(core.asRecordsDataSource(input.dataSource));
399
405
  const client = core.createRecordsClient({
@@ -409,7 +415,8 @@ async function askTablePageSeed(input) {
409
415
  try {
410
416
  const pageSize = input.pageSize ?? (input.embedded ? EMBEDDED_PAGE_SIZE : TABLE_PAGE_SIZE);
411
417
  const args = await firstGridPageRequest(client, input.tableId, { pageSize });
412
- if (args && input.rows !== false) {
418
+ const wantRows = typeof input.rows === "function" ? input.rows(recording.seed()) : input.rows !== false;
419
+ if (args && wantRows) {
413
420
  await client.listPage({
414
421
  table_id: args.p_table_id,
415
422
  filter: args.p_filter,
@@ -431,5 +438,6 @@ exports.TABLE_PAGE_SIZE = TABLE_PAGE_SIZE;
431
438
  exports.askTablePageSeed = askTablePageSeed;
432
439
  exports.firstGridPageArgs = firstGridPageArgs;
433
440
  exports.firstGridPageRequest = firstGridPageRequest;
441
+ exports.serverRowsOf = serverRowsOf;
434
442
  //# sourceMappingURL=first-page.cjs.map
435
443
  //# sourceMappingURL=first-page.cjs.map