@comitor/ui 1.11.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/LICENSE +35 -0
  2. package/README.md +23 -7
  3. package/dist/components/ui/action-bar-constants.d.ts +31 -0
  4. package/dist/components/ui/action-bar-constants.js +9 -0
  5. package/dist/components/ui/action-bar-constants.js.map +1 -0
  6. package/dist/components/ui/action-bar.d.ts +67 -0
  7. package/dist/components/ui/action-bar.js +522 -0
  8. package/dist/components/ui/action-bar.js.map +1 -0
  9. package/dist/components/ui/badge-overflow.d.ts +30 -0
  10. package/dist/components/ui/badge-overflow.js +179 -0
  11. package/dist/components/ui/badge-overflow.js.map +1 -0
  12. package/dist/components/ui/banner.d.ts +79 -0
  13. package/dist/components/ui/banner.js +518 -0
  14. package/dist/components/ui/banner.js.map +1 -0
  15. package/dist/components/ui/circular-progress.d.ts +50 -0
  16. package/dist/components/ui/circular-progress.js +266 -0
  17. package/dist/components/ui/circular-progress.js.map +1 -0
  18. package/dist/components/ui/cropper-constants.d.ts +34 -0
  19. package/dist/components/ui/cropper-constants.js +10 -0
  20. package/dist/components/ui/cropper-constants.js.map +1 -0
  21. package/dist/components/ui/cropper.d.ts +106 -0
  22. package/dist/components/ui/cropper.js +1269 -0
  23. package/dist/components/ui/cropper.js.map +1 -0
  24. package/dist/components/ui/drawer.d.ts +1 -1
  25. package/dist/components/ui/drawer.js +2 -2
  26. package/dist/components/ui/drawer.js.map +1 -1
  27. package/dist/components/ui/kanban-constants.d.ts +61 -0
  28. package/dist/components/ui/kanban-constants.js +21 -0
  29. package/dist/components/ui/kanban-constants.js.map +1 -0
  30. package/dist/components/ui/kanban.d.ts +72 -0
  31. package/dist/components/ui/kanban.js +787 -0
  32. package/dist/components/ui/kanban.js.map +1 -0
  33. package/dist/components/ui/key-value-constants.d.ts +33 -0
  34. package/dist/components/ui/key-value-constants.js +11 -0
  35. package/dist/components/ui/key-value-constants.js.map +1 -0
  36. package/dist/components/ui/key-value.d.ts +96 -0
  37. package/dist/components/ui/key-value.js +641 -0
  38. package/dist/components/ui/key-value.js.map +1 -0
  39. package/dist/components/ui/mask-input-constants.d.ts +99 -0
  40. package/dist/components/ui/mask-input-constants.js +601 -0
  41. package/dist/components/ui/mask-input-constants.js.map +1 -0
  42. package/dist/components/ui/mask-input.d.ts +36 -0
  43. package/dist/components/ui/mask-input.js +558 -0
  44. package/dist/components/ui/mask-input.js.map +1 -0
  45. package/dist/components/ui/mention.d.ts +31 -0
  46. package/dist/components/ui/mention.js +128 -0
  47. package/dist/components/ui/mention.js.map +1 -0
  48. package/dist/components/ui/phone-input-constants.d.ts +54 -0
  49. package/dist/components/ui/phone-input-constants.js +9 -0
  50. package/dist/components/ui/phone-input-constants.js.map +1 -0
  51. package/dist/components/ui/phone-input.d.ts +85 -0
  52. package/dist/components/ui/phone-input.js +743 -0
  53. package/dist/components/ui/phone-input.js.map +1 -0
  54. package/dist/components/ui/rating.d.ts +56 -0
  55. package/dist/components/ui/rating.js +646 -0
  56. package/dist/components/ui/rating.js.map +1 -0
  57. package/dist/components/ui/responsive-dialog.d.ts +35 -0
  58. package/dist/components/ui/responsive-dialog.js +193 -0
  59. package/dist/components/ui/responsive-dialog.js.map +1 -0
  60. package/dist/components/ui/scroll-spy.d.ts +42 -0
  61. package/dist/components/ui/scroll-spy.js +334 -0
  62. package/dist/components/ui/scroll-spy.js.map +1 -0
  63. package/dist/components/ui/stepper-constants.d.ts +29 -0
  64. package/dist/components/ui/stepper-constants.js +9 -0
  65. package/dist/components/ui/stepper-constants.js.map +1 -0
  66. package/dist/components/ui/stepper.d.ts +80 -0
  67. package/dist/components/ui/stepper.js +902 -0
  68. package/dist/components/ui/stepper.js.map +1 -0
  69. package/dist/components/ui/tags-input.d.ts +41 -0
  70. package/dist/components/ui/tags-input.js +127 -0
  71. package/dist/components/ui/tags-input.js.map +1 -0
  72. package/dist/components/ui/time-picker-constants.d.ts +48 -0
  73. package/dist/components/ui/time-picker-constants.js +14 -0
  74. package/dist/components/ui/time-picker-constants.js.map +1 -0
  75. package/dist/components/ui/time-picker.d.ts +115 -0
  76. package/dist/components/ui/time-picker.js +1620 -0
  77. package/dist/components/ui/time-picker.js.map +1 -0
  78. package/dist/components/ui/timeline.d.ts +32 -0
  79. package/dist/components/ui/timeline.js +559 -0
  80. package/dist/components/ui/timeline.js.map +1 -0
  81. package/dist/components/ui/tour-constants.d.ts +39 -0
  82. package/dist/components/ui/tour-constants.js +12 -0
  83. package/dist/components/ui/tour-constants.js.map +1 -0
  84. package/dist/components/ui/tour.d.ts +124 -0
  85. package/dist/components/ui/tour.js +1207 -0
  86. package/dist/components/ui/tour.js.map +1 -0
  87. package/dist/data-grid/data-grid-cell-variants.js +10 -6
  88. package/dist/data-grid/data-grid-cell-variants.js.map +1 -1
  89. package/dist/data-grid/data-grid-cell-wrapper.js +1 -1
  90. package/dist/data-grid/data-grid-cell-wrapper.js.map +1 -1
  91. package/dist/data-grid/data-grid-column-header.js +4 -2
  92. package/dist/data-grid/data-grid-column-header.js.map +1 -1
  93. package/dist/data-grid/data-grid-context-menu.js +5 -4
  94. package/dist/data-grid/data-grid-context-menu.js.map +1 -1
  95. package/dist/data-grid/data-grid-filter-menu.d.ts +12 -1
  96. package/dist/data-grid/data-grid-filter-menu.js +28 -17
  97. package/dist/data-grid/data-grid-filter-menu.js.map +1 -1
  98. package/dist/data-grid/data-grid-keyboard-shortcuts.d.ts +12 -1
  99. package/dist/data-grid/data-grid-keyboard-shortcuts.js +7 -5
  100. package/dist/data-grid/data-grid-keyboard-shortcuts.js.map +1 -1
  101. package/dist/data-grid/data-grid-locale.d.ts +24 -0
  102. package/dist/data-grid/data-grid-locale.js +25 -0
  103. package/dist/data-grid/data-grid-locale.js.map +1 -0
  104. package/dist/data-grid/data-grid-paste-dialog.js +3 -2
  105. package/dist/data-grid/data-grid-paste-dialog.js.map +1 -1
  106. package/dist/data-grid/data-grid-row-height-menu.d.ts +11 -1
  107. package/dist/data-grid/data-grid-row-height-menu.js +25 -28
  108. package/dist/data-grid/data-grid-row-height-menu.js.map +1 -1
  109. package/dist/data-grid/data-grid-row.js +1 -1
  110. package/dist/data-grid/data-grid-row.js.map +1 -1
  111. package/dist/data-grid/data-grid-search.js +6 -5
  112. package/dist/data-grid/data-grid-search.js.map +1 -1
  113. package/dist/data-grid/data-grid-select-column.js +3 -1
  114. package/dist/data-grid/data-grid-select-column.js.map +1 -1
  115. package/dist/data-grid/data-grid-sort-menu.d.ts +12 -1
  116. package/dist/data-grid/data-grid-sort-menu.js +25 -13
  117. package/dist/data-grid/data-grid-sort-menu.js.map +1 -1
  118. package/dist/data-grid/data-grid-view-menu.d.ts +12 -1
  119. package/dist/data-grid/data-grid-view-menu.js +12 -4
  120. package/dist/data-grid/data-grid-view-menu.js.map +1 -1
  121. package/dist/data-grid/data-grid.d.ts +14 -2
  122. package/dist/data-grid/data-grid.js +7 -4
  123. package/dist/data-grid/data-grid.js.map +1 -1
  124. package/dist/data-grid/filters.d.ts +17 -21
  125. package/dist/data-grid/filters.js +73 -52
  126. package/dist/data-grid/filters.js.map +1 -1
  127. package/dist/data-grid/index.d.ts +4 -1
  128. package/dist/data-grid/index.js +20 -2
  129. package/dist/data-grid/index.js.map +1 -1
  130. package/dist/data-grid/messages-en.d.ts +294 -0
  131. package/dist/data-grid/messages-en.js +279 -0
  132. package/dist/data-grid/messages-en.js.map +1 -0
  133. package/dist/data-grid/messages-vi.d.ts +12 -0
  134. package/dist/data-grid/messages-vi.js +279 -0
  135. package/dist/data-grid/messages-vi.js.map +1 -0
  136. package/dist/data-grid/messages.d.ts +549 -262
  137. package/dist/data-grid/messages.js +16 -275
  138. package/dist/data-grid/messages.js.map +1 -1
  139. package/dist/data-grid/sortable.js +1 -1
  140. package/dist/data-grid/sortable.js.map +1 -1
  141. package/dist/data-grid/use-data-grid-undo-redo.d.ts +13 -1
  142. package/dist/data-grid/use-data-grid-undo-redo.js +13 -10
  143. package/dist/data-grid/use-data-grid-undo-redo.js.map +1 -1
  144. package/dist/data-grid/use-data-grid.d.ts +281 -1
  145. package/dist/data-grid/use-data-grid.js +24 -19
  146. package/dist/data-grid/use-data-grid.js.map +1 -1
  147. package/dist/data-grid/utils.d.ts +9 -1
  148. package/dist/data-grid/utils.js +3 -2
  149. package/dist/data-grid/utils.js.map +1 -1
  150. package/dist/index.d.ts +31 -0
  151. package/dist/index.js +42 -0
  152. package/dist/index.js.map +1 -1
  153. package/dist/lib/compose-refs.js.map +1 -0
  154. package/dist/lib/use-as-ref.js.map +1 -0
  155. package/dist/lib/use-is-mobile.d.ts +10 -0
  156. package/dist/lib/use-is-mobile.js +21 -0
  157. package/dist/lib/use-is-mobile.js.map +1 -0
  158. package/dist/lib/use-isomorphic-layout-effect.js.map +1 -0
  159. package/dist/lib/use-lazy-ref.js.map +1 -0
  160. package/dist/lib/visually-hidden-input.d.ts +12 -0
  161. package/dist/lib/visually-hidden-input.js +105 -0
  162. package/dist/lib/visually-hidden-input.js.map +1 -0
  163. package/package.json +5 -1
  164. package/styles.css +19 -0
  165. package/dist/data-grid/compose-refs.js.map +0 -1
  166. package/dist/data-grid/use-as-ref.js.map +0 -1
  167. package/dist/data-grid/use-isomorphic-layout-effect.js.map +0 -1
  168. package/dist/data-grid/use-lazy-ref.js.map +0 -1
  169. /package/dist/{data-grid → lib}/compose-refs.d.ts +0 -0
  170. /package/dist/{data-grid → lib}/compose-refs.js +0 -0
  171. /package/dist/{data-grid → lib}/use-as-ref.d.ts +0 -0
  172. /package/dist/{data-grid → lib}/use-as-ref.js +0 -0
  173. /package/dist/{data-grid → lib}/use-isomorphic-layout-effect.d.ts +0 -0
  174. /package/dist/{data-grid → lib}/use-isomorphic-layout-effect.js +0 -0
  175. /package/dist/{data-grid → lib}/use-lazy-ref.d.ts +0 -0
  176. /package/dist/{data-grid → lib}/use-lazy-ref.js +0 -0
@@ -1,280 +1,567 @@
1
+ import { DataGridMessages } from './messages-en.js';
2
+ export { messagesEn } from './messages-en.js';
3
+ export { messagesVi } from './messages-vi.js';
4
+
1
5
  /**
2
- * Toàn bộ chuỗi hiển thị của DataGrid (tiếng Việt) — gom một chỗ để dễ rà soát,
3
- * đổi từ ngữ theo nghiệp vụ, hoặc dịch sang ngôn ngữ khác sau này.
6
+ * Sổ đăng ký ngôn ngữ của DataGrid. Module THUẦN — không directive, không hook — nên Server
7
+ * Component đọc thẳng được (xem `verify:directives`, phép kiểm 2 và 3).
8
+ *
9
+ * Hai ngôn ngữ, và cố ý dừng ở hai: tiếng Anh là bản gốc định nghĩa hình dạng
10
+ * ({@link DataGridMessages}), tiếng Việt là bản dịch đủ. Thêm ngôn ngữ thứ ba thì thêm một file
11
+ * `messages-<mã>.ts` chú thích `: DataGridMessages`, ghi vào `DATA_GRID_MESSAGES` bên dưới, và
12
+ * `DataGridLocale` tự rộng ra theo — không có danh sách thứ hai nào phải nhớ cập nhật.
4
13
  *
5
- * Quy ước: chuỗi cố định để nguyên; chuỗi có tham số viết thành hàm.
6
- * KHÔNG đặt JSX ở đây — chỉ chuỗi thuần.
14
+ * ⚠ Mặc định là **tiếng Anh**, ngược với phần còn lại của gói (README §5). Đây là ngoại lệ có chủ
15
+ * ý của riêng `DataGrid`, chốt ở `2.0.0` — lý do đầy đủ ở đầu `messages-en.ts`.
7
16
  */
8
- declare const msg: {
9
- readonly grid: {
10
- /** Nhãn mặc định của vùng `role="grid"` (ghi đè bằng prop `aria-label`) */
11
- readonly label: "Bảng dữ liệu";
12
- readonly addRow: "Thêm dòng";
13
- };
14
- readonly search: {
15
- readonly placeholder: "Tìm trong bảng...";
16
- readonly label: "Tìm trong bảng";
17
- readonly prevMatch: "Kết quả trước";
18
- readonly nextMatch: "Kết quả sau";
19
- readonly close: "Đóng tìm kiếm";
20
- readonly matchPosition: (index: number, total: number) => string;
21
- readonly noResults: "Không có kết quả";
22
- readonly typeToSearch: "Gõ để tìm";
23
- };
24
- readonly column: {
25
- readonly sortAsc: "Sắp xếp tăng dần";
26
- readonly sortDesc: "Sắp xếp giảm dần";
27
- readonly removeSort: "Bỏ sắp xếp";
28
- readonly pinLeft: "Ghim sang trái";
29
- readonly unpinLeft: "Bỏ ghim trái";
30
- readonly pinRight: "Ghim sang phải";
31
- readonly unpinRight: "Bỏ ghim phải";
32
- readonly hide: "Ẩn cột";
33
- readonly resize: (label: string) => string;
34
- /** Tên kiểu dữ liệu của cột, hiện trong tooltip ở tiêu đề cột */
35
- readonly variant: {
36
- readonly shortText: "Văn bản ngắn";
37
- readonly longText: "Văn bản dài";
38
- readonly number: "Số";
39
- readonly url: "Liên kết";
40
- readonly checkbox: "Ô đánh dấu";
41
- readonly select: "Chọn một";
42
- readonly multiSelect: "Chọn nhiều";
43
- readonly date: "Ngày";
44
- readonly file: "Tệp";
17
+
18
+ /** Mọi bảng ngôn ngữ dựng sẵn, tra theo mã. */
19
+ declare const DATA_GRID_MESSAGES: {
20
+ en: {
21
+ grid: {
22
+ label: string;
23
+ addRow: string;
45
24
  };
46
- };
47
- readonly select: {
48
- readonly all: "Chọn tất cả";
49
- readonly row: "Chọn dòng";
50
- readonly rowNumber: (rowNumber: number) => string;
51
- };
52
- readonly contextMenu: {
53
- readonly copy: "Sao chép";
54
- readonly cut: "Cắt";
55
- readonly clear: "Xoá nội dung";
56
- readonly deleteRows: "Xoá dòng";
57
- };
58
- readonly pasteDialog: {
59
- readonly title: "Thêm dòng để dán hết dữ liệu?";
60
- readonly description: (rowsNeeded: number) => string;
61
- readonly expandTitle: "Tạo dòng mới";
62
- readonly expandDescription: (rowsNeeded: number) => string;
63
- readonly keepTitle: "Giữ nguyên số dòng";
64
- readonly keepDescription: "Chỉ dán phần vừa với các dòng hiện có";
65
- readonly cancel: "Huỷ";
66
- readonly confirm: "Tiếp tục";
67
- };
68
- readonly rowHeight: {
69
- readonly label: "Chiều cao dòng";
70
- readonly short: "Thấp";
71
- readonly medium: "Vừa";
72
- readonly tall: "Cao";
73
- readonly extraTall: "Rất cao";
74
- };
75
- readonly view: {
76
- readonly trigger: "Hiển thị";
77
- readonly toggleColumns: "Ẩn/hiện cột";
78
- readonly searchPlaceholder: "Tìm cột...";
79
- readonly empty: "Không có cột phù hợp.";
80
- };
81
- readonly sort: {
82
- readonly trigger: "Sắp xếp";
83
- readonly title: "Sắp xếp theo";
84
- readonly emptyTitle: "Chưa sắp xếp";
85
- readonly description: "Đổi tiêu chí sắp xếp cho danh sách.";
86
- readonly emptyDescription: "Thêm tiêu chí để sắp xếp danh sách.";
87
- readonly add: "Thêm sắp xếp";
88
- readonly reset: "Bỏ sắp xếp";
89
- readonly remove: "Xoá tiêu chí";
90
- readonly drag: "Kéo để đổi thứ tự";
91
- readonly fieldPlaceholder: "Tìm trường...";
92
- readonly fieldEmpty: "Không có trường phù hợp.";
93
- readonly asc: "Tăng dần";
94
- readonly desc: "Giảm dần";
95
- };
96
- readonly filter: {
97
- readonly trigger: "Lọc";
98
- readonly title: "Lọc theo";
99
- readonly emptyTitle: "Chưa có bộ lọc";
100
- readonly description: "Đổi điều kiện lọc để thu hẹp dữ liệu.";
101
- readonly emptyDescription: "Thêm điều kiện lọc để thu hẹp dữ liệu.";
102
- readonly add: "Thêm bộ lọc";
103
- readonly reset: "Xoá bộ lọc";
104
- readonly remove: "Xoá điều kiện";
105
- readonly drag: "Kéo để đổi thứ tự";
106
- readonly where: "Khi";
107
- readonly and: "Và";
108
- readonly fieldPlaceholder: "Tìm trường...";
109
- readonly fieldEmpty: "Không có trường phù hợp.";
110
- readonly valuePlaceholder: "Giá trị";
111
- readonly rangeStart: "Từ";
112
- readonly rangeEnd: "Đến";
113
- readonly pickDate: "Chọn ngày";
114
- readonly pickRange: "Chọn khoảng ngày";
115
- readonly optionPlaceholder: "Tìm lựa chọn...";
116
- readonly optionEmpty: "Không có lựa chọn phù hợp.";
117
- readonly selectedCount: (count: number) => string;
118
- readonly emptyValue: (label: string) => string;
119
- /** Nhãn toán tử lọc — xem `filters.ts` để biết toán tử nào dùng cho kiểu ô nào */
120
- readonly operators: {
121
- readonly contains: "Chứa";
122
- readonly notContains: "Không chứa";
123
- readonly equals: "Bằng";
124
- readonly notEquals: "Khác";
125
- readonly startsWith: "Bắt đầu bằng";
126
- readonly endsWith: "Kết thúc bằng";
127
- readonly isEmpty: "Đang trống";
128
- readonly isNotEmpty: "Không trống";
129
- readonly lessThan: "Nhỏ hơn";
130
- readonly lessThanOrEqual: "Nhỏ hơn hoặc bằng";
131
- readonly greaterThan: "Lớn hơn";
132
- readonly greaterThanOrEqual: "Lớn hơn hoặc bằng";
133
- readonly isBetween: "Trong khoảng";
134
- readonly dateEquals: "Đúng ngày";
135
- readonly dateNotEquals: "Khác ngày";
136
- readonly before: "Trước ngày";
137
- readonly after: "Sau ngày";
138
- readonly onOrBefore: "Vào hoặc trước ngày";
139
- readonly onOrAfter: "Vào hoặc sau ngày";
140
- readonly is: "Là";
141
- readonly isNot: "Không là";
142
- readonly isAnyOf: "Là một trong";
143
- readonly isNoneOf: "Không là bất kỳ";
144
- readonly isTrue: "Có đánh dấu";
145
- readonly isFalse: "Không đánh dấu";
25
+ search: {
26
+ placeholder: string;
27
+ label: string;
28
+ prevMatch: string;
29
+ nextMatch: string;
30
+ close: string;
31
+ matchPosition: (index: number, total: number) => string;
32
+ noResults: string;
33
+ typeToSearch: string;
34
+ };
35
+ column: {
36
+ sortAsc: string;
37
+ sortDesc: string;
38
+ removeSort: string;
39
+ pinLeft: string;
40
+ unpinLeft: string;
41
+ pinRight: string;
42
+ unpinRight: string;
43
+ hide: string;
44
+ resize: (label: string) => string;
45
+ variant: {
46
+ shortText: string;
47
+ longText: string;
48
+ number: string;
49
+ url: string;
50
+ checkbox: string;
51
+ select: string;
52
+ multiSelect: string;
53
+ date: string;
54
+ file: string;
55
+ };
56
+ };
57
+ select: {
58
+ all: string;
59
+ row: string;
60
+ rowNumber: (rowNumber: number) => string;
61
+ };
62
+ contextMenu: {
63
+ copy: string;
64
+ cut: string;
65
+ clear: string;
66
+ deleteRows: string;
67
+ };
68
+ pasteDialog: {
69
+ title: string;
70
+ description: (rowsNeeded: number) => string;
71
+ expandTitle: string;
72
+ expandDescription: (rowsNeeded: number) => string;
73
+ keepTitle: string;
74
+ keepDescription: string;
75
+ cancel: string;
76
+ confirm: string;
77
+ };
78
+ rowHeight: {
79
+ label: string;
80
+ short: string;
81
+ medium: string;
82
+ tall: string;
83
+ extraTall: string;
84
+ };
85
+ view: {
86
+ trigger: string;
87
+ toggleColumns: string;
88
+ searchPlaceholder: string;
89
+ empty: string;
90
+ };
91
+ sort: {
92
+ trigger: string;
93
+ title: string;
94
+ emptyTitle: string;
95
+ description: string;
96
+ emptyDescription: string;
97
+ add: string;
98
+ reset: string;
99
+ remove: string;
100
+ drag: string;
101
+ fieldPlaceholder: string;
102
+ fieldEmpty: string;
103
+ asc: string;
104
+ desc: string;
105
+ };
106
+ filter: {
107
+ trigger: string;
108
+ title: string;
109
+ emptyTitle: string;
110
+ description: string;
111
+ emptyDescription: string;
112
+ add: string;
113
+ reset: string;
114
+ remove: string;
115
+ drag: string;
116
+ where: string;
117
+ and: string;
118
+ fieldPlaceholder: string;
119
+ fieldEmpty: string;
120
+ valuePlaceholder: string;
121
+ rangeStart: string;
122
+ rangeEnd: string;
123
+ pickDate: string;
124
+ pickRange: string;
125
+ optionPlaceholder: string;
126
+ optionEmpty: string;
127
+ selectedCount: (count: number) => string;
128
+ emptyValue: (label: string) => string;
129
+ operators: {
130
+ contains: string;
131
+ notContains: string;
132
+ equals: string;
133
+ notEquals: string;
134
+ startsWith: string;
135
+ endsWith: string;
136
+ isEmpty: string;
137
+ isNotEmpty: string;
138
+ lessThan: string;
139
+ lessThanOrEqual: string;
140
+ greaterThan: string;
141
+ greaterThanOrEqual: string;
142
+ isBetween: string;
143
+ dateEquals: string;
144
+ dateNotEquals: string;
145
+ before: string;
146
+ after: string;
147
+ onOrBefore: string;
148
+ onOrAfter: string;
149
+ is: string;
150
+ isNot: string;
151
+ isAnyOf: string;
152
+ isNoneOf: string;
153
+ isTrue: string;
154
+ isFalse: string;
155
+ };
156
+ };
157
+ cell: {
158
+ longTextPlaceholder: string;
159
+ optionSearchPlaceholder: string;
160
+ optionEmpty: string;
161
+ clearAll: string;
162
+ invalidUrlTitle: string;
163
+ invalidUrlDescription: string;
164
+ };
165
+ file: {
166
+ uploadLabel: string;
167
+ dropHere: string;
168
+ dragHere: string;
169
+ browse: string;
170
+ limits: (maxSize?: string, maxFiles?: number) => string;
171
+ count: (count: number) => string;
172
+ clearAll: string;
173
+ remove: string;
174
+ uploading: string;
175
+ deleting: string;
176
+ tooMany: (maxFiles: number) => string;
177
+ tooLarge: (maxSize: string) => string;
178
+ wrongType: string;
179
+ rejectedOne: (name: string) => string;
180
+ rejectedMany: (name: string, others: number) => string;
181
+ uploadFailed: (count: number) => string;
182
+ deleteFailed: (name: string) => string;
183
+ deleteFailedMany: string;
184
+ };
185
+ toast: {
186
+ cellsCopied: (count: number) => string;
187
+ copyFailed: string;
188
+ cellsCut: (count: number) => string;
189
+ cutFailed: string;
190
+ cellsPasted: (count: number) => string;
191
+ cellsPastedWithSkipped: (count: number, skipped: number) => string;
192
+ pasteSkipped: (skipped: number) => string;
193
+ pasteFailed: string;
194
+ cellsCleared: (count: number) => string;
195
+ rowsDeleted: (count: number) => string;
196
+ nothingToUndo: string;
197
+ nothingToRedo: string;
198
+ undone: (count: number) => string;
199
+ redone: (count: number) => string;
200
+ };
201
+ booleanText: {
202
+ checked: string;
203
+ unchecked: string;
204
+ };
205
+ shortcuts: {
206
+ trigger: string;
207
+ title: string;
208
+ description: string;
209
+ searchPlaceholder: string;
210
+ emptyTitle: string;
211
+ emptyDescription: string;
212
+ close: string;
213
+ groups: {
214
+ navigation: string;
215
+ selection: string;
216
+ editing: string;
217
+ search: string;
218
+ filtering: string;
219
+ sorting: string;
220
+ general: string;
221
+ };
222
+ keys: {
223
+ click: string;
224
+ doubleClick: string;
225
+ };
226
+ navigation: {
227
+ move: string;
228
+ nextCell: string;
229
+ prevCell: string;
230
+ firstColumn: string;
231
+ lastColumn: string;
232
+ firstRowSameColumn: string;
233
+ lastRowSameColumn: string;
234
+ firstColumnSameRow: string;
235
+ lastColumnSameRow: string;
236
+ firstCell: string;
237
+ lastCell: string;
238
+ pageUp: string;
239
+ pageDown: string;
240
+ scrollUp: string;
241
+ scrollDown: string;
242
+ scrollLeft: string;
243
+ scrollRight: string;
244
+ };
245
+ selection: {
246
+ extend: string;
247
+ toTop: string;
248
+ toBottom: string;
249
+ toFirstColumn: string;
250
+ toLastColumn: string;
251
+ all: string;
252
+ toggle: string;
253
+ range: string;
254
+ clear: string;
255
+ };
256
+ editing: {
257
+ start: string;
258
+ insertRow: string;
259
+ copy: string;
260
+ cut: string;
261
+ paste: string;
262
+ clear: string;
263
+ deleteRows: string;
264
+ undo: string;
265
+ redo: string;
266
+ };
267
+ search: {
268
+ open: string;
269
+ next: string;
270
+ prev: string;
271
+ close: string;
272
+ };
273
+ filtering: {
274
+ toggle: string;
275
+ remove: string;
276
+ };
277
+ sorting: {
278
+ toggle: string;
279
+ remove: string;
280
+ };
281
+ general: {
282
+ shortcuts: string;
283
+ };
146
284
  };
147
285
  };
148
- readonly cell: {
149
- readonly longTextPlaceholder: "Nhập nội dung...";
150
- readonly optionSearchPlaceholder: "Tìm...";
151
- readonly optionEmpty: "Không có lựa chọn phù hợp.";
152
- readonly clearAll: "Bỏ chọn hết";
153
- readonly invalidUrlTitle: "Liên kết không hợp lệ";
154
- readonly invalidUrlDescription: "Liên kết chứa giao thức nguy hiểm (javascript:, data:, vbscript: hoặc file:)";
155
- };
156
- readonly file: {
157
- readonly uploadLabel: "Tải tệp lên";
158
- readonly dropHere: "Thả tệp vào đây";
159
- readonly dragHere: "Kéo tệp vào đây";
160
- readonly browse: "hoặc bấm để chọn tệp";
161
- readonly limits: (maxSize?: string, maxFiles?: number) => string;
162
- readonly count: (count: number) => string;
163
- readonly clearAll: "Xoá hết";
164
- readonly remove: "Xoá tệp";
165
- readonly uploading: "Đang tải lên...";
166
- readonly deleting: "Đang xoá...";
167
- readonly tooMany: (maxFiles: number) => string;
168
- readonly tooLarge: (maxSize: string) => string;
169
- readonly wrongType: "Không chấp nhận định dạng tệp này";
170
- readonly rejectedOne: (name: string) => string;
171
- readonly rejectedMany: (name: string, others: number) => string;
172
- readonly uploadFailed: (count: number) => string;
173
- readonly deleteFailed: (name: string) => string;
174
- readonly deleteFailedMany: "Không xoá được tệp";
175
- };
176
- readonly toast: {
177
- readonly cellsCopied: (count: number) => string;
178
- readonly copyFailed: "Không sao chép được vào clipboard";
179
- readonly cellsCut: (count: number) => string;
180
- readonly cutFailed: "Không cắt được vào clipboard";
181
- readonly cellsPasted: (count: number) => string;
182
- readonly cellsPastedWithSkipped: (count: number, skipped: number) => string;
183
- readonly pasteSkipped: (skipped: number) => string;
184
- readonly pasteFailed: "Không dán được. Vui lòng thử lại.";
185
- readonly cellsCleared: (count: number) => string;
186
- readonly rowsDeleted: (count: number) => string;
187
- readonly nothingToUndo: "Không còn thao tác để hoàn tác";
188
- readonly nothingToRedo: "Không còn thao tác để làm lại";
189
- readonly undone: (count: number) => string;
190
- readonly redone: (count: number) => string;
191
- };
192
- /** Giá trị văn bản khi dán boolean vào ô văn bản */
193
- readonly booleanText: {
194
- readonly checked: "Có";
195
- readonly unchecked: "Không";
196
- };
197
- readonly shortcuts: {
198
- readonly trigger: "Phím tắt";
199
- readonly title: "Phím tắt";
200
- readonly description: "Danh sách phím tắt để thao tác nhanh với bảng dữ liệu.";
201
- readonly searchPlaceholder: "Tìm phím tắt...";
202
- readonly emptyTitle: "Không tìm thấy phím tắt";
203
- readonly emptyDescription: "Thử tìm với từ khoá khác.";
204
- readonly close: "Đóng";
205
- readonly groups: {
206
- readonly navigation: "Di chuyển";
207
- readonly selection: "Chọn ô";
208
- readonly editing: "Sửa dữ liệu";
209
- readonly search: "Tìm kiếm";
210
- readonly filtering: "Lọc";
211
- readonly sorting: "Sắp xếp";
212
- readonly general: "Chung";
286
+ vi: {
287
+ grid: {
288
+ label: string;
289
+ addRow: string;
213
290
  };
214
- readonly keys: {
215
- readonly click: "Nhấp chuột";
216
- readonly doubleClick: "Nhấp đúp";
291
+ search: {
292
+ placeholder: string;
293
+ label: string;
294
+ prevMatch: string;
295
+ nextMatch: string;
296
+ close: string;
297
+ matchPosition: (index: number, total: number) => string;
298
+ noResults: string;
299
+ typeToSearch: string;
217
300
  };
218
- readonly navigation: {
219
- readonly move: "Di chuyển giữa các ô";
220
- readonly nextCell: "Sang ô kế tiếp";
221
- readonly prevCell: "Về ô trước đó";
222
- readonly firstColumn: "Về cột đầu";
223
- readonly lastColumn: "Tới cột cuối";
224
- readonly firstRowSameColumn: "Về dòng đầu (cùng cột)";
225
- readonly lastRowSameColumn: "Tới dòng cuối (cùng cột)";
226
- readonly firstColumnSameRow: "Về cột đầu (cùng dòng)";
227
- readonly lastColumnSameRow: "Tới cột cuối (cùng dòng)";
228
- readonly firstCell: "Về ô đầu bảng";
229
- readonly lastCell: "Tới ô cuối bảng";
230
- readonly pageUp: "Lên một trang";
231
- readonly pageDown: "Xuống một trang";
232
- readonly scrollUp: "Cuộn lên một trang";
233
- readonly scrollDown: "Cuộn xuống một trang";
234
- readonly scrollLeft: "Cuộn sang trái một trang cột";
235
- readonly scrollRight: "Cuộn sang phải một trang cột";
301
+ column: {
302
+ sortAsc: string;
303
+ sortDesc: string;
304
+ removeSort: string;
305
+ pinLeft: string;
306
+ unpinLeft: string;
307
+ pinRight: string;
308
+ unpinRight: string;
309
+ hide: string;
310
+ resize: (label: string) => string;
311
+ variant: {
312
+ shortText: string;
313
+ longText: string;
314
+ number: string;
315
+ url: string;
316
+ checkbox: string;
317
+ select: string;
318
+ multiSelect: string;
319
+ date: string;
320
+ file: string;
321
+ };
236
322
  };
237
- readonly selection: {
238
- readonly extend: "Mở rộng vùng chọn";
239
- readonly toTop: "Chọn tới đầu bảng";
240
- readonly toBottom: "Chọn tới cuối bảng";
241
- readonly toFirstColumn: "Chọn tới cột đầu";
242
- readonly toLastColumn: "Chọn tới cột cuối";
243
- readonly all: "Chọn toàn bộ ô";
244
- readonly toggle: "Thêm/bớt một ô khỏi vùng chọn";
245
- readonly range: "Chọn cả vùng";
246
- readonly clear: "Bỏ chọn";
323
+ select: {
324
+ all: string;
325
+ row: string;
326
+ rowNumber: (rowNumber: number) => string;
247
327
  };
248
- readonly editing: {
249
- readonly start: "Bắt đầu sửa ô";
250
- readonly insertRow: "Chèn dòng bên dưới";
251
- readonly copy: "Sao chép ô đang chọn";
252
- readonly cut: "Cắt ô đang chọn";
253
- readonly paste: "Dán vào ô";
254
- readonly clear: "Xoá nội dung ô đang chọn";
255
- readonly deleteRows: "Xoá dòng đang chọn";
256
- readonly undo: "Hoàn tác";
257
- readonly redo: "Làm lại";
328
+ contextMenu: {
329
+ copy: string;
330
+ cut: string;
331
+ clear: string;
332
+ deleteRows: string;
258
333
  };
259
- readonly search: {
260
- readonly open: "Mở ô tìm kiếm";
261
- readonly next: "Kết quả kế tiếp";
262
- readonly prev: "Kết quả trước đó";
263
- readonly close: "Đóng tìm kiếm";
334
+ pasteDialog: {
335
+ title: string;
336
+ description: (rowsNeeded: number) => string;
337
+ expandTitle: string;
338
+ expandDescription: (rowsNeeded: number) => string;
339
+ keepTitle: string;
340
+ keepDescription: string;
341
+ cancel: string;
342
+ confirm: string;
264
343
  };
265
- readonly filtering: {
266
- readonly toggle: "Mở/đóng menu lọc";
267
- readonly remove: "Xoá điều kiện lọc (khi đang chọn)";
344
+ rowHeight: {
345
+ label: string;
346
+ short: string;
347
+ medium: string;
348
+ tall: string;
349
+ extraTall: string;
268
350
  };
269
- readonly sorting: {
270
- readonly toggle: "Mở/đóng menu sắp xếp";
271
- readonly remove: "Xoá tiêu chí sắp xếp (khi đang chọn)";
351
+ view: {
352
+ trigger: string;
353
+ toggleColumns: string;
354
+ searchPlaceholder: string;
355
+ empty: string;
272
356
  };
273
- readonly general: {
274
- readonly shortcuts: "Xem danh sách phím tắt";
357
+ sort: {
358
+ trigger: string;
359
+ title: string;
360
+ emptyTitle: string;
361
+ description: string;
362
+ emptyDescription: string;
363
+ add: string;
364
+ reset: string;
365
+ remove: string;
366
+ drag: string;
367
+ fieldPlaceholder: string;
368
+ fieldEmpty: string;
369
+ asc: string;
370
+ desc: string;
371
+ };
372
+ filter: {
373
+ trigger: string;
374
+ title: string;
375
+ emptyTitle: string;
376
+ description: string;
377
+ emptyDescription: string;
378
+ add: string;
379
+ reset: string;
380
+ remove: string;
381
+ drag: string;
382
+ where: string;
383
+ and: string;
384
+ fieldPlaceholder: string;
385
+ fieldEmpty: string;
386
+ valuePlaceholder: string;
387
+ rangeStart: string;
388
+ rangeEnd: string;
389
+ pickDate: string;
390
+ pickRange: string;
391
+ optionPlaceholder: string;
392
+ optionEmpty: string;
393
+ selectedCount: (count: number) => string;
394
+ emptyValue: (label: string) => string;
395
+ operators: {
396
+ contains: string;
397
+ notContains: string;
398
+ equals: string;
399
+ notEquals: string;
400
+ startsWith: string;
401
+ endsWith: string;
402
+ isEmpty: string;
403
+ isNotEmpty: string;
404
+ lessThan: string;
405
+ lessThanOrEqual: string;
406
+ greaterThan: string;
407
+ greaterThanOrEqual: string;
408
+ isBetween: string;
409
+ dateEquals: string;
410
+ dateNotEquals: string;
411
+ before: string;
412
+ after: string;
413
+ onOrBefore: string;
414
+ onOrAfter: string;
415
+ is: string;
416
+ isNot: string;
417
+ isAnyOf: string;
418
+ isNoneOf: string;
419
+ isTrue: string;
420
+ isFalse: string;
421
+ };
422
+ };
423
+ cell: {
424
+ longTextPlaceholder: string;
425
+ optionSearchPlaceholder: string;
426
+ optionEmpty: string;
427
+ clearAll: string;
428
+ invalidUrlTitle: string;
429
+ invalidUrlDescription: string;
430
+ };
431
+ file: {
432
+ uploadLabel: string;
433
+ dropHere: string;
434
+ dragHere: string;
435
+ browse: string;
436
+ limits: (maxSize?: string, maxFiles?: number) => string;
437
+ count: (count: number) => string;
438
+ clearAll: string;
439
+ remove: string;
440
+ uploading: string;
441
+ deleting: string;
442
+ tooMany: (maxFiles: number) => string;
443
+ tooLarge: (maxSize: string) => string;
444
+ wrongType: string;
445
+ rejectedOne: (name: string) => string;
446
+ rejectedMany: (name: string, others: number) => string;
447
+ uploadFailed: (count: number) => string;
448
+ deleteFailed: (name: string) => string;
449
+ deleteFailedMany: string;
450
+ };
451
+ toast: {
452
+ cellsCopied: (count: number) => string;
453
+ copyFailed: string;
454
+ cellsCut: (count: number) => string;
455
+ cutFailed: string;
456
+ cellsPasted: (count: number) => string;
457
+ cellsPastedWithSkipped: (count: number, skipped: number) => string;
458
+ pasteSkipped: (skipped: number) => string;
459
+ pasteFailed: string;
460
+ cellsCleared: (count: number) => string;
461
+ rowsDeleted: (count: number) => string;
462
+ nothingToUndo: string;
463
+ nothingToRedo: string;
464
+ undone: (count: number) => string;
465
+ redone: (count: number) => string;
466
+ };
467
+ booleanText: {
468
+ checked: string;
469
+ unchecked: string;
470
+ };
471
+ shortcuts: {
472
+ trigger: string;
473
+ title: string;
474
+ description: string;
475
+ searchPlaceholder: string;
476
+ emptyTitle: string;
477
+ emptyDescription: string;
478
+ close: string;
479
+ groups: {
480
+ navigation: string;
481
+ selection: string;
482
+ editing: string;
483
+ search: string;
484
+ filtering: string;
485
+ sorting: string;
486
+ general: string;
487
+ };
488
+ keys: {
489
+ click: string;
490
+ doubleClick: string;
491
+ };
492
+ navigation: {
493
+ move: string;
494
+ nextCell: string;
495
+ prevCell: string;
496
+ firstColumn: string;
497
+ lastColumn: string;
498
+ firstRowSameColumn: string;
499
+ lastRowSameColumn: string;
500
+ firstColumnSameRow: string;
501
+ lastColumnSameRow: string;
502
+ firstCell: string;
503
+ lastCell: string;
504
+ pageUp: string;
505
+ pageDown: string;
506
+ scrollUp: string;
507
+ scrollDown: string;
508
+ scrollLeft: string;
509
+ scrollRight: string;
510
+ };
511
+ selection: {
512
+ extend: string;
513
+ toTop: string;
514
+ toBottom: string;
515
+ toFirstColumn: string;
516
+ toLastColumn: string;
517
+ all: string;
518
+ toggle: string;
519
+ range: string;
520
+ clear: string;
521
+ };
522
+ editing: {
523
+ start: string;
524
+ insertRow: string;
525
+ copy: string;
526
+ cut: string;
527
+ paste: string;
528
+ clear: string;
529
+ deleteRows: string;
530
+ undo: string;
531
+ redo: string;
532
+ };
533
+ search: {
534
+ open: string;
535
+ next: string;
536
+ prev: string;
537
+ close: string;
538
+ };
539
+ filtering: {
540
+ toggle: string;
541
+ remove: string;
542
+ };
543
+ sorting: {
544
+ toggle: string;
545
+ remove: string;
546
+ };
547
+ general: {
548
+ shortcuts: string;
549
+ };
275
550
  };
276
551
  };
277
552
  };
278
- type DataGridMessages = typeof msg;
553
+ /** Mã ngôn ngữ mà `DataGrid` nhận. Suy từ `DATA_GRID_MESSAGES`, không viết tay lần hai. */
554
+ type DataGridLocale = keyof typeof DATA_GRID_MESSAGES;
555
+ /** Mặc định khi không ai truyền gì — xem ghi chú đầu file về vì sao là `"en"`. */
556
+ declare const DEFAULT_DATA_GRID_LOCALE: DataGridLocale;
557
+ /**
558
+ * Bảng chuỗi cho một ngôn ngữ, hoặc bảng do app tự truyền vào.
559
+ *
560
+ * Nhận cả mã lẫn cả object để app không phải chọn giữa "dùng bản dựng sẵn" và "sửa vài chữ":
561
+ * truyền `"vi"` là xong, còn muốn đổi từ ngữ theo nghiệp vụ thì trải bảng ra rồi ghi đè khoá cần
562
+ * đổi. Mã lạ rơi về mặc định thay vì ném lỗi — một chữ sai chính tả trong prop không đáng làm
563
+ * trắng cả màn hình.
564
+ */
565
+ declare function getDataGridMessages(locale?: DataGridLocale | DataGridMessages): DataGridMessages;
279
566
 
280
- export { type DataGridMessages, msg };
567
+ export { DATA_GRID_MESSAGES, DEFAULT_DATA_GRID_LOCALE, type DataGridLocale, DataGridMessages, getDataGridMessages };