@ai-matrx/records-ui 0.90.1 → 0.90.2
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 +13 -0
- package/dist/index.cjs +19 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5050,9 +5050,8 @@ function FieldEditor({ tableId, field: field2, onSaved, onCancel, onRemoved, cla
|
|
|
5050
5050
|
onCancel ? /* @__PURE__ */ jsx21(Button9, { size: "sm", variant: "ghost", onClick: onCancel, children: "Cancel" }) : null,
|
|
5051
5051
|
field2 ? /* @__PURE__ */ jsx21("div", { className: "ml-auto flex items-center gap-2", children: askingToRemove ? /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
5052
5052
|
/* @__PURE__ */ jsxs16("span", { className: "text-destructive", children: [
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
" takes it off every record of this table. The values stay in the record's history and nothing else is deleted."
|
|
5053
|
+
archiveConfirmSentence(`the field \u201C${fieldName(field2)}\u201D`),
|
|
5054
|
+
" Its values stay in every record and come back with it."
|
|
5056
5055
|
] }),
|
|
5057
5056
|
/* @__PURE__ */ jsx21(Button9, { size: "sm", variant: "destructive", disabled: mutation.saving, onClick: () => void remove(), children: "Remove it" }),
|
|
5058
5057
|
/* @__PURE__ */ jsx21(Button9, { size: "sm", variant: "ghost", onClick: () => setAskingToRemove(false), children: "Keep it" })
|
|
@@ -13559,9 +13558,8 @@ function TableSettings({
|
|
|
13559
13558
|
shape.error ? /* @__PURE__ */ jsx48(RefusalNotice, { error: shape.error }) : null,
|
|
13560
13559
|
askingToRemove ? /* @__PURE__ */ jsxs41("div", { className: "flex flex-wrap items-center gap-2 rounded border border-destructive/40 px-2 py-1.5", children: [
|
|
13561
13560
|
/* @__PURE__ */ jsxs41("span", { className: "text-destructive", children: [
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
" takes it off every record of this table. The values stay in each record's history and nothing else is deleted."
|
|
13561
|
+
archiveConfirmSentence(`the field \u201C${fieldName(askingToRemove)}\u201D`),
|
|
13562
|
+
" Its values stay in every record and come back with it."
|
|
13565
13563
|
] }),
|
|
13566
13564
|
/* @__PURE__ */ jsx48(
|
|
13567
13565
|
Button32,
|
|
@@ -21310,6 +21308,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
|
|
|
21310
21308
|
const [views, setViews] = useState63(null);
|
|
21311
21309
|
const [error, setError] = useState63(null);
|
|
21312
21310
|
const [busy, setBusy] = useState63(false);
|
|
21311
|
+
const [stopping, setStopping] = useState63(null);
|
|
21313
21312
|
const load = useCallback36(async () => {
|
|
21314
21313
|
const [held, offered] = await Promise.all([
|
|
21315
21314
|
// THE PERSON'S OWN DOOR, not the notifier's. It answers what is addressed
|
|
@@ -21406,6 +21405,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
|
|
|
21406
21405
|
await load();
|
|
21407
21406
|
}
|
|
21408
21407
|
async function unsubscribe(ruleId) {
|
|
21408
|
+
setStopping(null);
|
|
21409
21409
|
setBusy(true);
|
|
21410
21410
|
const deleted = await client.recordDelete({ record_id: ruleId });
|
|
21411
21411
|
setBusy(false);
|
|
@@ -21467,14 +21467,18 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
|
|
|
21467
21467
|
children: "Use for this form"
|
|
21468
21468
|
}
|
|
21469
21469
|
) : null,
|
|
21470
|
-
rights.write && !(onChoose && held.rule_id === chosenRuleId) ? /* @__PURE__ */
|
|
21470
|
+
rights.write && !(onChoose && held.rule_id === chosenRuleId) && stopping === held.rule_id ? /* @__PURE__ */ jsxs66("span", { className: cn50("flex flex-wrap items-center gap-2", onChoose ? void 0 : "ml-auto"), children: [
|
|
21471
|
+
/* @__PURE__ */ jsx73("span", { className: "text-xs text-destructive", children: archiveConfirmSentence("this subscription") }),
|
|
21472
|
+
/* @__PURE__ */ jsx73(Button55, { size: "sm", variant: "destructive", disabled: busy, onClick: () => void unsubscribe(held.rule_id), children: "Stop telling me" }),
|
|
21473
|
+
/* @__PURE__ */ jsx73(Button55, { size: "sm", variant: "ghost", onClick: () => setStopping(null), children: "Keep it" })
|
|
21474
|
+
] }) : rights.write && !(onChoose && held.rule_id === chosenRuleId) ? /* @__PURE__ */ jsx73(
|
|
21471
21475
|
Button55,
|
|
21472
21476
|
{
|
|
21473
21477
|
size: "sm",
|
|
21474
21478
|
variant: "ghost",
|
|
21475
21479
|
className: onChoose ? void 0 : "ml-auto",
|
|
21476
21480
|
disabled: busy,
|
|
21477
|
-
onClick: () =>
|
|
21481
|
+
onClick: () => setStopping(held.rule_id),
|
|
21478
21482
|
children: "Stop telling me"
|
|
21479
21483
|
}
|
|
21480
21484
|
) : null
|
|
@@ -23241,6 +23245,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
|
|
|
23241
23245
|
const [boards, setBoards] = useState69(null);
|
|
23242
23246
|
const [error, setError] = useState69(null);
|
|
23243
23247
|
const [activeId, setActiveId] = useState69(activeDashboardId ?? null);
|
|
23248
|
+
const [askingToRemove, setAskingToRemove] = useState69(null);
|
|
23244
23249
|
const [run, setRun] = useState69(null);
|
|
23245
23250
|
const [running, setRunning] = useState69(false);
|
|
23246
23251
|
const [question, setQuestion] = useState69("");
|
|
@@ -23351,6 +23356,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
|
|
|
23351
23356
|
else setError(again.error);
|
|
23352
23357
|
}, [client, activeId, filter, grain]);
|
|
23353
23358
|
async function remove(target) {
|
|
23359
|
+
setAskingToRemove(null);
|
|
23354
23360
|
const gone = await client.dashboardDelete({ dashboard_id: target.id });
|
|
23355
23361
|
if (!gone.ok) {
|
|
23356
23362
|
setError(gone.error);
|
|
@@ -23439,7 +23445,11 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
|
|
|
23439
23445
|
children: scheduling ? "Done" : "Send on a schedule"
|
|
23440
23446
|
}
|
|
23441
23447
|
),
|
|
23442
|
-
rights.admin ? /* @__PURE__ */
|
|
23448
|
+
rights.admin && askingToRemove === board.id ? /* @__PURE__ */ jsxs73(Fragment32, { children: [
|
|
23449
|
+
/* @__PURE__ */ jsx80("span", { className: "text-xs text-destructive", children: archiveConfirmSentence(`the dashboard \u201C${board.name}\u201D`) }),
|
|
23450
|
+
/* @__PURE__ */ jsx80(Button60, { size: "sm", variant: "destructive", onClick: () => void remove(board), children: "Remove it" }),
|
|
23451
|
+
/* @__PURE__ */ jsx80(Button60, { size: "sm", variant: "ghost", onClick: () => setAskingToRemove(null), children: "Keep it" })
|
|
23452
|
+
] }) : rights.admin ? /* @__PURE__ */ jsx80(Button60, { size: "sm", variant: "ghost", onClick: () => setAskingToRemove(board.id), children: "Remove" }) : null
|
|
23443
23453
|
] }) : null
|
|
23444
23454
|
] }),
|
|
23445
23455
|
board && scheduling ? (
|