wini-web-components 2.2.7 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/component/button/button.d.ts +16 -16
  2. package/dist/component/button/button.js +39 -39
  3. package/dist/component/calendar/calendar.d.ts +30 -46
  4. package/dist/component/calendar/calendar.js +437 -432
  5. package/dist/component/checkbox/checkbox.d.ts +22 -22
  6. package/dist/component/checkbox/checkbox.js +80 -81
  7. package/dist/component/component-status.d.ts +8 -8
  8. package/dist/component/component-status.js +39 -39
  9. package/dist/component/date-picker/date-picker.d.ts +25 -36
  10. package/dist/component/date-picker/date-picker.js +362 -359
  11. package/dist/component/dialog/dialog.d.ts +36 -34
  12. package/dist/component/dialog/dialog.js +99 -97
  13. package/dist/component/import-file/import-file.d.ts +24 -36
  14. package/dist/component/import-file/import-file.js +154 -119
  15. package/dist/component/infinite-scroll/infinite-scroll.d.ts +17 -17
  16. package/dist/component/infinite-scroll/infinite-scroll.js +103 -103
  17. package/dist/component/input-multi-select/input-multi-select.d.ts +21 -38
  18. package/dist/component/input-multi-select/input-multi-select.js +334 -323
  19. package/dist/component/input-opt/input-opt.d.ts +21 -0
  20. package/dist/component/input-opt/input-opt.js +157 -0
  21. package/dist/component/number-picker/number-picker.d.ts +19 -19
  22. package/dist/component/number-picker/number-picker.js +137 -127
  23. package/dist/component/pagination/pagination.d.ts +13 -13
  24. package/dist/component/pagination/pagination.js +93 -82
  25. package/dist/component/popup/popup.d.ts +33 -33
  26. package/dist/component/popup/popup.js +138 -105
  27. package/dist/component/progress-bar/progress-bar.d.ts +16 -16
  28. package/dist/component/progress-bar/progress-bar.js +35 -36
  29. package/dist/component/progress-circle/progress-circle.d.ts +14 -14
  30. package/dist/component/progress-circle/progress-circle.js +30 -31
  31. package/dist/component/radio-button/radio-button.d.ts +20 -20
  32. package/dist/component/radio-button/radio-button.js +64 -64
  33. package/dist/component/rating/rating.d.ts +23 -23
  34. package/dist/component/rating/rating.js +73 -74
  35. package/dist/component/select1/select1.d.ts +31 -50
  36. package/dist/component/select1/select1.js +320 -309
  37. package/dist/component/slider/slider.d.ts +31 -31
  38. package/dist/component/slider/slider.js +80 -81
  39. package/dist/component/switch/switch.d.ts +23 -23
  40. package/dist/component/switch/switch.js +80 -81
  41. package/dist/component/table/table.d.ts +51 -51
  42. package/dist/component/table/table.js +119 -119
  43. package/dist/component/tag/tag.d.ts +17 -17
  44. package/dist/component/tag/tag.js +39 -39
  45. package/dist/component/text/text.d.ts +16 -16
  46. package/dist/component/text/text.js +51 -51
  47. package/dist/component/text-area/text-area.d.ts +28 -28
  48. package/dist/component/text-area/text-area.js +83 -73
  49. package/dist/component/text-field/text-field.d.ts +33 -33
  50. package/dist/component/text-field/text-field.js +107 -97
  51. package/dist/component/toast-noti/toast-noti.d.ts +5 -5
  52. package/dist/component/toast-noti/toast-noti.js +28 -28
  53. package/dist/component/wini-icon/winicon.d.ts +16 -16
  54. package/dist/component/wini-icon/winicon.js +121 -112
  55. package/dist/form/login/view.d.ts +40 -40
  56. package/dist/form/login/view.js +66 -65
  57. package/dist/i18n.d.ts +2 -0
  58. package/dist/i18n.js +125 -0
  59. package/dist/index.d.ts +32 -30
  60. package/dist/index.js +1 -1
  61. package/dist/language/i18n.d.ts +2 -0
  62. package/dist/language/i18n.js +125 -0
  63. package/package.json +5 -3
@@ -0,0 +1,2 @@
1
+ import i18n from 'i18next';
2
+ export { i18n };
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.i18n = void 0;
7
+ var i18next_1 = __importDefault(require("i18next"));
8
+ exports.i18n = i18next_1.default;
9
+ var react_i18next_1 = require("react-i18next");
10
+ // Translation resources
11
+ var resources = {
12
+ en: {
13
+ translation: {
14
+ su: 'Su',
15
+ mo: "Mo",
16
+ tu: "Tu",
17
+ we: "We",
18
+ th: "Th",
19
+ fr: "Fr",
20
+ sa: "Sa",
21
+ yesterday: "Yesterday",
22
+ lastWeek: "Last week",
23
+ lastMonth: "Last month",
24
+ lastYear: "Last year",
25
+ january: "January",
26
+ february: "February",
27
+ march: "March",
28
+ april: "April",
29
+ may: "May",
30
+ june: "June",
31
+ july: "July",
32
+ august: "August",
33
+ september: "September",
34
+ october: "October",
35
+ november: "November",
36
+ december: "December",
37
+ today: "Today",
38
+ apply: "Apply",
39
+ cancel: "Cancel",
40
+ submit: "Submit",
41
+ limitFileError: "File {{file.name}} exceeds the maximum size of {{sizeTitle}}",
42
+ limitFileWarning: "File size should not exceed {{sizeTitle}}.",
43
+ uploadFileAction: 'Click or drag and drop to upload file',
44
+ file: "File",
45
+ remove: "Remove",
46
+ choose: "Choose",
47
+ select: "Select",
48
+ all: "All",
49
+ noResultFound: "No result found",
50
+ ofItems: "of {{totalItem}} items",
51
+ page: "Page",
52
+ go: "Go to",
53
+ or: "Or",
54
+ username: "Username",
55
+ password: "Password",
56
+ dontHaveAccount: "Don't have an account?",
57
+ forgotPassword: "Forgot your password?",
58
+ login: "Log in",
59
+ loginTo: "Log in to",
60
+ signup: "Sign up",
61
+ signupFor: "Sign up for",
62
+ },
63
+ },
64
+ vi: {
65
+ translation: {
66
+ su: 'CN',
67
+ mo: "T2",
68
+ tu: "T3",
69
+ we: "T4",
70
+ th: "T5",
71
+ fr: "T6",
72
+ sa: "T7",
73
+ yesterday: "Hôm qua",
74
+ lastWeek: "Tuần trước",
75
+ lastMonth: "Tháng trước",
76
+ lastYear: "Năm trước",
77
+ january: "Tháng 1",
78
+ february: "Tháng 2",
79
+ march: "Tháng 3",
80
+ april: "Tháng 4",
81
+ may: "Tháng 5",
82
+ june: "Tháng 6",
83
+ july: "Tháng 7",
84
+ august: "Tháng 8",
85
+ september: "Tháng 9",
86
+ october: "Tháng 10",
87
+ november: "Tháng 11",
88
+ december: "Tháng 12",
89
+ today: "Hôm nay",
90
+ apply: "Áp dụng",
91
+ cancel: "Hủy",
92
+ submit: "Xác nhận",
93
+ limitFileError: "Tệp {{name}} vượt quá dung lượng tối đa {{sizeTitle}}",
94
+ limitFileWarning: "Tệp không được vượt quá {{sizeTitle}}.",
95
+ uploadFileAction: 'Nhấn hoặc kéo vào để tải tệp lên',
96
+ file: "Tệp",
97
+ remove: "Xóa",
98
+ choose: "Chọn",
99
+ select: "Chọn",
100
+ all: "Tất cả",
101
+ noResultFound: "Không tìm thấy kết quả",
102
+ ofItems: "trên {{totalItem}} kết quả",
103
+ page: "Trang",
104
+ go: "Đi tới",
105
+ or: "Hoặc",
106
+ username: "Tên đăng nhập",
107
+ password: "Mật khẩu",
108
+ dontHaveAccount: "Chưa có tài khoản?",
109
+ forgotPassword: "Quên mật khẩu?",
110
+ login: "Đăng nhập",
111
+ loginTo: "Đăng nhập vào",
112
+ signup: "Đăng ký",
113
+ signupFor: "Đăng ký"
114
+ },
115
+ },
116
+ };
117
+ // Initialize i18n
118
+ i18next_1.default.use(react_i18next_1.initReactI18next).init({
119
+ resources: resources,
120
+ lng: 'en', // Default language
121
+ fallbackLng: 'en', // Fallback language
122
+ interpolation: {
123
+ escapeValue: false, // React already escapes values
124
+ },
125
+ });
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "wini-web-components",
3
- "version": "2.2.7",
3
+ "version": "2.3.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
7
7
  "date-fns": "^3.6.0",
8
+ "i18next": "^24.1.0",
8
9
  "react": "^18.0.0",
9
10
  "react-awesome-slider": "^4.1.0",
10
11
  "react-dom": "^18.0.0",
11
12
  "react-hook-form": "^7.52.0",
13
+ "react-i18next": "^15.2.0",
12
14
  "react-paginate": "^8.2.0",
13
15
  "react-scripts": "5.0.1",
14
16
  "react-toastify": "^10.0.5",
@@ -47,13 +49,13 @@
47
49
  "@babel/preset-react": "^7.0.0",
48
50
  "@babel/preset-typescript": "^7.0.0",
49
51
  "@types/css-modules": "^1.0.5",
50
- "@types/react": "^18.0.0",
52
+ "@types/react": "^19.0.1",
51
53
  "@types/react-dom": "^18.0.0",
52
54
  "babel-loader": "^8.0.0",
53
55
  "css-loader": "^5.2.7",
54
56
  "style-loader": "^2.0.0",
55
57
  "ts-loader": "^9.5.1",
56
- "typescript": "^4.9.5",
58
+ "typescript": "^5.7.2",
57
59
  "webpack": "^5.0.0",
58
60
  "webpack-cli": "^4.0.0"
59
61
  },