@enyxs/wikex-components 0.11.26 → 0.11.27

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/fees.js CHANGED
@@ -37,11 +37,11 @@ __export(fees_exports, {
37
37
  module.exports = __toCommonJS(fees_exports);
38
38
 
39
39
  // src/wikex/fees-manager.tsx
40
- var import_material = require("@mui/material");
40
+ var import_material2 = require("@mui/material");
41
41
 
42
42
  // src/wikex/fees-table.tsx
43
- var import_jsx_runtime5 = require("react/jsx-runtime");
44
- var import_react2 = require("react");
43
+ var import_jsx_runtime6 = require("react/jsx-runtime");
44
+ var import_react3 = require("react");
45
45
  var import_styled_components6 = __toESM(require("styled-components"));
46
46
  var import_TextField = __toESM(require("@mui/material/TextField"));
47
47
  var import_Dialog = __toESM(require("@mui/material/Dialog"));
@@ -53,6 +53,124 @@ var import_Button = __toESM(require("@mui/material/Button"));
53
53
  var import_Select = __toESM(require("@mui/material/Select"));
54
54
  var import_MenuItem = __toESM(require("@mui/material/MenuItem"));
55
55
  var import_Checkbox = __toESM(require("@mui/material/Checkbox"));
56
+ var import_Collapse = __toESM(require("@mui/material/Collapse"));
57
+
58
+ // src/wikex/fees-typography-controls.tsx
59
+ var import_react = require("react");
60
+ var import_material = require("@mui/material");
61
+
62
+ // src/wikex/fees-table-model.ts
63
+ var FEES_FONT_SIZE_MIN = 8;
64
+ var FEES_FONT_SIZE_MAX = 32;
65
+ var FEES_FONT_WEIGHTS = [400, 500, 600, 700, 800];
66
+ var FEES_PAGE_SIZE = 25;
67
+ function normalizeFeesSearch(value) {
68
+ return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/đ/g, "d").replace(/Đ/g, "D").toLowerCase().trim();
69
+ }
70
+ function filterFeesRows(data, search, tag) {
71
+ const query = normalizeFeesSearch(search);
72
+ return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || Object.values(row.cells).some((cell) => normalizeFeesSearch(cell).includes(query))));
73
+ }
74
+ function paginateFeesRows(rows, requestedPage, pageSize = FEES_PAGE_SIZE) {
75
+ const size = pageSize === -1 ? Math.max(1, rows.length) : Number.isInteger(pageSize) && pageSize > 0 ? pageSize : FEES_PAGE_SIZE;
76
+ const pageCount = Math.max(1, Math.ceil(rows.length / size));
77
+ const page = Math.min(pageCount, Math.max(1, Number.isFinite(requestedPage) ? Math.floor(requestedPage) : 1));
78
+ return { page, pageCount, rows: rows.slice((page - 1) * size, page * size) };
79
+ }
80
+ function moveFeesItem(items, from, to) {
81
+ if (!Number.isInteger(from) || !Number.isInteger(to) || from < 0 || from >= items.length || to < 0 || to >= items.length || from === to) return items;
82
+ const next = [...items];
83
+ const [item] = next.splice(from, 1);
84
+ next.splice(to, 0, item);
85
+ return next;
86
+ }
87
+
88
+ // src/wikex/fees-typography-controls.tsx
89
+ var import_jsx_runtime = require("react/jsx-runtime");
90
+ var weightLabels = { 400: "Th\u01B0\u1EDDng", 500: "V\u1EEBa", 600: "H\u01A1i \u0111\u1EADm", 700: "\u0110\u1EADm", 800: "R\u1EA5t \u0111\u1EADm" };
91
+ function FontSizeInput({ label, value, onChange }) {
92
+ const [draft, setDraft] = (0, import_react.useState)(String(value));
93
+ const [error, setError] = (0, import_react.useState)(false);
94
+ (0, import_react.useEffect)(() => {
95
+ setDraft(String(value));
96
+ setError(false);
97
+ }, [value]);
98
+ const commit = () => {
99
+ const next = Number(draft);
100
+ const invalid = !draft.trim() || !Number.isInteger(next) || next < FEES_FONT_SIZE_MIN || next > FEES_FONT_SIZE_MAX;
101
+ setError(invalid);
102
+ if (!invalid && next !== value) onChange(next);
103
+ };
104
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
+ import_material.TextField,
106
+ {
107
+ fullWidth: true,
108
+ size: "small",
109
+ type: "number",
110
+ label: "C\u1EE1 ch\u1EEF (px)",
111
+ value: draft,
112
+ error,
113
+ slotProps: { htmlInput: { "aria-label": label, min: FEES_FONT_SIZE_MIN, max: FEES_FONT_SIZE_MAX, step: 1 } },
114
+ helperText: error ? `Nh\u1EADp s\u1ED1 nguy\xEAn t\u1EEB ${FEES_FONT_SIZE_MIN} \u0111\u1EBFn ${FEES_FONT_SIZE_MAX}.` : `${FEES_FONT_SIZE_MIN}\u2013${FEES_FONT_SIZE_MAX}px`,
115
+ onChange: (event) => {
116
+ setDraft(event.target.value);
117
+ setError(false);
118
+ },
119
+ onBlur: commit,
120
+ onKeyDown: (event) => {
121
+ if (event.key === "Enter") {
122
+ event.preventDefault();
123
+ commit();
124
+ }
125
+ }
126
+ }
127
+ );
128
+ }
129
+ function FeesTypographyControls({ value, onChange }) {
130
+ const root = (0, import_react.useRef)(null);
131
+ const update = (part, patch) => onChange({ ...value, [part]: { ...value?.[part], ...patch } });
132
+ 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
+ /* @__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
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { children: [
135
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle2", children: "\u0110\u1ECBnh d\u1EA1ng ch\u1EEF" }),
136
+ /* @__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
+ ] }),
138
+ /* @__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" }),
140
+ /* @__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
+ ] })
142
+ ] }),
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { sx: { display: "grid", gridTemplateColumns: { xs: "minmax(0, 1fr)", md: "repeat(2, minmax(0, 1fr))" }, gap: 2.5 }, children: [
144
+ { part: "thead", title: "Ti\xEAu \u0111\u1EC1 b\u1EA3ng", fontSize: 10, fontWeight: 600 },
145
+ { part: "tbody", title: "N\u1ED9i dung b\u1EA3ng", fontSize: 12, fontWeight: 500 }
146
+ ].map(({ part, title, fontSize, fontWeight }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 1.5, children: [
147
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", sx: { fontWeight: 600 }, children: title }),
148
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: { xs: "column", sm: "row" }, gap: 1.5, children: [
149
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FontSizeInput, { label: `C\u1EE1 ch\u1EEF ${title.toLocaleLowerCase("vi")}`, value: value?.[part]?.fontSize ?? fontSize, onChange: (fontSize2) => update(part, { fontSize: fontSize2 }) }, `${part}:${value?.[part]?.fontSize ?? "default"}`),
150
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
151
+ import_material.TextField,
152
+ {
153
+ select: true,
154
+ fullWidth: true,
155
+ size: "small",
156
+ label: "\u0110\u1ED9 \u0111\u1EADm",
157
+ value: value?.[part]?.fontWeight ?? fontWeight,
158
+ slotProps: { select: { MenuProps: { container: () => root.current?.ownerDocument.body ?? document.body }, inputProps: { "aria-label": `\u0110\u1ED9 \u0111\u1EADm ${title.toLocaleLowerCase("vi")}` } } },
159
+ helperText: "\xC1p d\u1EE5ng cho t\u1EA5t c\u1EA3 \xF4",
160
+ onChange: (event) => update(part, { fontWeight: Number(event.target.value) }),
161
+ children: FEES_FONT_WEIGHTS.map((weight) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.MenuItem, { value: weight, children: [
162
+ weightLabels[weight],
163
+ " (",
164
+ weight,
165
+ ")"
166
+ ] }, weight))
167
+ }
168
+ )
169
+ ] })
170
+ ] }, part)) }),
171
+ /* @__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
+ ] });
173
+ }
56
174
 
57
175
  // src/commodity-original/styles/colors.ts
58
176
  var lightColors = {
@@ -152,7 +270,7 @@ var appTheme = {
152
270
  };
153
271
 
154
272
  // src/commodity-original/components/Table/index.tsx
155
- var import_react = require("react");
273
+ var import_react2 = require("react");
156
274
 
157
275
  // src/commodity-original/components/Table/style.ts
158
276
  var import_styled_components = __toESM(require("styled-components"));
@@ -269,7 +387,7 @@ function getTableFixedColumnOffset(columns, columnIndex) {
269
387
  }
270
388
 
271
389
  // src/commodity-original/components/Table/index.tsx
272
- var import_jsx_runtime = require("react/jsx-runtime");
390
+ var import_jsx_runtime2 = require("react/jsx-runtime");
273
391
  function getCellValue(column, record) {
274
392
  return column.dataIndex === void 0 ? void 0 : record[column.dataIndex];
275
393
  }
@@ -342,7 +460,7 @@ function Table({
342
460
  const nextSelectedRowKeys = event.target.checked ? [...selectedRowKeys, recordKey] : selectedRowKeys.filter((key) => key !== recordKey);
343
461
  emitSelectionChange(nextSelectedRowKeys);
344
462
  };
345
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableScrollContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
463
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableScrollContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
346
464
  TableRoot,
347
465
  {
348
466
  $minWidth: scroll?.x === void 0 ? void 0 : getTableColumnSize(scroll.x),
@@ -351,8 +469,8 @@ function Table({
351
469
  className,
352
470
  "data-size": size,
353
471
  children: [
354
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableHeaderRow, { children: [
355
- rowSelection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeaderCell, { scope: "col", children: selectionType === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
472
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(TableHeaderRow, { children: [
473
+ rowSelection ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableHeaderCell, { scope: "col", children: selectionType === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
356
474
  TableSelectionInput,
357
475
  {
358
476
  checked: isAllSelected,
@@ -361,8 +479,8 @@ function Table({
361
479
  type: "checkbox"
362
480
  }
363
481
  ) : null }) : null,
364
- expandable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeaderCell, { scope: "col" }) : null,
365
- columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
482
+ expandable ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableHeaderCell, { scope: "col" }) : null,
483
+ columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
366
484
  TableHeaderCell,
367
485
  {
368
486
  $fixed: column.fixed,
@@ -370,7 +488,7 @@ function Table({
370
488
  $width: column.width === void 0 ? void 0 : getTableColumnSize(column.width),
371
489
  "data-column-key": column.key,
372
490
  scope: "col",
373
- children: column.sortable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
491
+ children: column.sortable ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
374
492
  TableSortButton,
375
493
  {
376
494
  "aria-pressed": sort?.field === column.key,
@@ -383,13 +501,13 @@ function Table({
383
501
  column.key
384
502
  ))
385
503
  ] }) }),
386
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { colSpan: columnCount, children: loadingContent }) }) : dataSource.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { colSpan: columnCount, children: empty }) }) : dataSource.map((record, index) => {
504
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tbody", { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableCell, { colSpan: columnCount, children: loadingContent }) }) : dataSource.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableCell, { colSpan: columnCount, children: empty }) }) : dataSource.map((record, index) => {
387
505
  const recordKey = getRowKey(record);
388
506
  const selectionProps = rowSelection?.getCheckboxProps?.(record);
389
507
  const isExpanded = expandedRowKeySet.has(recordKey);
390
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
391
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, { "data-row-key": recordKey, children: [
392
- rowSelection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
508
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react2.Fragment, { children: [
509
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(TableRow, { "data-row-key": recordKey, children: [
510
+ rowSelection ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
393
511
  TableSelectionInput,
394
512
  {
395
513
  checked: selectedRowKeySet.has(recordKey),
@@ -399,7 +517,7 @@ function Table({
399
517
  type: selectionType
400
518
  }
401
519
  ) }) : null,
402
- expandable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
520
+ expandable ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
403
521
  TableExpandButton,
404
522
  {
405
523
  "aria-expanded": isExpanded,
@@ -410,7 +528,7 @@ function Table({
410
528
  ) }) : null,
411
529
  columns.map((column, columnIndex) => {
412
530
  const value = getCellValue(column, record);
413
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
531
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
414
532
  TableCell,
415
533
  {
416
534
  $fixed: column.fixed,
@@ -422,7 +540,7 @@ function Table({
422
540
  );
423
541
  })
424
542
  ] }),
425
- expandable?.render && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableExpandedCell, { colSpan: columnCount, children: expandable.render(record) }) }) : null
543
+ expandable?.render && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableExpandedCell, { colSpan: columnCount, children: expandable.render(record) }) }) : null
426
544
  ] }, recordKey);
427
545
  }) })
428
546
  ]
@@ -477,7 +595,7 @@ var PaginationArrow = import_styled_components2.styled.span.withConfig({
477
595
  ], chevron_right_default, chevron_right_default);
478
596
 
479
597
  // src/commodity-original/components/Pagination/index.tsx
480
- var import_jsx_runtime2 = require("react/jsx-runtime");
598
+ var import_jsx_runtime3 = require("react/jsx-runtime");
481
599
  function getPaginationItems(page, pageCount, siblingCount) {
482
600
  const maxVisibleItems = siblingCount * 2 + 5;
483
601
  if (pageCount <= maxVisibleItems) {
@@ -513,13 +631,13 @@ function Pagination({
513
631
  const items = getPaginationItems(currentPage, safePageCount, siblingCount);
514
632
  const hasPreviousPage = currentPage > 1;
515
633
  const hasNextPage = currentPage < safePageCount;
516
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
634
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
517
635
  PaginationNav,
518
636
  {
519
637
  "aria-label": ariaLabel ?? t("pagination.navigation"),
520
638
  className,
521
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(PaginationList, { children: [
522
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
639
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PaginationList, { children: [
640
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
523
641
  PaginationButton,
524
642
  {
525
643
  "aria-label": labels?.previous ?? t("pagination.previous"),
@@ -527,10 +645,10 @@ function Pagination({
527
645
  disabled: !hasPreviousPage,
528
646
  onClick: () => onPageChange(currentPage - 1),
529
647
  type: "button",
530
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationArrow, { "data-direction": "previous" })
648
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PaginationArrow, { "data-direction": "previous" })
531
649
  }
532
650
  ) }),
533
- items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationButton, { "aria-hidden": "true", disabled: true, tabIndex: -1, type: "button", children: "\u2026" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
651
+ items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PaginationButton, { "aria-hidden": "true", disabled: true, tabIndex: -1, type: "button", children: "\u2026" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
534
652
  PaginationButton,
535
653
  {
536
654
  "aria-current": item === currentPage ? "page" : void 0,
@@ -541,7 +659,7 @@ function Pagination({
541
659
  children: item
542
660
  }
543
661
  ) }, `${item}-${index}`)),
544
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
662
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
545
663
  PaginationButton,
546
664
  {
547
665
  "aria-label": labels?.next ?? t("pagination.next"),
@@ -549,7 +667,7 @@ function Pagination({
549
667
  disabled: !hasNextPage,
550
668
  onClick: () => onPageChange(currentPage + 1),
551
669
  type: "button",
552
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationArrow, { "data-direction": "next" })
670
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PaginationArrow, { "data-direction": "next" })
553
671
  }
554
672
  ) })
555
673
  ] })
@@ -585,7 +703,7 @@ var InputAdornment = import_styled_components3.default.span.withConfig({
585
703
  ], ({ theme }) => theme.colors.text.secondary, InputCommonRoot, InputCommonRoot);
586
704
 
587
705
  // src/commodity-original/components/InputCommon/index.tsx
588
- var import_jsx_runtime3 = require("react/jsx-runtime");
706
+ var import_jsx_runtime4 = require("react/jsx-runtime");
589
707
  function InputCommon({
590
708
  leftIcon,
591
709
  rightIcon,
@@ -596,11 +714,11 @@ function InputCommon({
596
714
  onClear,
597
715
  ...inputProps
598
716
  }) {
599
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(InputCommonRoot, { "data-disabled": inputProps.disabled || void 0, "data-error": error || void 0, "data-size": size, children: [
600
- leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputAdornment, { "aria-hidden": "true", children: leftIcon }) : null,
601
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputCommonField, { ...inputProps }),
602
- clearable && inputProps.value ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { "aria-label": "X\xF3a n\u1ED9i dung", onClick: onClear, type: "button", children: "\xD7" }) : rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputAdornment, { "aria-hidden": "true", children: rightIcon }) : null,
603
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { role: "alert", children: errorMessage }) : null
717
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(InputCommonRoot, { "data-disabled": inputProps.disabled || void 0, "data-error": error || void 0, "data-size": size, children: [
718
+ leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InputAdornment, { "aria-hidden": "true", children: leftIcon }) : null,
719
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InputCommonField, { ...inputProps }),
720
+ clearable && inputProps.value ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { "aria-label": "X\xF3a n\u1ED9i dung", onClick: onClear, type: "button", children: "\xD7" }) : rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InputAdornment, { "aria-hidden": "true", children: rightIcon }) : null,
721
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { role: "alert", children: errorMessage }) : null
604
722
  ] });
605
723
  }
606
724
 
@@ -632,7 +750,7 @@ var TabLine = import_styled_components4.default.span.withConfig({
632
750
  ], ({ theme }) => theme.colors.accent.primary, TabCommonList, TabCommonList);
633
751
 
634
752
  // src/commodity-original/components/TabCommon/index.tsx
635
- var import_jsx_runtime4 = require("react/jsx-runtime");
753
+ var import_jsx_runtime5 = require("react/jsx-runtime");
636
754
  function TabCommon({
637
755
  items,
638
756
  value,
@@ -641,7 +759,7 @@ function TabCommon({
641
759
  className,
642
760
  size = "md"
643
761
  }) {
644
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
762
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
645
763
  TabCommonList,
646
764
  {
647
765
  "aria-label": ariaLabel,
@@ -650,7 +768,7 @@ function TabCommon({
650
768
  role: "tablist",
651
769
  children: items.map((item) => {
652
770
  const isActive = item.id === value;
653
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
771
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
654
772
  TabButton,
655
773
  {
656
774
  "aria-selected": isActive,
@@ -661,7 +779,7 @@ function TabCommon({
661
779
  type: "button",
662
780
  children: [
663
781
  item.label,
664
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TabLine, { "aria-hidden": "true" })
782
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TabLine, { "aria-hidden": "true" })
665
783
  ]
666
784
  },
667
785
  item.id
@@ -756,29 +874,6 @@ var FeesMonthCode = import_styled_components5.default.span.withConfig({
756
874
  `;font-family:var(--Font-Main,Manrope);font-size:var(--Size-Title-S,14px);font-style:normal;font-weight:500;line-height:var(--Line-height-Body-S,18px);`
757
875
  ], ({ theme }) => theme.colors.text.primary);
758
876
 
759
- // src/wikex/fees-table-model.ts
760
- var FEES_PAGE_SIZE = 25;
761
- function normalizeFeesSearch(value) {
762
- return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/đ/g, "d").replace(/Đ/g, "D").toLowerCase().trim();
763
- }
764
- function filterFeesRows(data, search, tag) {
765
- const query = normalizeFeesSearch(search);
766
- return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || Object.values(row.cells).some((cell) => normalizeFeesSearch(cell).includes(query))));
767
- }
768
- function paginateFeesRows(rows, requestedPage, pageSize = FEES_PAGE_SIZE) {
769
- const size = pageSize === -1 ? Math.max(1, rows.length) : Number.isInteger(pageSize) && pageSize > 0 ? pageSize : FEES_PAGE_SIZE;
770
- const pageCount = Math.max(1, Math.ceil(rows.length / size));
771
- const page = Math.min(pageCount, Math.max(1, Number.isFinite(requestedPage) ? Math.floor(requestedPage) : 1));
772
- return { page, pageCount, rows: rows.slice((page - 1) * size, page * size) };
773
- }
774
- function moveFeesItem(items, from, to) {
775
- if (!Number.isInteger(from) || !Number.isInteger(to) || from < 0 || from >= items.length || to < 0 || to >= items.length || from === to) return items;
776
- const next = [...items];
777
- const [item] = next.splice(from, 1);
778
- next.splice(to, 0, item);
779
- return next;
780
- }
781
-
782
877
  // src/wikex/fees-table.tsx
783
878
  var fallbackColors = lightColors;
784
879
  var feesTheme = {
@@ -791,32 +886,32 @@ var feesTheme = {
791
886
  ]))
792
887
  };
793
888
  var EditorActions = import_styled_components6.default.div.withConfig({
794
- componentId: "sc-ecbebe61-0"
889
+ componentId: "sc-a5657aea-0"
795
890
  })([
796
891
  `display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
797
892
  ]);
798
893
  var EditGroup = import_styled_components6.default.div.withConfig({
799
- componentId: "sc-ecbebe61-1"
894
+ componentId: "sc-a5657aea-1"
800
895
  })([
801
896
  `display:flex;flex-direction:column;gap:6px;`
802
897
  ]);
803
898
  var HeaderGroup = (0, import_styled_components6.default)(EditGroup).withConfig({
804
- componentId: "sc-ecbebe61-2"
899
+ componentId: "sc-a5657aea-2"
805
900
  })([
806
901
  `gap:8px;`
807
902
  ]);
808
903
  var HeaderTitle = import_styled_components6.default.div.withConfig({
809
- componentId: "sc-ecbebe61-3"
904
+ componentId: "sc-a5657aea-3"
810
905
  })([
811
906
  `display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
812
907
  ]);
813
908
  var HeaderActions = import_styled_components6.default.div.withConfig({
814
- componentId: "sc-ecbebe61-4"
909
+ componentId: "sc-a5657aea-4"
815
910
  })([
816
911
  `display:flex;align-items:center;min-height:24px;`
817
912
  ]);
818
913
  var AlignedFeesTable = (0, import_styled_components6.default)(FeesAndMarginTable).withConfig({
819
- componentId: "sc-ecbebe61-5"
914
+ componentId: "sc-a5657aea-5"
820
915
  })([
821
916
  `&[data-editable] th{vertical-align:top;}--fees-row-background:`,
822
917
  `;--fees-stripe-background:`,
@@ -824,26 +919,36 @@ var AlignedFeesTable = (0, import_styled_components6.default)(FeesAndMarginTable
824
919
  `;:root[data-theme="dark"] &{--fees-row-background:#39393d;--fees-stripe-background:`,
825
920
  `;--fees-text:`,
826
921
  `;}&[data-editable] table{table-layout:auto;}table{table-layout:fixed;font-family:var(--font-manrope,Manrope),Arial,Helvetica,sans-serif;}th,td{box-sizing:border-box;overflow-wrap:anywhere;}thead > tr,thead > tr > th{background:`,
827
- `;}thead > tr > th{height:52px;padding:11.5px 8px;color:`,
828
- `;font-size:10px;font-weight:600;line-height:14px;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:12px;font-weight:500;line-height:16px;}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:`,
922
+ `;}&&& thead > tr > th{height:52px;padding:11.5px 8px;color:`,
923
+ `;font-size:`,
924
+ `px;font-weight:`,
925
+ `;line-height:`,
926
+ `;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
+ `px;font-weight:`,
928
+ `;line-height:`,
929
+ `;}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:`,
829
930
  `px;table-layout:fixed;}`,
830
- ` thead > tr > th,tbody > tr > td{padding-left:6px;padding-right:6px;white-space:pre-line;overflow-wrap:anywhere;font-family:var(--font-inter,Inter),Arial,Helvetica,sans-serif;}thead > tr > th{height:40px;padding-top:9.5px;padding-bottom:9.5px;font-size:8px;line-height:10px;}tbody > tr > td{height:40px;padding-top:5.5px;padding-bottom:5.5px;font-size:10px;line-height:14px;}thead > tr > th:last-child,tbody > tr > td:last-child{padding-right:12px;}th > span,td > span{text-align:left;}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:`,
931
+ ` thead > tr > th,tbody > tr > td{padding-left:6px;padding-right:6px;white-space:pre-line;overflow-wrap:anywhere;font-family:var(--font-inter,Inter),Arial,Helvetica,sans-serif;}thead > tr > th{height:40px;padding-top:9.5px;padding-bottom:9.5px;font-size:`,
932
+ `px;line-height:`,
933
+ `;}tbody > tr > td{height:40px;padding-top:5.5px;padding-bottom:5.5px;font-size:`,
934
+ `px;line-height:`,
935
+ `;}thead > tr > th:last-child,tbody > tr > td:last-child{padding-right:12px;}th > span,td > span{text-align:left;}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:`,
831
936
  `;}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);}}}`
832
- ], ({ 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, ({ $mobileColumnWidths }) => $mobileColumnWidths.reduce((sum, width) => sum + width, 0), ({ $mobileColumnWidths }) => $mobileColumnWidths.map((width, index) => `
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) => `
833
938
  th:nth-child(${index + 1}), td:nth-child(${index + 1}) {
834
939
  width: ${width}px;
835
940
  min-width: ${width}px;
836
941
  max-width: ${width}px;
837
942
  }
838
- `).join(""), ({ theme }) => theme.colors.accent.primary);
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);
839
944
  var FeesCellContent = import_styled_components6.default.span.withConfig({
840
- componentId: "sc-ecbebe61-6"
945
+ componentId: "sc-a5657aea-6"
841
946
  })([
842
947
  `display:block;text-align:`,
843
948
  `;`
844
949
  ], ({ $alignRight }) => $alignRight ? "right" : "left");
845
950
  var EditorButton = import_styled_components6.default.button.withConfig({
846
- componentId: "sc-ecbebe61-7"
951
+ componentId: "sc-a5657aea-7"
847
952
  })([
848
953
  `padding:7px 12px;border:1px solid `,
849
954
  `;border-radius:6px;background:`,
@@ -852,17 +957,17 @@ var EditorButton = import_styled_components6.default.button.withConfig({
852
957
  `;}&:disabled{cursor:default;opacity:.4;}`
853
958
  ], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
854
959
  var OrderActions = import_styled_components6.default.div.withConfig({
855
- componentId: "sc-ecbebe61-8"
960
+ componentId: "sc-a5657aea-8"
856
961
  })([
857
962
  `display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
858
963
  ]);
859
964
  var PositionLabel = import_styled_components6.default.label.withConfig({
860
- componentId: "sc-ecbebe61-9"
965
+ componentId: "sc-a5657aea-9"
861
966
  })([
862
967
  `display:inline-flex;align-items:center;gap:6px;font-size:12px;`
863
968
  ]);
864
969
  var PositionInput = import_styled_components6.default.input.withConfig({
865
- componentId: "sc-ecbebe61-10"
970
+ componentId: "sc-a5657aea-10"
866
971
  })([
867
972
  `width:56px;padding:5px;border:1px solid `,
868
973
  `;border-radius:4px;background:`,
@@ -871,26 +976,26 @@ var PositionInput = import_styled_components6.default.input.withConfig({
871
976
  `;}`
872
977
  ], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
873
978
  var ColumnRow = import_styled_components6.default.div.withConfig({
874
- componentId: "sc-ecbebe61-11"
979
+ componentId: "sc-a5657aea-11"
875
980
  })([
876
981
  `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;}`
877
982
  ]);
878
983
  var PaginationControls = (0, import_styled_components6.default)(FeesAndMarginPagination).withConfig({
879
- componentId: "sc-ecbebe61-12"
984
+ componentId: "sc-a5657aea-12"
880
985
  })([
881
986
  `align-items:center;flex-wrap:wrap;gap:16px 24px;`
882
987
  ]);
883
988
  var PageSizeLabel = import_styled_components6.default.div.withConfig({
884
- componentId: "sc-ecbebe61-13"
989
+ componentId: "sc-a5657aea-13"
885
990
  })([
886
991
  `display:inline-flex;align-items:center;gap:8px;color:`,
887
992
  `;font:inherit;font-size:13px;`
888
993
  ], ({ theme }) => theme.colors.text.primary);
889
994
  function Position({ value, max, label, onMove }) {
890
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(PositionLabel, {
995
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PositionLabel, {
891
996
  children: [
892
997
  "V\u1ECB tr\xED",
893
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PositionInput, {
998
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PositionInput, {
894
999
  "aria-label": label,
895
1000
  type: "number",
896
1001
  min: 1,
@@ -909,19 +1014,19 @@ function Position({ value, max, label, onMove }) {
909
1014
  });
910
1015
  }
911
1016
  var DeleteButton = (0, import_styled_components6.default)(EditorButton).withConfig({
912
- componentId: "sc-ecbebe61-14"
1017
+ componentId: "sc-a5657aea-14"
913
1018
  })([
914
1019
  `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;}`
915
1020
  ]);
916
1021
  var CellEditorInput = import_styled_components6.default.textarea.withConfig({
917
- componentId: "sc-ecbebe61-15"
1022
+ componentId: "sc-a5657aea-15"
918
1023
  })([
919
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:`,
920
1025
  `;}&:focus{outline:1px solid `,
921
1026
  `;}`
922
1027
  ], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.accent.primary);
923
1028
  function CellEditor({ onInput, ...props }) {
924
- const ref = (0, import_react2.useRef)(null);
1029
+ const ref = (0, import_react3.useRef)(null);
925
1030
  const fit = () => {
926
1031
  const element = ref.current;
927
1032
  if (!element) return;
@@ -930,11 +1035,8 @@ function CellEditor({ onInput, ...props }) {
930
1035
  const border = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
931
1036
  element.style.height = `${element.scrollHeight + border}px`;
932
1037
  };
933
- (0, import_react2.useLayoutEffect)(fit, [
934
- props.value,
935
- props.defaultValue
936
- ]);
937
- (0, import_react2.useLayoutEffect)(() => {
1038
+ (0, import_react3.useLayoutEffect)(fit);
1039
+ (0, import_react3.useLayoutEffect)(() => {
938
1040
  const element = ref.current;
939
1041
  if (!element) return;
940
1042
  let width = element.getBoundingClientRect().width;
@@ -955,7 +1057,7 @@ function CellEditor({ onInput, ...props }) {
955
1057
  observer.disconnect();
956
1058
  };
957
1059
  }, []);
958
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CellEditorInput, {
1060
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CellEditorInput, {
959
1061
  ...props,
960
1062
  ref,
961
1063
  rows: 1,
@@ -966,11 +1068,11 @@ function CellEditor({ onInput, ...props }) {
966
1068
  });
967
1069
  }
968
1070
  function RowTagSelect({ selected, options, onChange }) {
969
- const selectRoot = (0, import_react2.useRef)(null);
970
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditGroup, {
971
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
1071
+ const selectRoot = (0, import_react3.useRef)(null);
1072
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditGroup, {
1073
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
972
1074
  ref: selectRoot,
973
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Select.default, {
1075
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Select.default, {
974
1076
  multiple: true,
975
1077
  fullWidth: true,
976
1078
  size: "small",
@@ -991,10 +1093,10 @@ function RowTagSelect({ selected, options, onChange }) {
991
1093
  fontSize: 13
992
1094
  },
993
1095
  children: [
994
- options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_MenuItem.default, {
1096
+ options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_MenuItem.default, {
995
1097
  value: item,
996
1098
  children: [
997
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Checkbox.default, {
1099
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Checkbox.default, {
998
1100
  size: "small",
999
1101
  checked: selected.includes(item),
1000
1102
  tabIndex: -1,
@@ -1003,7 +1105,7 @@ function RowTagSelect({ selected, options, onChange }) {
1003
1105
  item
1004
1106
  ]
1005
1107
  }, item)),
1006
- !options.length && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_MenuItem.default, {
1108
+ !options.length && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_MenuItem.default, {
1007
1109
  disabled: true,
1008
1110
  children: "Ch\u01B0a c\xF3 tag \u2014 d\xF9ng n\xFAt Th\xEAm tag ph\xEDa tr\xEAn"
1009
1111
  })
@@ -1053,15 +1155,16 @@ var rightAlignedColumns = /* @__PURE__ */ new Set([
1053
1155
  "unit"
1054
1156
  ]);
1055
1157
  function FeesTable({ value, editable = false, onChange, labels, size = "md", tagOrder = [], language = "vi" }) {
1056
- const [search, setSearch] = (0, import_react2.useState)("");
1057
- const [tag, setTag] = (0, import_react2.useState)("");
1058
- const [page, setPage] = (0, import_react2.useState)(1);
1059
- const [pageSize, setPageSize] = (0, import_react2.useState)(FEES_PAGE_SIZE);
1060
- const [columnsOpen, setColumnsOpen] = (0, import_react2.useState)(false);
1158
+ const [search, setSearch] = (0, import_react3.useState)("");
1159
+ const [tag, setTag] = (0, import_react3.useState)("");
1160
+ const [page, setPage] = (0, import_react3.useState)(1);
1161
+ const [pageSize, setPageSize] = (0, import_react3.useState)(FEES_PAGE_SIZE);
1162
+ const [columnsOpen, setColumnsOpen] = (0, import_react3.useState)(false);
1163
+ const [typographyOpen, setTypographyOpen] = (0, import_react3.useState)(false);
1061
1164
  const english = language === "en";
1062
1165
  const canEdit = editable && Boolean(onChange);
1063
- const tableRoot = (0, import_react2.useRef)(null);
1064
- (0, import_react2.useLayoutEffect)(() => {
1166
+ const tableRoot = (0, import_react3.useRef)(null);
1167
+ (0, import_react3.useLayoutEffect)(() => {
1065
1168
  const root = tableRoot.current;
1066
1169
  if (!root || !canEdit) return;
1067
1170
  const editors = [
@@ -1079,10 +1182,11 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1079
1182
  canEdit,
1080
1183
  value.columns
1081
1184
  ]);
1082
- const dialogId = (0, import_react2.useId)();
1083
- const [createTagOpen, setCreateTagOpen] = (0, import_react2.useState)(false);
1084
- const [tagDraft, setTagDraft] = (0, import_react2.useState)("");
1085
- const [deleteTarget, setDeleteTarget] = (0, import_react2.useState)(null);
1185
+ const dialogId = (0, import_react3.useId)();
1186
+ const mobileFontScale = Math.max(1, (value.typography?.thead?.fontSize ?? 8) / 8, (value.typography?.tbody?.fontSize ?? 10) / 10);
1187
+ const [createTagOpen, setCreateTagOpen] = (0, import_react3.useState)(false);
1188
+ const [tagDraft, setTagDraft] = (0, import_react3.useState)("");
1189
+ const [deleteTarget, setDeleteTarget] = (0, import_react3.useState)(null);
1086
1190
  const confirmDelete = () => {
1087
1191
  if (!deleteTarget || !canEdit) return;
1088
1192
  if (deleteTarget.kind === "row") {
@@ -1174,10 +1278,10 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1174
1278
  key: column.key,
1175
1279
  width: canEdit ? columnWidths[column.key] ?? 140 : index === 0 ? 178 : 170,
1176
1280
  fixed: index === 0 ? "left" : void 0,
1177
- title: canEdit ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(HeaderGroup, {
1281
+ title: canEdit ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(HeaderGroup, {
1178
1282
  children: [
1179
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HeaderTitle, {
1180
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CellEditor, {
1283
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HeaderTitle, {
1284
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CellEditor, {
1181
1285
  rows: 2,
1182
1286
  value: column.title,
1183
1287
  "aria-label": `Ti\xEAu \u0111\u1EC1 c\u1ED9t ${index + 1}`,
@@ -1190,8 +1294,8 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1190
1294
  })
1191
1295
  })
1192
1296
  }),
1193
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HeaderActions, {
1194
- children: column.key !== "name" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DeleteButton, {
1297
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HeaderActions, {
1298
+ children: column.key !== "name" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DeleteButton, {
1195
1299
  type: "button",
1196
1300
  onClick: () => {
1197
1301
  setDeleteTarget({
@@ -1204,11 +1308,11 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1204
1308
  })
1205
1309
  })
1206
1310
  ]
1207
- }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeesCellContent, {
1311
+ }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesCellContent, {
1208
1312
  $alignRight: rightAlignedColumns.has(column.key),
1209
1313
  children: column.title
1210
1314
  }),
1211
- render: (_unused, row) => canEdit ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CellEditor, {
1315
+ render: (_unused, row) => canEdit ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CellEditor, {
1212
1316
  rows: Math.max(2, (row.cells[column.key] ?? "").split("\n").length),
1213
1317
  value: row.cells[column.key] ?? "",
1214
1318
  "aria-label": `${column.title} \u2014 ${row.cells.name || "H\xE0ng m\u1EDBi"}`,
@@ -1218,47 +1322,47 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1218
1322
  [column.key]: event.target.value
1219
1323
  }
1220
1324
  })
1221
- }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeesCellContent, {
1325
+ }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesCellContent, {
1222
1326
  $alignRight: rightAlignedColumns.has(column.key),
1223
1327
  children: row.cells[column.key] ?? ""
1224
1328
  })
1225
1329
  }));
1226
1330
  if (canEdit) columns.push({
1227
1331
  key: "__tags",
1228
- title: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(HeaderGroup, {
1332
+ title: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(HeaderGroup, {
1229
1333
  children: [
1230
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HeaderTitle, {
1334
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HeaderTitle, {
1231
1335
  children: "Tag & th\u1EE9 t\u1EF1 d\xF2ng"
1232
1336
  }),
1233
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HeaderActions, {})
1337
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HeaderActions, {})
1234
1338
  ]
1235
1339
  }),
1236
1340
  width: 300,
1237
- render: (_unused, row) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(EditGroup, {
1341
+ render: (_unused, row) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(EditGroup, {
1238
1342
  children: [
1239
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RowTagSelect, {
1343
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RowTagSelect, {
1240
1344
  selected: row.tags,
1241
1345
  options: tags,
1242
1346
  onChange: (next) => changeRow(row.id, {
1243
1347
  tags: next
1244
1348
  })
1245
1349
  }),
1246
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(OrderActions, {
1350
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(OrderActions, {
1247
1351
  children: [
1248
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Position, {
1352
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Position, {
1249
1353
  value: value.rows.findIndex((item) => item.id === row.id),
1250
1354
  max: value.rows.length,
1251
1355
  label: `V\u1ECB tr\xED d\xF2ng ${row.cells.name}`,
1252
1356
  onMove: (to) => moveRow(row.id, to)
1253
1357
  }),
1254
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1358
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1255
1359
  type: "button",
1256
1360
  "aria-label": `\u0110\u01B0a d\xF2ng ${row.cells.name} l\xEAn`,
1257
1361
  disabled: value.rows[0]?.id === row.id,
1258
1362
  onClick: () => moveRow(row.id, value.rows.findIndex((item) => item.id === row.id) - 1),
1259
1363
  children: "\u2191"
1260
1364
  }),
1261
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1365
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1262
1366
  type: "button",
1263
1367
  "aria-label": `\u0110\u01B0a d\xF2ng ${row.cells.name} xu\u1ED1ng`,
1264
1368
  disabled: value.rows[value.rows.length - 1]?.id === row.id,
@@ -1267,7 +1371,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1267
1371
  })
1268
1372
  ]
1269
1373
  }),
1270
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DeleteButton, {
1374
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DeleteButton, {
1271
1375
  type: "button",
1272
1376
  onClick: () => {
1273
1377
  setDeleteTarget({
@@ -1281,24 +1385,24 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1281
1385
  ]
1282
1386
  })
1283
1387
  });
1284
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_styled_components6.ThemeProvider, {
1388
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_styled_components6.ThemeProvider, {
1285
1389
  theme: feesTheme,
1286
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", {
1390
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", {
1287
1391
  ref: tableRoot,
1288
1392
  "data-cms-table-editor": true,
1289
1393
  onClick: (event) => {
1290
1394
  if (canEdit) event.stopPropagation();
1291
1395
  },
1292
1396
  children: [
1293
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeesAndMarginToolbar, {
1397
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesAndMarginToolbar, {
1294
1398
  "aria-label": "L\u1ECDc b\u1EA3ng ph\xED v\xE0 k\xFD qu\u1EF9",
1295
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(FeesAndMarginToolbarInner, {
1399
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(FeesAndMarginToolbarInner, {
1296
1400
  children: [
1297
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
1401
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
1298
1402
  style: {
1299
1403
  minWidth: 0
1300
1404
  },
1301
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TabCommon, {
1405
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabCommon, {
1302
1406
  ariaLabel: "L\u1ECDc theo tag",
1303
1407
  size,
1304
1408
  items: [
@@ -1318,9 +1422,9 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1318
1422
  }
1319
1423
  })
1320
1424
  }),
1321
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeesAndMarginSearch, {
1322
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InputCommon, {
1323
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeesSearchIcon, {}),
1425
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesAndMarginSearch, {
1426
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InputCommon, {
1427
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesSearchIcon, {}),
1324
1428
  size: "sm",
1325
1429
  "aria-label": labels?.search ?? "T\xECm t\xEAn h\xE0ng h\xF3a ho\u1EB7c m\xE3",
1326
1430
  placeholder: labels?.search ?? "T\xECm t\xEAn h\xE0ng h\xF3a ho\u1EB7c m\xE3",
@@ -1334,9 +1438,9 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1334
1438
  ]
1335
1439
  })
1336
1440
  }),
1337
- canEdit && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(EditorActions, {
1441
+ canEdit && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(EditorActions, {
1338
1442
  children: [
1339
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1443
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1340
1444
  type: "button",
1341
1445
  onClick: () => {
1342
1446
  const row = {
@@ -1360,12 +1464,12 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1360
1464
  },
1361
1465
  children: "+ Th\xEAm h\xE0ng"
1362
1466
  }),
1363
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1467
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1364
1468
  type: "button",
1365
1469
  onClick: addColumn,
1366
1470
  children: "+ Th\xEAm c\u1ED9t"
1367
1471
  }),
1368
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(EditorButton, {
1472
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(EditorButton, {
1369
1473
  type: "button",
1370
1474
  onClick: () => setColumnsOpen(true),
1371
1475
  children: [
@@ -1374,7 +1478,14 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1374
1478
  ")"
1375
1479
  ]
1376
1480
  }),
1377
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1481
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1482
+ type: "button",
1483
+ "aria-expanded": typographyOpen,
1484
+ "aria-controls": `${dialogId}-typography`,
1485
+ onClick: () => setTypographyOpen((open) => !open),
1486
+ children: "\u0110\u1ECBnh d\u1EA1ng ch\u1EEF"
1487
+ }),
1488
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1378
1489
  type: "button",
1379
1490
  onClick: () => {
1380
1491
  setTagDraft("");
@@ -1384,10 +1495,30 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1384
1495
  })
1385
1496
  ]
1386
1497
  }),
1387
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AlignedFeesTable, {
1388
- $mobileColumnWidths: columns.map((column) => mobileColumnWidths[column.key] ?? 88),
1498
+ canEdit && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Collapse.default, {
1499
+ in: typographyOpen,
1500
+ unmountOnExit: true,
1501
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
1502
+ id: `${dialogId}-typography`,
1503
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesTypographyControls, {
1504
+ value: value.typography,
1505
+ onChange: (typography) => {
1506
+ const { typography: _previous, ...data } = value;
1507
+ onChange?.({
1508
+ ...data,
1509
+ ...typography ? {
1510
+ typography
1511
+ } : {}
1512
+ });
1513
+ }
1514
+ })
1515
+ })
1516
+ }),
1517
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AlignedFeesTable, {
1518
+ $typography: value.typography,
1519
+ $mobileColumnWidths: columns.map((column) => Math.ceil((mobileColumnWidths[column.key] ?? 88) * mobileFontScale)),
1389
1520
  "data-editable": canEdit || void 0,
1390
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Table, {
1521
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Table, {
1391
1522
  ariaLabel: english ? "Fees and margin table" : "B\u1EA3ng ph\xED v\xE0 k\xFD qu\u1EF9",
1392
1523
  columns,
1393
1524
  dataSource: pagination.rows,
@@ -1399,15 +1530,15 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1399
1530
  }
1400
1531
  })
1401
1532
  }),
1402
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(PaginationControls, {
1533
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PaginationControls, {
1403
1534
  children: [
1404
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(PageSizeLabel, {
1535
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PageSizeLabel, {
1405
1536
  children: [
1406
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", {
1537
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
1407
1538
  id: `${dialogId}-page-size-label`,
1408
1539
  children: english ? "Rows per page:" : "S\u1ED1 d\xF2ng m\u1ED7i trang:"
1409
1540
  }),
1410
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Select.default, {
1541
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Select.default, {
1411
1542
  size: "small",
1412
1543
  value: pageSize,
1413
1544
  labelId: `${dialogId}-page-size-label`,
@@ -1433,11 +1564,11 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1433
1564
  25,
1434
1565
  50,
1435
1566
  100
1436
- ].map((size2) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_MenuItem.default, {
1567
+ ].map((size2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_MenuItem.default, {
1437
1568
  value: size2,
1438
1569
  children: size2
1439
1570
  }, size2)),
1440
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_MenuItem.default, {
1571
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_MenuItem.default, {
1441
1572
  value: -1,
1442
1573
  children: english ? "All" : "T\u1EA5t c\u1EA3"
1443
1574
  })
@@ -1445,7 +1576,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1445
1576
  })
1446
1577
  ]
1447
1578
  }),
1448
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", {
1579
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", {
1449
1580
  "aria-live": "polite",
1450
1581
  style: {
1451
1582
  fontSize: 13
@@ -1458,7 +1589,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1458
1589
  filtered.length
1459
1590
  ]
1460
1591
  }),
1461
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Pagination, {
1592
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Pagination, {
1462
1593
  page: pagination.page,
1463
1594
  pageCount: pagination.pageCount,
1464
1595
  onPageChange: setPage,
@@ -1472,7 +1603,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1472
1603
  })
1473
1604
  ]
1474
1605
  }),
1475
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Dialog.default, {
1606
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Dialog.default, {
1476
1607
  open: columnsOpen && canEdit,
1477
1608
  onClose: () => setColumnsOpen(false),
1478
1609
  container: () => tableRoot.current?.ownerDocument.body ?? document.body,
@@ -1480,18 +1611,18 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1480
1611
  fullWidth: true,
1481
1612
  maxWidth: "md",
1482
1613
  children: [
1483
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogTitle.default, {
1614
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogTitle.default, {
1484
1615
  id: `${dialogId}-columns-title`,
1485
1616
  children: "Qu\u1EA3n l\xFD c\u1ED9t"
1486
1617
  }),
1487
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_DialogContent.default, {
1618
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_DialogContent.default, {
1488
1619
  children: [
1489
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogContentText.default, {
1620
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogContentText.default, {
1490
1621
  children: "\u0110\u1ED5i ti\xEAu \u0111\u1EC1 v\xE0 v\u1ECB tr\xED c\u1ED9t. V\u1ECB tr\xED d\xF2ng/c\u1ED9t \u0111\u01B0\u1EE3c t\xEDnh trong to\xE0n b\u1EA3ng, k\u1EC3 c\u1EA3 c\xE1c d\xF2ng \u0111ang \u1EA9n b\u1EDFi b\u1ED9 l\u1ECDc."
1491
1622
  }),
1492
- value.columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ColumnRow, {
1623
+ value.columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(ColumnRow, {
1493
1624
  children: [
1494
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CellEditor, {
1625
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CellEditor, {
1495
1626
  "aria-label": `Ti\xEAu \u0111\u1EC1 c\u1ED9t ${index + 1}`,
1496
1627
  value: column.title,
1497
1628
  onChange: (event) => onChange?.({
@@ -1502,29 +1633,29 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1502
1633
  } : item)
1503
1634
  })
1504
1635
  }),
1505
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(OrderActions, {
1636
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(OrderActions, {
1506
1637
  children: [
1507
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Position, {
1638
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Position, {
1508
1639
  value: index,
1509
1640
  max: value.columns.length,
1510
1641
  label: `V\u1ECB tr\xED c\u1ED9t ${column.title}`,
1511
1642
  onMove: (to) => moveColumn(index, to)
1512
1643
  }),
1513
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1644
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1514
1645
  type: "button",
1515
1646
  "aria-label": `\u0110\u01B0a c\u1ED9t ${column.title} l\xEAn`,
1516
1647
  disabled: index === 0,
1517
1648
  onClick: () => moveColumn(index, index - 1),
1518
1649
  children: "\u2191"
1519
1650
  }),
1520
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1651
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1521
1652
  type: "button",
1522
1653
  "aria-label": `\u0110\u01B0a c\u1ED9t ${column.title} xu\u1ED1ng`,
1523
1654
  disabled: index === value.columns.length - 1,
1524
1655
  onClick: () => moveColumn(index, index + 1),
1525
1656
  children: "\u2193"
1526
1657
  }),
1527
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DeleteButton, {
1658
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DeleteButton, {
1528
1659
  type: "button",
1529
1660
  disabled: column.key === "name",
1530
1661
  onClick: () => setDeleteTarget({
@@ -1538,15 +1669,15 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1538
1669
  })
1539
1670
  ]
1540
1671
  }, column.key)),
1541
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EditorButton, {
1672
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(EditorButton, {
1542
1673
  type: "button",
1543
1674
  onClick: addColumn,
1544
1675
  children: "+ Th\xEAm c\u1ED9t"
1545
1676
  })
1546
1677
  ]
1547
1678
  }),
1548
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogActions.default, {
1549
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Button.default, {
1679
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogActions.default, {
1680
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Button.default, {
1550
1681
  variant: "contained",
1551
1682
  onClick: () => setColumnsOpen(false),
1552
1683
  children: "Xong"
@@ -1554,7 +1685,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1554
1685
  })
1555
1686
  ]
1556
1687
  }),
1557
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Dialog.default, {
1688
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Dialog.default, {
1558
1689
  open: createTagOpen && canEdit,
1559
1690
  onClose: () => setCreateTagOpen(false),
1560
1691
  container: () => tableRoot.current?.ownerDocument.body ?? document.body,
@@ -1562,12 +1693,12 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1562
1693
  fullWidth: true,
1563
1694
  maxWidth: "xs",
1564
1695
  children: [
1565
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogTitle.default, {
1696
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogTitle.default, {
1566
1697
  id: `${dialogId}-create-tag-title`,
1567
1698
  children: "T\u1EA1o tag m\u1EDBi"
1568
1699
  }),
1569
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogContent.default, {
1570
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_TextField.default, {
1700
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogContent.default, {
1701
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_TextField.default, {
1571
1702
  autoFocus: true,
1572
1703
  fullWidth: true,
1573
1704
  margin: "dense",
@@ -1584,13 +1715,13 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1584
1715
  }
1585
1716
  })
1586
1717
  }),
1587
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_DialogActions.default, {
1718
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_DialogActions.default, {
1588
1719
  children: [
1589
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Button.default, {
1720
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Button.default, {
1590
1721
  onClick: () => setCreateTagOpen(false),
1591
1722
  children: "H\u1EE7y"
1592
1723
  }),
1593
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Button.default, {
1724
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Button.default, {
1594
1725
  variant: "contained",
1595
1726
  disabled: !newTagName || duplicateTag,
1596
1727
  onClick: createTag,
@@ -1600,7 +1731,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1600
1731
  })
1601
1732
  ]
1602
1733
  }),
1603
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Dialog.default, {
1734
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Dialog.default, {
1604
1735
  open: Boolean(deleteTarget) && canEdit,
1605
1736
  onClose: () => setDeleteTarget(null),
1606
1737
  container: () => tableRoot.current?.ownerDocument.body ?? document.body,
@@ -1609,7 +1740,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1609
1740
  fullWidth: true,
1610
1741
  maxWidth: "xs",
1611
1742
  children: [
1612
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_DialogTitle.default, {
1743
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_DialogTitle.default, {
1613
1744
  id: `${dialogId}-title`,
1614
1745
  children: [
1615
1746
  "X\xF3a ",
@@ -1617,20 +1748,20 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1617
1748
  "?"
1618
1749
  ]
1619
1750
  }),
1620
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogContent.default, {
1621
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_DialogContentText.default, {
1751
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogContent.default, {
1752
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_DialogContentText.default, {
1622
1753
  id: `${dialogId}-description`,
1623
1754
  children: deleteTarget?.kind === "column" ? `B\u1EA1n c\xF3 mu\u1ED1n x\xF3a c\u1ED9t \u201C${deleteTarget.label}\u201D v\xE0 to\xE0n b\u1ED9 n\u1ED9i dung trong c\u1ED9t n\xE0y?` : `B\u1EA1n c\xF3 mu\u1ED1n x\xF3a h\xE0ng \u201C${deleteTarget?.label ?? ""}\u201D?`
1624
1755
  })
1625
1756
  }),
1626
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_DialogActions.default, {
1757
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_DialogActions.default, {
1627
1758
  children: [
1628
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Button.default, {
1759
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Button.default, {
1629
1760
  autoFocus: true,
1630
1761
  onClick: () => setDeleteTarget(null),
1631
1762
  children: "H\u1EE7y"
1632
1763
  }),
1633
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Button.default, {
1764
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_Button.default, {
1634
1765
  color: "error",
1635
1766
  variant: "contained",
1636
1767
  onClick: confirmDelete,
@@ -1649,7 +1780,7 @@ function FeesTable({ value, editable = false, onChange, labels, size = "md", tag
1649
1780
  }
1650
1781
 
1651
1782
  // src/wikex/fees-manager.tsx
1652
- var import_jsx_runtime6 = require("react/jsx-runtime");
1783
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1653
1784
  function FeesManager({
1654
1785
  entries,
1655
1786
  selectedId,
@@ -1669,16 +1800,16 @@ function FeesManager({
1669
1800
  }) {
1670
1801
  const entry = entries.find((item) => item.id === selectedId);
1671
1802
  const key = `${selectedId}:${language}`;
1672
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { spacing: 3, sx: { minWidth: 0, width: 1, maxWidth: 1800, mx: "auto" }, children: [
1673
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { direction: { xs: "column", md: "row" }, justifyContent: "space-between", alignItems: { md: "center" }, gap: 2.5, children: [
1674
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { spacing: 1, sx: { minWidth: 0, maxWidth: 720 }, children: [
1675
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Typography, { variant: "h4", children: "Ph\xED & k\xFD qu\u1EF9" }),
1676
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", children: "Qu\u1EA3n l\xFD d\u1EEF li\u1EC7u, tag v\xE0 th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB. B\u1ED1 c\u1EE5c v\xE0 n\u1ED9i dung gi\u1EDBi thi\u1EC7u \u0111\u01B0\u1EE3c ch\u1EC9nh trong Layout trang t\u0129nh." })
1803
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { spacing: 3, sx: { minWidth: 0, width: 1 }, children: [
1804
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { direction: { xs: "column", md: "row" }, justifyContent: "space-between", alignItems: { md: "center" }, gap: 2.5, children: [
1805
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { spacing: 1, sx: { minWidth: 0, maxWidth: 720 }, children: [
1806
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Typography, { variant: "h4", children: "Ph\xED & k\xFD qu\u1EF9" }),
1807
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Typography, { variant: "body2", color: "text.secondary", children: "Qu\u1EA3n l\xFD d\u1EEF li\u1EC7u, tag v\xE0 th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB. B\u1ED1 c\u1EE5c v\xE0 n\u1ED9i dung gi\u1EDBi thi\u1EC7u \u0111\u01B0\u1EE3c ch\u1EC9nh trong Layout trang t\u0129nh." })
1677
1808
  ] }),
1678
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { direction: "row", spacing: 1.5, alignItems: "center", flexShrink: 0, children: [
1679
- dirtyKeys.includes(key) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Chip, { size: "small", color: "warning", label: "Ch\u01B0a l\u01B0u" }),
1680
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1681
- import_material.Button,
1809
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { direction: "row", spacing: 1.5, alignItems: "center", flexShrink: 0, children: [
1810
+ dirtyKeys.includes(key) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Chip, { size: "small", color: "warning", label: "Ch\u01B0a l\u01B0u" }),
1811
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1812
+ import_material2.Button,
1682
1813
  {
1683
1814
  variant: "contained",
1684
1815
  loading: saving,
@@ -1690,17 +1821,17 @@ function FeesManager({
1690
1821
  )
1691
1822
  ] })
1692
1823
  ] }),
1693
- !canWrite && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Alert, { severity: "info", children: "B\u1EA1n c\xF3 quy\u1EC1n xem b\u1EA3ng ph\xED. C\u1EA7n quy\u1EC1n s\u1EEDa n\u1ED9i dung \u0111\u1EC3 thay \u0111\u1ED5i d\u1EEF li\u1EC7u." }),
1694
- notice && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Alert, { severity: notice.severity, onClose: onDismissNotice, children: notice.message }),
1695
- !entries.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Alert, { severity: "info", children: "Ch\u01B0a c\xF3 b\u1EA3ng ph\xED. Th\xEAm component B\u1EA3ng ph\xED & K\xFD qu\u1EF9 v\xE0o m\u1ED9t trang trong Layout trang t\u0129nh \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u." }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1696
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Card, { variant: "outlined", sx: { p: { xs: 2.5, md: 3 }, boxShadow: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { spacing: 2.5, children: [
1697
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 1.5, flexWrap: "wrap", children: [
1698
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Typography, { variant: "subtitle1", children: "B\u1EA3ng \u0111ang qu\u1EA3n l\xFD" }),
1699
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Chip, { size: "small", variant: statusChipVariant, label: entry?.status === "published" ? "Trang \u0111\xE3 xu\u1EA5t b\u1EA3n" : "Trang b\u1EA3n nh\xE1p", color: entry?.status === "published" ? "success" : "default" })
1824
+ !canWrite && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Alert, { severity: "info", children: "B\u1EA1n c\xF3 quy\u1EC1n xem b\u1EA3ng ph\xED. C\u1EA7n quy\u1EC1n s\u1EEDa n\u1ED9i dung \u0111\u1EC3 thay \u0111\u1ED5i d\u1EEF li\u1EC7u." }),
1825
+ notice && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Alert, { severity: notice.severity, onClose: onDismissNotice, children: notice.message }),
1826
+ !entries.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Alert, { severity: "info", children: "Ch\u01B0a c\xF3 b\u1EA3ng ph\xED. Th\xEAm component B\u1EA3ng ph\xED & K\xFD qu\u1EF9 v\xE0o m\u1ED9t trang trong Layout trang t\u0129nh \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u." }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1827
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Card, { variant: "outlined", sx: { p: { xs: 2.5, md: 3 }, boxShadow: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { spacing: 2.5, children: [
1828
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 1.5, flexWrap: "wrap", children: [
1829
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Typography, { variant: "subtitle1", children: "B\u1EA3ng \u0111ang qu\u1EA3n l\xFD" }),
1830
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Chip, { size: "small", variant: statusChipVariant, label: entry?.status === "published" ? "Trang \u0111\xE3 xu\u1EA5t b\u1EA3n" : "Trang b\u1EA3n nh\xE1p", color: entry?.status === "published" ? "success" : "default" })
1700
1831
  ] }),
1701
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { direction: { xs: "column", md: "row" }, spacing: 2.5, alignItems: { md: "flex-end" }, children: [
1702
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1703
- import_material.TextField,
1832
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { direction: { xs: "column", md: "row" }, spacing: 2.5, alignItems: { md: "flex-end" }, children: [
1833
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1834
+ import_material2.TextField,
1704
1835
  {
1705
1836
  select: true,
1706
1837
  size: "small",
@@ -1710,7 +1841,7 @@ function FeesManager({
1710
1841
  fullWidth: true,
1711
1842
  sx: { flex: 1, minWidth: 0 },
1712
1843
  onChange: (event) => onSelectEntry(event.target.value),
1713
- children: entries.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.MenuItem, { value: item.id, children: [
1844
+ children: entries.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.MenuItem, { value: item.id, children: [
1714
1845
  item.pageTitle,
1715
1846
  " \xB7 /",
1716
1847
  item.slug,
@@ -1720,10 +1851,10 @@ function FeesManager({
1720
1851
  ] }, item.id))
1721
1852
  }
1722
1853
  ),
1723
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { spacing: 1, sx: { width: { xs: 1, md: 240 }, flexShrink: 0 }, children: [
1724
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "Ng\xF4n ng\u1EEF n\u1ED9i dung" }),
1725
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1726
- import_material.ToggleButtonGroup,
1854
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { spacing: 1, sx: { width: { xs: 1, md: 240 }, flexShrink: 0 }, children: [
1855
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Typography, { variant: "caption", color: "text.secondary", children: "Ng\xF4n ng\u1EEF n\u1ED9i dung" }),
1856
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1857
+ import_material2.ToggleButtonGroup,
1727
1858
  {
1728
1859
  size: "small",
1729
1860
  exclusive: true,
@@ -1735,11 +1866,11 @@ function FeesManager({
1735
1866
  if (next === "vi" || next === "en") onSelectLanguage(next);
1736
1867
  },
1737
1868
  children: [
1738
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.ToggleButton, { value: "vi", children: [
1869
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.ToggleButton, { value: "vi", children: [
1739
1870
  "Ti\u1EBFng Vi\u1EC7t",
1740
1871
  dirtyKeys.includes(`${selectedId}:vi`) ? " \u2022" : ""
1741
1872
  ] }),
1742
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.ToggleButton, { value: "en", children: [
1873
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.ToggleButton, { value: "en", children: [
1743
1874
  "English",
1744
1875
  dirtyKeys.includes(`${selectedId}:en`) ? " \u2022" : ""
1745
1876
  ] })
@@ -1749,22 +1880,22 @@ function FeesManager({
1749
1880
  ] })
1750
1881
  ] })
1751
1882
  ] }) }),
1752
- parseError && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Alert, { severity: "error", children: parseError }),
1753
- table && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Card, { inert: saving, "aria-busy": saving, sx: { minWidth: 0, opacity: saving ? 0.65 : 1 }, children: [
1754
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { direction: { xs: "column", sm: "row" }, spacing: 2, justifyContent: "space-between", alignItems: { sm: "center" }, sx: { px: { xs: 2.5, md: 3 }, py: 2.5 }, children: [
1755
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { spacing: 0.5, children: [
1756
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Typography, { variant: "subtitle1", children: "D\u1EEF li\u1EC7u ph\xED & k\xFD qu\u1EF9" }),
1757
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", children: canWrite ? "S\u1EEDa tr\u1EF1c ti\u1EBFp trong \xF4. D\xF9ng Qu\u1EA3n l\xFD c\u1ED9t ho\u1EB7c V\u1ECB tr\xED \u0111\u1EC3 \u0111\u1ED5i th\u1EE9 t\u1EF1." : "Tra c\u1EE9u d\u1EEF li\u1EC7u v\xE0 l\u1ECDc theo nh\xF3m h\xE0ng h\xF3a." })
1883
+ parseError && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Alert, { severity: "error", children: parseError }),
1884
+ table && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Card, { inert: saving, "aria-busy": saving, sx: { minWidth: 0, opacity: saving ? 0.65 : 1 }, children: [
1885
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { direction: { xs: "column", sm: "row" }, spacing: 2, justifyContent: "space-between", alignItems: { sm: "center" }, sx: { px: { xs: 2.5, md: 3 }, py: 2.5 }, children: [
1886
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { spacing: 0.5, children: [
1887
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Typography, { variant: "subtitle1", children: "D\u1EEF li\u1EC7u ph\xED & k\xFD qu\u1EF9" }),
1888
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Typography, { variant: "body2", color: "text.secondary", children: canWrite ? "S\u1EEDa tr\u1EF1c ti\u1EBFp trong \xF4. D\xF9ng Qu\u1EA3n l\xFD c\u1ED9t ho\u1EB7c V\u1ECB tr\xED \u0111\u1EC3 \u0111\u1ED5i th\u1EE9 t\u1EF1." : "Tra c\u1EE9u d\u1EEF li\u1EC7u v\xE0 l\u1ECDc theo nh\xF3m h\xE0ng h\xF3a." })
1758
1889
  ] }),
1759
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Stack, { direction: "row", spacing: 1, flexShrink: 0, children: [
1760
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Chip, { size: "small", variant: "outlined", label: `${table.rows.length} d\xF2ng` }),
1761
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Chip, { size: "small", variant: "outlined", label: `${table.columns.length} c\u1ED9t` })
1890
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Stack, { direction: "row", spacing: 1, flexShrink: 0, children: [
1891
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Chip, { size: "small", variant: "outlined", label: `${table.rows.length} d\xF2ng` }),
1892
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Chip, { size: "small", variant: "outlined", label: `${table.columns.length} c\u1ED9t` })
1762
1893
  ] })
1763
1894
  ] }),
1764
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Divider, {}),
1765
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material.Box, { sx: { p: { xs: 2.5, md: 3 }, minWidth: 0 }, children: [
1766
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", sx: { display: { xs: "block", md: "none" }, mb: 2 }, children: "Vu\u1ED1t ngang trong b\u1EA3ng \u0111\u1EC3 xem th\xEAm c\xE1c c\u1ED9t." }),
1767
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FeesTable, { value: table, language, editable: canWrite, onChange: canWrite && !saving ? onChange : void 0 }, key)
1895
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Divider, {}),
1896
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material2.Box, { sx: { p: { xs: 2.5, md: 3 }, minWidth: 0 }, children: [
1897
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material2.Typography, { variant: "caption", color: "text.secondary", sx: { display: { xs: "block", md: "none" }, mb: 2 }, children: "Vu\u1ED1t ngang trong b\u1EA3ng \u0111\u1EC3 xem th\xEAm c\xE1c c\u1ED9t." }),
1898
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FeesTable, { value: table, language, editable: canWrite, onChange: canWrite && !saving ? onChange : void 0 }, key)
1768
1899
  ] })
1769
1900
  ] })
1770
1901
  ] })