@materialui-reactjs/admin 1.0.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +322 -0
- package/LICENSE +21 -0
- package/README.md +587 -453
- package/dist/Common-DFahMuQE.cjs +11 -0
- package/dist/Common-_PK8HLKN.js +267 -0
- package/dist/Env-DoS-iQjs.cjs +1 -0
- package/dist/Env-SHztUA3s.js +16 -0
- package/dist/HeaderUpdate-Dirxjmxs.cjs +1 -0
- package/dist/{chunks/HeaderUpdate-DuS-gHNR.js → HeaderUpdate-drlnuHI8.js} +28 -25
- package/dist/SortableItem-C3KzO8Xh.cjs +1 -0
- package/dist/SpinnerLoader-BujLjvC3.cjs +1 -0
- package/dist/{chunks/SpinnerLoader-h8RDIarB.js → SpinnerLoader-CyhOQC6d.js} +2 -2
- package/dist/UDragFile-D8wOZ1Ut.js +96 -0
- package/dist/UDragFile-Db0sK4M7.cjs +1 -0
- package/dist/{chunks/Validator-CXYkI7vJ.js → Validator-D2zwZeov.js} +83 -52
- package/dist/Validator-DBxl8wtE.cjs +1 -0
- package/dist/assets/css/form.css +1 -1
- package/dist/assets/css/index.css +1 -1
- package/dist/ckeditor/ckeditor.d.ts +3 -0
- package/dist/ckeditor/plugins/elfinder.d.ts +11 -0
- package/dist/ckeditor/plugins/fullscreen.d.ts +15 -0
- package/dist/ckeditor/plugins/pdffinder.d.ts +18 -0
- package/dist/ckeditor/types.d.ts +37 -0
- package/dist/common-CEZp8xpQ.js +30 -0
- package/dist/common-ivDX6gGq.cjs +1 -0
- package/dist/components/echarts/index.cjs +1 -0
- package/dist/components/echarts/index.js +1 -1
- package/dist/components/form/AdvancedMultiSelect.d.ts +6 -3
- package/dist/components/form/AsxhUImages.d.ts +2 -1
- package/dist/components/form/BoxAddRow.d.ts +13 -2
- package/dist/components/form/CheckTreeBox.d.ts +12 -3
- package/dist/components/form/CusForm.d.ts +19 -6
- package/dist/components/form/DateInput.d.ts +2 -1
- package/dist/components/form/Editor.d.ts +2 -1
- package/dist/components/form/EfFile.d.ts +2 -1
- package/dist/components/form/EfImage.d.ts +2 -1
- package/dist/components/form/EfImages.d.ts +2 -1
- package/dist/components/form/PImage.d.ts +2 -1
- package/dist/components/form/SelectAddRowBox.d.ts +9 -5
- package/dist/components/form/SelectAddRowBoxAdvanced.d.ts +13 -4
- package/dist/components/form/SelectBox.d.ts +20 -7
- package/dist/components/form/UDragFile.d.ts +2 -1
- package/dist/components/form/UFile.d.ts +2 -1
- package/dist/components/form/UFiles.d.ts +9 -2
- package/dist/components/form/UImages.d.ts +2 -1
- package/dist/components/form/index.cjs +1 -0
- package/dist/components/form/index.js +2 -2
- package/dist/components/loader/SpinnerLoader.d.ts +5 -1
- package/dist/components/loader/index.cjs +1 -0
- package/dist/components/loader/index.js +1 -2
- package/dist/components/meta/CardTable.d.ts +11 -5
- package/dist/components/meta/CardTable.types.d.ts +57 -0
- package/dist/components/meta/CusTooltip.d.ts +8 -2
- package/dist/components/meta/Head.d.ts +10 -1
- package/dist/components/meta/HeaderDetail.d.ts +2 -1
- package/dist/components/meta/HeaderUpdate.d.ts +5 -1
- package/dist/components/meta/ModalForm.d.ts +41 -11
- package/dist/components/meta/Navtabs.d.ts +1 -1
- package/dist/components/meta/ScrollTable.d.ts +7 -3
- package/dist/components/meta/SearchBox.d.ts +8 -5
- package/dist/components/meta/SortableItem.d.ts +11 -1
- package/dist/components/meta/index.cjs +1 -0
- package/dist/components/meta/index.d.ts +1 -0
- package/dist/components/meta/index.js +3 -3
- package/dist/components/sidebar/Sidebar.types.d.ts +9 -7
- package/dist/components/sidebar/index.cjs +1 -0
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/single/Detail.d.ts +8 -3
- package/dist/components/single/Fields.d.ts +10 -4
- package/dist/components/single/Import.d.ts +8 -3
- package/dist/components/single/List.d.ts +33 -7
- package/dist/components/single/Update.d.ts +10 -4
- package/dist/components/single/UpdateDetail.d.ts +3 -2
- package/dist/components/single/UpdateTableDetail.d.ts +4 -3
- package/dist/components/single/index.cjs +1 -0
- package/dist/components/single/index.js +1 -1
- package/dist/components/top-navbar/index.cjs +1 -0
- package/dist/components/top-navbar/index.js +78 -2
- package/dist/echarts-Bi3uwLbg.cjs +1 -0
- package/dist/{chunks/echarts-CRmndsxC.js → echarts-CTzMqeR5.js} +4 -4
- package/dist/form-heyswTRq.js +3897 -0
- package/dist/form-sgtop6li.cjs +49 -0
- package/dist/hook/common.d.ts +87 -0
- package/dist/hook/detail.cjs +1 -0
- package/dist/hook/detail.d.ts +9 -15
- package/dist/hook/detail.js +1 -11
- package/dist/hook/fields.cjs +1 -0
- package/dist/hook/fields.d.ts +6 -14
- package/dist/hook/fields.js +1 -11
- package/dist/hook/import.d.ts +6 -11
- package/dist/hook/index.cjs +1 -0
- package/dist/hook/index.d.ts +29 -20
- package/dist/hook/index.js +14 -11
- package/dist/hook/update.cjs +1 -0
- package/dist/hook/update.d.ts +11 -19
- package/dist/hook/update.js +12 -9
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +14 -11
- package/dist/meta-BANk9kHW.cjs +1 -0
- package/dist/meta-CheDAmMh.js +745 -0
- package/dist/rolldown-runtime-BocRIvOZ.cjs +1 -0
- package/dist/sidebar-CfQAYWi-.cjs +1 -0
- package/dist/{chunks/sidebar-Dj4Xr9du.js → sidebar-CzRmfvhi.js} +10 -13
- package/dist/{chunks/single-CRF61o_U.js → single-BsJ7TYJi.js} +364 -282
- package/dist/single-C2WPEjhk.cjs +1 -0
- package/dist/style.cjs +0 -0
- package/dist/style.d.ts +0 -0
- package/dist/style.js +0 -0
- package/dist/types/Menu.d.ts +25 -0
- package/dist/utils/Common.d.ts +224 -43
- package/dist/utils/CusRoute.d.ts +21 -1
- package/dist/utils/Env.d.ts +23 -2
- package/dist/utils/Group.d.ts +12 -1
- package/dist/utils/Validator.d.ts +34 -12
- package/dist/utils/index.cjs +11 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +212 -171
- package/package.json +190 -163
- package/dist/chunks/Common-BURf0rBN.js +0 -222
- package/dist/chunks/Env-DRXhvUcb.js +0 -16
- package/dist/chunks/UDragFile-BnUR3riq.js +0 -92
- package/dist/chunks/form-CPkpL5eA.js +0 -45889
- package/dist/chunks/loader-BUiOnhOH.js +0 -1
- package/dist/chunks/meta-4qPWijBT.js +0 -758
- package/dist/chunks/top-navbar-Bob0gMUh.js +0 -78
- package/scripts/postinstall.cjs +0 -80
- /package/dist/{chunks/SortableItem-B4-Zsso3.js → SortableItem-B4-Zsso3.js} +0 -0
- /package/dist/{components/meta/Pdfviewer.d.ts → hook/import.cjs} +0 -0
package/package.json
CHANGED
|
@@ -1,171 +1,198 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
},
|
|
7
|
-
"description": "Reusable React admin components",
|
|
8
|
-
"type": "module",
|
|
9
|
-
|
|
10
|
-
"main": "./dist/index.js",
|
|
11
|
-
"module": "./dist/index.js",
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/index.js"
|
|
2
|
+
"name": "@materialui-reactjs/admin",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
18
6
|
},
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
"description": "Reusable React admin components",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.cjs",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
"./hook": {
|
|
20
|
+
"types": "./dist/hook/index.d.ts",
|
|
21
|
+
"import": "./dist/hook/index.js",
|
|
22
|
+
"require": "./dist/hook/index.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./hook/detail": {
|
|
25
|
+
"types": "./dist/hook/detail.d.ts",
|
|
26
|
+
"import": "./dist/hook/detail.js",
|
|
27
|
+
"require": "./dist/hook/detail.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./hook/fields": {
|
|
30
|
+
"types": "./dist/hook/fields.d.ts",
|
|
31
|
+
"import": "./dist/hook/fields.js",
|
|
32
|
+
"require": "./dist/hook/fields.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./hook/import": {
|
|
35
|
+
"types": "./dist/hook/import.d.ts",
|
|
36
|
+
"import": "./dist/hook/import.js",
|
|
37
|
+
"require": "./dist/hook/import.cjs"
|
|
38
|
+
},
|
|
39
|
+
"./hook/update": {
|
|
40
|
+
"types": "./dist/hook/update.d.ts",
|
|
41
|
+
"import": "./dist/hook/update.js",
|
|
42
|
+
"require": "./dist/hook/update.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./utils": {
|
|
45
|
+
"types": "./dist/utils/index.d.ts",
|
|
46
|
+
"import": "./dist/utils/index.js",
|
|
47
|
+
"require": "./dist/utils/index.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./form": {
|
|
50
|
+
"types": "./dist/components/form/index.d.ts",
|
|
51
|
+
"import": "./dist/components/form/index.js",
|
|
52
|
+
"require": "./dist/components/form/index.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./echarts": {
|
|
55
|
+
"types": "./dist/components/echarts/index.d.ts",
|
|
56
|
+
"import": "./dist/components/echarts/index.js",
|
|
57
|
+
"require": "./dist/components/echarts/index.cjs"
|
|
58
|
+
},
|
|
59
|
+
"./loader": {
|
|
60
|
+
"types": "./dist/components/loader/index.d.ts",
|
|
61
|
+
"import": "./dist/components/loader/index.js",
|
|
62
|
+
"require": "./dist/components/loader/index.cjs"
|
|
63
|
+
},
|
|
64
|
+
"./meta": {
|
|
65
|
+
"types": "./dist/components/meta/index.d.ts",
|
|
66
|
+
"import": "./dist/components/meta/index.js",
|
|
67
|
+
"require": "./dist/components/meta/index.cjs"
|
|
68
|
+
},
|
|
69
|
+
"./sidebar": {
|
|
70
|
+
"types": "./dist/components/sidebar/index.d.ts",
|
|
71
|
+
"import": "./dist/components/sidebar/index.js",
|
|
72
|
+
"require": "./dist/components/sidebar/index.cjs"
|
|
73
|
+
},
|
|
74
|
+
"./single": {
|
|
75
|
+
"types": "./dist/components/single/index.d.ts",
|
|
76
|
+
"import": "./dist/components/single/index.js",
|
|
77
|
+
"require": "./dist/components/single/index.cjs"
|
|
78
|
+
},
|
|
79
|
+
"./top-navbar": {
|
|
80
|
+
"types": "./dist/components/top-navbar/index.d.ts",
|
|
81
|
+
"import": "./dist/components/top-navbar/index.js",
|
|
82
|
+
"require": "./dist/components/top-navbar/index.cjs"
|
|
83
|
+
},
|
|
84
|
+
"./fontawesome.css": "./dist/fontawesome/css/all.min.css",
|
|
85
|
+
"./style.css": "./dist/assets/css/index.css"
|
|
23
86
|
},
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
87
|
+
"files": [
|
|
88
|
+
"dist",
|
|
89
|
+
"README.md",
|
|
90
|
+
"CHANGELOG.md",
|
|
91
|
+
"LICENSE"
|
|
92
|
+
],
|
|
93
|
+
"sideEffects": [
|
|
94
|
+
"**/*.css"
|
|
95
|
+
],
|
|
96
|
+
"scripts": {
|
|
97
|
+
"dev": "vite",
|
|
98
|
+
"test": "vitest run",
|
|
99
|
+
"test:watch": "vitest",
|
|
100
|
+
"test:ui": "vitest --ui",
|
|
101
|
+
"test:coverage": "vitest run --coverage",
|
|
102
|
+
"test:consumer": "node scripts/consumer-smoke.mjs",
|
|
103
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
104
|
+
"lint": "eslint .",
|
|
105
|
+
"lint:fix": "eslint . --fix",
|
|
106
|
+
"format": "prettier --write \"**/*.{ts,tsx,js,mjs,json,md}\"",
|
|
107
|
+
"format:check": "prettier --check \"**/*.{ts,tsx,js,mjs,json,md}\"",
|
|
108
|
+
"verify": "npm run format:check && npm run lint && npm run typecheck && npm run test",
|
|
109
|
+
"build": "npm run typecheck && vite build",
|
|
110
|
+
"pack": "npm run build && npm pack",
|
|
111
|
+
"prepublishOnly": "npm run build"
|
|
27
112
|
},
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
113
|
+
"peerDependencies": {
|
|
114
|
+
"@ckeditor/ckeditor5-react": "^11.2.0",
|
|
115
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
116
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
117
|
+
"@emotion/react": "^11.14.0",
|
|
118
|
+
"@emotion/styled": "^11.14.1",
|
|
119
|
+
"@hello-pangea/dnd": "^18.0.1",
|
|
120
|
+
"@mui/material": "^9.4.0",
|
|
121
|
+
"@mui/x-date-pickers": "^9.14.0",
|
|
122
|
+
"@reduxjs/toolkit": "^2.12.0",
|
|
123
|
+
"bootstrap": "^5.3.8",
|
|
124
|
+
"ckeditor5": "^48.4.0",
|
|
125
|
+
"date-fns": "^4.4.0",
|
|
126
|
+
"decimal.js": "^10.6.0",
|
|
127
|
+
"echarts": "^6.1.0",
|
|
128
|
+
"echarts-for-react": "^3.0.6",
|
|
129
|
+
"jquery": "^3.7.1",
|
|
130
|
+
"react": "^19.3.0",
|
|
131
|
+
"react-dom": "^19.3.0",
|
|
132
|
+
"react-helmet-async": "^3.0.0",
|
|
133
|
+
"react-redux": "^9.3.0",
|
|
134
|
+
"react-router-dom": "^7.18.4",
|
|
135
|
+
"react-select": "^5.10.2",
|
|
136
|
+
"react-sortablejs": "^6.1.4",
|
|
137
|
+
"sortablejs": "^1.15.7",
|
|
138
|
+
"sweetalert2": "^11.26.25",
|
|
139
|
+
"sweetalert2-react-content": "^5.1.2"
|
|
31
140
|
},
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
141
|
+
"peerDependenciesMeta": {
|
|
142
|
+
"ckeditor5": {
|
|
143
|
+
"optional": true
|
|
144
|
+
}
|
|
35
145
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
146
|
+
"devDependencies": {
|
|
147
|
+
"@ckeditor/ckeditor5-react": "^11.2.0",
|
|
148
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
149
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
150
|
+
"@emotion/react": "^11.14.0",
|
|
151
|
+
"@emotion/styled": "^11.14.1",
|
|
152
|
+
"@hello-pangea/dnd": "^18.0.1",
|
|
153
|
+
"@mui/material": "^9.4.0",
|
|
154
|
+
"@mui/x-date-pickers": "^9.14.0",
|
|
155
|
+
"@reduxjs/toolkit": "^2.12.0",
|
|
156
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
157
|
+
"@testing-library/react": "^16.3.3",
|
|
158
|
+
"@testing-library/user-event": "^14.6.7",
|
|
159
|
+
"@eslint/js": "^10.0.1",
|
|
160
|
+
"@types/bootstrap": "^5.2.11",
|
|
161
|
+
"@types/jquery": "^4.0.1",
|
|
162
|
+
"@types/node": "^26.6.3",
|
|
163
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
164
|
+
"@vitest/coverage-v8": "^5.0.2",
|
|
165
|
+
"bootstrap": "^5.3.8",
|
|
166
|
+
"ckeditor5": "^48.4.0",
|
|
167
|
+
"date-fns": "^4.4.0",
|
|
168
|
+
"decimal.js": "^10.6.0",
|
|
169
|
+
"echarts": "^6.1.0",
|
|
170
|
+
"echarts-for-react": "^3.0.6",
|
|
171
|
+
"eslint": "^10.11.0",
|
|
172
|
+
"eslint-config-prettier": "^10.1.8",
|
|
173
|
+
"eslint-plugin-react-hooks": "^7.1.0",
|
|
174
|
+
"globals": "^17.12.0",
|
|
175
|
+
"jquery": "^3.7.1",
|
|
176
|
+
"jsdom": "^30.1.1",
|
|
177
|
+
"prettier": "^3.9.0",
|
|
178
|
+
"react": "^19.3.0",
|
|
179
|
+
"react-dom": "^19.3.0",
|
|
180
|
+
"react-helmet-async": "^3.0.0",
|
|
181
|
+
"react-redux": "^9.3.0",
|
|
182
|
+
"react-router-dom": "^7.18.4",
|
|
183
|
+
"react-select": "^5.10.2",
|
|
184
|
+
"react-sortablejs": "^6.1.4",
|
|
185
|
+
"sortablejs": "^1.15.7",
|
|
186
|
+
"sweetalert2": "^11.26.25",
|
|
187
|
+
"sweetalert2-react-content": "^5.1.2",
|
|
188
|
+
"typescript": "^6.0.3",
|
|
189
|
+
"typescript-eslint": "^8.70.1",
|
|
190
|
+
"vite": "^8.3.1",
|
|
191
|
+
"vite-plugin-dts": "^5.1.1",
|
|
192
|
+
"vitest": "^5.0.2"
|
|
39
193
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"types": "./dist/utils/index.d.ts",
|
|
43
|
-
"import": "./dist/utils/index.js"
|
|
194
|
+
"engines": {
|
|
195
|
+
"node": ">=20.19.0"
|
|
44
196
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"types": "./dist/components/form/index.d.ts",
|
|
48
|
-
"import": "./dist/components/form/index.js"
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
"./echarts": {
|
|
52
|
-
"types": "./dist/components/echarts/index.d.ts",
|
|
53
|
-
"import": "./dist/components/echarts/index.js"
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
"./loader": {
|
|
57
|
-
"types": "./dist/components/loader/index.d.ts",
|
|
58
|
-
"import": "./dist/components/loader/index.js"
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
"./meta": {
|
|
62
|
-
"types": "./dist/components/meta/index.d.ts",
|
|
63
|
-
"import": "./dist/components/meta/index.js"
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
"./sidebar": {
|
|
67
|
-
"types": "./dist/components/sidebar/index.d.ts",
|
|
68
|
-
"import": "./dist/components/sidebar/index.js"
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
"./single": {
|
|
72
|
-
"types": "./dist/components/single/index.d.ts",
|
|
73
|
-
"import": "./dist/components/single/index.js"
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
"./top-navbar": {
|
|
77
|
-
"types": "./dist/components/top-navbar/index.d.ts",
|
|
78
|
-
"import": "./dist/components/top-navbar/index.js"
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
"./fontawesome.css": "./dist/fontawesome/css/all.min.css",
|
|
82
|
-
|
|
83
|
-
"./style.css": "./dist/assets/css/index.css"
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
"files": [
|
|
87
|
-
"dist",
|
|
88
|
-
"scripts/postinstall.cjs",
|
|
89
|
-
"README.md"
|
|
90
|
-
],
|
|
91
|
-
|
|
92
|
-
"sideEffects": [
|
|
93
|
-
"**/*.css"
|
|
94
|
-
],
|
|
95
|
-
|
|
96
|
-
"scripts": {
|
|
97
|
-
"dev": "vite",
|
|
98
|
-
"test": "tsc --noEmit",
|
|
99
|
-
"build": "tsc --noEmit && vite build",
|
|
100
|
-
"pack": "npm run build && npm pack",
|
|
101
|
-
"prepublishOnly": "npm run build",
|
|
102
|
-
"postinstall": "node scripts/postinstall.cjs"
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
"peerDependencies": {
|
|
106
|
-
"@ckeditor/ckeditor5-react": "^11.2.0",
|
|
107
|
-
"@dnd-kit/sortable": "^10.0.0",
|
|
108
|
-
"@dnd-kit/utilities": "^3.2.2",
|
|
109
|
-
"@emotion/react": "^11.14.0",
|
|
110
|
-
"@emotion/styled": "^11.14.1",
|
|
111
|
-
"@hello-pangea/dnd": "^18.0.1",
|
|
112
|
-
"@mui/material": "^9.2.0",
|
|
113
|
-
"@mui/x-date-pickers": "^9.10.0",
|
|
114
|
-
"@reduxjs/toolkit": "^2.12.0",
|
|
115
|
-
"bootstrap": "^5.3.8",
|
|
116
|
-
"date-fns": "^4.4.0",
|
|
117
|
-
"decimal.js": "^10.6.0",
|
|
118
|
-
"echarts": "^6.1.0",
|
|
119
|
-
"echarts-for-react": "^3.0.6",
|
|
120
|
-
"react": "^19.2.7",
|
|
121
|
-
"react-dom": "^19.2.7",
|
|
122
|
-
"react-helmet-async": "^3.0.0",
|
|
123
|
-
"react-redux": "^9.3.0",
|
|
124
|
-
"react-router-dom": "^7.18.1",
|
|
125
|
-
"react-select": "^5.10.2",
|
|
126
|
-
"react-sortablejs": "^6.1.4",
|
|
127
|
-
"sortablejs": "^1.15.7",
|
|
128
|
-
"sweetalert2": "^11.26.25",
|
|
129
|
-
"sweetalert2-react-content": "^5.1.2"
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
"devDependencies": {
|
|
133
|
-
"@ckeditor/ckeditor5-react": "^11.2.0",
|
|
134
|
-
"@dnd-kit/sortable": "^10.0.0",
|
|
135
|
-
"@dnd-kit/utilities": "^3.2.2",
|
|
136
|
-
"@emotion/react": "^11.14.0",
|
|
137
|
-
"@emotion/styled": "^11.14.1",
|
|
138
|
-
"@hello-pangea/dnd": "^18.0.1",
|
|
139
|
-
"@mui/material": "^9.2.0",
|
|
140
|
-
"@mui/x-date-pickers": "^9.10.0",
|
|
141
|
-
"@reduxjs/toolkit": "^2.12.0",
|
|
142
|
-
"@types/bootstrap": "^5.2.11",
|
|
143
|
-
"@types/jquery": "^4.0.1",
|
|
144
|
-
"@types/node": "^26.2.0",
|
|
145
|
-
"@vitejs/plugin-react": "^6.0.3",
|
|
146
|
-
"bootstrap": "^5.3.8",
|
|
147
|
-
"date-fns": "^4.4.0",
|
|
148
|
-
"decimal.js": "^10.6.0",
|
|
149
|
-
"echarts": "^6.1.0",
|
|
150
|
-
"echarts-for-react": "^3.0.6",
|
|
151
|
-
"react": "^19.2.7",
|
|
152
|
-
"react-dom": "^19.2.7",
|
|
153
|
-
"react-helmet-async": "^3.0.0",
|
|
154
|
-
"react-redux": "^9.3.0",
|
|
155
|
-
"react-router-dom": "^7.18.1",
|
|
156
|
-
"react-select": "^5.10.2",
|
|
157
|
-
"react-sortablejs": "^6.1.4",
|
|
158
|
-
"sortablejs": "^1.15.7",
|
|
159
|
-
"sweetalert2": "^11.26.25",
|
|
160
|
-
"sweetalert2-react-content": "^5.1.2",
|
|
161
|
-
"typescript": "^6.0.3",
|
|
162
|
-
"vite": "^8.1.5",
|
|
163
|
-
"vite-plugin-dts": "^5.0.3"
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
"engines": {
|
|
167
|
-
"node": ">=24"
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
"license": "MIT"
|
|
171
|
-
}
|
|
197
|
+
"license": "MIT"
|
|
198
|
+
}
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./Env-DRXhvUcb.js";
|
|
2
|
-
import t from "sweetalert2";
|
|
3
|
-
import n from "sweetalert2-react-content";
|
|
4
|
-
import { Modal as r } from "bootstrap";
|
|
5
|
-
import "date-fns";
|
|
6
|
-
import "decimal.js";
|
|
7
|
-
//#region src/utils/Common.ts
|
|
8
|
-
var { SECRET_KEY: i, STATIC_URL: a, API_URL: o, UPLOADS_URL: s } = await e(), c = (e, t = !0) => {
|
|
9
|
-
let n = typeof e == "string" ? document.querySelector(e) : e;
|
|
10
|
-
if (n) {
|
|
11
|
-
if (t) n.querySelector(".boxSpinner") || n.insertAdjacentHTML("afterbegin", "<div class=\"boxSpinner rounded\">\n <div class=\"spinner\">\n <div class=\"rect1\"></div>\n <div class=\"rect2\"></div>\n <div class=\"rect3\"></div>\n <div class=\"rect4\"></div>\n <div class=\"rect5\"></div>\n <div class=\"rect6\"></div>\n <div class=\"rect7\"></div>\n </div>\n </div>");
|
|
12
|
-
else {
|
|
13
|
-
let e = n.querySelector(".boxSpinner");
|
|
14
|
-
e && e.remove();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}, l = (e) => {
|
|
18
|
-
let t = new FormData();
|
|
19
|
-
return Object.entries(e).forEach(([e, n]) => {
|
|
20
|
-
if (n != null) {
|
|
21
|
-
if (n instanceof FileList) {
|
|
22
|
-
Array.from(n).forEach((n) => t.append(e, n));
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (n instanceof File) {
|
|
26
|
-
t.append(e, n);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (Array.isArray(n) && n.every((e) => e instanceof File)) {
|
|
30
|
-
n.forEach((n) => t.append(e, n));
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (Array.isArray(n) && n.every((e) => [
|
|
34
|
-
"string",
|
|
35
|
-
"number",
|
|
36
|
-
"boolean"
|
|
37
|
-
].includes(typeof e))) {
|
|
38
|
-
n.forEach((n) => t.append(e, n.toString()));
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (typeof n == "object") {
|
|
42
|
-
t.append(e, JSON.stringify(n));
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
t.append(e, n);
|
|
46
|
-
}
|
|
47
|
-
}), t;
|
|
48
|
-
}, u = class extends Error {
|
|
49
|
-
errorCode;
|
|
50
|
-
constructor(e, t) {
|
|
51
|
-
super(e), this.name = "ApiError", this.errorCode = t;
|
|
52
|
-
}
|
|
53
|
-
}, d = async (e, t = {}, n = "POST", r = "application/json", a = !0) => {
|
|
54
|
-
let o = { "Secret-Key": i };
|
|
55
|
-
r !== "multipart/form-data" && (o["Content-Type"] = r);
|
|
56
|
-
let s = {
|
|
57
|
-
method: n,
|
|
58
|
-
headers: o,
|
|
59
|
-
credentials: "include"
|
|
60
|
-
};
|
|
61
|
-
if (n == "POST" && (s.body = r === "multipart/form-data" ? l(t) : JSON.stringify(t)), n === "GET" && Object.keys(t).length > 0) {
|
|
62
|
-
let n = new URLSearchParams();
|
|
63
|
-
Object.entries(t).forEach(([e, t]) => {
|
|
64
|
-
Array.isArray(t) ? t.forEach((t) => n.append(e, String(t))) : n.append(e, String(t));
|
|
65
|
-
});
|
|
66
|
-
let r = n.toString();
|
|
67
|
-
e += (e.includes("?") ? "&" : "?") + r;
|
|
68
|
-
}
|
|
69
|
-
let c = await (await fetch(e, s)).text(), d = null;
|
|
70
|
-
if (c) try {
|
|
71
|
-
d = JSON.parse(c);
|
|
72
|
-
} catch {
|
|
73
|
-
d = c;
|
|
74
|
-
}
|
|
75
|
-
if (d?.status == 200) return d;
|
|
76
|
-
if (d?.msg && a) throw new u(d.msg, d.errorCode);
|
|
77
|
-
if (a) throw Error("invalid_response");
|
|
78
|
-
return !1;
|
|
79
|
-
}, f = (e = "Bạn có chắc muốn thực hiện thao tác này ?", r = "Đồng ý") => n(t).fire({
|
|
80
|
-
title: "Xác nhận",
|
|
81
|
-
text: e,
|
|
82
|
-
icon: "warning",
|
|
83
|
-
showCancelButton: !0,
|
|
84
|
-
confirmButtonColor: "#4CAF50",
|
|
85
|
-
cancelButtonColor: "#F44336",
|
|
86
|
-
confirmButtonText: r,
|
|
87
|
-
cancelButtonText: "Hủy",
|
|
88
|
-
position: "top"
|
|
89
|
-
}), p = (e, r = "top", i = !1) => {
|
|
90
|
-
n(t).fire({
|
|
91
|
-
toast: i,
|
|
92
|
-
icon: "success",
|
|
93
|
-
position: r,
|
|
94
|
-
title: e,
|
|
95
|
-
showConfirmButton: !1,
|
|
96
|
-
timer: 1500
|
|
97
|
-
});
|
|
98
|
-
}, m = (e) => {
|
|
99
|
-
n(t).fire({
|
|
100
|
-
icon: "error",
|
|
101
|
-
position: "top",
|
|
102
|
-
title: e,
|
|
103
|
-
showConfirmButton: !1
|
|
104
|
-
});
|
|
105
|
-
}, h = (e) => {
|
|
106
|
-
if (!e) return "";
|
|
107
|
-
let t = new Date(e);
|
|
108
|
-
return isNaN(t.getTime()) ? "Invalid Date" : `${String(t.getDate()).padStart(2, "0")}/${String(t.getMonth() + 1).padStart(2, "0")}/${t.getFullYear()}`;
|
|
109
|
-
}, g = (e) => {
|
|
110
|
-
let t = new URLSearchParams();
|
|
111
|
-
return Object.entries(e).forEach(([e, n]) => {
|
|
112
|
-
Array.isArray(n) ? n.forEach((n) => {
|
|
113
|
-
n != null && t.append(e, String(n));
|
|
114
|
-
}) : n != null && t.set(e, String(n));
|
|
115
|
-
}), t.toString();
|
|
116
|
-
}, _ = () => {
|
|
117
|
-
let e = window.location.pathname.match(/\/(\d+)(\/)?$/);
|
|
118
|
-
return e ? Number(e[1]) : null;
|
|
119
|
-
}, v = (e, t = "/styles/default.jpg") => e ? a + ("/" + e).replaceAll("//", "/") : t, y = (e) => e ? a + ("/" + e).replaceAll("//", "/") : "", b = (e, t = "/styles/default.jpg") => e ? o + ("/" + e).replaceAll("//", "/") : t, x = (e, t = "/styles/default.jpg") => e ? s + "/" + e : t;
|
|
120
|
-
function S(e) {
|
|
121
|
-
let t = "";
|
|
122
|
-
for (let n = 0; n < e; n++) {
|
|
123
|
-
let e = Math.floor(Math.random() * 62);
|
|
124
|
-
t += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[e];
|
|
125
|
-
}
|
|
126
|
-
return t;
|
|
127
|
-
}
|
|
128
|
-
var C = (e, t = 20, n = !1) => new Promise((r) => {
|
|
129
|
-
for (let r = 0; r < e.length; r++) if (e[r] !== void 0) {
|
|
130
|
-
if (n.test(e[r].name)) {
|
|
131
|
-
if (e[r].size >= t * 1024 * 1024) return m(`Tập tin tải lên không quá ${t}M`), !1;
|
|
132
|
-
} else return m("Tập tin không hợp lệ"), !1;
|
|
133
|
-
} else return m("Tập tin không tồn tại"), !1;
|
|
134
|
-
r(void 0);
|
|
135
|
-
}), w = (e = "", t = "danger") => {
|
|
136
|
-
let n = "";
|
|
137
|
-
if (typeof e == "string") return e.trim() === "" ? "" : `<div class="alert alert-${t}">${e}</div>`;
|
|
138
|
-
for (let r in e) n += `<div class="alert alert-${t}">${e[r]}</div>`;
|
|
139
|
-
return n;
|
|
140
|
-
}, T = (e, t = {}) => new Promise((n, r) => {
|
|
141
|
-
try {
|
|
142
|
-
let r = window.jQuery, i = r(e);
|
|
143
|
-
if (!i.length) throw Error("invalid_elfinder");
|
|
144
|
-
let a = {
|
|
145
|
-
url: o + "/elfinder/connector",
|
|
146
|
-
height: 500,
|
|
147
|
-
resizable: !0,
|
|
148
|
-
baseUrl: "/assets/plugins/elFinder/",
|
|
149
|
-
defaultView: "list",
|
|
150
|
-
useBrowserHistory: !1,
|
|
151
|
-
getFileCallback: (e) => {
|
|
152
|
-
n(e);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
i.elfinder("destroy").elfinder({
|
|
156
|
-
...a,
|
|
157
|
-
...t
|
|
158
|
-
});
|
|
159
|
-
} catch (e) {
|
|
160
|
-
r(e);
|
|
161
|
-
}
|
|
162
|
-
}), E = (e) => new Promise((t, n) => {
|
|
163
|
-
try {
|
|
164
|
-
let n = typeof e == "string" ? document.querySelector(e) : e;
|
|
165
|
-
if (!n) throw Error("invalid_modalEl_btnEl");
|
|
166
|
-
n.querySelectorAll(".btn-md-close")?.forEach((e) => {
|
|
167
|
-
e?.addEventListener("click", () => {
|
|
168
|
-
i.hide();
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
let i = r.getOrCreateInstance(n, {
|
|
172
|
-
backdrop: "static",
|
|
173
|
-
keyboard: !1
|
|
174
|
-
});
|
|
175
|
-
t({
|
|
176
|
-
md: i,
|
|
177
|
-
modalEl: n
|
|
178
|
-
});
|
|
179
|
-
} catch (e) {
|
|
180
|
-
console.log(e), n(e);
|
|
181
|
-
}
|
|
182
|
-
}), D = (e, t, n = !1, r = !1) => {
|
|
183
|
-
if (!e) throw Error("invalid_btnEl");
|
|
184
|
-
e.addEventListener("click", (i) => {
|
|
185
|
-
i.preventDefault(), E(t).then((t) => {
|
|
186
|
-
let { modalEl: i, md: a } = t;
|
|
187
|
-
T("#elfinderStatic").then((t) => {
|
|
188
|
-
n && n({
|
|
189
|
-
data: t,
|
|
190
|
-
btnEl: e,
|
|
191
|
-
md: a
|
|
192
|
-
});
|
|
193
|
-
}), i.addEventListener("hidden.bs.modal", () => {
|
|
194
|
-
r && r();
|
|
195
|
-
}), a.show();
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
}, O = (e, t, n = !1, r = !1) => {
|
|
199
|
-
if (!e) throw Error("invalid_btnEl");
|
|
200
|
-
e.addEventListener("click", (i) => {
|
|
201
|
-
i.preventDefault(), E(t).then((t) => {
|
|
202
|
-
let { modalEl: i, md: a } = t;
|
|
203
|
-
T("#elfinderStatic", { url: o + "/elfinder/connectorFiles" }).then((t) => {
|
|
204
|
-
n && n({
|
|
205
|
-
data: t,
|
|
206
|
-
btnEl: e,
|
|
207
|
-
md: a
|
|
208
|
-
});
|
|
209
|
-
}), i.addEventListener("hidden.bs.modal", () => {
|
|
210
|
-
r && r();
|
|
211
|
-
}), a.show();
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
}, k = (e = !1) => {
|
|
215
|
-
let t = [{
|
|
216
|
-
id: 1,
|
|
217
|
-
name: "Tiếng Việt"
|
|
218
|
-
}];
|
|
219
|
-
return e === !1 ? t : t.find((t) => t.id === e)?.name || "";
|
|
220
|
-
};
|
|
221
|
-
//#endregion
|
|
222
|
-
export { f as _, T as a, c as b, _ as c, b as d, x as f, w as g, D as h, g as i, v as l, O as m, C as n, h as o, S as p, E as r, y as s, d as t, k as u, m as v, p as y };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//#region src/utils/Env.ts
|
|
2
|
-
var e = null, t = null;
|
|
3
|
-
function n() {
|
|
4
|
-
return e ? Promise.resolve(e) : t || (t = fetch("/env.json").then((e) => {
|
|
5
|
-
if (!e.ok) throw Error("Failed to load env");
|
|
6
|
-
return e.json();
|
|
7
|
-
}).then((t) => (e = t, t)).catch((e) => {
|
|
8
|
-
throw t = null, e;
|
|
9
|
-
}), t);
|
|
10
|
-
}
|
|
11
|
-
function r() {
|
|
12
|
-
if (!e) throw Error("Environment has not been loaded. Call loadEnv() before using getEnv().");
|
|
13
|
-
return e;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { n, r as t };
|