@ai-matrx/records-ui 0.105.1 → 0.106.0
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 +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -14951,7 +14951,18 @@ function useMergedGridControls(args) {
|
|
|
14951
14951
|
label: "Duplicate property",
|
|
14952
14952
|
icon: "copy-plus",
|
|
14953
14953
|
disabledReason: mayStructure ? void 0 : editable ? rights.why("structure") : "Editing is off here.",
|
|
14954
|
-
|
|
14954
|
+
// DUPLICATE PROPERTY (Notion N5): one door declares the copy right after this column and copies
|
|
14955
|
+
// every record's value into it (`custom.field_duplicate`); nothing to fill in, as in Notion.
|
|
14956
|
+
onSelect: () => {
|
|
14957
|
+
void client.fieldDuplicate({ field_id: field2.id }).then((made) => {
|
|
14958
|
+
if (!made.ok) {
|
|
14959
|
+
notify?.error(`${fieldName(field2)} was not duplicated: ${refusalSentence(made.error)}`);
|
|
14960
|
+
return;
|
|
14961
|
+
}
|
|
14962
|
+
tableShapeChanged5(tableId);
|
|
14963
|
+
notify?.success(`${made.data.label} is added.`);
|
|
14964
|
+
});
|
|
14965
|
+
}
|
|
14955
14966
|
});
|
|
14956
14967
|
if (summaries) {
|
|
14957
14968
|
out.push(summaryMenuItem(field2, columnId2 === firstKey, summaries.chosen[columnId2], summaries.operations, (op2) => summaries.choose(columnId2, op2)));
|
|
@@ -15298,7 +15309,7 @@ function useMergedGridControls(args) {
|
|
|
15298
15309
|
},
|
|
15299
15310
|
children: /* @__PURE__ */ jsxs49(DialogContent8, { className: "max-h-[85vh] overflow-y-auto sm:max-w-2xl", children: [
|
|
15300
15311
|
/* @__PURE__ */ jsxs49(DialogHeader8, { children: [
|
|
15301
|
-
/* @__PURE__ */ jsx54(DialogTitle8, { children: columnDialog?.kind === "settings" ? `Column settings \xB7 ${fieldName(columnDialog.field)}` : columnDialog?.kind === "insert" && columnDialog.
|
|
15312
|
+
/* @__PURE__ */ jsx54(DialogTitle8, { children: columnDialog?.kind === "settings" ? `Column settings \xB7 ${fieldName(columnDialog.field)}` : columnDialog?.kind === "insert" && columnDialog.anchor ? `Add column ${columnDialog.side === "left" ? "left" : "right"} of ${fieldOf2(columnDialog.anchor) ? fieldName(fieldOf2(columnDialog.anchor)) : columnDialog.anchor}` : ADD_FIELD_OPEN_LABEL }),
|
|
15302
15313
|
/* @__PURE__ */ jsx54(DialogDescription6, { className: "sr-only", children: "Name, type and look" })
|
|
15303
15314
|
] }),
|
|
15304
15315
|
columnDialog?.kind === "settings" ? /* @__PURE__ */ jsx54(
|
|
@@ -15322,7 +15333,6 @@ function useMergedGridControls(args) {
|
|
|
15322
15333
|
FieldEditor,
|
|
15323
15334
|
{
|
|
15324
15335
|
tableId,
|
|
15325
|
-
...columnDialog.copyOf ? { copyOf: columnDialog.copyOf } : {},
|
|
15326
15336
|
onCancel: () => {
|
|
15327
15337
|
pendingInsert.current = null;
|
|
15328
15338
|
close();
|