@ai-matrx/records-ui 0.101.26 → 0.101.27
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 +6 -0
- package/dist/index.cjs +24 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.101.27
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records-ui/v0.101.26..npm/records-ui/v0.101.27 -- apps/shared/records-ui`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.101.26
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/index.cjs
CHANGED
|
@@ -20815,10 +20815,11 @@ function viewOrderOf(definition) {
|
|
|
20815
20815
|
const raw = definition?.["order"];
|
|
20816
20816
|
return raw === "manual" ? "manual" : raw === "sorted" ? "sorted" : null;
|
|
20817
20817
|
}
|
|
20818
|
+
var RETIRED_HOST_LAYOUTS = ["sheet"];
|
|
20818
20819
|
function designatedLayoutOf(definition) {
|
|
20819
20820
|
const data = definition ?? {};
|
|
20820
20821
|
const raw = typeof data["layout"] === "string" ? data["layout"].trim().toLowerCase() : "";
|
|
20821
|
-
if (raw !== "" && !VIEW_LAYOUTS.includes(raw)) return raw;
|
|
20822
|
+
if (raw !== "" && !VIEW_LAYOUTS.includes(raw) && !RETIRED_HOST_LAYOUTS.includes(raw)) return raw;
|
|
20822
20823
|
return null;
|
|
20823
20824
|
}
|
|
20824
20825
|
function tableOpening(view, hostLayoutIds) {
|
|
@@ -23154,7 +23155,8 @@ function GridBody({
|
|
|
23154
23155
|
rows: rows.length,
|
|
23155
23156
|
onPage: setPage
|
|
23156
23157
|
}
|
|
23157
|
-
)
|
|
23158
|
+
),
|
|
23159
|
+
embedded && !merged && !readOnly && rights.write ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(AddRowLine, { onAdd: () => void addRecord(), busy: editingBusy, label: newRowLabel ?? "Add row" }) }) : null
|
|
23158
23160
|
] }),
|
|
23159
23161
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ActionConfirm, { runner, fields: fields.data ?? [], noun, nounPlural }),
|
|
23160
23162
|
assist.dialogs,
|
|
@@ -31187,7 +31189,8 @@ function ListView({
|
|
|
31187
31189
|
remembered,
|
|
31188
31190
|
note,
|
|
31189
31191
|
style,
|
|
31190
|
-
formats
|
|
31192
|
+
formats,
|
|
31193
|
+
newLabel
|
|
31191
31194
|
}) {
|
|
31192
31195
|
const groupField = grouping?.field ? fields.find((f) => f.key === grouping.field) : void 0;
|
|
31193
31196
|
const groupKey = groupField?.key ?? null;
|
|
@@ -31253,14 +31256,17 @@ function ListView({
|
|
|
31253
31256
|
)
|
|
31254
31257
|
}
|
|
31255
31258
|
) }, row.id)) }),
|
|
31256
|
-
mayAddIn ? /* @__PURE__ */ (0, import_jsx_runtime104.
|
|
31259
|
+
mayAddIn ? /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
31257
31260
|
"button",
|
|
31258
31261
|
{
|
|
31259
31262
|
type: "button",
|
|
31260
31263
|
"data-records-list-add": group.key,
|
|
31261
31264
|
className: "self-start rounded px-1 py-0.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
31262
31265
|
onClick: () => void add(group),
|
|
31263
|
-
children:
|
|
31266
|
+
children: [
|
|
31267
|
+
"+ ",
|
|
31268
|
+
newLabel ?? "New"
|
|
31269
|
+
]
|
|
31264
31270
|
}
|
|
31265
31271
|
) : null
|
|
31266
31272
|
] }, group.key)) }),
|
|
@@ -31562,7 +31568,8 @@ function ViewSwitcher({
|
|
|
31562
31568
|
remembered: Boolean(onViewChange),
|
|
31563
31569
|
...onOpenRecord ? { onOpenRecord } : {},
|
|
31564
31570
|
...onMoved ? { onMoved } : {},
|
|
31565
|
-
canCreate: Boolean(onNewRecordForm)
|
|
31571
|
+
canCreate: Boolean(onNewRecordForm),
|
|
31572
|
+
...embedded && newRowLabel ? { newRowLabel } : {}
|
|
31566
31573
|
}
|
|
31567
31574
|
)
|
|
31568
31575
|
] });
|
|
@@ -31645,7 +31652,8 @@ function Board({
|
|
|
31645
31652
|
onMoved,
|
|
31646
31653
|
viewId,
|
|
31647
31654
|
onClearFilter,
|
|
31648
|
-
canCreate = false
|
|
31655
|
+
canCreate = false,
|
|
31656
|
+
newRowLabel
|
|
31649
31657
|
}) {
|
|
31650
31658
|
const fields = (0, import_react178.useFields)(view.subject);
|
|
31651
31659
|
const records = useViewRecords(view, pageSize, filter, viewId ?? null);
|
|
@@ -31889,6 +31897,7 @@ function Board({
|
|
|
31889
31897
|
onChanged: () => records.reload(),
|
|
31890
31898
|
...onMoved ? { onMoved } : {},
|
|
31891
31899
|
canAdd: mayAdd,
|
|
31900
|
+
...newRowLabel ? { newLabel: newRowLabel } : {},
|
|
31892
31901
|
remembered,
|
|
31893
31902
|
note: records.membership,
|
|
31894
31903
|
style,
|
|
@@ -31911,6 +31920,7 @@ function Board({
|
|
|
31911
31920
|
Gallery,
|
|
31912
31921
|
{
|
|
31913
31922
|
...addCard ? { onNew: () => void addCard() } : {},
|
|
31923
|
+
...newRowLabel ? { newLabel: newRowLabel } : {},
|
|
31914
31924
|
tableId: view.subject,
|
|
31915
31925
|
titleKey,
|
|
31916
31926
|
onChanged: () => {
|
|
@@ -32239,7 +32249,8 @@ function Gallery({
|
|
|
32239
32249
|
onSizeChange,
|
|
32240
32250
|
onHiddenFieldsChange,
|
|
32241
32251
|
remembered,
|
|
32242
|
-
onNew
|
|
32252
|
+
onNew,
|
|
32253
|
+
newLabel
|
|
32243
32254
|
}) {
|
|
32244
32255
|
const hidden = (0, import_react177.useMemo)(() => new Set(hiddenFields ?? []), [hiddenFields]);
|
|
32245
32256
|
const imageField = imageKey ? fields.find((field2) => field2.key === imageKey) : void 0;
|
|
@@ -32303,14 +32314,17 @@ function Gallery({
|
|
|
32303
32314
|
}
|
|
32304
32315
|
) }, row.id);
|
|
32305
32316
|
}),
|
|
32306
|
-
onNew ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime105.
|
|
32317
|
+
onNew ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
32307
32318
|
"button",
|
|
32308
32319
|
{
|
|
32309
32320
|
type: "button",
|
|
32310
32321
|
"data-records-gallery-add": "",
|
|
32311
32322
|
className: "flex h-full min-h-16 w-full items-center justify-center rounded border border-dashed p-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
32312
32323
|
onClick: onNew,
|
|
32313
|
-
children:
|
|
32324
|
+
children: [
|
|
32325
|
+
"+ ",
|
|
32326
|
+
newLabel ?? "New"
|
|
32327
|
+
]
|
|
32314
32328
|
}
|
|
32315
32329
|
) }) : null
|
|
32316
32330
|
]
|