@ai-matrx/records 0.87.12 → 0.87.14
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 +14 -2
- package/dist/react/index.cjs +8 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +8 -0
- package/dist/react/index.js.map +1 -1
- package/dist/typed-table/index.cjs +8 -0
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.js +8 -0
- package/dist/typed-table/index.js.map +1 -1
- package/package.json +5 -4
package/dist/react/index.js
CHANGED
|
@@ -11721,6 +11721,14 @@ function defineTypedTable(input) {
|
|
|
11721
11721
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(c.approval.approvedOn ?? "")) refuse3(slug, "the approval names the day it was given (YYYY-MM-DD).");
|
|
11722
11722
|
if (!c.approval.covers?.trim()) refuse3(slug, "the approval says what it covers.");
|
|
11723
11723
|
}
|
|
11724
|
+
const seenLabels = /* @__PURE__ */ new Map();
|
|
11725
|
+
for (const [fieldKey, def] of entries) {
|
|
11726
|
+
const label = (def.label ?? labelFor(fieldKey)).trim();
|
|
11727
|
+
const norm = label.replace(/\s+/g, " ").toLowerCase();
|
|
11728
|
+
const other = seenLabels.get(norm);
|
|
11729
|
+
if (other !== void 0) refuse3(slug, `two fields called ${JSON.stringify(other.label)} (${other.key} and ${fieldKey}); the store refuses a second column with a label it already has.`);
|
|
11730
|
+
seenLabels.set(norm, { key: fieldKey, label });
|
|
11731
|
+
}
|
|
11724
11732
|
const specs = entries.map(([fieldKey, def], i) => ({
|
|
11725
11733
|
key: fieldKey,
|
|
11726
11734
|
label: def.label ?? labelFor(fieldKey),
|