@ai-matrx/records-ui 0.113.29 → 0.113.31

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,38 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## Unreleased
4
+
5
+ An archived organization says so. A refusal that names an archived organization (`archivedOrganizationId`, records
6
+ >= 0.92.0) now draws "This organization is archived" through `RefusalNotice` - so TablePage, the record page, embedded
7
+ tables and the data home all inherit it. An owner or super admin gets "Restore organization"; anyone else is told an
8
+ owner can restore it. New optional host port `archivedOrganization` ({ state, restore, afterRestore? }); unbound, the
9
+ notice has no button.
10
+
11
+ **Consumer action:** bind `archivedOrganization` to show the Restore button.
12
+
13
+ ## 0.113.32
14
+
15
+ The version rule (`recordVersions`, `askOnce`, `refusals`, `rowVersion`, `writeOnTheWinningVersion`) now
16
+ comes from `@ai-matrx/records/versions` (moved there whole); this package's files are re-exports, so
17
+ `askOnce`'s cache and every write door are one instance across both packages. Nothing exported changed.
18
+
19
+ **Consumer action:** none (records ≥ 0.92.0 arrives with this version).
20
+
21
+ ## 0.113.31
22
+
23
+ The form document and the public-address read now come from `@ai-matrx/records/forms` (moved there
24
+ whole). Every `forms`/`publicBinding` export this package re-exported is unchanged.
25
+
26
+ **Consumer action:** none (records ≥ 0.89.0 arrives with this version).
27
+
28
+ ## 0.113.30
29
+
30
+ Platform records now come from `@ai-matrx/records/entity` (and `/entity/react`) — the former
31
+ `@ai-matrx/entity-data`, folded into records. The `@ai-matrx/entity-data` dependency is gone; no
32
+ behaviour change.
33
+
34
+ **Consumer action:** none (records ≥ 0.88.0 arrives with this version).
35
+
3
36
  ## 0.113.29
4
37
 
5
38
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -6,11 +6,44 @@ var textCase = require('@ai-matrx/kit/text-case');
6
6
  var records = require('@ai-matrx/records');
7
7
  var dataTable = require('@ai-matrx/design-system/data-table');
8
8
  require('react');
9
+ var versions_star = require('@ai-matrx/records/versions');
9
10
  var tableStyle = require('@ai-matrx/design-system/data-table/table-style');
10
11
  require('@ai-matrx/design-system/field-formats');
11
- var port = require('@ai-matrx/entity-data/port');
12
+ var entity = require('@ai-matrx/records/entity');
12
13
 
13
- // src/firstPage.ts
14
+ function _interopNamespace(e) {
15
+ if (e && e.__esModule) return e;
16
+ var n = Object.create(null);
17
+ if (e) {
18
+ Object.keys(e).forEach(function (k) {
19
+ if (k !== 'default') {
20
+ var d = Object.getOwnPropertyDescriptor(e, k);
21
+ Object.defineProperty(n, k, d.get ? d : {
22
+ enumerable: true,
23
+ get: function () { return e[k]; }
24
+ });
25
+ }
26
+ });
27
+ }
28
+ n.default = e;
29
+ return Object.freeze(n);
30
+ }
31
+
32
+ var versions_star__namespace = /*#__PURE__*/_interopNamespace(versions_star);
33
+
34
+ var __defProp = Object.defineProperty;
35
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
36
+ var __getOwnPropNames = Object.getOwnPropertyNames;
37
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
38
+ var __copyProps = (to, from, except, desc) => {
39
+ if (from && typeof from === "object" || typeof from === "function") {
40
+ for (let key of __getOwnPropNames(from))
41
+ if (!__hasOwnProp.call(to, key) && key !== except)
42
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
+ }
44
+ return to;
45
+ };
46
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
14
47
  function fieldName(field2) {
15
48
  const label = (field2.label ?? "").trim();
16
49
  if (label !== "" && label === field2.key && /^[a-z0-9]+(?:[_.-][a-z0-9]+)+$/.test(label)) return textCase.humanizeIdentifier(label);
@@ -231,10 +264,8 @@ function storeQuestion(fields, base, columnFilters, now = /* @__PURE__ */ new Da
231
264
  }
232
265
 
233
266
  // src/rowVersion.ts
234
- function ownVersion(row) {
235
- const v = row.version;
236
- return typeof v === "number" ? v : null;
237
- }
267
+ var rowVersion_exports = {};
268
+ __reExport(rowVersion_exports, versions_star__namespace);
238
269
 
239
270
  // src/groupReads.ts
240
271
  function isPlainGrouping(grouping) {
@@ -586,9 +617,9 @@ function mergeSeeds(...seeds) {
586
617
  }
587
618
  async function askEntityBlockSeed(input) {
588
619
  const recording = core.recordingDataSource(core.asRecordsDataSource(input.dataSource));
589
- const port$1 = port.createSeedPort(recording.source);
620
+ const port = entity.createSeedPort(recording.source);
590
621
  try {
591
- await Promise.all([port$1.describe(input.token), port$1.list(input.token, entityTableQuery(input.question ?? {}))]);
622
+ await Promise.all([port.describe(input.token), port.list(input.token, entityTableQuery(input.question ?? {}))]);
592
623
  } catch {
593
624
  }
594
625
  return recording.seed();
@@ -731,7 +762,7 @@ async function askTablePageSeed(input) {
731
762
  reads.push(client.recordAggregate({ table_id: input.tableId, groupBy: [key], measures: [{ op: "count" }], limit: 500, ...filter ? { filter } : {} }));
732
763
  }
733
764
  }
734
- const unversioned = page.data.rows.filter((row) => ownVersion(row) === null).map((row) => row.id);
765
+ const unversioned = page.data.rows.filter((row) => (0, rowVersion_exports.ownVersion)(row) === null).map((row) => row.id);
735
766
  if (unversioned.length > 0) reads.push(client.recordHeaders({ ids: unversioned }));
736
767
  reads.push(
737
768
  client.reverseColumns({ table_id: input.tableId }).then(async (columns) => {