@enyxs/wikex-components 0.11.29 → 0.11.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/README.md +13 -0
- package/dist/fees-model.d.mts +5 -1
- package/dist/fees-model.d.ts +5 -1
- package/dist/fees-model.js +18 -0
- package/dist/fees-model.js.map +1 -1
- package/dist/fees-model.mjs +16 -0
- package/dist/fees-model.mjs.map +1 -1
- package/dist/fees.d.mts +1 -1
- package/dist/fees.d.ts +1 -1
- package/dist/fees.js +77 -27
- package/dist/fees.js.map +1 -1
- package/dist/fees.mjs +77 -27
- package/dist/fees.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +103 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +103 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/fees.js
CHANGED
|
@@ -63,6 +63,7 @@ var import_material = require("@mui/material");
|
|
|
63
63
|
var FEES_FONT_SIZE_MIN = 8;
|
|
64
64
|
var FEES_FONT_SIZE_MAX = 32;
|
|
65
65
|
var FEES_FONT_WEIGHTS = [400, 500, 600, 700, 800];
|
|
66
|
+
var FEES_TEXT_ALIGNS = ["left", "center", "right"];
|
|
66
67
|
var FEES_PAGE_SIZE = 25;
|
|
67
68
|
function normalizeFeesSearch(value) {
|
|
68
69
|
return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/đ/g, "d").replace(/Đ/g, "D").toLowerCase().trim();
|
|
@@ -71,6 +72,15 @@ function filterFeesRows(data, search, tag) {
|
|
|
71
72
|
const query = normalizeFeesSearch(search);
|
|
72
73
|
return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || Object.values(row.cells).some((cell) => normalizeFeesSearch(cell).includes(query))));
|
|
73
74
|
}
|
|
75
|
+
function sortFeesRowsByName(rows, language = "vi") {
|
|
76
|
+
const collator = new Intl.Collator(language, { sensitivity: "base", numeric: true });
|
|
77
|
+
return [...rows].sort((a, b) => {
|
|
78
|
+
const left = (a.cells.name ?? "").trim();
|
|
79
|
+
const right = (b.cells.name ?? "").trim();
|
|
80
|
+
if (!left || !right) return left ? -1 : right ? 1 : 0;
|
|
81
|
+
return collator.compare(left, right);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
74
84
|
function paginateFeesRows(rows, requestedPage, pageSize = FEES_PAGE_SIZE) {
|
|
75
85
|
const size = pageSize === -1 ? Math.max(1, rows.length) : Number.isInteger(pageSize) && pageSize > 0 ? pageSize : FEES_PAGE_SIZE;
|
|
76
86
|
const pageCount = Math.max(1, Math.ceil(rows.length / size));
|
|
@@ -88,6 +98,7 @@ function moveFeesItem(items, from, to) {
|
|
|
88
98
|
// src/wikex/fees-typography-controls.tsx
|
|
89
99
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
90
100
|
var weightLabels = { 400: "Th\u01B0\u1EDDng", 500: "V\u1EEBa", 600: "H\u01A1i \u0111\u1EADm", 700: "\u0110\u1EADm", 800: "R\u1EA5t \u0111\u1EADm" };
|
|
101
|
+
var alignLabels = { left: "C\u0103n tr\xE1i", center: "C\u0103n gi\u1EEFa", right: "C\u0103n ph\u1EA3i" };
|
|
91
102
|
function FontSizeInput({ label, value, onChange }) {
|
|
92
103
|
const [draft, setDraft] = (0, import_react.useState)(String(value));
|
|
93
104
|
const [error, setError] = (0, import_react.useState)(false);
|
|
@@ -128,7 +139,13 @@ function FontSizeInput({ label, value, onChange }) {
|
|
|
128
139
|
}
|
|
129
140
|
function FeesTypographyControls({ value, onChange }) {
|
|
130
141
|
const root = (0, import_react.useRef)(null);
|
|
131
|
-
const update = (part, patch) =>
|
|
142
|
+
const update = (part, patch) => {
|
|
143
|
+
const style = Object.fromEntries(Object.entries({ ...value?.[part], ...patch }).filter(([, setting]) => setting !== void 0));
|
|
144
|
+
const next = { ...value };
|
|
145
|
+
if (Object.keys(style).length) next[part] = style;
|
|
146
|
+
else delete next[part];
|
|
147
|
+
onChange(Object.keys(next).length ? next : void 0);
|
|
148
|
+
};
|
|
132
149
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { ref: root, role: "group", "aria-label": "\u0110\u1ECBnh d\u1EA1ng ch\u1EEF b\u1EA3ng ph\xED", sx: { mt: 2, p: { xs: 2, sm: 2.5 }, border: "1px solid", borderColor: "divider", borderRadius: 1.5 }, children: [
|
|
133
150
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: { xs: "column", sm: "row" }, gap: 1.5, justifyContent: "space-between", alignItems: { sm: "center" }, sx: { mb: 2 }, children: [
|
|
134
151
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { children: [
|
|
@@ -136,7 +153,7 @@ function FeesTypographyControls({ value, onChange }) {
|
|
|
136
153
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "\xC1p d\u1EE5ng cho to\xE0n b\u1EA3ng, theo ng\xF4n ng\u1EEF \u0111ang ch\u1ECDn. Xem thay \u0111\u1ED5i ngay b\xEAn d\u01B0\u1EDBi." })
|
|
137
154
|
] }),
|
|
138
155
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: "row", gap: 1, flexShrink: 0, children: [
|
|
139
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { size: "small", variant: "outlined", onClick: () => onChange({ thead: { fontSize: 14, fontWeight: 700 }, tbody: { fontSize: 14, fontWeight: 500 } }), children: "D\u1EC5 \u0111\u1ECDc" }),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { size: "small", variant: "outlined", onClick: () => onChange({ thead: { ...value?.thead, fontSize: 14, fontWeight: 700 }, tbody: { ...value?.tbody, fontSize: 14, fontWeight: 500 } }), children: "D\u1EC5 \u0111\u1ECDc" }),
|
|
140
157
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { size: "small", color: "inherit", disabled: !value, onClick: () => onChange(void 0), children: "M\u1EB7c \u0111\u1ECBnh" })
|
|
141
158
|
] })
|
|
142
159
|
] }),
|
|
@@ -166,7 +183,24 @@ function FeesTypographyControls({ value, onChange }) {
|
|
|
166
183
|
] }, weight))
|
|
167
184
|
}
|
|
168
185
|
)
|
|
169
|
-
] })
|
|
186
|
+
] }),
|
|
187
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
188
|
+
import_material.TextField,
|
|
189
|
+
{
|
|
190
|
+
select: true,
|
|
191
|
+
fullWidth: true,
|
|
192
|
+
size: "small",
|
|
193
|
+
label: "C\u0103n l\u1EC1",
|
|
194
|
+
value: value?.[part]?.textAlign ?? "",
|
|
195
|
+
slotProps: { select: { displayEmpty: true, SelectDisplayProps: { "aria-labelledby": void 0 }, MenuProps: { container: () => root.current?.ownerDocument.body ?? document.body }, inputProps: { "aria-label": `C\u0103n l\u1EC1 ${title.toLocaleLowerCase("vi")}` } }, inputLabel: { shrink: true } },
|
|
196
|
+
helperText: "\xC1p d\u1EE5ng cho t\u1EA5t c\u1EA3 \xF4, c\u1EA3 tr\xEAn \u0111i\u1EC7n tho\u1EA1i",
|
|
197
|
+
onChange: (event) => update(part, { textAlign: event.target.value ? event.target.value : void 0 }),
|
|
198
|
+
children: [
|
|
199
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.MenuItem, { value: "", children: "Theo m\u1EB7c \u0111\u1ECBnh" }),
|
|
200
|
+
FEES_TEXT_ALIGNS.map((align) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.MenuItem, { value: align, children: alignLabels[align] }, align))
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
)
|
|
170
204
|
] }, part)) }),
|
|
171
205
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 1 }, children: "C\u1EE1 ch\u1EEF t\xF9y ch\u1EC9nh \xE1p d\u1EE5ng c\u1EA3 tr\xEAn \u0111i\u1EC7n tho\u1EA1i; b\u1EA3ng c\xF3 th\u1EC3 vu\u1ED1t ngang. \u201CM\u1EB7c \u0111\u1ECBnh\u201D kh\xF4i ph\u1EE5c c\u1EE1 ch\u1EEF t\u1EF1 th\xEDch \u1EE9ng theo m\xE0n h\xECnh." })
|
|
172
206
|
] });
|
|
@@ -886,32 +920,32 @@ var feesTheme = {
|
|
|
886
920
|
]))
|
|
887
921
|
};
|
|
888
922
|
var EditorActions = import_styled_components6.default.div.withConfig({
|
|
889
|
-
componentId: "sc-
|
|
923
|
+
componentId: "sc-a14ae83-0"
|
|
890
924
|
})([
|
|
891
925
|
`display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
|
|
892
926
|
]);
|
|
893
927
|
var EditGroup = import_styled_components6.default.div.withConfig({
|
|
894
|
-
componentId: "sc-
|
|
928
|
+
componentId: "sc-a14ae83-1"
|
|
895
929
|
})([
|
|
896
930
|
`display:flex;flex-direction:column;gap:6px;`
|
|
897
931
|
]);
|
|
898
932
|
var HeaderGroup = (0, import_styled_components6.default)(EditGroup).withConfig({
|
|
899
|
-
componentId: "sc-
|
|
933
|
+
componentId: "sc-a14ae83-2"
|
|
900
934
|
})([
|
|
901
935
|
`gap:8px;`
|
|
902
936
|
]);
|
|
903
937
|
var HeaderTitle = import_styled_components6.default.div.withConfig({
|
|
904
|
-
componentId: "sc-
|
|
938
|
+
componentId: "sc-a14ae83-3"
|
|
905
939
|
})([
|
|
906
940
|
`display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
|
|
907
941
|
]);
|
|
908
942
|
var HeaderActions = import_styled_components6.default.div.withConfig({
|
|
909
|
-
componentId: "sc-
|
|
943
|
+
componentId: "sc-a14ae83-4"
|
|
910
944
|
})([
|
|
911
945
|
`display:flex;align-items:center;min-height:24px;`
|
|
912
946
|
]);
|
|
913
947
|
var AlignedFeesTable = (0, import_styled_components6.default)(FeesAndMarginTable).withConfig({
|
|
914
|
-
componentId: "sc-
|
|
948
|
+
componentId: "sc-a14ae83-5"
|
|
915
949
|
})([
|
|
916
950
|
`&[data-editable] th{vertical-align:top;}--fees-row-background:`,
|
|
917
951
|
`;--fees-stripe-background:`,
|
|
@@ -922,9 +956,11 @@ var AlignedFeesTable = (0, import_styled_components6.default)(FeesAndMarginTable
|
|
|
922
956
|
`;}&&& thead > tr > th{height:52px;padding:11.5px 8px;color:`,
|
|
923
957
|
`;font-size:`,
|
|
924
958
|
`px;font-weight:`,
|
|
959
|
+
`;text-align:`,
|
|
925
960
|
`;line-height:`,
|
|
926
961
|
`;white-space:pre-line;}tbody > tr{background:var(--fees-row-background);}tbody > tr:nth-child(even){background:var(--fees-stripe-background);}&&& tbody > tr > td{height:32px;padding:7.5px 8px;background:inherit;color:var(--fees-text);font-size:`,
|
|
927
962
|
`px;font-weight:`,
|
|
963
|
+
`;text-align:`,
|
|
928
964
|
`;line-height:`,
|
|
929
965
|
`;}thead > tr > th:first-child,tbody > tr > td:first-child{padding-left:16px;}@media (max-width:767px){&&:not([data-editable]){table{min-width:100%;width:`,
|
|
930
966
|
`px;table-layout:fixed;}`,
|
|
@@ -932,23 +968,25 @@ var AlignedFeesTable = (0, import_styled_components6.default)(FeesAndMarginTable
|
|
|
932
968
|
`px;line-height:`,
|
|
933
969
|
`;}tbody > tr > td{height:40px;padding-top:5.5px;padding-bottom:5.5px;font-size:`,
|
|
934
970
|
`px;line-height:`,
|
|
935
|
-
`;}thead > tr > th:last-child,tbody > tr > td:last-child{padding-right:12px;}th > span
|
|
971
|
+
`;}thead > tr > th:last-child,tbody > tr > td:last-child{padding-right:12px;}th > span{text-align:`,
|
|
972
|
+
`;}td > span{text-align:`,
|
|
973
|
+
`;}thead > tr > th:first-child,tbody > tr > td:first-child{position:sticky;left:0;padding-left:12px;}thead > tr > th:first-child{z-index:3;background:`,
|
|
936
974
|
`;}tbody > tr > td:first-child{z-index:2;background:var(--fees-row-background);}tbody > tr:nth-child(even) > td:first-child{background:var(--fees-stripe-background);}}}`
|
|
937
|
-
], ({ theme }) => theme.colors.background.deep, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.accent.foreground, ({ theme }) => theme.colors.background.card, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.foreground, ({ $typography }) => $typography?.thead?.fontSize ?? 10, ({ $typography }) => $typography?.thead?.fontWeight ?? 600, ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "14px", ({ $typography }) => $typography?.tbody?.fontSize ?? 12, ({ $typography }) => $typography?.tbody?.fontWeight ?? 500, ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "16px", ({ $mobileColumnWidths }) => $mobileColumnWidths.reduce((sum, width) => sum + width, 0), ({ $mobileColumnWidths }) => $mobileColumnWidths.map((width, index) => `
|
|
975
|
+
], ({ theme }) => theme.colors.background.deep, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.accent.foreground, ({ theme }) => theme.colors.background.card, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.foreground, ({ $typography }) => $typography?.thead?.fontSize ?? 10, ({ $typography }) => $typography?.thead?.fontWeight ?? 600, ({ $typography }) => $typography?.thead?.textAlign ?? "left", ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "14px", ({ $typography }) => $typography?.tbody?.fontSize ?? 12, ({ $typography }) => $typography?.tbody?.fontWeight ?? 500, ({ $typography }) => $typography?.tbody?.textAlign ?? "left", ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "16px", ({ $mobileColumnWidths }) => $mobileColumnWidths.reduce((sum, width) => sum + width, 0), ({ $mobileColumnWidths }) => $mobileColumnWidths.map((width, index) => `
|
|
938
976
|
th:nth-child(${index + 1}), td:nth-child(${index + 1}) {
|
|
939
977
|
width: ${width}px;
|
|
940
978
|
min-width: ${width}px;
|
|
941
979
|
max-width: ${width}px;
|
|
942
980
|
}
|
|
943
|
-
`).join(""), ({ $typography }) => $typography?.thead?.fontSize ?? 8, ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "10px", ({ $typography }) => $typography?.tbody?.fontSize ?? 10, ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "14px", ({ theme }) => theme.colors.accent.primary);
|
|
981
|
+
`).join(""), ({ $typography }) => $typography?.thead?.fontSize ?? 8, ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "10px", ({ $typography }) => $typography?.tbody?.fontSize ?? 10, ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "14px", ({ $typography }) => $typography?.thead?.textAlign ?? "left", ({ $typography }) => $typography?.tbody?.textAlign ?? "left", ({ theme }) => theme.colors.accent.primary);
|
|
944
982
|
var FeesCellContent = import_styled_components6.default.span.withConfig({
|
|
945
|
-
componentId: "sc-
|
|
983
|
+
componentId: "sc-a14ae83-6"
|
|
946
984
|
})([
|
|
947
985
|
`display:block;text-align:`,
|
|
948
986
|
`;`
|
|
949
|
-
], ({ $
|
|
987
|
+
], ({ $align }) => $align);
|
|
950
988
|
var EditorButton = import_styled_components6.default.button.withConfig({
|
|
951
|
-
componentId: "sc-
|
|
989
|
+
componentId: "sc-a14ae83-7"
|
|
952
990
|
})([
|
|
953
991
|
`padding:7px 12px;border:1px solid `,
|
|
954
992
|
`;border-radius:6px;background:`,
|
|
@@ -957,17 +995,17 @@ var EditorButton = import_styled_components6.default.button.withConfig({
|
|
|
957
995
|
`;}&:disabled{cursor:default;opacity:.4;}`
|
|
958
996
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
959
997
|
var OrderActions = import_styled_components6.default.div.withConfig({
|
|
960
|
-
componentId: "sc-
|
|
998
|
+
componentId: "sc-a14ae83-8"
|
|
961
999
|
})([
|
|
962
1000
|
`display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
|
|
963
1001
|
]);
|
|
964
1002
|
var PositionLabel = import_styled_components6.default.label.withConfig({
|
|
965
|
-
componentId: "sc-
|
|
1003
|
+
componentId: "sc-a14ae83-9"
|
|
966
1004
|
})([
|
|
967
1005
|
`display:inline-flex;align-items:center;gap:6px;font-size:12px;`
|
|
968
1006
|
]);
|
|
969
1007
|
var PositionInput = import_styled_components6.default.input.withConfig({
|
|
970
|
-
componentId: "sc-
|
|
1008
|
+
componentId: "sc-a14ae83-10"
|
|
971
1009
|
})([
|
|
972
1010
|
`width:56px;padding:5px;border:1px solid `,
|
|
973
1011
|
`;border-radius:4px;background:`,
|
|
@@ -976,17 +1014,17 @@ var PositionInput = import_styled_components6.default.input.withConfig({
|
|
|
976
1014
|
`;}`
|
|
977
1015
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
978
1016
|
var ColumnRow = import_styled_components6.default.div.withConfig({
|
|
979
|
-
componentId: "sc-
|
|
1017
|
+
componentId: "sc-a14ae83-11"
|
|
980
1018
|
})([
|
|
981
1019
|
`display:flex;gap:12px;align-items:center;margin:16px 0;> textarea{flex:1;min-width:120px;}@media (max-width:600px){align-items:stretch;flex-direction:column;}`
|
|
982
1020
|
]);
|
|
983
1021
|
var PaginationControls = (0, import_styled_components6.default)(FeesAndMarginPagination).withConfig({
|
|
984
|
-
componentId: "sc-
|
|
1022
|
+
componentId: "sc-a14ae83-12"
|
|
985
1023
|
})([
|
|
986
1024
|
`align-items:center;flex-wrap:wrap;gap:16px 24px;`
|
|
987
1025
|
]);
|
|
988
1026
|
var PageSizeLabel = import_styled_components6.default.div.withConfig({
|
|
989
|
-
componentId: "sc-
|
|
1027
|
+
componentId: "sc-a14ae83-13"
|
|
990
1028
|
})([
|
|
991
1029
|
`display:inline-flex;align-items:center;gap:8px;color:`,
|
|
992
1030
|
`;font:inherit;font-size:13px;`
|
|
@@ -1014,14 +1052,14 @@ function Position({ value, max, label, onMove }) {
|
|
|
1014
1052
|
});
|
|
1015
1053
|
}
|
|
1016
1054
|
var DeleteButton = (0, import_styled_components6.default)(EditorButton).withConfig({
|
|
1017
|
-
componentId: "sc-
|
|
1055
|
+
componentId: "sc-a14ae83-14"
|
|
1018
1056
|
})([
|
|
1019
1057
|
`align-self:flex-start;padding:4px 8px;border:0;border-radius:4px;background:#d32f2f;color:#fff;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap;text-decoration:none;&:hover{background:#b71c1c;}&:focus-visible{outline:2px solid #d32f2f;outline-offset:2px;}`
|
|
1020
1058
|
]);
|
|
1021
1059
|
var CellEditorInput = import_styled_components6.default.textarea.withConfig({
|
|
1022
|
-
componentId: "sc-
|
|
1060
|
+
componentId: "sc-a14ae83-15"
|
|
1023
1061
|
})([
|
|
1024
|
-
`display:block;box-sizing:border-box;width:100%;min-width:0;padding:3px;border:1px solid transparent;border-radius:3px;color:inherit;background:transparent;font:inherit;line-height:inherit;resize:none;overflow:hidden;&:hover{border-color:`,
|
|
1062
|
+
`display:block;box-sizing:border-box;width:100%;min-width:0;padding:3px;border:1px solid transparent;border-radius:3px;color:inherit;background:transparent;font:inherit;line-height:inherit;text-align:inherit;resize:none;overflow:hidden;&:hover{border-color:`,
|
|
1025
1063
|
`;}&:focus{outline:1px solid `,
|
|
1026
1064
|
`;}`
|
|
1027
1065
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.accent.primary);
|
|
@@ -1232,7 +1270,8 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
|
|
|
1232
1270
|
};
|
|
1233
1271
|
const activeTag = tags.includes(tag) ? tag : "";
|
|
1234
1272
|
const filtered = filterFeesRows(value, search, activeTag);
|
|
1235
|
-
const
|
|
1273
|
+
const displayedRows = canEdit ? filtered : sortFeesRowsByName(filtered, language);
|
|
1274
|
+
const pagination = paginateFeesRows(displayedRows, page, pageSize);
|
|
1236
1275
|
const moveColumn = (from, to) => onChange?.({
|
|
1237
1276
|
...value,
|
|
1238
1277
|
columns: moveFeesItem(value.columns, from, to)
|
|
@@ -1309,7 +1348,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
|
|
|
1309
1348
|
})
|
|
1310
1349
|
]
|
|
1311
1350
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesCellContent, {
|
|
1312
|
-
$
|
|
1351
|
+
$align: value.typography?.thead?.textAlign ?? (rightAlignedColumns.has(column.key) ? "right" : "left"),
|
|
1313
1352
|
children: column.title
|
|
1314
1353
|
}),
|
|
1315
1354
|
render: (_unused, row) => canEdit ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CellEditor, {
|
|
@@ -1323,7 +1362,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
|
|
|
1323
1362
|
}
|
|
1324
1363
|
})
|
|
1325
1364
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesCellContent, {
|
|
1326
|
-
$
|
|
1365
|
+
$align: value.typography?.tbody?.textAlign ?? (rightAlignedColumns.has(column.key) ? "right" : "left"),
|
|
1327
1366
|
children: row.cells[column.key] ?? ""
|
|
1328
1367
|
})
|
|
1329
1368
|
}));
|
|
@@ -1440,6 +1479,17 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
|
|
|
1440
1479
|
}),
|
|
1441
1480
|
canEdit && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(EditorActions, {
|
|
1442
1481
|
children: [
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
|
|
1483
|
+
type: "button",
|
|
1484
|
+
onClick: () => {
|
|
1485
|
+
onChange?.({
|
|
1486
|
+
...value,
|
|
1487
|
+
rows: sortFeesRowsByName(value.rows, language)
|
|
1488
|
+
});
|
|
1489
|
+
setPage(1);
|
|
1490
|
+
},
|
|
1491
|
+
children: english ? "Sort names A\u2013Z" : "S\u1EAFp x\u1EBFp t\xEAn A\u2013Z"
|
|
1492
|
+
}),
|
|
1443
1493
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
|
|
1444
1494
|
type: "button",
|
|
1445
1495
|
onClick: () => {
|