@sustaina/shared-ui 1.7.0 → 1.7.1
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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1580,10 +1580,13 @@ function SortableRow({
|
|
|
1580
1580
|
id: value,
|
|
1581
1581
|
disabled: name == "columns.0.id"
|
|
1582
1582
|
});
|
|
1583
|
-
const style =
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1583
|
+
const style = React4__namespace.useMemo(
|
|
1584
|
+
() => ({
|
|
1585
|
+
transform: utilities.CSS.Transform.toString(transform),
|
|
1586
|
+
transition
|
|
1587
|
+
}),
|
|
1588
|
+
[transform, transition]
|
|
1589
|
+
);
|
|
1587
1590
|
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
1588
1591
|
const currentFormColumns = reactHookForm.useWatch({ control, name: "columns" });
|
|
1589
1592
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: setNodeRef, style, className: "flex items-center rounded-md bg-white", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1592,7 +1595,7 @@ function SortableRow({
|
|
|
1592
1595
|
control,
|
|
1593
1596
|
name,
|
|
1594
1597
|
render: ({ field }) => {
|
|
1595
|
-
const options = availableColumns.filter((col) => col.id === field.value || !currentFormColumns?.some((c) => c.id === col.id)).map((col) => ({ id: col.id, label: capitalize(col.id) }));
|
|
1598
|
+
const options = availableColumns.filter((col) => col.id === field.value || !currentFormColumns?.some((c) => c.id === col.id)).map((col) => ({ id: col.id, label: col?.label ? col.label : capitalize(col.id) }));
|
|
1596
1599
|
return /* @__PURE__ */ jsxRuntime.jsxs(FormItem2, { className: "flex-1", children: [
|
|
1597
1600
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1598
1601
|
/* @__PURE__ */ jsxRuntime.jsx(
|