@ai-matrx/records-ui 0.115.80 → 0.115.82
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 +20 -1
- package/dist/helpers.d.cts +16 -0
- package/dist/helpers.d.ts +16 -0
- package/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
-
## 0.115.
|
|
3
|
+
## 0.115.82
|
|
4
4
|
|
|
5
5
|
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
6
6
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
|
|
7
7
|
|
|
8
|
+
## 0.115.81
|
|
9
|
+
|
|
10
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
11
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
12
|
+
Diff: `git diff ebc4f61cd1 b4d74a0e98 -- apps/shared/records-ui/src`
|
|
13
|
+
|
|
14
|
+
Changed shipped source files (1):
|
|
15
|
+
- `apps/shared/records-ui/src/ViewBar.tsx`
|
|
16
|
+
|
|
17
|
+
## 0.115.80
|
|
18
|
+
|
|
19
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
20
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
21
|
+
Diff: `git diff aa17cdaf9c ebc4f61cd1 -- apps/shared/records-ui/src`
|
|
22
|
+
|
|
23
|
+
Changed shipped source files (2):
|
|
24
|
+
- `apps/shared/records-ui/src/Condition.tsx`
|
|
25
|
+
- `apps/shared/records-ui/src/ViewFilter.tsx`
|
|
26
|
+
|
|
8
27
|
## 0.115.79
|
|
9
28
|
|
|
10
29
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
package/dist/helpers.d.cts
CHANGED
|
@@ -775,6 +775,13 @@ interface RecordsUiHost {
|
|
|
775
775
|
* Never a Share button that opens nothing.
|
|
776
776
|
*/
|
|
777
777
|
share?: (subject: ShareSubject) => ReactNode;
|
|
778
|
+
/**
|
|
779
|
+
* OPTIONAL. SHARE ONE SAVED VIEW BY LINK (lane VIEW-LINK). The view menu's "Share view link…" hands the view to this
|
|
780
|
+
* port, which returns the host's own panel: make an Anyone link, copy it, see who made each, turn one off. The link
|
|
781
|
+
* is the platform's Anyone link on that one view, read-only, so the sharing rules stay the host's. Unbound, the
|
|
782
|
+
* menu has no such item (never an item that opens nothing).
|
|
783
|
+
*/
|
|
784
|
+
shareViewLink?: (subject: ViewLinkSubject) => ReactNode;
|
|
778
785
|
/**
|
|
779
786
|
* OPTIONAL. WHO CAN SEE AND EDIT ONE COLUMN (access-setup PLAN §12, Store Tables). The column header's
|
|
780
787
|
* "Who can see and edit…" item hands the column to this port, which returns the host's People involved
|
|
@@ -935,6 +942,15 @@ interface ShareSubject {
|
|
|
935
942
|
/** Close the dialog. The control owns the open/closed state, the host owns the dialog. */
|
|
936
943
|
onClose: () => void;
|
|
937
944
|
}
|
|
945
|
+
/** One saved view, handed to the host's "Share view link" panel. */
|
|
946
|
+
interface ViewLinkSubject {
|
|
947
|
+
viewId: Uuid;
|
|
948
|
+
tableId: Uuid;
|
|
949
|
+
/** The view's name as the menu shows it. */
|
|
950
|
+
name: string;
|
|
951
|
+
/** Close the panel. The menu owns open/closed, the host owns the panel. */
|
|
952
|
+
onClose: () => void;
|
|
953
|
+
}
|
|
938
954
|
/** One column, handed to the host's "Who can see and edit" panel. */
|
|
939
955
|
interface ColumnAccessSubject {
|
|
940
956
|
tableId: Uuid;
|
package/dist/helpers.d.ts
CHANGED
|
@@ -775,6 +775,13 @@ interface RecordsUiHost {
|
|
|
775
775
|
* Never a Share button that opens nothing.
|
|
776
776
|
*/
|
|
777
777
|
share?: (subject: ShareSubject) => ReactNode;
|
|
778
|
+
/**
|
|
779
|
+
* OPTIONAL. SHARE ONE SAVED VIEW BY LINK (lane VIEW-LINK). The view menu's "Share view link…" hands the view to this
|
|
780
|
+
* port, which returns the host's own panel: make an Anyone link, copy it, see who made each, turn one off. The link
|
|
781
|
+
* is the platform's Anyone link on that one view, read-only, so the sharing rules stay the host's. Unbound, the
|
|
782
|
+
* menu has no such item (never an item that opens nothing).
|
|
783
|
+
*/
|
|
784
|
+
shareViewLink?: (subject: ViewLinkSubject) => ReactNode;
|
|
778
785
|
/**
|
|
779
786
|
* OPTIONAL. WHO CAN SEE AND EDIT ONE COLUMN (access-setup PLAN §12, Store Tables). The column header's
|
|
780
787
|
* "Who can see and edit…" item hands the column to this port, which returns the host's People involved
|
|
@@ -935,6 +942,15 @@ interface ShareSubject {
|
|
|
935
942
|
/** Close the dialog. The control owns the open/closed state, the host owns the dialog. */
|
|
936
943
|
onClose: () => void;
|
|
937
944
|
}
|
|
945
|
+
/** One saved view, handed to the host's "Share view link" panel. */
|
|
946
|
+
interface ViewLinkSubject {
|
|
947
|
+
viewId: Uuid;
|
|
948
|
+
tableId: Uuid;
|
|
949
|
+
/** The view's name as the menu shows it. */
|
|
950
|
+
name: string;
|
|
951
|
+
/** Close the panel. The menu owns open/closed, the host owns the panel. */
|
|
952
|
+
onClose: () => void;
|
|
953
|
+
}
|
|
938
954
|
/** One column, handed to the host's "Who can see and edit" panel. */
|
|
939
955
|
interface ColumnAccessSubject {
|
|
940
956
|
tableId: Uuid;
|
package/dist/index.cjs
CHANGED
|
@@ -39966,9 +39966,11 @@ function viewActions(whyNot, host, locked = false, personal = false) {
|
|
|
39966
39966
|
] : [];
|
|
39967
39967
|
const sectionVerb = host.moveToSection ? [whenUnlocked(one({ id: "section", label: "Move to section\u2026", icon: "folder-input", group: "organize" }, host.moveToSection))] : [];
|
|
39968
39968
|
const copyVerb = host.copySettings ? [whenUnlocked(one({ id: "copy-settings", label: "Copy settings from\u2026", icon: "copy", group: "organize" }, host.copySettings))] : [];
|
|
39969
|
+
const shareVerb = host.shareLink ? [{ id: "share-link", label: "Share view link\u2026", icon: "link", group: "organize", run: host.shareLink }] : [];
|
|
39969
39970
|
return [
|
|
39970
39971
|
whenUnlocked(one({ id: "rename", label: "Rename view\u2026", icon: "pencil", group: "organize", verb: "rename" }, host.rename)),
|
|
39971
39972
|
one({ id: "duplicate", label: "Duplicate view", icon: "copy", group: "organize", verb: "duplicate" }, host.duplicate),
|
|
39973
|
+
...shareVerb,
|
|
39972
39974
|
...copyVerb,
|
|
39973
39975
|
...kindVerb,
|
|
39974
39976
|
...sectionVerb,
|
|
@@ -40038,6 +40040,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40038
40040
|
const rights = useTableRights(table.data);
|
|
40039
40041
|
const tableThere = Boolean(table.data);
|
|
40040
40042
|
const notify = useRecordsUi().notify;
|
|
40043
|
+
const shareViewLink = useRecordsUi().shareViewLink;
|
|
40041
40044
|
const [views, setViews] = (0, import_react232.useState)(() => initialViews ?? null);
|
|
40042
40045
|
const [error, setError] = (0, import_react232.useState)(null);
|
|
40043
40046
|
const [unavailable, setUnavailable] = (0, import_react232.useState)(false);
|
|
@@ -40054,6 +40057,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40054
40057
|
const [namingPersonal, setNamingPersonal] = (0, import_react232.useState)(false);
|
|
40055
40058
|
const [movingTo, setMovingTo] = (0, import_react232.useState)(null);
|
|
40056
40059
|
const [copying, setCopying] = (0, import_react232.useState)(false);
|
|
40060
|
+
const [linking, setLinking] = (0, import_react232.useState)(false);
|
|
40057
40061
|
const [shut, setShut] = (0, import_react232.useState)(() => {
|
|
40058
40062
|
try {
|
|
40059
40063
|
const raw = typeof localStorage === "undefined" ? null : localStorage.getItem(`records-view-sections-shut:${tableId}`);
|
|
@@ -40198,12 +40202,18 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40198
40202
|
await load();
|
|
40199
40203
|
}
|
|
40200
40204
|
async function copySettingsFrom(source, into) {
|
|
40201
|
-
const
|
|
40205
|
+
const copied = settingsToCopy(source, into);
|
|
40206
|
+
const written = await saveViewPatch(client, tableId, into.id, copied);
|
|
40202
40207
|
if (!written.ok) {
|
|
40203
40208
|
setError(written.error);
|
|
40204
40209
|
return;
|
|
40205
40210
|
}
|
|
40206
40211
|
setCopying(false);
|
|
40212
|
+
if (views) {
|
|
40213
|
+
const next = views.map((v) => v.id === into.id ? { ...v, ...copied } : v);
|
|
40214
|
+
setViews(next);
|
|
40215
|
+
onViews?.(next);
|
|
40216
|
+
}
|
|
40207
40217
|
onSettingsCopied?.(into.id);
|
|
40208
40218
|
await load();
|
|
40209
40219
|
notify?.success(`Copied settings from \u201C${source.name}\u201D`);
|
|
@@ -40425,7 +40435,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40425
40435
|
]
|
|
40426
40436
|
}
|
|
40427
40437
|
) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_design_system112.Button, { size: "sm", variant: "ghost", className: "h-8 w-full justify-start px-2 text-xs", onClick: () => setNaming(true), children: rights.admin ? "New view" : "New personal view" }) }),
|
|
40428
|
-
current ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "mt-1 border-t border-border pt-1", "data-view-actions": current.id, children: copying ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col gap-0.5", "data-view-copy-settings": "", children: [
|
|
40438
|
+
current ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "mt-1 border-t border-border pt-1", "data-view-actions": current.id, children: linking && shareViewLink ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { "data-view-share-link": current.id, children: shareViewLink({ viewId: current.id, tableId, name: current.name, onClose: () => setLinking(false) }) }) : copying ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col gap-0.5", "data-view-copy-settings": "", children: [
|
|
40429
40439
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("span", { className: "px-2 text-[11px] text-muted-foreground", children: [
|
|
40430
40440
|
"Copy settings to \u201C",
|
|
40431
40441
|
current.name,
|
|
@@ -40495,6 +40505,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40495
40505
|
// and a personal view is only ever listed to its creator.
|
|
40496
40506
|
...rights.admin || current.personal ? { togglePersonal: () => togglePersonal(current) } : {},
|
|
40497
40507
|
moveToSection: () => setMovingTo(""),
|
|
40508
|
+
...shareViewLink ? { shareLink: () => setLinking(true) } : {},
|
|
40498
40509
|
...(views ?? []).length > 1 ? { copySettings: () => setCopying(true) } : {}
|
|
40499
40510
|
}, current.presentation?.locked === true, current.personal === true);
|
|
40500
40511
|
const reasons = viewActionReasons(actions);
|