@ai-matrx/records-ui 0.93.140 → 0.93.142
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 +12 -0
- package/dist/index.cjs +42 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +42 -29
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +23 -26
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +23 -26
- package/dist/pickers.js.map +1 -1
- package/dist/table-shape.cjs +3 -9
- package/dist/table-shape.cjs.map +1 -1
- package/dist/table-shape.js +3 -9
- package/dist/table-shape.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.93.142
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records-ui/v0.93.140..npm/records-ui/v0.93.142 -- apps/shared/records-ui`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.93.141
|
|
10
|
+
### One humanizer
|
|
11
|
+
|
|
12
|
+
- The package's own `humanize` is deleted (and no longer exported); every last-resort name goes through `@ai-matrx/kit/text-case` `humanizeIdentifier` (Title Case, acronym-aware: `job_no` → "Job No", `owner_id` → "Owner ID"). `kindLabel` too.
|
|
13
|
+
- Consumer action: a host that imported `humanize` from here imports `humanizeIdentifier` from `@ai-matrx/kit/text-case`.
|
|
14
|
+
|
|
3
15
|
## 0.93.140
|
|
4
16
|
|
|
5
17
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/index.cjs
CHANGED
|
@@ -346,7 +346,6 @@ __export(src_exports, {
|
|
|
346
346
|
hasTimePart: () => hasTimePart,
|
|
347
347
|
hintForAPerson: () => hintForAPerson,
|
|
348
348
|
hintIsMachineIdentity: () => hintIsMachineIdentity,
|
|
349
|
-
humanize: () => humanize,
|
|
350
349
|
idsOf: () => idsOf,
|
|
351
350
|
isChoiceAddition: () => isChoiceAddition,
|
|
352
351
|
isCompleteDataBinding: () => isCompleteDataBinding,
|
|
@@ -809,25 +808,21 @@ function refusalLineForAPerson(error) {
|
|
|
809
808
|
|
|
810
809
|
// src/names.ts
|
|
811
810
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
812
|
-
|
|
813
|
-
const words2 = token.replace(/[_\-.]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
814
|
-
if (words2 === "") return token;
|
|
815
|
-
return words2.charAt(0).toUpperCase() + words2.slice(1);
|
|
816
|
-
}
|
|
811
|
+
var import_text_case = require("@ai-matrx/kit/text-case");
|
|
817
812
|
function fieldName(field2) {
|
|
818
813
|
const label = (field2.label ?? "").trim();
|
|
819
|
-
if (label !== "" && label === field2.key && /^[a-z0-9]+(?:[_.-][a-z0-9]+)+$/.test(label)) return
|
|
814
|
+
if (label !== "" && label === field2.key && /^[a-z0-9]+(?:[_.-][a-z0-9]+)+$/.test(label)) return (0, import_text_case.humanizeIdentifier)(label);
|
|
820
815
|
if (label !== "") return label;
|
|
821
816
|
const name = (field2.name ?? "").trim();
|
|
822
817
|
if (name !== "") return name;
|
|
823
|
-
return
|
|
818
|
+
return (0, import_text_case.humanizeIdentifier)(field2.key);
|
|
824
819
|
}
|
|
825
820
|
function tableName(table) {
|
|
826
821
|
const name = (table.name ?? "").trim();
|
|
827
822
|
if (name !== "") return name;
|
|
828
823
|
const singular = (table.label_singular ?? "").trim();
|
|
829
824
|
if (singular !== "") return singular;
|
|
830
|
-
return
|
|
825
|
+
return (0, import_text_case.humanizeIdentifier)(table.slug ?? "");
|
|
831
826
|
}
|
|
832
827
|
function recordName(document2, titleKey, fallback = "Untitled") {
|
|
833
828
|
const data = document2 ?? {};
|
|
@@ -1595,6 +1590,7 @@ function BarcodeControl({ value, onChange, disabled, id }) {
|
|
|
1595
1590
|
|
|
1596
1591
|
// src/parity.ts
|
|
1597
1592
|
var import_records5 = require("@ai-matrx/records");
|
|
1593
|
+
var import_text_case2 = require("@ai-matrx/kit/text-case");
|
|
1598
1594
|
|
|
1599
1595
|
// src/docs.ts
|
|
1600
1596
|
function fieldToken(fieldId) {
|
|
@@ -1750,7 +1746,7 @@ function fieldTypeLabel(field2) {
|
|
|
1750
1746
|
json: "Structured data",
|
|
1751
1747
|
relation: "Link to a record"
|
|
1752
1748
|
};
|
|
1753
|
-
return plain[kind] ??
|
|
1749
|
+
return plain[kind] ?? (0, import_text_case2.humanizeIdentifier)(kind);
|
|
1754
1750
|
}
|
|
1755
1751
|
|
|
1756
1752
|
// src/RelationPicker.tsx
|
|
@@ -5020,6 +5016,7 @@ var import_react29 = require("@ai-matrx/records/react");
|
|
|
5020
5016
|
|
|
5021
5017
|
// src/whoChanged.ts
|
|
5022
5018
|
var import_format = require("@ai-matrx/kit/format");
|
|
5019
|
+
var import_text_case3 = require("@ai-matrx/kit/text-case");
|
|
5023
5020
|
var SOMEBODY = "somebody in this organization";
|
|
5024
5021
|
var THE_SYSTEM = "the system";
|
|
5025
5022
|
function actorWords(actor, resolve) {
|
|
@@ -5057,7 +5054,7 @@ function operationWords(label) {
|
|
|
5057
5054
|
if (raw === "") return "Changed";
|
|
5058
5055
|
const known = OPERATION_WORDS[raw.toLowerCase()];
|
|
5059
5056
|
if (known) return known;
|
|
5060
|
-
const words2 =
|
|
5057
|
+
const words2 = (0, import_text_case3.humanizeIdentifier)(raw).toLowerCase();
|
|
5061
5058
|
return words2.charAt(0).toUpperCase() + words2.slice(1);
|
|
5062
5059
|
}
|
|
5063
5060
|
function lastChangeSentence(fieldLabel, entry, resolve) {
|
|
@@ -5418,6 +5415,7 @@ var import_design_system17 = require("@ai-matrx/design-system");
|
|
|
5418
5415
|
|
|
5419
5416
|
// src/kindValues.ts
|
|
5420
5417
|
var import_directives = require("@ai-matrx/content-ir/directives");
|
|
5418
|
+
var import_text_case4 = require("@ai-matrx/kit/text-case");
|
|
5421
5419
|
var KIND_KEY = "__kind";
|
|
5422
5420
|
var WHOLE_FENCE = /^\s*```(?:matrx|json)?[ \t]*\r?\n?([\s\S]*?)\r?\n?[ \t]*```\s*$/;
|
|
5423
5421
|
function asObject(value) {
|
|
@@ -5463,8 +5461,7 @@ function kindValueWords(kv) {
|
|
|
5463
5461
|
return kindLabel(kv.kind);
|
|
5464
5462
|
}
|
|
5465
5463
|
function kindLabel(kind) {
|
|
5466
|
-
|
|
5467
|
-
return words2 ? words2.charAt(0).toUpperCase() + words2.slice(1) : "Structured value";
|
|
5464
|
+
return (0, import_text_case4.humanizeIdentifier)(kind.replace(/^directive_v\d+_/, "").replace(/_v\d+$/, "")) || "Structured value";
|
|
5468
5465
|
}
|
|
5469
5466
|
|
|
5470
5467
|
// src/ReferenceChips.tsx
|
|
@@ -8146,6 +8143,9 @@ function FieldFormatPicker({
|
|
|
8146
8143
|
] });
|
|
8147
8144
|
}
|
|
8148
8145
|
|
|
8146
|
+
// src/FieldEditor.tsx
|
|
8147
|
+
var import_text_case5 = require("@ai-matrx/kit/text-case");
|
|
8148
|
+
|
|
8149
8149
|
// src/gridLook.ts
|
|
8150
8150
|
function defaultSortOf(table, fields) {
|
|
8151
8151
|
const raw = table?.default_sort ?? null;
|
|
@@ -9394,7 +9394,7 @@ function ValueOnTheOtherSide({
|
|
|
9394
9394
|
const declared2 = (columns.data ?? []).filter((f) => f.type !== "formula");
|
|
9395
9395
|
const sample = (0, import_react44.useRecords)(declared2.length === 0 && !columns.loading ? target : null, { pageSize: 1 });
|
|
9396
9396
|
const carried = sample.data?.rows[0]?.document ?? null;
|
|
9397
|
-
const offered = declared2.length > 0 ? declared2.map((f) => ({ key: f.key, name: fieldName(f) })) : Object.keys(carried ?? {}).map((key) => ({ key, name:
|
|
9397
|
+
const offered = declared2.length > 0 ? declared2.map((f) => ({ key: f.key, name: fieldName(f) })) : Object.keys(carried ?? {}).map((key) => ({ key, name: (0, import_text_case5.humanizeIdentifier)(key) }));
|
|
9398
9398
|
const stillAsking = columns.loading || declared2.length === 0 && sample.loading;
|
|
9399
9399
|
const body = !relation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "Choose the column above first." }) : stillAsking ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "Reading that table's columns\u2026" }) : offered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("p", { className: "text-[11px] text-muted-foreground", children: [
|
|
9400
9400
|
fieldName(relation),
|
|
@@ -11786,6 +11786,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
11786
11786
|
|
|
11787
11787
|
// src/gridColumns.tsx
|
|
11788
11788
|
var import_design_system34 = require("@ai-matrx/design-system");
|
|
11789
|
+
var import_text_case6 = require("@ai-matrx/kit/text-case");
|
|
11789
11790
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
11790
11791
|
function workedOutFrom(field2) {
|
|
11791
11792
|
const kind = editorKindFor(field2);
|
|
@@ -11823,7 +11824,7 @@ function fieldColumnIds(ids, fields) {
|
|
|
11823
11824
|
}
|
|
11824
11825
|
function columnLabel(fields, columnId) {
|
|
11825
11826
|
const field2 = fields.find((f) => f.key === columnId);
|
|
11826
|
-
return field2 ? fieldName(field2) :
|
|
11827
|
+
return field2 ? fieldName(field2) : (0, import_text_case6.humanizeIdentifier)(columnId);
|
|
11827
11828
|
}
|
|
11828
11829
|
function AddFieldButton({ onClick }) {
|
|
11829
11830
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
@@ -11968,6 +11969,9 @@ function columnForField(field2, editing, mayWriteRow, whyNotRow, look, onAskWhoC
|
|
|
11968
11969
|
};
|
|
11969
11970
|
}
|
|
11970
11971
|
|
|
11972
|
+
// src/Grid.tsx
|
|
11973
|
+
var import_text_case9 = require("@ai-matrx/kit/text-case");
|
|
11974
|
+
|
|
11971
11975
|
// src/PastePreview.tsx
|
|
11972
11976
|
var import_react59 = require("react");
|
|
11973
11977
|
var import_design_system35 = require("@ai-matrx/design-system");
|
|
@@ -12550,6 +12554,7 @@ function checkImportRules(fields, rows, mapping, choiceOptions, relationNames) {
|
|
|
12550
12554
|
}
|
|
12551
12555
|
|
|
12552
12556
|
// src/ImportWizard.tsx
|
|
12557
|
+
var import_text_case7 = require("@ai-matrx/kit/text-case");
|
|
12553
12558
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
12554
12559
|
var BATCH = 250;
|
|
12555
12560
|
var SAMPLES = 2e3;
|
|
@@ -12621,7 +12626,7 @@ async function sha256(bytes) {
|
|
|
12621
12626
|
}
|
|
12622
12627
|
function typeWord(t) {
|
|
12623
12628
|
if (t === "range") return fieldTypeChoice("number")?.label ?? "Number";
|
|
12624
|
-
return fieldTypeChoice(t)?.label ?? (t === "relation" ? "Points at another table" :
|
|
12629
|
+
return fieldTypeChoice(t)?.label ?? (t === "relation" ? "Points at another table" : (0, import_text_case7.humanizeIdentifier)(t));
|
|
12625
12630
|
}
|
|
12626
12631
|
function lineInYourFile(dataRow) {
|
|
12627
12632
|
return dataRow + 1;
|
|
@@ -13661,6 +13666,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, className }) {
|
|
|
13661
13666
|
|
|
13662
13667
|
// src/tableShape.ts
|
|
13663
13668
|
var import_source2 = require("@ai-matrx/content-ir/source");
|
|
13669
|
+
var import_text_case8 = require("@ai-matrx/kit/text-case");
|
|
13664
13670
|
var FEWEST_LIST_ITEMS = 2;
|
|
13665
13671
|
var FEWEST_KEY_VALUE_PAIRS = 2;
|
|
13666
13672
|
var LONGEST_TEXT_READ = 2e6;
|
|
@@ -13908,7 +13914,7 @@ function isPlainObject(v) {
|
|
|
13908
13914
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
13909
13915
|
}
|
|
13910
13916
|
function labelOfKey(key) {
|
|
13911
|
-
return /[\s]/.test(key) || /^[A-Z]/.test(key) ? key :
|
|
13917
|
+
return /[\s]/.test(key) || /^[A-Z]/.test(key) ? key : (0, import_text_case8.humanizeIdentifier)(key);
|
|
13912
13918
|
}
|
|
13913
13919
|
function shapeFromObjects(objects, kind, from, name) {
|
|
13914
13920
|
if (objects.length === 0) return null;
|
|
@@ -16852,7 +16858,7 @@ function GridBody({
|
|
|
16852
16858
|
const field2 = (fields.data ?? []).find((f) => f.key === write.key);
|
|
16853
16859
|
const name = changedRecordName(table.data, rows.find((r) => r.id === write.rowId)?.document ?? {}, write.key, write.after);
|
|
16854
16860
|
undo.push({
|
|
16855
|
-
label: `Changed ${field2 ? fieldName(field2) :
|
|
16861
|
+
label: `Changed ${field2 ? fieldName(field2) : (0, import_text_case9.humanizeIdentifier)(write.key)} on ${name}`,
|
|
16856
16862
|
cells: [{ rowId: write.rowId, key: write.key, before: write.before ?? null, after: write.after ?? null, version: write.version }]
|
|
16857
16863
|
});
|
|
16858
16864
|
};
|
|
@@ -17912,7 +17918,7 @@ function GridBody({
|
|
|
17912
17918
|
key: sortedKeys[0],
|
|
17913
17919
|
name: (() => {
|
|
17914
17920
|
const first = (toolbarFields ?? []).find((f) => f.key === sortedKeys[0]);
|
|
17915
|
-
return first ? fieldName(first) :
|
|
17921
|
+
return first ? fieldName(first) : (0, import_text_case9.humanizeIdentifier)(sortedKeys[0]);
|
|
17916
17922
|
})()
|
|
17917
17923
|
} : null,
|
|
17918
17924
|
onChange: changeLayout,
|
|
@@ -18024,7 +18030,7 @@ function GridBody({
|
|
|
18024
18030
|
const labelOfField = (0, import_react82.useCallback)(
|
|
18025
18031
|
(key) => {
|
|
18026
18032
|
const held = (fields.data ?? []).find((f) => f.key === key);
|
|
18027
|
-
return held ? fieldName(held) :
|
|
18033
|
+
return held ? fieldName(held) : (0, import_text_case9.humanizeIdentifier)(key);
|
|
18028
18034
|
},
|
|
18029
18035
|
[fields.data]
|
|
18030
18036
|
);
|
|
@@ -22111,6 +22117,7 @@ function useRecordVersion(recordId) {
|
|
|
22111
22117
|
}
|
|
22112
22118
|
|
|
22113
22119
|
// src/RecordForm.tsx
|
|
22120
|
+
var import_text_case10 = require("@ai-matrx/kit/text-case");
|
|
22114
22121
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
22115
22122
|
function RecordForm({
|
|
22116
22123
|
tableId,
|
|
@@ -22274,7 +22281,7 @@ function RecordForm({
|
|
|
22274
22281
|
Object.entries(said.conflict.contested_fields).map(([key, theirs]) => {
|
|
22275
22282
|
const column = (fields.data ?? []).find((f) => f.key === key);
|
|
22276
22283
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("p", { className: "text-[11px]", children: [
|
|
22277
|
-
column ? fieldName(column) :
|
|
22284
|
+
column ? fieldName(column) : (0, import_text_case10.humanizeIdentifier)(key),
|
|
22278
22285
|
": yours",
|
|
22279
22286
|
" ",
|
|
22280
22287
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("strong", { children: asWords(draft[key]) }),
|
|
@@ -22436,6 +22443,7 @@ function ShareForSomebodyElse({
|
|
|
22436
22443
|
}
|
|
22437
22444
|
|
|
22438
22445
|
// src/Peek.tsx
|
|
22446
|
+
var import_text_case11 = require("@ai-matrx/kit/text-case");
|
|
22439
22447
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
22440
22448
|
function Peek({ tableId, recordId, onClose, className }) {
|
|
22441
22449
|
const table = (0, import_react120.useTable)(tableId);
|
|
@@ -22530,7 +22538,7 @@ function Peek({ tableId, recordId, onClose, className }) {
|
|
|
22530
22538
|
] });
|
|
22531
22539
|
}
|
|
22532
22540
|
function computedInPlainWords(row, field2) {
|
|
22533
|
-
const name = field2 ? fieldName(field2) :
|
|
22541
|
+
const name = field2 ? fieldName(field2) : (0, import_text_case11.humanizeIdentifier)(row.field_key);
|
|
22534
22542
|
const shown3 = row.value === null || row.value === void 0 || row.value === "" ? "nothing" : field2 ? scalarText(field2, row.value) : String(row.value);
|
|
22535
22543
|
const when = new Date(row.computed_at);
|
|
22536
22544
|
const at = Number.isNaN(when.getTime()) ? "" : ` on ${when.toLocaleDateString()}`;
|
|
@@ -26718,6 +26726,7 @@ var import_format7 = require("@ai-matrx/kit/format");
|
|
|
26718
26726
|
var import_react147 = require("react");
|
|
26719
26727
|
var import_react148 = require("@ai-matrx/records/react");
|
|
26720
26728
|
var import_design_system76 = require("@ai-matrx/design-system");
|
|
26729
|
+
var import_text_case12 = require("@ai-matrx/kit/text-case");
|
|
26721
26730
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
26722
26731
|
var DUE_WORD = DUE_STATE_LABEL;
|
|
26723
26732
|
var REQUIRES_WORD = CHECKLIST_REQUIREMENT_LABEL;
|
|
@@ -26950,7 +26959,7 @@ function StepRow({
|
|
|
26950
26959
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
26951
26960
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "w-5 shrink-0 text-right text-[11px] tabular-nums text-muted-foreground", children: step2.step_order }),
|
|
26952
26961
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: (0, import_design_system76.cn)("min-w-0 flex-1 truncate text-xs", step2.finished && "line-through"), children: step2.title }),
|
|
26953
|
-
step2.role ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system76.Badge, { variant: "outline", className: "text-[10px]", children: step2.assignee_name ??
|
|
26962
|
+
step2.role ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system76.Badge, { variant: "outline", className: "text-[10px]", children: step2.assignee_name ?? (0, import_text_case12.humanizeIdentifier)(step2.role) }) : null,
|
|
26954
26963
|
step2.due_state && step2.due_state !== "undated" ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
26955
26964
|
import_design_system76.Badge,
|
|
26956
26965
|
{
|
|
@@ -28316,6 +28325,7 @@ var import_react151 = require("react");
|
|
|
28316
28325
|
var import_react152 = require("@ai-matrx/records/react");
|
|
28317
28326
|
var import_design_system78 = require("@ai-matrx/design-system");
|
|
28318
28327
|
var import_format8 = require("@ai-matrx/kit/format");
|
|
28328
|
+
var import_text_case13 = require("@ai-matrx/kit/text-case");
|
|
28319
28329
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
28320
28330
|
function HistoryPanel({ tableId, recordId, onAskAboutField, className }) {
|
|
28321
28331
|
const client = (0, import_react152.useRecordsClient)();
|
|
@@ -28542,7 +28552,7 @@ function ChangeLine({
|
|
|
28542
28552
|
onAskAboutField
|
|
28543
28553
|
}) {
|
|
28544
28554
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("li", { "data-change-key": change.key, className: "flex items-baseline gap-2 text-[11px]", children: [
|
|
28545
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "w-24 shrink-0 truncate font-medium", title: change.label, children: change.label ||
|
|
28555
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "w-24 shrink-0 truncate font-medium", title: change.label, children: change.label || (0, import_text_case13.humanizeIdentifier)(change.key) }),
|
|
28546
28556
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "min-w-0 flex-1 truncate", children: [
|
|
28547
28557
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-muted-foreground line-through", children: say(change.before, field2) }),
|
|
28548
28558
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "mx-1 text-muted-foreground", children: "\u2192" }),
|
|
@@ -28556,7 +28566,7 @@ function ChangeLine({
|
|
|
28556
28566
|
"span",
|
|
28557
28567
|
{
|
|
28558
28568
|
className: "shrink-0 text-muted-foreground",
|
|
28559
|
-
title: Object.entries(change.source).map(([k, v]) => `${
|
|
28569
|
+
title: Object.entries(change.source).map(([k, v]) => `${(0, import_text_case13.humanizeIdentifier)(k)}: ${String(v)}`).join(" \xB7 "),
|
|
28560
28570
|
children: "evidence"
|
|
28561
28571
|
}
|
|
28562
28572
|
) : null,
|
|
@@ -28617,6 +28627,7 @@ function say(value, field2) {
|
|
|
28617
28627
|
var import_react153 = require("react");
|
|
28618
28628
|
var import_react154 = require("@ai-matrx/records/react");
|
|
28619
28629
|
var import_design_system79 = require("@ai-matrx/design-system");
|
|
28630
|
+
var import_text_case14 = require("@ai-matrx/kit/text-case");
|
|
28620
28631
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
28621
28632
|
function CommentThread({ tableId, recordId, fieldKey, className }) {
|
|
28622
28633
|
const client = (0, import_react154.useRecordsClient)();
|
|
@@ -28677,7 +28688,7 @@ function CommentThread({ tableId, recordId, fieldKey, className }) {
|
|
|
28677
28688
|
const shown3 = fieldKey ? thread.comments.filter((c) => c.field_key === fieldKey) : thread.comments;
|
|
28678
28689
|
const roots = shown3.filter((c) => !c.parent_comment_id);
|
|
28679
28690
|
const repliesOf = (id) => shown3.filter((c) => c.parent_comment_id === id);
|
|
28680
|
-
const fieldLabel = fieldKey ? (fields.data ?? []).find((f) => f.key === fieldKey)?.label ||
|
|
28691
|
+
const fieldLabel = fieldKey ? (fields.data ?? []).find((f) => f.key === fieldKey)?.label || (0, import_text_case14.humanizeIdentifier)(fieldKey) : null;
|
|
28681
28692
|
async function post() {
|
|
28682
28693
|
if (draft.trim() === "") return;
|
|
28683
28694
|
setBusy(true);
|
|
@@ -28829,7 +28840,7 @@ function Line({
|
|
|
28829
28840
|
onReply,
|
|
28830
28841
|
onResolve
|
|
28831
28842
|
}) {
|
|
28832
|
-
const about = comment.field_key ? fields.find((f) => f.key === comment.field_key)?.label ||
|
|
28843
|
+
const about = comment.field_key ? fields.find((f) => f.key === comment.field_key)?.label || (0, import_text_case14.humanizeIdentifier)(comment.field_key) : null;
|
|
28833
28844
|
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
28834
28845
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-baseline gap-2 text-[11px] text-muted-foreground", children: [
|
|
28835
28846
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "truncate font-medium text-foreground", children: comment.created_by_name }),
|
|
@@ -28856,6 +28867,7 @@ function Line({
|
|
|
28856
28867
|
var import_react155 = require("react");
|
|
28857
28868
|
var import_react156 = require("@ai-matrx/records/react");
|
|
28858
28869
|
var import_design_system80 = require("@ai-matrx/design-system");
|
|
28870
|
+
var import_text_case15 = require("@ai-matrx/kit/text-case");
|
|
28859
28871
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
28860
28872
|
function FieldHistoryPanel({
|
|
28861
28873
|
tableId,
|
|
@@ -28887,7 +28899,7 @@ function FieldHistoryPanel({
|
|
|
28887
28899
|
(0, import_react155.useEffect)(() => {
|
|
28888
28900
|
void load();
|
|
28889
28901
|
}, [load]);
|
|
28890
|
-
const label = (fields.data ?? []).find((f) => f.key === fieldKey)?.label ||
|
|
28902
|
+
const label = (fields.data ?? []).find((f) => f.key === fieldKey)?.label || (0, import_text_case15.humanizeIdentifier)(fieldKey);
|
|
28891
28903
|
if (error) return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(RefusalNotice, { error, className });
|
|
28892
28904
|
if (!rows || fields.loading && !fields.data || table.loading && !table.data) return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_design_system80.Skeleton, { className: (0, import_design_system80.cn)("h-40 w-full", className) });
|
|
28893
28905
|
async function start(row) {
|
|
@@ -35458,6 +35470,7 @@ var import_react204 = require("react");
|
|
|
35458
35470
|
var import_records47 = require("@ai-matrx/records");
|
|
35459
35471
|
var import_react205 = require("@ai-matrx/records/react");
|
|
35460
35472
|
var import_design_system105 = require("@ai-matrx/design-system");
|
|
35473
|
+
var import_text_case16 = require("@ai-matrx/kit/text-case");
|
|
35461
35474
|
|
|
35462
35475
|
// src/ViewFilter.tsx
|
|
35463
35476
|
var import_react201 = require("react");
|
|
@@ -35787,7 +35800,7 @@ function RailFrame({
|
|
|
35787
35800
|
function filterInWords(filter, fields) {
|
|
35788
35801
|
const nameOf = (key) => {
|
|
35789
35802
|
const field2 = fields.find((f) => f.key === key);
|
|
35790
|
-
return field2 ? fieldName(field2) :
|
|
35803
|
+
return field2 ? fieldName(field2) : (0, import_text_case16.humanizeIdentifier)(key);
|
|
35791
35804
|
};
|
|
35792
35805
|
const parts = Object.keys(filter).map((key) => {
|
|
35793
35806
|
const value = filter[key];
|