@ai-matrx/records-ui 0.101.30 → 0.101.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 +6 -0
- package/dist/index.cjs +45 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +45 -9
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +61 -14
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +48 -1
- package/dist/pickers.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.101.31
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records-ui/v0.101.30..npm/records-ui/v0.101.31 -- apps/shared/records-ui`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.101.30
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/index.cjs
CHANGED
|
@@ -5677,7 +5677,7 @@ var import_design_system21 = require("@ai-matrx/design-system");
|
|
|
5677
5677
|
|
|
5678
5678
|
// src/embeddedLook.tsx
|
|
5679
5679
|
var import_react32 = require("react");
|
|
5680
|
-
var EMBEDDED_LOOK = { blankEmpty: true, choiceDot: true };
|
|
5680
|
+
var EMBEDDED_LOOK = { blankEmpty: true, choiceDot: true, plainRelation: true };
|
|
5681
5681
|
var EmbeddedLookContext = (0, import_react32.createContext)(null);
|
|
5682
5682
|
var EmbeddedLookProvider = EmbeddedLookContext.Provider;
|
|
5683
5683
|
function useEmbeddedLook() {
|
|
@@ -5693,6 +5693,7 @@ var EMBEDDED_TABLE_CLASS = [
|
|
|
5693
5693
|
"[&_thead_th]:border-border",
|
|
5694
5694
|
"[&_thead_th:last-child]:border-r-0"
|
|
5695
5695
|
].join(" ");
|
|
5696
|
+
var EMBEDDED_PLAIN_FOOTER_CLASS = "[&_tfoot]:bg-transparent [&_tfoot]:border-t-0";
|
|
5696
5697
|
|
|
5697
5698
|
// src/enumLabels.ts
|
|
5698
5699
|
function exhaustiveValuesOf() {
|
|
@@ -6001,10 +6002,39 @@ function referencesOf(field2, value, kind, labels) {
|
|
|
6001
6002
|
}
|
|
6002
6003
|
var ARCHIVED_REFERENCE_WORD = "Archived";
|
|
6003
6004
|
var ARCHIVED_REFERENCE_TIP = "In the Archived view; restore it to use it again";
|
|
6005
|
+
function PageGlyph() {
|
|
6006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: 14, height: 14, fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "data-records-page-glyph": "", children: [
|
|
6007
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
6008
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M10 13H8" }),
|
|
6010
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M16 17H8" })
|
|
6011
|
+
] });
|
|
6012
|
+
}
|
|
6004
6013
|
function ReferenceChip({ reference, waiting }) {
|
|
6005
6014
|
const host = useRecordsUi();
|
|
6006
6015
|
const words2 = reference.label ?? (reference.token === "record" ? waiting ?? "Loading\u2026" : WITHHELD_ENTITY_LABEL);
|
|
6007
6016
|
const drawn = host.renderReference ? host.renderReference({ ...reference, label: reference.label ?? words2 }) : null;
|
|
6017
|
+
const look = useEmbeddedLook();
|
|
6018
|
+
if (look?.plainRelation) {
|
|
6019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
6020
|
+
"span",
|
|
6021
|
+
{
|
|
6022
|
+
className: (0, import_design_system18.cn)(
|
|
6023
|
+
"inline-flex max-w-full min-w-0 items-center gap-1.5 text-sm text-foreground hover:underline [&_a]:text-inherit [&_a]:no-underline [&_a:hover]:underline",
|
|
6024
|
+
reference.archived && "opacity-70"
|
|
6025
|
+
),
|
|
6026
|
+
"data-records-reference-chip": reference.token,
|
|
6027
|
+
"data-records-reference-plain": "",
|
|
6028
|
+
"data-records-reference-archived": reference.archived ? "" : void 0,
|
|
6029
|
+
title: reference.archived ? ARCHIVED_REFERENCE_TIP : words2,
|
|
6030
|
+
children: [
|
|
6031
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "aria-hidden": "true", "data-records-reference-icon": "", className: "inline-flex size-4 shrink-0 items-center justify-center text-muted-foreground", children: reference.icon ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm leading-none", children: reference.icon }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PageGlyph, {}) }),
|
|
6032
|
+
drawn ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "truncate", children: words2 }),
|
|
6033
|
+
reference.archived ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "shrink-0 text-muted-foreground", children: ARCHIVED_REFERENCE_WORD }) : null
|
|
6034
|
+
]
|
|
6035
|
+
}
|
|
6036
|
+
);
|
|
6037
|
+
}
|
|
6008
6038
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
6009
6039
|
import_design_system18.Badge,
|
|
6010
6040
|
{
|
|
@@ -6735,7 +6765,7 @@ function renderValue(field2, value, document2, labels, stillWaitingFor, look) {
|
|
|
6735
6765
|
"data-records-choice-chip": "",
|
|
6736
6766
|
...chip.tinted ? { "data-records-choice-tint": "" } : {},
|
|
6737
6767
|
children: [
|
|
6738
|
-
look?.choiceDot ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { "aria-hidden": "true", "data-records-choice-dot": "", className: (0, import_design_system21.cn)("mr-1.5 inline-block size-1.5 shrink-0 rounded-full", chip.dot) }) : null,
|
|
6768
|
+
look?.choiceDot ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { "aria-hidden": "true", "data-matrx-pill-ink": "", "data-records-choice-dot": "", className: (0, import_design_system21.cn)("mr-1.5 inline-block size-1.5 shrink-0 rounded-full", chip.dot) }) : null,
|
|
6739
6769
|
statusMark(field2, item, Array.isArray(value) ? void 0 : document2),
|
|
6740
6770
|
scalarText(field2, item, labels, Array.isArray(value) ? void 0 : stillWaitingFor)
|
|
6741
6771
|
]
|
|
@@ -6890,7 +6920,7 @@ function RecordValue({
|
|
|
6890
6920
|
const shape = shown4 && (shown4.id === "date" || shown4.id === "datetime") && isDateField(field2) ? dateFormatFor(field2, value) : void 0;
|
|
6891
6921
|
const dated = shape ? { ...shape, ...shown4?.options ? { options: shown4.options } : {} } : void 0;
|
|
6892
6922
|
const formatted = shown4 ? (0, import_data_table4.formatColumnValue)({ format: dated ?? shown4 }, value) : null;
|
|
6893
|
-
if (formatted) return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FormattedValue, { value, format: dated ?? shown4 });
|
|
6923
|
+
if (formatted && !(embeddedLook?.blankEmpty && formatted.empty)) return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FormattedValue, { value, format: dated ?? shown4 });
|
|
6894
6924
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: renderValue(field2, value, document2, labels, stillWaitingFor, embeddedLook) });
|
|
6895
6925
|
}
|
|
6896
6926
|
var ONE_FIELD_ARRAYS = /* @__PURE__ */ new WeakMap();
|
|
@@ -22570,7 +22600,7 @@ function GridBody({
|
|
|
22570
22600
|
[storePaged, query, queryTotal, classicInCard, records.data?.total]
|
|
22571
22601
|
);
|
|
22572
22602
|
const showAddLine = mayAddRow && rows.length > 0;
|
|
22573
|
-
const showSummaryLine = rows.length > 0 && (!merged || Object.keys(chosenSummaries).length > 0);
|
|
22603
|
+
const showSummaryLine = rows.length > 0 && (embedded ? Object.keys(chosenSummaries).length > 0 : !merged || Object.keys(chosenSummaries).length > 0);
|
|
22574
22604
|
const footerFace = JSON.stringify([
|
|
22575
22605
|
showAddLine ? added.busy : null,
|
|
22576
22606
|
showSummaryLine ? [chosenSummaries, summaries.values, summaries.rowCount, summaries.loading] : null
|
|
@@ -22753,7 +22783,7 @@ function GridBody({
|
|
|
22753
22783
|
mode: phone ? "sheet" : toolbarFold2 >= 3 ? "menu" : "inline",
|
|
22754
22784
|
pinned: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
22755
22785
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(UndoRedoLive, { source: undoSource }),
|
|
22756
|
-
!readOnly && rights.write ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
22786
|
+
!embedded && !readOnly && rights.write ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
22757
22787
|
NewFromTemplateMenu,
|
|
22758
22788
|
{
|
|
22759
22789
|
tableId,
|
|
@@ -22765,7 +22795,8 @@ function GridBody({
|
|
|
22765
22795
|
// NEW RECORD NEVER LEAVES THE ROW (live walk 2026-10-05: at 1440 px with the
|
|
22766
22796
|
// side chat open it and "From template" both vanished behind the "…"). When the
|
|
22767
22797
|
// row is short, "From template", undo and the rest ride the "…"; this stays.
|
|
22768
|
-
|
|
22798
|
+
// EMBEDDED: the "+ New page" line under the table is the create action.
|
|
22799
|
+
...!embedded && !readOnly && rights.write ? {
|
|
22769
22800
|
primary: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
22770
22801
|
NewRecordControl,
|
|
22771
22802
|
{
|
|
@@ -22830,7 +22861,7 @@ function GridBody({
|
|
|
22830
22861
|
// 2026-09-28: with the Forms rail open "New record" read "New reco", faded
|
|
22831
22862
|
// under the slot's edge). Pinned, it sticks to the row's right edge and what
|
|
22832
22863
|
// scrolls passes under it — the merged grid's rule, not a second one.
|
|
22833
|
-
...!readOnly && rights.write ? {
|
|
22864
|
+
...!embedded && !readOnly && rights.write ? {
|
|
22834
22865
|
overflow: {
|
|
22835
22866
|
mode: "inline",
|
|
22836
22867
|
pinned: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_design_system58.Button, { size: "sm", className: "shrink-0", disabled: editingBusy, onClick: () => void addRecord(), children: editingBusy ? "Adding\u2026" : "New record" })
|
|
@@ -23081,7 +23112,8 @@ function GridBody({
|
|
|
23081
23112
|
tableClassName: (0, import_design_system58.cn)(
|
|
23082
23113
|
!look.wrap && "[&_tbody_td]:max-w-[28rem] [&_tbody_td]:overflow-hidden [&_tbody_td]:text-ellipsis [&_tbody_td]:whitespace-nowrap! [&_tbody_td_*]:whitespace-nowrap!",
|
|
23083
23114
|
look.fit === "scroll" && "sm:[&>table]:w-max! sm:[&>table]:max-w-none! sm:[&>table]:min-w-full!",
|
|
23084
|
-
embedded && EMBEDDED_TABLE_CLASS
|
|
23115
|
+
embedded && EMBEDDED_TABLE_CLASS,
|
|
23116
|
+
embedded && !showSummaryLine && EMBEDDED_PLAIN_FOOTER_CLASS
|
|
23085
23117
|
),
|
|
23086
23118
|
footerRows,
|
|
23087
23119
|
...embedded ? { copy: false } : copyConfig ? { copy: copyConfig } : {},
|
|
@@ -31587,7 +31619,11 @@ function ViewSwitcher({
|
|
|
31587
31619
|
onUseSort: (sort) => change({ sorts: [sort], order: "sorted" })
|
|
31588
31620
|
} : {}
|
|
31589
31621
|
}
|
|
31590
|
-
} :
|
|
31622
|
+
} : (view.sorts?.length ?? 0) > 0 || local.sorts ? (
|
|
31623
|
+
/* A VIEW THE HOST HOLDS INLINE (Spaces) has no saved id but still has its sort: the
|
|
31624
|
+
grid opens in it, never in the table's own order. */
|
|
31625
|
+
{ viewOrder: { viewId: null, order: null, sorts: local.sorts ?? view.sorts ?? [] } }
|
|
31626
|
+
) : {}
|
|
31591
31627
|
}
|
|
31592
31628
|
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
31593
31629
|
Board,
|