@qlover/create-app 0.7.14 → 0.8.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 (361) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/configs/_common/.gitignore.template +6 -0
  3. package/dist/configs/_common/.prettierignore +17 -5
  4. package/dist/configs/_common/.vscode/settings.json +6 -1
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/templates/next-app/.env.template +1 -1
  8. package/dist/templates/next-app/README.en.md +130 -0
  9. package/dist/templates/next-app/README.md +114 -20
  10. package/dist/templates/next-app/config/Identifier/api.ts +5 -5
  11. package/dist/templates/next-app/config/Identifier/common/admint.table.ts +69 -0
  12. package/dist/templates/next-app/config/Identifier/common/common.ts +76 -0
  13. package/dist/templates/next-app/config/Identifier/common/index.ts +3 -0
  14. package/dist/templates/next-app/config/Identifier/{validator.ts → common/validators.ts} +5 -5
  15. package/dist/templates/next-app/config/Identifier/index.ts +2 -12
  16. package/dist/templates/next-app/config/Identifier/pages/index.ts +6 -0
  17. package/dist/templates/next-app/config/Identifier/pages/page.admin.home.ts +27 -0
  18. package/dist/templates/next-app/config/Identifier/pages/page.admin.locales.ts +266 -0
  19. package/dist/templates/next-app/config/Identifier/pages/page.admin.user.ts +293 -0
  20. package/dist/templates/{react-app/config/Identifier → next-app/config/Identifier/pages}/page.home.ts +15 -22
  21. package/dist/templates/next-app/config/Identifier/{page.login.ts → pages/page.login.ts} +28 -34
  22. package/dist/templates/next-app/config/Identifier/{page.register.ts → pages/page.register.ts} +30 -29
  23. package/dist/templates/next-app/config/adminNavs.ts +19 -0
  24. package/dist/templates/next-app/config/common.ts +22 -13
  25. package/dist/templates/next-app/config/i18n/HomeI18n.ts +5 -5
  26. package/dist/templates/next-app/config/i18n/admin18n.ts +61 -19
  27. package/dist/templates/next-app/config/i18n/i18nConfig.ts +2 -0
  28. package/dist/templates/next-app/config/i18n/i18nKeyScheam.ts +36 -0
  29. package/dist/templates/next-app/config/i18n/loginI18n.ts +22 -22
  30. package/dist/templates/next-app/config/i18n/register18n.ts +23 -24
  31. package/dist/templates/next-app/docs/en/api.md +387 -0
  32. package/dist/templates/next-app/docs/en/component.md +544 -0
  33. package/dist/templates/next-app/docs/en/database.md +496 -0
  34. package/dist/templates/next-app/docs/en/development-guide.md +727 -0
  35. package/dist/templates/next-app/docs/en/env.md +563 -0
  36. package/dist/templates/next-app/docs/en/i18n.md +287 -0
  37. package/dist/templates/next-app/docs/en/index.md +165 -0
  38. package/dist/templates/next-app/docs/en/page.md +457 -0
  39. package/dist/templates/next-app/docs/en/project-structure.md +176 -0
  40. package/dist/templates/next-app/docs/en/router.md +427 -0
  41. package/dist/templates/next-app/docs/en/theme.md +532 -0
  42. package/dist/templates/next-app/docs/en/validator.md +478 -0
  43. package/dist/templates/next-app/docs/zh/api.md +387 -0
  44. package/dist/templates/next-app/docs/zh/component.md +544 -0
  45. package/dist/templates/next-app/docs/zh/database.md +496 -0
  46. package/dist/templates/next-app/docs/zh/development-guide.md +727 -0
  47. package/dist/templates/next-app/docs/zh/env.md +563 -0
  48. package/dist/templates/next-app/docs/zh/i18n.md +287 -0
  49. package/dist/templates/next-app/docs/zh/index.md +165 -0
  50. package/dist/templates/next-app/docs/zh/page.md +457 -0
  51. package/dist/templates/next-app/docs/zh/project-structure.md +176 -0
  52. package/dist/templates/next-app/docs/zh/router.md +427 -0
  53. package/dist/templates/next-app/docs/zh/theme.md +532 -0
  54. package/dist/templates/next-app/docs/zh/validator.md +476 -0
  55. package/dist/templates/next-app/make/generateLocales.ts +19 -12
  56. package/dist/templates/next-app/migrations/schema/LocalesSchema.ts +15 -0
  57. package/dist/templates/next-app/migrations/sql/1694244000000.sql +11 -0
  58. package/dist/templates/next-app/package.json +7 -3
  59. package/dist/templates/next-app/public/locales/en.json +172 -207
  60. package/dist/templates/next-app/public/locales/zh.json +172 -207
  61. package/dist/templates/next-app/src/app/[locale]/admin/locales/page.tsx +153 -0
  62. package/dist/templates/next-app/src/app/[locale]/admin/users/page.tsx +48 -50
  63. package/dist/templates/next-app/src/app/[locale]/login/LoginForm.tsx +2 -2
  64. package/dist/templates/next-app/src/app/api/admin/locales/create/route.ts +34 -0
  65. package/dist/templates/next-app/src/app/api/admin/locales/import/route.ts +40 -0
  66. package/dist/templates/next-app/src/app/api/admin/locales/route.ts +42 -0
  67. package/dist/templates/next-app/src/app/api/admin/locales/update/route.ts +32 -0
  68. package/dist/templates/next-app/src/app/api/locales/json/route.ts +44 -0
  69. package/dist/templates/next-app/src/base/cases/AdminPageManager.ts +1 -13
  70. package/dist/templates/next-app/src/base/cases/Datetime.ts +18 -0
  71. package/dist/templates/next-app/src/base/cases/DialogErrorPlugin.ts +12 -6
  72. package/dist/templates/next-app/src/base/cases/ResourceState.ts +17 -0
  73. package/dist/templates/next-app/src/base/cases/TranslateI18nInterface.ts +25 -0
  74. package/dist/templates/next-app/src/base/cases/ZodColumnBuilder.ts +200 -0
  75. package/dist/templates/next-app/src/base/port/ZodBuilderInterface.ts +8 -0
  76. package/dist/templates/next-app/src/base/services/AdminLocalesService.ts +20 -0
  77. package/dist/templates/next-app/src/base/services/AdminPageEvent.ts +26 -0
  78. package/dist/templates/next-app/src/base/services/AdminPageScheduler.ts +42 -0
  79. package/dist/templates/next-app/src/base/services/ResourceService.ts +122 -0
  80. package/dist/templates/next-app/src/base/services/adminApi/AdminLocalesApi.ts +104 -0
  81. package/dist/templates/next-app/src/base/services/adminApi/AdminUserApi.ts +38 -5
  82. package/dist/templates/next-app/src/base/services/appApi/AppApiPlugin.ts +1 -1
  83. package/dist/templates/next-app/src/i18n/request.ts +30 -1
  84. package/dist/templates/next-app/src/server/PageParams.ts +2 -10
  85. package/dist/templates/next-app/src/server/port/DBBridgeInterface.ts +5 -0
  86. package/dist/templates/next-app/src/server/port/DBTableInterface.ts +2 -0
  87. package/dist/templates/next-app/src/server/port/LocalesRepositoryInterface.ts +43 -0
  88. package/dist/templates/next-app/src/server/repositorys/LocalesRepository.ts +197 -0
  89. package/dist/templates/next-app/src/server/services/ApiLocaleService.ts +122 -0
  90. package/dist/templates/next-app/src/server/sqlBridges/SupabaseBridge.ts +60 -11
  91. package/dist/templates/next-app/src/server/validators/ExtendedExecutorError.ts +6 -0
  92. package/dist/templates/next-app/src/server/validators/LocalesValidator.ts +131 -0
  93. package/dist/templates/next-app/src/server/validators/LoginValidator.ts +2 -5
  94. package/dist/templates/next-app/src/server/validators/PaginationValidator.ts +32 -16
  95. package/dist/templates/next-app/src/styles/css/antd-themes/pagination/_default.css +2 -1
  96. package/dist/templates/next-app/src/styles/css/antd-themes/pagination/dark.css +28 -29
  97. package/dist/templates/next-app/src/styles/css/antd-themes/pagination/pink.css +2 -1
  98. package/dist/templates/next-app/src/uikit/components/AdminLayout.tsx +17 -3
  99. package/dist/templates/next-app/src/uikit/components/BaseHeader.tsx +5 -4
  100. package/dist/templates/next-app/src/uikit/components/BaseLayout.tsx +5 -4
  101. package/dist/templates/next-app/src/uikit/components/BootstrapsProvider.tsx +3 -2
  102. package/dist/templates/next-app/src/uikit/components/ComboProvider.tsx +1 -1
  103. package/dist/templates/next-app/src/uikit/components/EditableCell.tsx +118 -0
  104. package/dist/templates/next-app/src/uikit/components/LogoutButton.tsx +5 -6
  105. package/dist/templates/next-app/src/uikit/components/ThemeSwitcher.tsx +1 -1
  106. package/dist/templates/next-app/src/uikit/components/With.tsx +2 -2
  107. package/dist/templates/next-app/src/uikit/components/localesImportButton/LocalesImportButton.tsx +62 -0
  108. package/dist/templates/next-app/src/uikit/components/localesImportButton/LocalesImportEvent.ts +28 -0
  109. package/dist/templates/next-app/src/uikit/components/localesImportButton/import.module.css +6 -0
  110. package/dist/templates/next-app/src/uikit/hook/useI18nInterface.ts +8 -14
  111. package/dist/templates/next-app/src/uikit/hook/useWarnTranslations.ts +25 -0
  112. package/dist/templates/react-app/.prettierignore +17 -0
  113. package/dist/templates/react-app/README.en.md +71 -54
  114. package/dist/templates/react-app/README.md +35 -18
  115. package/dist/templates/react-app/__tests__/__mocks__/BootstrapTest.ts +14 -0
  116. package/dist/templates/react-app/__tests__/__mocks__/MockAppConfit.ts +1 -1
  117. package/dist/templates/react-app/__tests__/__mocks__/MockDialogHandler.ts +2 -2
  118. package/dist/templates/react-app/__tests__/__mocks__/MockLogger.ts +1 -1
  119. package/dist/templates/react-app/__tests__/__mocks__/components/TestApp.tsx +45 -0
  120. package/dist/templates/react-app/__tests__/__mocks__/components/TestBootstrapsProvider.tsx +34 -0
  121. package/dist/templates/react-app/__tests__/__mocks__/components/TestRouter.tsx +46 -0
  122. package/dist/templates/react-app/__tests__/__mocks__/components/index.ts +12 -0
  123. package/dist/templates/react-app/__tests__/__mocks__/createMockGlobals.ts +1 -2
  124. package/dist/templates/react-app/__tests__/__mocks__/testIOC/TestIOC.ts +51 -0
  125. package/dist/templates/react-app/__tests__/__mocks__/testIOC/TestIOCRegister.ts +69 -0
  126. package/dist/templates/react-app/__tests__/setup/index.ts +1 -51
  127. package/dist/templates/react-app/__tests__/setup/setupGlobal.ts +51 -0
  128. package/dist/templates/react-app/__tests__/src/App.structure.test.tsx +115 -0
  129. package/dist/templates/react-app/__tests__/src/base/cases/AppConfig.test.ts +2 -2
  130. package/dist/templates/react-app/__tests__/src/base/cases/AppError.test.ts +1 -1
  131. package/dist/templates/react-app/__tests__/src/base/cases/DialogHandler.test.ts +3 -5
  132. package/dist/templates/react-app/__tests__/src/base/cases/I18nKeyErrorPlugin.test.ts +13 -2
  133. package/dist/templates/react-app/__tests__/src/base/cases/InversifyContainer.test.ts +1 -1
  134. package/dist/templates/react-app/__tests__/src/base/cases/PublicAssetsPath.test.ts +1 -1
  135. package/dist/templates/react-app/__tests__/src/base/cases/RequestLogger.test.ts +5 -5
  136. package/dist/templates/react-app/__tests__/src/base/cases/RequestStatusCatcher.test.ts +1 -2
  137. package/dist/templates/react-app/__tests__/src/base/cases/RouterLoader.test.ts +25 -15
  138. package/dist/templates/react-app/__tests__/src/base/services/I18nService.test.ts +29 -15
  139. package/dist/templates/react-app/__tests__/src/core/IOC.test.ts +19 -9
  140. package/dist/templates/react-app/__tests__/src/core/bootstraps/BootstrapClient.test.ts +153 -0
  141. package/dist/templates/react-app/__tests__/src/core/bootstraps/BootstrapsApp.test.ts +9 -7
  142. package/dist/templates/react-app/__tests__/src/main.integration.test.tsx +4 -5
  143. package/dist/templates/react-app/__tests__/src/main.test.tsx +4 -4
  144. package/dist/templates/react-app/__tests__/src/uikit/components/BaseHeader.test.tsx +68 -59
  145. package/dist/templates/react-app/config/IOCIdentifier.ts +8 -8
  146. package/dist/templates/react-app/config/Identifier/{common.error.ts → common/common.error.ts} +5 -5
  147. package/dist/templates/react-app/config/Identifier/{common.ts → common/common.ts} +9 -9
  148. package/dist/templates/react-app/config/Identifier/common/index.ts +2 -0
  149. package/dist/templates/react-app/config/Identifier/index.ts +1 -9
  150. package/dist/templates/react-app/config/Identifier/pages/index.ts +8 -0
  151. package/dist/templates/react-app/config/Identifier/{page.about.ts → pages/page.about.ts} +34 -26
  152. package/dist/templates/react-app/config/Identifier/{page.executor.ts → pages/page.executor.ts} +47 -39
  153. package/dist/templates/{next-app/config/Identifier → react-app/config/Identifier/pages}/page.home.ts +24 -23
  154. package/dist/templates/react-app/config/Identifier/pages/page.identifiter.ts +102 -0
  155. package/dist/templates/react-app/config/Identifier/{page.jsonStorage.ts → pages/page.jsonStorage.ts} +18 -11
  156. package/dist/templates/react-app/config/Identifier/{page.login.ts → pages/page.login.ts} +37 -27
  157. package/dist/templates/react-app/config/Identifier/{page.register.ts → pages/page.register.ts} +37 -25
  158. package/dist/templates/react-app/config/Identifier/{page.request.ts → pages/page.request.ts} +34 -44
  159. package/dist/templates/react-app/config/app.router.ts +66 -69
  160. package/dist/templates/react-app/config/i18n/PageI18nInterface.ts +51 -0
  161. package/dist/templates/react-app/config/i18n/aboutI18n.ts +42 -0
  162. package/dist/templates/react-app/config/i18n/executorI18n.ts +51 -0
  163. package/dist/templates/react-app/config/i18n/homeI18n.ts +24 -0
  164. package/dist/templates/react-app/config/i18n/i18nConfig.ts +30 -0
  165. package/dist/templates/react-app/config/i18n/identifiter18n.ts +30 -0
  166. package/dist/templates/react-app/config/i18n/jsonStorage18n.ts +27 -0
  167. package/dist/templates/react-app/config/i18n/login18n.ts +42 -0
  168. package/dist/templates/react-app/config/i18n/notFoundI18n.ts +34 -0
  169. package/dist/templates/react-app/config/i18n/register18n.ts +40 -0
  170. package/dist/templates/react-app/config/i18n/request18n.ts +41 -0
  171. package/dist/templates/react-app/config/theme.ts +14 -4
  172. package/dist/templates/react-app/docs/en/bootstrap.md +1670 -341
  173. package/dist/templates/react-app/docs/en/development-guide.md +1021 -345
  174. package/dist/templates/react-app/docs/en/env.md +1132 -278
  175. package/dist/templates/react-app/docs/en/i18n.md +858 -147
  176. package/dist/templates/react-app/docs/en/index.md +733 -104
  177. package/dist/templates/react-app/docs/en/ioc.md +1228 -287
  178. package/dist/templates/react-app/docs/en/playwright/e2e-tests.md +321 -0
  179. package/dist/templates/react-app/docs/en/playwright/index.md +19 -0
  180. package/dist/templates/react-app/docs/en/playwright/installation-summary.md +332 -0
  181. package/dist/templates/react-app/docs/en/playwright/overview.md +222 -0
  182. package/dist/templates/react-app/docs/en/playwright/quickstart.md +325 -0
  183. package/dist/templates/react-app/docs/en/playwright/reorganization-notes.md +340 -0
  184. package/dist/templates/react-app/docs/en/playwright/setup-complete.md +290 -0
  185. package/dist/templates/react-app/docs/en/playwright/testing-guide.md +565 -0
  186. package/dist/templates/react-app/docs/en/store.md +1194 -184
  187. package/dist/templates/react-app/docs/en/why-no-globals.md +797 -0
  188. package/dist/templates/react-app/docs/zh/bootstrap.md +1670 -341
  189. package/dist/templates/react-app/docs/zh/development-guide.md +1021 -345
  190. package/dist/templates/react-app/docs/zh/env.md +1132 -275
  191. package/dist/templates/react-app/docs/zh/i18n.md +858 -147
  192. package/dist/templates/react-app/docs/zh/index.md +717 -104
  193. package/dist/templates/react-app/docs/zh/ioc.md +1229 -287
  194. package/dist/templates/react-app/docs/zh/playwright/e2e-tests.md +321 -0
  195. package/dist/templates/react-app/docs/zh/playwright/index.md +19 -0
  196. package/dist/templates/react-app/docs/zh/playwright/installation-summary.md +332 -0
  197. package/dist/templates/react-app/docs/zh/playwright/overview.md +222 -0
  198. package/dist/templates/react-app/docs/zh/playwright/quickstart.md +325 -0
  199. package/dist/templates/react-app/docs/zh/playwright/reorganization-notes.md +340 -0
  200. package/dist/templates/react-app/docs/zh/playwright/setup-complete.md +290 -0
  201. package/dist/templates/react-app/docs/zh/playwright/testing-guide.md +565 -0
  202. package/dist/templates/react-app/docs/zh/store.md +1192 -184
  203. package/dist/templates/react-app/docs/zh/why-no-globals.md +797 -0
  204. package/dist/templates/react-app/e2e/App.spec.ts +319 -0
  205. package/dist/templates/react-app/e2e/fixtures/base.fixture.ts +40 -0
  206. package/dist/templates/react-app/e2e/main.spec.ts +20 -0
  207. package/dist/templates/react-app/e2e/utils/test-helpers.ts +19 -0
  208. package/dist/templates/react-app/eslint.config.mjs +247 -0
  209. package/dist/templates/react-app/makes/eslint-utils.mjs +195 -0
  210. package/dist/templates/react-app/makes/generateTs2LocalesOptions.ts +26 -0
  211. package/dist/templates/react-app/package.json +31 -3
  212. package/dist/templates/react-app/playwright.config.ts +79 -0
  213. package/dist/templates/react-app/public/locales/en/common.json +190 -179
  214. package/dist/templates/react-app/public/locales/zh/common.json +190 -179
  215. package/dist/templates/react-app/src/App.tsx +15 -42
  216. package/dist/templates/react-app/src/base/apis/AiApi.ts +5 -5
  217. package/dist/templates/react-app/src/base/apis/feApi/FeApi.ts +1 -1
  218. package/dist/templates/react-app/src/base/apis/feApi/FeApiAdapter.ts +1 -1
  219. package/dist/templates/react-app/src/base/apis/feApi/FeApiBootstarp.ts +8 -8
  220. package/dist/templates/react-app/src/base/apis/feApi/FeApiType.ts +1 -1
  221. package/dist/templates/react-app/src/base/apis/userApi/UserApi.ts +6 -6
  222. package/dist/templates/react-app/src/base/apis/userApi/UserApiAdapter.ts +1 -1
  223. package/dist/templates/react-app/src/base/apis/userApi/UserApiBootstarp.ts +12 -14
  224. package/dist/templates/react-app/src/base/apis/userApi/UserApiType.ts +1 -1
  225. package/dist/templates/react-app/src/base/cases/DialogHandler.ts +5 -2
  226. package/dist/templates/react-app/src/base/cases/I18nKeyErrorPlugin.ts +3 -3
  227. package/dist/templates/react-app/src/base/cases/InversifyContainer.ts +3 -3
  228. package/dist/templates/react-app/src/base/cases/RequestLanguages.ts +2 -2
  229. package/dist/templates/react-app/src/base/cases/RequestLogger.ts +4 -4
  230. package/dist/templates/react-app/src/base/cases/RequestStatusCatcher.ts +1 -1
  231. package/dist/templates/react-app/src/base/cases/ResourceState.ts +23 -0
  232. package/dist/templates/react-app/src/base/cases/RouterLoader.ts +4 -4
  233. package/dist/templates/react-app/src/base/cases/TranslateI18nInterface.ts +26 -0
  234. package/dist/templates/react-app/src/base/port/ExecutorPageBridgeInterface.ts +2 -3
  235. package/dist/templates/react-app/src/base/port/I18nServiceInterface.ts +1 -1
  236. package/dist/templates/react-app/src/base/port/IOCInterface.ts +36 -0
  237. package/dist/templates/react-app/src/base/port/JSONStoragePageBridgeInterface.ts +2 -1
  238. package/dist/templates/react-app/src/base/port/ProcesserExecutorInterface.ts +1 -1
  239. package/dist/templates/react-app/src/base/port/RequestPageBridgeInterface.ts +2 -2
  240. package/dist/templates/react-app/src/base/port/RouteServiceInterface.ts +9 -5
  241. package/dist/templates/react-app/src/base/port/UserServiceInterface.ts +1 -1
  242. package/dist/templates/react-app/src/base/services/I18nService.ts +29 -29
  243. package/dist/templates/react-app/src/base/services/IdentifierService.ts +143 -0
  244. package/dist/templates/react-app/src/base/services/ProcesserExecutor.ts +3 -3
  245. package/dist/templates/react-app/src/base/services/RouteService.ts +27 -8
  246. package/dist/templates/react-app/src/base/services/UserService.ts +8 -8
  247. package/dist/templates/react-app/src/base/types/Page.ts +14 -2
  248. package/dist/templates/react-app/src/base/types/global.d.ts +1 -1
  249. package/dist/templates/react-app/src/core/IOC.ts +5 -46
  250. package/dist/templates/react-app/src/core/bootstraps/{BootstrapApp.ts → BootstrapClient.ts} +44 -17
  251. package/dist/templates/react-app/src/core/bootstraps/BootstrapsRegistry.ts +14 -7
  252. package/dist/templates/react-app/src/core/bootstraps/IocIdentifierTest.ts +1 -1
  253. package/dist/templates/react-app/src/core/bootstraps/PrintBootstrap.ts +1 -1
  254. package/dist/templates/react-app/src/core/clientIoc/ClientIOC.ts +40 -0
  255. package/dist/templates/react-app/src/core/{IocRegisterImpl.ts → clientIoc/ClientIOCRegister.ts} +35 -24
  256. package/dist/templates/react-app/src/core/globals.ts +9 -9
  257. package/dist/templates/react-app/src/main.tsx +4 -4
  258. package/dist/templates/react-app/src/pages/404.tsx +6 -3
  259. package/dist/templates/react-app/src/pages/500.tsx +5 -2
  260. package/dist/templates/react-app/src/pages/NoRouteFound.tsx +5 -0
  261. package/dist/templates/react-app/src/pages/auth/Layout.tsx +9 -6
  262. package/dist/templates/react-app/src/pages/auth/LoginPage.tsx +46 -56
  263. package/dist/templates/react-app/src/pages/auth/RegisterPage.tsx +46 -58
  264. package/dist/templates/react-app/src/pages/base/AboutPage.tsx +35 -40
  265. package/dist/templates/react-app/src/pages/base/ExecutorPage.tsx +51 -51
  266. package/dist/templates/react-app/src/pages/base/HomePage.tsx +14 -15
  267. package/dist/templates/react-app/src/pages/base/IdentifierPage.tsx +70 -11
  268. package/dist/templates/react-app/src/pages/base/JSONStoragePage.tsx +24 -25
  269. package/dist/templates/react-app/src/pages/base/Layout.tsx +2 -2
  270. package/dist/templates/react-app/src/pages/base/RedirectPathname.tsx +3 -2
  271. package/dist/templates/react-app/src/pages/base/RequestPage.tsx +41 -59
  272. package/dist/templates/react-app/src/styles/css/antd-themes/{_default.css → _common/_default.css} +85 -0
  273. package/dist/templates/react-app/src/styles/css/antd-themes/{dark.css → _common/dark.css} +99 -0
  274. package/dist/templates/react-app/src/styles/css/antd-themes/_common/index.css +3 -0
  275. package/dist/templates/react-app/src/styles/css/antd-themes/{pink.css → _common/pink.css} +86 -0
  276. package/dist/templates/react-app/src/styles/css/antd-themes/index.css +4 -3
  277. package/dist/templates/react-app/src/styles/css/antd-themes/menu/_default.css +108 -0
  278. package/dist/templates/react-app/src/styles/css/antd-themes/menu/dark.css +67 -0
  279. package/dist/templates/react-app/src/styles/css/antd-themes/menu/index.css +3 -0
  280. package/dist/templates/react-app/src/styles/css/antd-themes/menu/pink.css +67 -0
  281. package/dist/templates/react-app/src/styles/css/antd-themes/pagination/_default.css +34 -0
  282. package/dist/templates/react-app/src/styles/css/antd-themes/pagination/dark.css +31 -0
  283. package/dist/templates/react-app/src/styles/css/antd-themes/pagination/index.css +3 -0
  284. package/dist/templates/react-app/src/styles/css/antd-themes/pagination/pink.css +36 -0
  285. package/dist/templates/react-app/src/styles/css/antd-themes/table/_default.css +44 -0
  286. package/dist/templates/react-app/src/styles/css/antd-themes/table/dark.css +43 -0
  287. package/dist/templates/react-app/src/styles/css/antd-themes/table/index.css +3 -0
  288. package/dist/templates/react-app/src/styles/css/antd-themes/table/pink.css +43 -0
  289. package/dist/templates/react-app/src/styles/css/page.css +4 -3
  290. package/dist/templates/react-app/src/styles/css/themes/_default.css +1 -0
  291. package/dist/templates/react-app/src/styles/css/themes/dark.css +1 -0
  292. package/dist/templates/react-app/src/styles/css/themes/pink.css +1 -0
  293. package/dist/templates/react-app/src/styles/css/zIndex.css +1 -1
  294. package/dist/templates/react-app/src/uikit/bridges/ExecutorPageBridge.ts +3 -3
  295. package/dist/templates/react-app/src/uikit/bridges/JSONStoragePageBridge.ts +2 -2
  296. package/dist/templates/react-app/src/uikit/bridges/NavigateBridge.ts +1 -1
  297. package/dist/templates/react-app/src/uikit/bridges/RequestPageBridge.ts +3 -3
  298. package/dist/templates/react-app/src/uikit/components/AppRouterProvider.tsx +35 -0
  299. package/dist/templates/react-app/src/uikit/components/BaseHeader.tsx +15 -11
  300. package/dist/templates/react-app/src/uikit/components/BaseRouteProvider.tsx +14 -11
  301. package/dist/templates/react-app/src/uikit/components/BaseRouteSeo.tsx +18 -0
  302. package/dist/templates/react-app/src/uikit/components/BootstrapsProvider.tsx +13 -0
  303. package/dist/templates/react-app/src/uikit/components/ClientSeo.tsx +62 -0
  304. package/dist/templates/react-app/src/uikit/components/ComboProvider.tsx +38 -0
  305. package/dist/templates/react-app/src/uikit/components/LanguageSwitcher.tsx +48 -27
  306. package/dist/templates/react-app/src/uikit/components/Loading.tsx +4 -2
  307. package/dist/templates/react-app/src/uikit/components/LocaleLink.tsx +4 -5
  308. package/dist/templates/react-app/src/uikit/components/LogoutButton.tsx +34 -11
  309. package/dist/templates/react-app/src/uikit/components/ProcessExecutorProvider.tsx +9 -5
  310. package/dist/templates/react-app/src/uikit/components/RouterRenderComponent.tsx +6 -3
  311. package/dist/templates/react-app/src/uikit/components/ThemeSwitcher.tsx +97 -40
  312. package/dist/templates/react-app/src/uikit/components/UserAuthProvider.tsx +5 -5
  313. package/dist/templates/react-app/src/uikit/components/With.tsx +17 -0
  314. package/dist/templates/react-app/src/uikit/contexts/BaseRouteContext.ts +17 -11
  315. package/dist/templates/react-app/src/uikit/contexts/IOCContext.ts +13 -0
  316. package/dist/templates/react-app/src/uikit/hooks/useAppTranslation.ts +26 -0
  317. package/dist/templates/react-app/src/uikit/hooks/useI18nGuard.ts +8 -11
  318. package/dist/templates/react-app/src/uikit/hooks/useI18nInterface.ts +25 -0
  319. package/dist/templates/react-app/src/uikit/hooks/useIOC.ts +35 -0
  320. package/dist/templates/react-app/src/uikit/hooks/useNavigateBridge.ts +3 -3
  321. package/dist/templates/react-app/src/uikit/hooks/useStrictEffect.ts +0 -1
  322. package/dist/templates/react-app/tsconfig.e2e.json +21 -0
  323. package/dist/templates/react-app/tsconfig.json +8 -1
  324. package/dist/templates/react-app/tsconfig.node.json +1 -1
  325. package/dist/templates/react-app/tsconfig.test.json +3 -1
  326. package/dist/templates/react-app/vite.config.ts +50 -34
  327. package/package.json +2 -1
  328. package/dist/configs/react-app/eslint.config.js +0 -94
  329. package/dist/templates/next-app/config/Identifier/common.error.ts +0 -41
  330. package/dist/templates/next-app/config/Identifier/common.ts +0 -69
  331. package/dist/templates/next-app/config/Identifier/page.about.ts +0 -181
  332. package/dist/templates/next-app/config/Identifier/page.admin.ts +0 -48
  333. package/dist/templates/next-app/config/Identifier/page.executor.ts +0 -272
  334. package/dist/templates/next-app/config/Identifier/page.identifiter.ts +0 -39
  335. package/dist/templates/next-app/config/Identifier/page.jsonStorage.ts +0 -72
  336. package/dist/templates/next-app/config/Identifier/page.request.ts +0 -182
  337. package/dist/templates/next-app/docs/env.md +0 -94
  338. package/dist/templates/next-app/src/base/cases/ChatAction.ts +0 -21
  339. package/dist/templates/next-app/src/base/cases/FocusBarAction.ts +0 -36
  340. package/dist/templates/next-app/src/base/cases/RequestState.ts +0 -20
  341. package/dist/templates/next-app/src/base/port/AdminPageInterface.ts +0 -85
  342. package/dist/templates/next-app/src/base/port/AsyncStateInterface.ts +0 -7
  343. package/dist/templates/next-app/src/base/services/AdminUserService.ts +0 -45
  344. package/dist/templates/next-app/src/uikit/components/ChatRoot.tsx +0 -17
  345. package/dist/templates/next-app/src/uikit/components/chat/ChatActionInterface.ts +0 -30
  346. package/dist/templates/next-app/src/uikit/components/chat/ChatFocusBar.tsx +0 -65
  347. package/dist/templates/next-app/src/uikit/components/chat/ChatMessages.tsx +0 -59
  348. package/dist/templates/next-app/src/uikit/components/chat/ChatWrap.tsx +0 -28
  349. package/dist/templates/next-app/src/uikit/components/chat/FocusBarActionInterface.ts +0 -19
  350. package/dist/templates/next-app/src/uikit/hook/useMountedClient.ts +0 -17
  351. package/dist/templates/next-app/src/uikit/hook/useStore.ts +0 -15
  352. package/dist/templates/react-app/__tests__/__mocks__/I18nService.ts +0 -13
  353. package/dist/templates/react-app/__tests__/src/App.test.tsx +0 -139
  354. package/dist/templates/react-app/config/Identifier/page.identifiter.ts +0 -39
  355. package/dist/templates/react-app/config/i18n.ts +0 -15
  356. package/dist/templates/react-app/docs/en/project-structure.md +0 -434
  357. package/dist/templates/react-app/docs/zh/project-structure.md +0 -434
  358. package/dist/templates/react-app/src/base/cases/RequestState.ts +0 -20
  359. package/dist/templates/react-app/src/base/port/AsyncStateInterface.ts +0 -7
  360. package/dist/templates/react-app/src/uikit/hooks/useDocumentTitle.ts +0 -15
  361. package/dist/templates/react-app/src/uikit/hooks/useStore.ts +0 -15
@@ -1,181 +1,192 @@
1
1
  {
2
- "header.theme.default": "默认主题",
3
- "header.theme.dark": "暗色主题",
4
- "header.theme.pink": "粉色主题",
5
- "auth.logout.dialog.title": "登出",
6
- "auth.logout.dialog.content": "确定要登出吗?",
7
- "page.404.title": "404 页面未找到",
8
- "page.404.description": "404 页面描述",
9
- "page.500.title": "500 页面错误",
10
- "page.500.description": "500 页面描述",
11
- "err.local.no.user.token": "本地未找到 user token",
12
- "err.global.no.window": "全局未找到 window",
13
- "err.within.page.provider": "必须在 PageProvider 中使用",
14
- "err.response.no.token": "响应内容没有 token 值",
15
- "err.not.found.component": "未找到组件",
16
- "page.about.title": "关于我们",
17
- "page.about.description": "了解更多关于我们的项目和团队信息",
18
- "about.message.test": "这是一条测试消息",
19
- "about.notification.title": "通知标题",
20
- "about.notification.description": "这是一条测试通知",
21
- "about.button.message": "显示 Message",
22
- "about.button.message2": "静态消息",
23
- "about.button.notification": "显示 Notification",
24
- "about.button.notification2": "静态通知",
25
- "about.tooltip.text": "这是一个提示文本",
26
- "about.button.tooltip": "悬停显示 Tooltip",
27
- "about.modal.title": "模态框示例",
28
- "about.modal.content": "这是一个模态框的内容",
29
- "about.button.modal": "显示 Modal",
30
- "about.drawer.title": "抽屉示例",
31
- "about.drawer.content": "这是一个抽屉的内容",
32
- "about.button.drawer": "显示 Drawer",
33
- "about.popover.content": "这是一个气泡卡片",
34
- "about.popover.title": "Popover 标题",
35
- "about.button.popover": "显示 Popover",
36
- "about.popconfirm.title": "确认提示",
37
- "about.popconfirm.description": "您确定要执行此操作吗?",
38
- "about.button.popconfirm": "显示 Popconfirm",
39
- "about.alert.message": "这是一个警告提示",
40
- "about.ok.text": "确定",
41
- "about.cancel.text": "取消",
42
- "page.executor.title": "执行器示例",
43
- "page.executor.description": "一个强大的任务执行器,支持多种任务类型和状态管理",
44
- "page.error_identifier.title": "错误标识符",
45
- "page.executor.main_title": "执行器",
46
- "page.executor.test_plugin.title": "测试插件",
47
- "page.executor.task.status.pending": "等待中",
48
- "page.executor.task.status.running": "运行中",
49
- "page.executor.task.status.completed": "已完成",
50
- "page.executor.task.status.failed": "失败",
51
- "page.executor.task.type.data_sync": "数据同步",
52
- "page.executor.task.type.report": "报告生成",
53
- "page.executor.task.type.maintenance": "系统维护",
54
- "page.executor.task.type.backup": "数据备份",
55
- "page.executor.task.duration.unit": "分钟",
56
- "page.executor.task.start": "开始",
57
- "page.executor.task.stop": "停止",
58
- "page.executor.task.success": "任务 %{name} 执行成功",
59
- "page.executor.task.failure": "任务 %{name} 执行失败",
60
- "page.executor.plugin.test.success": "插件测试成功",
61
- "page.executor.plugin.test.failure": "插件测试失败",
62
- "page.executor.custom_task.url_required": "请输入URL",
63
- "page.executor.custom_task.name": "自定义任务 %{method} %{url}",
64
- "page.executor.create_task.title": "创建自定义任务",
65
- "page.executor.create_button": "创建",
66
- "page.executor.enter_url": "输入URL",
67
- "page.executor.task_list.title": "任务列表",
68
- "page.executor.task_stats.total": "总任务数",
69
- "page.executor.task_stats.running": "运行中",
70
- "page.executor.task_stats.completed": "已完成",
71
- "page.executor.task_stats.failed": "失败",
72
- "page.executor.task_history.title": "执行历史",
73
- "page.executor.help.title": "需要帮助?",
74
- "page.executor.help.description": "遇到问题?查看我们的任务执行指南或联系支持团队",
75
- "page.executor.view_guide": "查看指南",
76
- "page.executor.contact_support": "联系支持",
77
- "page.executor.request.timeout": "请求超时时间",
78
- "page.home.title": "首页",
79
- "page.home.description": "一个现代前端实用库集合,提供各种实用工具和组件",
80
- "home.welcome": "欢迎来到主页",
81
- "home.description": "一个现代前端实用库集合,提供各种实用工具和组件",
82
- "page.error.identifier.description": "错误标识符的使用和示例",
83
- "home.explore": "探索",
84
- "home.get_started.title": "准备开始使用?",
85
- "home.get_started.description": "加入我们,探索实用工具的力量",
86
- "home.get_started.button": "立即开始",
87
- "page.error.identifier.main_title": "错误标识符",
88
- "page.error.identifier.source_description": "来自 '@config/Identifier/error' 的标识符",
89
- "page.error.identifier.help.title": "需要帮助?",
90
- "page.error.identifier.help.description": "如果您在使用错误标识符时遇到问题,请联系我们的支持团队",
91
- "page.error.identifier.contact_support": "联系支持",
92
- "page.jsonstorage.title": "JSONStorage 页面",
93
- "page.jsonstorage.description": "使用 JSONStorage 进行数据存储和管理",
94
- "page.jsonstorage.main_title": "JSONStorage 演示",
95
- "page.jsonstorage.permanent_title": "永久存储测试",
96
- "page.jsonstorage.expire_title": "过期时间测试",
97
- "page.jsonstorage.timeout_title": "请求超时时间设置",
98
- "page.jsonstorage.format_title": "测试 key: ${key}, 随机值范围: ${min}~${max}",
99
- "page.jsonstorage.set_random": "设置随机值",
100
- "page.jsonstorage.current_value": "当前值",
101
- "page.jsonstorage.set_expire": "设置随机值(带过期时间)",
102
- "page.jsonstorage.ms": "毫秒",
103
- "page.login.title": "登录",
104
- "page.login.description": "登录页面描述",
105
- "login.title": "登录",
106
- "login.email": "邮箱",
107
- "login.username": "用户名",
108
- "login.password": "密码",
109
- "login.login": "登录",
110
- "login.welcome": "欢迎来到未来学习",
111
- "login.subtitle": "解锁个性化 AI 驱动的学习体验,加速您的知识旅程。",
112
- "login.forgot_password": "忘记密码?",
113
- "login.continue_with": "或继续使用",
114
- "login.with_google": "使用 Google 登录",
115
- "login.no_account": "还没有账号?",
116
- "login.create_account": "在此创建",
117
- "login.email_required": "请输入您的邮箱!",
118
- "login.password_required": "请输入您的密码!",
119
- "login.feature.ai_paths": "AI驱动的个性化学习路径",
120
- "login.feature.smart_recommendations": "智能内容推荐",
121
- "login.feature.progress_tracking": "实时进度追踪",
122
- "login.email.title": "输入邮箱",
123
- "login.password.title": "输入密码",
124
- "login.forgot_password.title": "重置密码",
125
- "login.button.title": "登录账号",
126
- "login.with_google.title": "使用Google账号登录",
127
- "login.create_account.title": "创建新账号",
128
- "page.register.title": "创建账号",
129
- "page.register.description": "创建账号页面描述",
130
- "register.title": "创建账号",
131
- "register.subtitle": "开始您的学习之旅",
132
- "register.username": "用户名",
133
- "register.username_required": "请输入用户名!",
134
- "register.email": "邮箱",
135
- "register.email_required": "请输入邮箱!",
136
- "register.password": "密码",
137
- "register.password_required": "请输入密码!",
138
- "register.confirm_password": "确认密码",
139
- "register.confirm_password_required": "请确认密码!",
140
- "register.password_mismatch": "两次输入的密码不匹配!",
141
- "register.button": "注册",
142
- "register.terms_prefix": "注册即表示您同意我们的",
143
- "register.terms_link": "服务条款",
144
- "register.terms_and": "",
145
- "register.privacy_link": "隐私政策",
146
- "register.have_account": "已有账号?",
147
- "register.login_link": "登录",
148
- "register.feature.personalized": "个性化学习体验",
149
- "register.feature.support": "专家支持和指导",
150
- "register.feature.community": "活跃的学习社区",
151
- "register.terms_required": "请同意服务条款和隐私政策",
152
- "page.request.title": "请求示例",
153
- "page.request.description": "展示各种请求示例和用法",
154
- "request.requestTimeout": "请求超时",
155
- "request.helloResult": "Hello 结果是",
156
- "request.helloError": "Hello 错误是",
157
- "request.ipInfoResult": "IpInfo 结果是",
158
- "request.ipInfo": "IpInfo",
159
- "request.randomUser": "随机用户",
160
- "request.loading": "加载中...",
161
- "request.randomUserResult": "随机用户 结果是",
162
- "request.randomUserError": "随机用户 错误是",
163
- "request.triggerAbortRequest": "触发中止请求",
164
- "request.stopAbortRequest": "停止中止请求",
165
- "request.abortRequestResult": "中止请求 结果是",
166
- "request.abortRequestError": "中止请求 错误是",
167
- "page.request.timeout": "请求超时时间",
168
- "page.request.hello.title": "AI API: Hello",
169
- "page.request.hello.description": "函数式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger 插件",
170
- "page.request.hello.button": "Hello",
171
- "page.request.ip_info.title": "FeApi: IP Information",
172
- "page.request.ip_info.description": "RequestScheduler 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin 插件, 其中 ApiPickDataPlugin 插件可以将返回类型统一扁平到 data 字段",
173
- "page.request.random_user.title": "UserApi: Random User",
174
- "page.request.random_user.description": "RequestTransaction 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin 插件, 其中 FetchAbortPlugin 可以中止请求, ApiCatchPlugin 可以将捕获的错误统一到 apiCatchResult 字段",
175
- "page.request.api_catch.title": "UserApi: Api Catch Result",
176
- "page.request.abort.title": "UserApi: Abort Request",
177
- "page.request.trigger_abort": "触发中止请求",
178
- "page.request.stop_abort": "停止中止请求",
179
- "page.request.trigger_api_catch": "触发 API 捕获结果",
180
- "page.request.stop_api_catch": "停止 API 捕获结果"
2
+ "common:no.user.token": "本地未找到 user token",
3
+ "common:global.no.window": "全局未找到 window",
4
+ "common:within.page.provider": "必须在 PageProvider 中使用",
5
+ "common:response.no.token": "响应内容没有 token 值",
6
+ "common:not.found.component": "未找到组件",
7
+ "common:theme.default": "默认主题",
8
+ "common:theme.dark": "暗色主题",
9
+ "common:theme.pink": "粉色主题",
10
+ "common:logout.dialog.title": "登出",
11
+ "common:logout.dialog.content": "确定要登出吗?",
12
+ "common:404.title": "404 页面未找到",
13
+ "common:404.description": "404 页面描述",
14
+ "common:500.title": "500 页面错误",
15
+ "common:500.description": "500 页面描述",
16
+ "page_about:title": "关于我们",
17
+ "page_about:description": "了解更多关于我们的项目和团队信息",
18
+ "page_about:keywords": "关于我们, 项目, 团队",
19
+ "page_about:message.test": "这是一条测试消息",
20
+ "page_about:notification.title": "通知标题",
21
+ "page_about:notification.description": "这是一条测试通知",
22
+ "page_about:button.message": "显示 Message",
23
+ "page_about:button.message2": "静态消息",
24
+ "page_about:button.notification": "显示 Notification",
25
+ "page_about:button.notification2": "静态通知",
26
+ "page_about:tooltip.text": "这是一个提示文本",
27
+ "page_about:button.tooltip": "悬停显示 Tooltip",
28
+ "page_about:modal.title": "模态框示例",
29
+ "page_about:modal.content": "这是一个模态框的内容",
30
+ "page_about:button.modal": "显示 Modal",
31
+ "page_about:drawer.title": "抽屉示例",
32
+ "page_about:drawer.content": "这是一个抽屉的内容",
33
+ "page_about:button.drawer": "显示 Drawer",
34
+ "page_about:popover.content": "这是一个气泡卡片",
35
+ "page_about:popover.title": "Popover 标题",
36
+ "page_about:button.popover": "显示 Popover",
37
+ "page_about:popconfirm.title": "确认提示",
38
+ "page_about:popconfirm.description": "您确定要执行此操作吗?",
39
+ "page_about:button.popconfirm": "显示 Popconfirm",
40
+ "page_about:alert.message": "这是一个警告提示",
41
+ "page_about:ok.text": "确定",
42
+ "page_about:cancel.text": "取消",
43
+ "page_executor:title": "执行器示例",
44
+ "page_executor:description": "一个强大的任务执行器,支持多种任务类型和状态管理",
45
+ "page_executor:keywords": "任务执行器, 任务类型, 任务状态",
46
+ "page_executor:main_title": "执行器",
47
+ "page_executor:test_plugin.title": "测试插件",
48
+ "page_executor:task.status.pending": "等待中",
49
+ "page_executor:task.status.running": "运行中",
50
+ "page_executor:task.status.completed": "已完成",
51
+ "page_executor:task.status.failed": "失败",
52
+ "page_executor:task.type.data_sync": "数据同步",
53
+ "page_executor:task.type.report": "报告生成",
54
+ "page_executor:task.type.maintenance": "系统维护",
55
+ "page_executor:task.type.backup": "数据备份",
56
+ "page_executor:task.duration.unit": "分钟",
57
+ "page_executor:task.start": "开始",
58
+ "page_executor:task.stop": "停止",
59
+ "page_executor:task.success": "任务 %{name} 执行成功",
60
+ "page_executor:task.failure": "任务 %{name} 执行失败",
61
+ "page_executor:plugin.test.success": "插件测试成功",
62
+ "page_executor:plugin.test.failure": "插件测试失败",
63
+ "page_executor:custom_task.url_required": "请输入URL",
64
+ "page_executor:custom_task.name": "自定义任务 %{method} %{url}",
65
+ "page_executor:create_task.title": "创建自定义任务",
66
+ "page_executor:create_button": "创建",
67
+ "page_executor:enter_url": "输入URL",
68
+ "page_executor:task_list.title": "任务列表",
69
+ "page_executor:task_stats.total": "总任务数",
70
+ "page_executor:task_stats.running": "运行中",
71
+ "page_executor:task_stats.completed": "已完成",
72
+ "page_executor:task_stats.failed": "失败",
73
+ "page_executor:task_history.title": "执行历史",
74
+ "page_executor:help.title": "需要帮助?",
75
+ "page_executor:help.description": "遇到问题?查看我们的任务执行指南或联系支持团队",
76
+ "page_executor:view_guide": "查看指南",
77
+ "page_executor:contact_support": "联系支持",
78
+ "page_executor:request.timeout": "请求超时时间",
79
+ "page_executor:error_identifier.title": "错误标识符",
80
+ "page_home:title": "首页",
81
+ "page_home:description": "一个现代前端实用库集合,提供各种实用工具和组件",
82
+ "page_home:keywords": "现代前端实用库, 实用工具, 组件",
83
+ "page_home:welcome": "欢迎来到主页",
84
+ "page_home:description2": "一个现代前端实用库集合,提供各种实用工具和组件",
85
+ "page_home:get_started": "准备开始使用?",
86
+ "page_home:get_started__description": "加入我们,探索实用工具的力量",
87
+ "page_home:get_started__button": "立即开始",
88
+ "page_home:explore": "探索",
89
+ "page_home:identifier.description": "错误标识符的使用和示例",
90
+ "page_identifier:title": "错误标识符",
91
+ "page_identifier:description": "标识符描述",
92
+ "page_identifier:keywords": "标识符, 错误标识符",
93
+ "page_identifier:source_description": "来自 '@config/Identifier/error' 的标识符",
94
+ "page_identifier:help.title": "需要帮助?",
95
+ "page_identifier:help.description": "如果您在使用错误标识符时遇到问题,请联系我们的支持团队",
96
+ "page_identifier:contact_support": "联系支持",
97
+ "page_identifier:table.title": "标识符表格标题",
98
+ "page_identifier:table.index": "标识符表格索引",
99
+ "page_identifier:table.description": "标识符表格描述",
100
+ "page_identifier:table.id": "标识符表格id",
101
+ "page_identifier:table.key": "标识符表格key",
102
+ "page_identifier:table.locale_value": "标识符表格locale value",
103
+ "page_identifier:table.label": "标识符表格label",
104
+ "page_jsonstorage:title": "JSONStorage 页面",
105
+ "page_jsonstorage:description": "使用 JSONStorage 进行数据存储和管理",
106
+ "page_jsonstorage:keywords": "JSONStorage, JSONStorage 页面",
107
+ "page_jsonstorage:main_title": "JSONStorage 演示",
108
+ "page_jsonstorage:permanent_title": "永久存储测试",
109
+ "page_jsonstorage:expire_title": "过期时间测试",
110
+ "page_jsonstorage:timeout_title": "请求超时时间设置",
111
+ "page_jsonstorage:format_title": "测试 key: ${key}, 随机值范围: ${min}~${max}",
112
+ "page_jsonstorage:set_random": "设置随机值",
113
+ "page_jsonstorage:current_value": "当前值",
114
+ "page_jsonstorage:set_expire": "设置随机值(带过期时间)",
115
+ "page_jsonstorage:ms": "毫秒",
116
+ "page_login:title": "登录",
117
+ "page_login:description": "登录页面描述",
118
+ "page_login:keywords": "Login, Login Page",
119
+ "page_login:email": "邮箱",
120
+ "page_login:username": "用户名",
121
+ "page_login:password": "密码",
122
+ "page_login:login": "登录",
123
+ "page_login:welcome": "欢迎来到未来学习",
124
+ "page_login:subtitle": "解锁个性化 AI 驱动的学习体验,加速您的知识旅程。",
125
+ "page_login:forgot_password": "忘记密码?",
126
+ "page_login:continue_with": "或继续使用",
127
+ "page_login:with_google": "使用 Google 登录",
128
+ "page_login:no_account": "还没有账号?",
129
+ "page_login:create_account": "在此创建",
130
+ "page_login:email_required": "请输入您的邮箱!",
131
+ "page_login:password_required": "请输入您的密码!",
132
+ "page_login:feature.ai_paths": "AI驱动的个性化学习路径",
133
+ "page_login:feature.smart_recommendations": "智能内容推荐",
134
+ "page_login:feature.progress_tracking": "实时进度追踪",
135
+ "page_login:email.title": "输入邮箱",
136
+ "page_login:password.title": "输入密码",
137
+ "page_login:forgot_password.title": "重置密码",
138
+ "page_login:button.title": "登录账号",
139
+ "page_login:with_google.title": "使用Google账号登录",
140
+ "page_login:create_account.title": "创建新账号",
141
+ "page_register:title": "创建账号",
142
+ "page_register:description": "创建账号页面描述",
143
+ "page_register:keywords": "Register, Register Page",
144
+ "page_register:subtitle": "开始您的学习之旅",
145
+ "page_register:username": "用户名",
146
+ "page_register:username_required": "请输入用户名!",
147
+ "page_register:email": "邮箱",
148
+ "page_register:email_required": "请输入邮箱!",
149
+ "page_register:password": "密码",
150
+ "page_register:password_required": "请输入密码!",
151
+ "page_register:confirm_password": "确认密码",
152
+ "page_register:confirm_password_required": "请确认密码!",
153
+ "page_register:password_mismatch": "两次输入的密码不匹配!",
154
+ "page_register:button": "注册",
155
+ "page_register:terms_prefix": "注册即表示您同意我们的",
156
+ "page_register:terms_link": "服务条款",
157
+ "page_register:terms_and": "",
158
+ "page_register:privacy_link": "隐私政策",
159
+ "page_register:have_account": "已有账号?",
160
+ "page_register:login_link": "登录",
161
+ "page_register:feature.personalized": "个性化学习体验",
162
+ "page_register:feature.support": "专家支持和指导",
163
+ "page_register:feature.community": "活跃的学习社区",
164
+ "page_register:terms_required": "请同意服务条款和隐私政策",
165
+ "page_request:title": "请求示例",
166
+ "page_request:description": "展示各种请求示例和用法",
167
+ "page_request:keywords": "请求示例, 请求用法",
168
+ "page_request:requestTimeout": "请求超时",
169
+ "page_request:helloResult": "Hello 结果是",
170
+ "page_request:helloError": "Hello 错误是",
171
+ "page_request:ipInfoResult": "IpInfo 结果是",
172
+ "page_request:ipInfo": "IpInfo",
173
+ "page_request:randomUser": "随机用户",
174
+ "page_request:loading": "加载中...",
175
+ "page_request:randomUserResult": "随机用户 结果是",
176
+ "page_request:randomUserError": "随机用户 错误是",
177
+ "page_request:abortRequestResult": "中止请求 结果是",
178
+ "page_request:abortRequestError": "中止请求 错误是",
179
+ "page_request:hello.title": "AI API: Hello",
180
+ "page_request:hello.description": "函数式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger 插件",
181
+ "page_request:hello.button": "Hello",
182
+ "page_request:ip_info.title": "FeApi: IP Information",
183
+ "page_request:ip_info.description": "RequestScheduler 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin 插件, 其中 ApiPickDataPlugin 插件可以将返回类型统一扁平到 data 字段",
184
+ "page_request:random_user.title": "UserApi: Random User",
185
+ "page_request:random_user.description": "RequestTransaction 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin 插件, 其中 FetchAbortPlugin 可以中止请求, ApiCatchPlugin 可以将捕获的错误统一到 apiCatchResult 字段",
186
+ "page_request:api_catch.title": "UserApi: Api Catch Result",
187
+ "page_request:abort.title": "UserApi: Abort Request",
188
+ "page_request:trigger_abort": "触发中止请求",
189
+ "page_request:stop_abort": "停止中止请求",
190
+ "page_request:trigger_api_catch": "触发 API 捕获结果",
191
+ "page_request:stop_api_catch": "停止 API 捕获结果"
181
192
  }
@@ -1,18 +1,16 @@
1
1
  import '@/styles/css/index.css';
2
- import { createBrowserRouter, RouterProvider } from 'react-router-dom';
3
- import { lazy, useMemo } from 'react';
4
- import { RouterRenderComponent } from './uikit/components/RouterRenderComponent';
5
- import { IOC } from './core/IOC';
6
- import { RouterLoader, type ComponentValue } from '@/base/cases/RouterLoader';
7
- import { AntdThemeProvider } from '@brain-toolkit/antd-theme-override/react';
8
- import { routerPrefix } from '@config/common';
9
- import { useStore } from './uikit/hooks/useStore';
10
- import { IOCIdentifier } from '@config/IOCIdentifier';
11
- import { logger } from './core/globals';
2
+ import { themeConfig } from '@config/theme';
3
+ import { lazy } from 'react';
4
+ import { AppRouterProvider } from './uikit/components/AppRouterProvider';
5
+ import { BootstrapsProvider } from './uikit/components/BootstrapsProvider';
6
+ import { ComboProvider } from './uikit/components/ComboProvider';
7
+ import type { ComponentValue } from './base/cases/RouterLoader';
12
8
 
13
- function getAllPages() {
9
+ const allPages = (function getAllPages() {
10
+ // !!! important, map to all pages in pages directory
14
11
  const modules = import.meta.glob('./pages/**/*.tsx');
15
12
  return Object.keys(modules).reduce((acc, path) => {
13
+ // !!! important, convert path to component name
16
14
  const componentName = path.replace(/^\.\/pages\/(.*)\.tsx$/, '$1');
17
15
  acc[componentName] = () =>
18
16
  lazy(
@@ -22,40 +20,15 @@ function getAllPages() {
22
20
  );
23
21
  return acc;
24
22
  }, {} as ComponentValue);
25
- }
26
-
27
- const routerLoader = new RouterLoader({
28
- componentMaps: getAllPages(),
29
- render: RouterRenderComponent,
30
- logger: logger
31
- });
23
+ })();
32
24
 
33
25
  function App() {
34
- const routes = useStore(
35
- IOC(IOCIdentifier.RouteServiceInterface),
36
- (state) => state.routes
37
- );
38
-
39
- const routerBase = useMemo(() => {
40
- const routeList = routes.map((route) => routerLoader.toRoute(route));
41
- const router = createBrowserRouter(routeList, {
42
- basename: routerPrefix
43
- });
44
- return router;
45
- }, [routes]);
46
-
47
26
  return (
48
- <AntdThemeProvider
49
- staticApi={IOC('AntdStaticApiInterface')}
50
- theme={{
51
- cssVar: {
52
- key: 'fe-theme',
53
- prefix: 'fe'
54
- }
55
- }}
56
- >
57
- <RouterProvider router={routerBase} />
58
- </AntdThemeProvider>
27
+ <BootstrapsProvider data-testid="App">
28
+ <ComboProvider themeConfig={themeConfig}>
29
+ <AppRouterProvider pages={allPages} />
30
+ </ComboProvider>
31
+ </BootstrapsProvider>
59
32
  );
60
33
  }
61
34
 
@@ -1,14 +1,14 @@
1
+ import { IOCIdentifier } from '@config/IOCIdentifier';
2
+ import {
3
+ type BootstrapExecutorPlugin,
4
+ RequestCommonPlugin
5
+ } from '@qlover/corekit-bridge';
1
6
  import {
2
7
  FetchURLPlugin,
3
8
  RequestAdapterFetch,
4
9
  RequestScheduler
5
10
  } from '@qlover/fe-corekit';
6
- import {
7
- type BootstrapExecutorPlugin,
8
- RequestCommonPlugin
9
- } from '@qlover/corekit-bridge';
10
11
  import { RequestLogger } from '../cases/RequestLogger';
11
- import { IOCIdentifier } from '@config/IOCIdentifier';
12
12
  import type { AppConfig } from '../cases/AppConfig';
13
13
 
14
14
  const apiApiAdapter = new RequestAdapterFetch({
@@ -1,8 +1,8 @@
1
1
  import { RequestAdapterFetch, RequestScheduler } from '@qlover/fe-corekit';
2
- import { FeApiGetIpInfo } from './FeApiType';
3
2
  import { inject, injectable } from 'inversify';
4
3
  import { FeApiAdapter } from './FeApiAdapter';
5
4
  import { FeApiConfig } from './FeApiBootstarp';
5
+ import { FeApiGetIpInfo } from './FeApiType';
6
6
 
7
7
  @injectable()
8
8
  export class FeApi extends RequestScheduler<FeApiConfig> {
@@ -1,7 +1,7 @@
1
- import type { AppConfig } from '@/base/cases/AppConfig';
2
1
  import { IOCIdentifier } from '@config/IOCIdentifier';
3
2
  import { RequestAdapterFetch } from '@qlover/fe-corekit';
4
3
  import { inject, injectable } from 'inversify';
4
+ import type { AppConfig } from '@/base/cases/AppConfig';
5
5
 
6
6
  @injectable()
7
7
  export class FeApiAdapter extends RequestAdapterFetch {
@@ -1,18 +1,18 @@
1
- import type {
2
- RequestAdapterConfig,
3
- RequestAdapterResponse,
4
- RequestTransactionInterface
5
- } from '@qlover/fe-corekit';
6
- import { FetchURLPlugin } from '@qlover/fe-corekit';
1
+ import { IOCIdentifier } from '@config/IOCIdentifier';
7
2
  import {
8
3
  type BootstrapContext,
9
4
  type BootstrapExecutorPlugin,
10
5
  type ApiMockPluginConfig,
11
6
  ApiPickDataPlugin
12
7
  } from '@qlover/corekit-bridge';
13
- import { FeApi } from './FeApi';
14
- import { IOCIdentifier } from '@config/IOCIdentifier';
8
+ import { FetchURLPlugin } from '@qlover/fe-corekit';
15
9
  import { RequestLogger } from '@/base/cases/RequestLogger';
10
+ import { FeApi } from './FeApi';
11
+ import type {
12
+ RequestAdapterConfig,
13
+ RequestAdapterResponse,
14
+ RequestTransactionInterface
15
+ } from '@qlover/fe-corekit';
16
16
 
17
17
  /**
18
18
  * FeApiConfig
@@ -1,4 +1,4 @@
1
- import { FeApiTransaction } from './FeApiBootstarp';
1
+ import type { FeApiTransaction } from './FeApiBootstarp';
2
2
 
3
3
  export type FeApiGetIpInfo = FeApiTransaction<
4
4
  undefined,
@@ -1,8 +1,14 @@
1
+ import { RES_NO_TOKEN } from '@config/Identifier';
1
2
  import {
2
3
  FetchAbortPlugin,
3
4
  RequestAdapterFetch,
4
5
  RequestTransaction
5
6
  } from '@qlover/fe-corekit';
7
+ import { inject, injectable } from 'inversify';
8
+ import { AppError } from '@/base/cases/AppError';
9
+ import { RegisterFormData } from '@/base/services/UserService';
10
+ import { UserApiAdapter } from './UserApiAdapter';
11
+ import { UserApiConfig } from './UserApiBootstarp';
6
12
  import {
7
13
  GetIpInfoTransaction,
8
14
  UserApiGetUserInfoTransaction,
@@ -10,17 +16,11 @@ import {
10
16
  UserApiTestApiCatchResultTransaction,
11
17
  UserInfo
12
18
  } from './UserApiType';
13
- import { inject, injectable } from 'inversify';
14
- import { UserApiAdapter } from './UserApiAdapter';
15
- import { UserApiConfig } from './UserApiBootstarp';
16
19
  import type {
17
20
  LoginResponseData,
18
21
  UserAuthApiInterface,
19
22
  UserAuthStoreInterface
20
23
  } from '@qlover/corekit-bridge';
21
- import { RegisterFormData } from '@/base/services/UserService';
22
- import { RES_NO_TOKEN } from '@config/Identifier';
23
- import { AppError } from '@/base/cases/AppError';
24
24
 
25
25
  /**
26
26
  * UserApi
@@ -1,7 +1,7 @@
1
- import type { AppConfig } from '@/base/cases/AppConfig';
2
1
  import { IOCIdentifier } from '@config/IOCIdentifier';
3
2
  import { RequestAdapterFetch } from '@qlover/fe-corekit';
4
3
  import { inject, injectable } from 'inversify';
4
+ import type { AppConfig } from '@/base/cases/AppConfig';
5
5
 
6
6
  @injectable()
7
7
  export class UserApiAdapter extends RequestAdapterFetch {