@origen-ui/admin-cli 2.0.2 → 3.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.
Files changed (888) hide show
  1. package/README.md +20 -9
  2. package/bin/contract-sync.mjs +112 -0
  3. package/bin/lib/errors.mjs +8 -0
  4. package/bin/lib/fs-json.mjs +18 -0
  5. package/bin/lib/hash.mjs +9 -0
  6. package/bin/og-admin.mjs +165 -35
  7. package/bin/sync-project.mjs +717 -0
  8. package/package.json +20 -17
  9. package/templates/current/clean/.agents/skills/admin-component-usage/SKILL.md +28 -0
  10. package/templates/current/clean/.agents/skills/admin-component-usage/references/component-directory.md +270 -0
  11. package/templates/current/clean/.agents/skills/build-admin-feature/SKILL.md +20 -0
  12. package/templates/current/clean/.agents/skills/build-admin-feature/references/component-selection.md +38 -0
  13. package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-form/SKILL.md +1 -1
  14. package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-form-table/SKILL.md +4 -3
  15. package/templates/current/clean/{.codex → .agents}/skills/use-og-search/SKILL.md +3 -3
  16. package/templates/current/clean/.agents/skills/use-og-table/SKILL.md +22 -0
  17. package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-upload/SKILL.md +6 -5
  18. package/templates/current/clean/.api-client-e2e.config.ts +13 -0
  19. package/templates/current/clean/.claude/rules/01-feature-architecture.md +10 -0
  20. package/templates/current/clean/.claude/rules/02-vue-typescript.md +10 -0
  21. package/templates/current/clean/.claude/rules/03-component-policy.md +31 -0
  22. package/templates/current/clean/.claude/rules/04-api-auth-router.md +10 -0
  23. package/templates/current/clean/.claude/rules/05-style.md +10 -0
  24. package/templates/current/clean/.claude/rules/06-quality.md +10 -0
  25. package/templates/current/clean/.claude/skills/admin-component-usage/SKILL.md +28 -0
  26. package/templates/current/clean/.claude/skills/admin-component-usage/references/component-directory.md +270 -0
  27. package/templates/current/clean/.claude/skills/build-admin-feature/SKILL.md +20 -0
  28. package/templates/current/clean/.claude/skills/build-admin-feature/references/component-selection.md +38 -0
  29. package/templates/current/clean/{.codex → .claude}/skills/use-og-form/SKILL.md +1 -1
  30. package/templates/current/clean/{.codex → .claude}/skills/use-og-form-table/SKILL.md +4 -3
  31. package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-search/SKILL.md +3 -3
  32. package/templates/current/clean/.claude/skills/use-og-table/SKILL.md +22 -0
  33. package/templates/current/clean/{.codex → .claude}/skills/use-og-upload/SKILL.md +6 -5
  34. package/templates/current/clean/.codebuddy/rules/01-feature-architecture.md +2 -2
  35. package/templates/current/clean/.codebuddy/rules/03-component-policy.md +4 -1
  36. package/templates/current/clean/.codebuddy/skills/admin-component-usage/SKILL.md +31 -0
  37. package/templates/current/clean/.codebuddy/skills/admin-component-usage/references/component-directory.md +270 -0
  38. package/templates/current/clean/.codebuddy/skills/build-admin-feature/SKILL.md +11 -5
  39. package/templates/current/clean/.codebuddy/skills/build-admin-feature/references/component-selection.md +38 -0
  40. package/templates/current/clean/.codebuddy/skills/use-og-form/SKILL.md +1 -1
  41. package/templates/current/clean/.codebuddy/skills/use-og-form-table/SKILL.md +4 -3
  42. package/templates/current/clean/.codebuddy/skills/use-og-search/SKILL.md +3 -3
  43. package/templates/current/clean/.codebuddy/skills/use-og-table/SKILL.md +16 -10
  44. package/templates/current/clean/.codebuddy/skills/use-og-upload/SKILL.md +6 -5
  45. package/templates/current/clean/.codex/AGENTS.md +55 -8
  46. package/templates/current/clean/.codex/rules/01-feature-architecture.md +2 -2
  47. package/templates/current/clean/.codex/rules/03-component-policy.md +4 -1
  48. package/templates/current/clean/.cursor/rules/.generated +5 -0
  49. package/templates/current/clean/.cursor/rules/01-feature-architecture.mdc +2 -2
  50. package/templates/current/clean/.cursor/rules/03-component-policy.mdc +4 -1
  51. package/templates/current/clean/.cursor/skills/admin-component-usage/SKILL.md +28 -0
  52. package/templates/current/clean/.cursor/skills/admin-component-usage/references/component-directory.md +270 -0
  53. package/templates/current/clean/.cursor/skills/build-admin-feature/SKILL.md +11 -5
  54. package/templates/current/clean/.cursor/skills/build-admin-feature/references/component-selection.md +38 -0
  55. package/templates/current/clean/.cursor/skills/use-og-form/SKILL.md +1 -1
  56. package/templates/current/clean/.cursor/skills/use-og-form-table/SKILL.md +4 -3
  57. package/templates/current/clean/.cursor/skills/use-og-search/SKILL.md +3 -3
  58. package/templates/current/clean/.cursor/skills/use-og-table/SKILL.md +16 -10
  59. package/templates/current/clean/.cursor/skills/use-og-upload/SKILL.md +6 -5
  60. package/templates/current/clean/{.env.example → .env.dev} +3 -2
  61. package/templates/current/clean/.env.mock +4 -0
  62. package/templates/current/clean/.env.production +5 -0
  63. package/templates/current/clean/.env.test +4 -0
  64. package/templates/current/clean/.prettierignore +17 -0
  65. package/templates/current/clean/.prettierrc +8 -0
  66. package/templates/current/clean/.qoder/rules/01-feature-architecture.md +3 -4
  67. package/templates/current/clean/.qoder/rules/02-vue-typescript.md +1 -2
  68. package/templates/current/clean/.qoder/rules/03-component-policy.md +5 -3
  69. package/templates/current/clean/.qoder/rules/04-api-auth-router.md +1 -2
  70. package/templates/current/clean/.qoder/rules/05-style.md +1 -2
  71. package/templates/current/clean/.qoder/rules/06-quality.md +1 -2
  72. package/templates/current/clean/.qoder/skills/admin-component-usage/SKILL.md +28 -0
  73. package/templates/current/clean/.qoder/skills/admin-component-usage/references/component-directory.md +270 -0
  74. package/templates/current/clean/.qoder/skills/build-admin-feature/SKILL.md +11 -5
  75. package/templates/current/clean/.qoder/skills/build-admin-feature/references/component-selection.md +38 -0
  76. package/templates/current/clean/.qoder/skills/use-og-form/SKILL.md +1 -1
  77. package/templates/current/clean/.qoder/skills/use-og-form-table/SKILL.md +4 -3
  78. package/templates/current/clean/.qoder/skills/use-og-search/SKILL.md +3 -3
  79. package/templates/current/clean/.qoder/skills/use-og-table/SKILL.md +16 -10
  80. package/templates/current/clean/.qoder/skills/use-og-upload/SKILL.md +6 -5
  81. package/templates/current/clean/.zcode/skills/admin-component-usage/SKILL.md +28 -0
  82. package/templates/current/clean/.zcode/skills/admin-component-usage/references/component-directory.md +270 -0
  83. package/templates/current/clean/.zcode/skills/build-admin-feature/SKILL.md +20 -0
  84. package/templates/current/clean/.zcode/skills/build-admin-feature/references/component-selection.md +38 -0
  85. package/templates/current/clean/.zcode/skills/style-og-origen-ui/SKILL.md +11 -0
  86. package/templates/current/clean/.zcode/skills/use-og-dialog/SKILL.md +12 -0
  87. package/templates/current/clean/.zcode/skills/use-og-editor/SKILL.md +25 -0
  88. package/templates/current/clean/.zcode/skills/use-og-form/SKILL.md +12 -0
  89. package/templates/current/clean/.zcode/skills/use-og-form-table/SKILL.md +26 -0
  90. package/templates/current/clean/.zcode/skills/use-og-http/SKILL.md +13 -0
  91. package/templates/current/clean/.zcode/skills/use-og-router-tabs/SKILL.md +11 -0
  92. package/templates/current/clean/.zcode/skills/use-og-search/SKILL.md +14 -0
  93. package/templates/current/clean/.zcode/skills/use-og-table/SKILL.md +22 -0
  94. package/templates/current/clean/.zcode/skills/use-og-upload/SKILL.md +26 -0
  95. package/templates/current/clean/AGENTS.md +55 -9
  96. package/templates/current/clean/CHANGELOG.md +107 -0
  97. package/templates/current/clean/CLAUDE.md +3 -0
  98. package/templates/current/clean/README.md +58 -88
  99. package/templates/current/clean/component-catalog.json +766 -348
  100. package/templates/current/clean/component-catalog.v2.json +2040 -0
  101. package/templates/current/clean/docs/components/dialog.md +405 -0
  102. package/templates/current/clean/docs/components/editor-viewer.md +87 -0
  103. package/templates/current/clean/docs/components/editor.md +275 -0
  104. package/templates/current/clean/docs/components/form-table.md +222 -0
  105. package/templates/current/clean/docs/components/form.md +750 -0
  106. package/templates/current/clean/docs/components/index.md +44 -0
  107. package/templates/current/clean/docs/components/router.md +452 -0
  108. package/templates/current/clean/docs/components/search.md +1205 -0
  109. package/templates/current/clean/docs/components/svg-icon.md +124 -0
  110. package/templates/current/clean/docs/components/table-local.md +176 -0
  111. package/templates/current/clean/docs/components/table-with-search.md +207 -0
  112. package/templates/current/clean/docs/components/table.md +813 -0
  113. package/templates/current/clean/docs/components/tabs.md +440 -0
  114. package/templates/current/clean/docs/components/upload.md +349 -0
  115. package/templates/current/clean/eslint.config.js +89 -0
  116. package/templates/current/clean/index.html +1 -1
  117. package/templates/current/clean/openapi.json +10048 -999
  118. package/templates/current/clean/package.json +45 -33
  119. package/templates/current/clean/playwright.config.ts +20 -6
  120. package/templates/current/clean/playwright.mock.config.ts +42 -0
  121. package/templates/current/clean/pnpm-workspace.yaml +19 -3
  122. package/templates/current/clean/recipes/remote-crud-dialog-form.vue +15 -13
  123. package/templates/current/clean/scaffold.lock.json +164 -4
  124. package/templates/current/clean/scripts/api-codegen.config.ts +35 -0
  125. package/templates/current/clean/scripts/api-codegen.ts +2015 -0
  126. package/templates/current/clean/scripts/api-templates/http-client.ejs +359 -0
  127. package/templates/current/clean/scripts/check-admin-scaffold.mjs +311 -17
  128. package/templates/current/clean/scripts/generate-api.ts +290 -85
  129. package/templates/current/clean/scripts/lib/admin-component-catalog.mjs +515 -0
  130. package/templates/current/clean/scripts/lib/repository-root.mjs +9 -0
  131. package/templates/current/clean/scripts/mock-api.ts +1356 -0
  132. package/templates/current/clean/scripts/remove-examples.mjs +9 -34
  133. package/templates/current/clean/src/App.vue +9 -18
  134. package/templates/current/clean/src/api/generated/data-contracts.ts +23 -265
  135. package/templates/current/clean/src/api/generated/http-client.ts +351 -180
  136. package/templates/current/clean/src/api/generated/index.ts +22 -0
  137. package/templates/current/clean/src/api/generated/services/auth.ts +123 -0
  138. package/templates/current/clean/src/api/generated/services/common/files.ts +111 -0
  139. package/templates/current/clean/src/api/generated/services/monitor/cache.ts +164 -0
  140. package/templates/current/clean/src/api/generated/services/monitor/job.ts +195 -0
  141. package/templates/current/clean/src/api/generated/services/monitor/jobLog.ts +126 -0
  142. package/templates/current/clean/src/api/generated/services/monitor/logininfor.ts +126 -0
  143. package/templates/current/clean/src/api/generated/services/monitor/online.ts +66 -0
  144. package/templates/current/clean/src/api/generated/services/monitor/operlog.ts +106 -0
  145. package/templates/current/clean/src/api/generated/services/monitor/server.ts +41 -0
  146. package/templates/current/clean/src/api/generated/services/system/configs.ts +190 -0
  147. package/templates/current/clean/src/api/generated/services/system/departments.ts +173 -0
  148. package/templates/current/clean/src/api/generated/services/system/dictionaries/data.ts +169 -0
  149. package/templates/current/clean/src/api/generated/services/system/dictionaries/types.ts +187 -0
  150. package/templates/current/clean/src/api/generated/services/system/index.ts +158 -0
  151. package/templates/current/clean/src/api/generated/services/system/menus.ts +193 -0
  152. package/templates/current/clean/src/api/generated/services/system/notices.ts +221 -0
  153. package/templates/current/clean/src/api/generated/services/system/posts.ts +168 -0
  154. package/templates/current/clean/src/api/generated/services/system/roles.ts +354 -0
  155. package/templates/current/clean/src/api/generated/services/system/users.ts +425 -0
  156. package/templates/current/clean/src/api/generated/services/tool/code-generator.ts +304 -0
  157. package/templates/current/clean/src/api/generated/types/auth.types.ts +132 -0
  158. package/templates/current/clean/src/api/generated/types/common/files.types.ts +57 -0
  159. package/templates/current/clean/src/api/generated/types/common.ts +174 -0
  160. package/templates/current/clean/src/api/generated/types/enum-dict.ts +94 -0
  161. package/templates/current/clean/src/api/generated/types/enums.ts +155 -0
  162. package/templates/current/clean/src/api/generated/types/monitor/cache.types.ts +149 -0
  163. package/templates/current/clean/src/api/generated/types/monitor/job.types.ts +207 -0
  164. package/templates/current/clean/src/api/generated/types/monitor/jobLog.types.ts +134 -0
  165. package/templates/current/clean/src/api/generated/types/monitor/logininfor.types.ts +135 -0
  166. package/templates/current/clean/src/api/generated/types/monitor/online.types.ts +80 -0
  167. package/templates/current/clean/src/api/generated/types/monitor/operlog.types.ts +126 -0
  168. package/templates/current/clean/src/api/generated/types/monitor/server.types.ts +205 -0
  169. package/templates/current/clean/src/api/generated/types/system/configs.types.ts +200 -0
  170. package/templates/current/clean/src/api/generated/types/system/departments.types.ts +145 -0
  171. package/templates/current/clean/src/api/generated/types/system/dictionaries/data.types.ts +210 -0
  172. package/templates/current/clean/src/api/generated/types/system/dictionaries/types.types.ts +221 -0
  173. package/templates/current/clean/src/api/generated/types/system/index.types.ts +19 -0
  174. package/templates/current/clean/src/api/generated/types/system/menus.types.ts +234 -0
  175. package/templates/current/clean/src/api/generated/types/system/notices.types.ts +270 -0
  176. package/templates/current/clean/src/api/generated/types/system/posts.types.ts +198 -0
  177. package/templates/current/clean/src/api/generated/types/system/roles.types.ts +410 -0
  178. package/templates/current/clean/src/api/generated/types/system/users.types.ts +413 -0
  179. package/templates/current/clean/src/api/generated/types/tool/code-generator.types.ts +388 -0
  180. package/templates/current/clean/src/api/index.ts +44 -39
  181. package/templates/current/clean/src/app/__tests__/api-generated.types.ts +24 -0
  182. package/templates/current/clean/src/app/api.ts +6 -0
  183. package/templates/current/clean/src/app/authorization/permission.ts +9 -0
  184. package/templates/current/{examples/src/app → clean/src/app/config}/runtimeConfig.ts +44 -12
  185. package/templates/current/clean/src/app/errors/errorMessage.ts +80 -0
  186. package/templates/current/clean/src/app/http/client.ts +141 -0
  187. package/templates/current/clean/src/app/http/http-adapter.ts +71 -0
  188. package/templates/current/{examples/src/app → clean/src/app/i18n}/adminLocale.ts +25 -19
  189. package/templates/current/clean/src/app/{localeFormat.ts → i18n/localeFormat.ts} +29 -6
  190. package/templates/current/clean/src/app/i18n/origenUiLocale.ts +15 -0
  191. package/templates/current/clean/src/app/menu/menu.ts +175 -0
  192. package/templates/current/clean/src/app/menu/menuTypes.ts +20 -0
  193. package/templates/current/clean/src/{features → app}/security/devtoolsProtection.ts +8 -7
  194. package/templates/current/clean/src/app/ui/createAdminUi.ts +31 -0
  195. package/templates/current/clean/src/app/ui/iconCatalog.ts +71 -0
  196. package/templates/current/clean/src/assets/icons/appearance.svg +1 -0
  197. package/templates/current/clean/src/assets/icons/arrow-right.svg +1 -0
  198. package/templates/current/clean/src/assets/icons/check.svg +1 -0
  199. package/templates/current/clean/src/assets/icons/circle-check.svg +1 -0
  200. package/templates/current/clean/src/assets/icons/default.svg +4 -0
  201. package/templates/current/clean/src/assets/icons/directory/setting.svg +1 -0
  202. package/templates/current/clean/src/assets/icons/expand.svg +1 -0
  203. package/templates/current/clean/src/assets/icons/fold.svg +1 -0
  204. package/templates/current/clean/src/assets/icons/key.svg +1 -0
  205. package/templates/current/clean/src/assets/icons/lock.svg +1 -0
  206. package/templates/current/clean/src/assets/icons/monitor.svg +1 -0
  207. package/templates/current/clean/src/assets/icons/moon.svg +11 -0
  208. package/templates/current/clean/src/assets/icons/page/department.svg +1 -0
  209. package/templates/current/clean/src/assets/icons/page/dictionary.svg +1 -0
  210. package/templates/current/clean/src/assets/icons/page/menus.svg +1 -0
  211. package/templates/current/clean/src/assets/icons/page/user.svg +1 -0
  212. package/templates/current/clean/src/assets/icons/page/users.svg +1 -0
  213. package/templates/current/clean/src/assets/icons/plus.svg +1 -0
  214. package/templates/current/clean/src/assets/icons/profile.svg +1 -0
  215. package/templates/current/clean/src/assets/icons/refresh.svg +1 -0
  216. package/templates/current/clean/src/assets/icons/roles.svg +1 -0
  217. package/templates/current/clean/src/assets/icons/search.svg +1 -0
  218. package/templates/current/clean/src/assets/icons/sunny.svg +1 -0
  219. package/templates/current/clean/src/assets/icons/system.svg +1 -0
  220. package/templates/current/clean/src/assets/icons/theme-auto.svg +14 -0
  221. package/templates/current/clean/src/assets/icons/tune.svg +13 -0
  222. package/templates/current/clean/src/{features/shell/components → components}/RouteProgress.vue +2 -2
  223. package/templates/current/{examples/src/features/system/access → clean/src}/composables/useAuthorizationRefresh.ts +6 -1
  224. package/templates/current/clean/src/composables/useSystemTableSearchVisibility.ts +33 -0
  225. package/templates/current/clean/src/{features/appearance/composables → composables}/useTheme.ts +1 -1
  226. package/templates/current/clean/src/env.d.ts +6 -19
  227. package/templates/current/clean/src/layouts/AdminLayout.vue +7 -9
  228. package/templates/current/clean/src/{features/shell/components → layouts}/AdminWatermark.vue +2 -2
  229. package/templates/current/clean/src/layouts/BreadcrumbBar.vue +9 -1
  230. package/templates/current/clean/src/layouts/SideMenu.vue +7 -15
  231. package/templates/current/clean/src/{features/appearance/components → layouts}/ThemePanel.vue +39 -11
  232. package/templates/current/clean/src/layouts/TopBar.vue +60 -28
  233. package/templates/current/clean/src/layouts/WorkspaceTabs.vue +10 -1
  234. package/templates/current/clean/src/layouts/topBarMenuSearch.ts +25 -4
  235. package/templates/current/clean/src/locales/en-US.json +227 -219
  236. package/templates/current/clean/src/locales/index.ts +72 -32
  237. package/templates/current/clean/src/locales/messages-types.ts +15 -10
  238. package/templates/current/clean/src/locales/vue-i18n.d.ts +1 -1
  239. package/templates/current/clean/src/locales/zh-CN.json +226 -218
  240. package/templates/current/clean/src/locales/zh-TW.json +222 -214
  241. package/templates/current/clean/src/main.ts +59 -30
  242. package/templates/current/clean/src/router/bootstrap.ts +69 -24
  243. package/templates/current/clean/src/router/dynamic/componentLoader.ts +150 -0
  244. package/templates/current/clean/src/router/{dynamicMenuRefresh.ts → dynamic/dynamicMenuRefresh.ts} +6 -2
  245. package/templates/current/clean/src/router/dynamic/dynamicRoutes.ts +247 -0
  246. package/templates/current/clean/src/router/navigation/guards.ts +12 -0
  247. package/templates/current/clean/src/router/navigation/paths.ts +28 -0
  248. package/templates/current/clean/src/router/navigation/staticRoutes.ts +109 -0
  249. package/templates/current/clean/src/router/{queryEncryption.ts → query/queryEncryption.ts} +29 -12
  250. package/templates/current/clean/src/router/query/routeQuery.ts +29 -0
  251. package/templates/current/clean/src/router/{useRouteQueryDefaults.ts → query/useRouteQueryDefaults.ts} +9 -8
  252. package/templates/current/clean/src/router/query/useRouteQueryDefaults.types.ts +28 -0
  253. package/templates/current/clean/src/router/{runtimeErrorRecovery.ts → recovery/runtimeErrorRecovery.ts} +21 -3
  254. package/templates/current/clean/src/{features/auth/store → store}/auth.ts +96 -61
  255. package/templates/current/clean/src/store/dictionaries.ts +86 -0
  256. package/templates/current/clean/src/{features/shell/store → store}/sidebar.ts +9 -2
  257. package/templates/current/{examples/src/features/appearance → clean/src}/store/theme.ts +8 -4
  258. package/templates/current/clean/src/styles/layout.css +51 -0
  259. package/templates/current/clean/src/templates/og-form.ts +7 -2
  260. package/templates/current/clean/src/templates/og-table.ts +88 -20
  261. package/templates/current/clean/src/templates/router.ts +11 -2
  262. package/templates/current/clean/src/utils/color-mix.ts +6 -2
  263. package/templates/current/clean/src/utils/download.ts +11 -0
  264. package/templates/current/clean/src/utils/permissions.ts +1 -1
  265. package/templates/current/clean/src/utils/retryableDialog.ts +46 -0
  266. package/templates/current/clean/src/{features → views}/errors/pages/Forbidden.vue +6 -2
  267. package/templates/current/clean/src/views/errors/pages/MethodNotAllowed.vue +34 -0
  268. package/templates/current/clean/src/{features → views}/errors/pages/NotFound.vue +6 -2
  269. package/templates/current/clean/src/{features → views}/errors/pages/ServerError.vue +6 -2
  270. package/templates/current/clean/src/{features/auth/pages/Login.vue → views/login/pages/index.vue} +99 -10
  271. package/templates/current/clean/src/views/system/access/services/admin-repository.ts +489 -0
  272. package/templates/current/clean/src/views/system/access/services/rbac.ts +317 -0
  273. package/templates/current/clean/src/views/system/dept/components/DepartmentEditorForm.vue +87 -0
  274. package/templates/current/clean/src/views/system/dept/composables/useDepartmentManagement.ts +314 -0
  275. package/templates/current/clean/src/views/system/dept/pages/index.vue +44 -0
  276. package/templates/current/clean/src/views/system/dept/services/departments.ts +168 -0
  277. package/templates/current/clean/src/views/system/dict/components/DictionaryDataEditorForm.vue +98 -0
  278. package/templates/current/clean/src/views/system/dict/components/DictionaryDataPreview.vue +233 -0
  279. package/templates/current/clean/src/views/system/dict/components/DictionaryTypeEditorForm.vue +66 -0
  280. package/templates/current/clean/src/views/system/dict/composables/useDictionaryDataManagement.ts +406 -0
  281. package/templates/current/clean/src/views/system/dict/composables/useDictionaryTypeManagement.ts +329 -0
  282. package/templates/current/clean/src/views/system/dict/data/pages/index.vue +134 -0
  283. package/templates/current/clean/src/views/system/dict/pages/index.vue +113 -0
  284. package/templates/current/clean/src/views/system/dict/services/dictionaries.ts +239 -0
  285. package/templates/current/clean/src/views/system/menu/components/MenuEditorForm.vue +252 -0
  286. package/templates/current/clean/src/views/system/menu/composables/useMenuManagement.ts +357 -0
  287. package/templates/current/clean/src/views/system/menu/menuDraft.ts +45 -0
  288. package/templates/current/clean/src/views/system/menu/pages/ExternalLink.vue +37 -0
  289. package/templates/current/clean/src/views/system/menu/pages/index.vue +75 -0
  290. package/templates/current/clean/src/views/system/post/components/PostEditorForm.vue +69 -0
  291. package/templates/current/clean/src/views/system/post/composables/usePostManagement.ts +245 -0
  292. package/templates/current/clean/src/views/system/post/pages/index.vue +92 -0
  293. package/templates/current/clean/src/views/system/post/services/posts.ts +100 -0
  294. package/templates/current/clean/src/views/system/role/auth-users/pages/index.vue +100 -0
  295. package/templates/current/clean/src/views/system/role/components/RoleDataScopeForm.vue +167 -0
  296. package/templates/current/clean/src/views/system/role/components/RoleEditorForm.vue +165 -0
  297. package/templates/current/clean/src/views/system/role/components/RoleUserSelectForm.vue +129 -0
  298. package/templates/current/clean/src/views/system/role/composables/useRoleManagement.ts +422 -0
  299. package/templates/current/clean/src/views/system/role/composables/useRoleUserManagement.ts +233 -0
  300. package/templates/current/clean/src/views/system/role/pages/index.vue +110 -0
  301. package/templates/current/clean/src/views/system/role/services/roleAccess.ts +162 -0
  302. package/templates/current/clean/src/views/system/user/auth-roles/pages/index.vue +209 -0
  303. package/templates/current/clean/src/views/system/user/components/UserDetailsForm.vue +108 -0
  304. package/templates/current/clean/src/views/system/user/components/UserEditorForm.vue +207 -0
  305. package/templates/current/clean/src/views/system/user/components/UserImportDialog.vue +80 -0
  306. package/templates/current/clean/src/views/system/user/components/UserResetPasswordForm.vue +56 -0
  307. package/templates/current/clean/src/views/system/user/composables/useUserManagement.ts +502 -0
  308. package/templates/current/clean/src/views/system/user/pages/index.vue +459 -0
  309. package/templates/current/clean/tests/e2e/admin-access-business.spec.ts +33 -0
  310. package/templates/current/clean/tests/e2e/admin-shell.spec.ts +50 -0
  311. package/templates/current/clean/tests/e2e/fixtures/adminMockBackend.ts +95 -0
  312. package/templates/current/clean/tests/e2e/fixtures/labelGeometry.ts +52 -0
  313. package/templates/current/clean/tests/e2e/mock-api-generation.spec.ts +27 -0
  314. package/templates/current/clean/tests/e2e/mock-business.spec.ts +555 -0
  315. package/templates/current/clean/tests/e2e/mock-menu-retry-form-label.spec.ts +100 -0
  316. package/templates/current/clean/tests/e2e/mock-shell.spec.ts +25 -0
  317. package/templates/current/clean/tests/e2e/mock-tree-selection-layout.spec.ts +113 -0
  318. package/templates/current/clean/tests/unit/api/api-codegen.spec.ts +893 -0
  319. package/templates/current/clean/tests/unit/api/client.spec.ts +145 -0
  320. package/templates/current/clean/tests/unit/api/generated-http-client.spec.ts +290 -0
  321. package/templates/current/{examples/src → clean/tests/unit}/api/http-adapter.spec.ts +3 -3
  322. package/templates/current/clean/tests/unit/api/system-apis.spec.ts +118 -0
  323. package/templates/current/clean/tests/unit/app/createAdminUi.spec.ts +79 -0
  324. package/templates/current/clean/{src → tests/unit}/app/errorMessage.spec.ts +1 -1
  325. package/templates/current/clean/tests/unit/app/iconCatalog.spec.ts +12 -0
  326. package/templates/current/clean/tests/unit/app/menu.spec.ts +215 -0
  327. package/templates/current/{examples/src → clean/tests/unit}/app/origenUiLocale.spec.ts +1 -1
  328. package/templates/current/{examples/src → clean/tests/unit}/app/permission.spec.ts +4 -5
  329. package/templates/current/clean/tests/unit/app/runtimeConfig.spec.ts +36 -0
  330. package/templates/current/{examples/src/features → clean/tests/unit/app}/security/devtoolsProtection.spec.ts +17 -7
  331. package/templates/current/{examples/src/features/shell → clean/tests/unit}/composables/useRouteProgress.spec.ts +1 -1
  332. package/templates/current/{examples/src/features/shell/components → clean/tests/unit/layouts}/AdminWatermark.spec.ts +5 -7
  333. package/templates/current/{examples/src → clean/tests/unit}/layouts/topBarMenuSearch.spec.ts +25 -8
  334. package/templates/current/clean/{src → tests/unit}/locales/messages.spec.ts +43 -17
  335. package/templates/current/clean/tests/unit/router/dynamicMenuRefresh.spec.ts +151 -0
  336. package/templates/current/clean/tests/unit/router/dynamicRoutes.spec.ts +374 -0
  337. package/templates/current/clean/tests/unit/router/paths.spec.ts +103 -0
  338. package/templates/current/clean/{src → tests/unit}/router/queryEncryption.spec.ts +49 -12
  339. package/templates/current/{examples/src → clean/tests/unit}/router/routeQuery.spec.ts +8 -1
  340. package/templates/current/clean/{src → tests/unit}/router/runtimeErrorRecovery.spec.ts +11 -6
  341. package/templates/current/{examples/src → clean/tests/unit}/router/useRouteQueryDefaults.spec.ts +46 -12
  342. package/templates/current/clean/tests/unit/scripts/mock-api.spec.ts +440 -0
  343. package/templates/current/clean/{scripts → tests/unit/scripts}/vite-build-policy.spec.ts +35 -6
  344. package/templates/current/clean/{src/features/auth → tests/unit}/store/auth.spec.ts +68 -15
  345. package/templates/current/clean/tests/unit/store/dictionaries.spec.ts +106 -0
  346. package/templates/current/{examples/src → clean/tests/unit}/templates/templates.spec.ts +60 -16
  347. package/templates/current/clean/{src/utils/__tests__ → tests/unit/utils}/color-mix.spec.ts +1 -1
  348. package/templates/current/clean/tests/unit/utils/retryableDialog.spec.ts +61 -0
  349. package/templates/current/{examples/src/features/errors/pages → clean/tests/unit/views/errors}/error-pages.spec.ts +11 -7
  350. package/templates/current/clean/tests/unit/views/feature-composables.spec.ts +233 -0
  351. package/templates/current/clean/tests/unit/views/system/access/admin-repository.spec.ts +353 -0
  352. package/templates/current/clean/tests/unit/views/system/access/rbac.spec.ts +329 -0
  353. package/templates/current/clean/tests/unit/views/system/dept/departments.spec.ts +104 -0
  354. package/templates/current/clean/tests/unit/views/system/dict/dictionaries.spec.ts +234 -0
  355. package/templates/current/clean/tests/unit/views/system/menu/menuDraft.spec.ts +77 -0
  356. package/templates/current/clean/tests/unit/views/system/menu/useMenuManagement.spec.ts +339 -0
  357. package/templates/current/clean/tests/unit/views/system/user/searchControl.spec.ts +128 -0
  358. package/templates/current/clean/tsconfig.json +4 -19
  359. package/templates/current/clean/vite.build-policy.ts +97 -22
  360. package/templates/current/clean/vite.config.ts +50 -7
  361. package/templates/current/examples/.agents/skills/admin-component-usage/SKILL.md +28 -0
  362. package/templates/current/examples/.agents/skills/admin-component-usage/references/component-directory.md +270 -0
  363. package/templates/current/examples/.agents/skills/build-admin-feature/SKILL.md +20 -0
  364. package/templates/current/examples/.agents/skills/build-admin-feature/references/component-selection.md +38 -0
  365. package/templates/current/examples/.agents/skills/style-og-origen-ui/SKILL.md +11 -0
  366. package/templates/current/examples/.agents/skills/use-og-dialog/SKILL.md +12 -0
  367. package/templates/current/examples/.agents/skills/use-og-editor/SKILL.md +25 -0
  368. package/templates/current/examples/.agents/skills/use-og-form/SKILL.md +12 -0
  369. package/templates/current/examples/.agents/skills/use-og-form-table/SKILL.md +26 -0
  370. package/templates/current/examples/.agents/skills/use-og-http/SKILL.md +13 -0
  371. package/templates/current/examples/.agents/skills/use-og-router-tabs/SKILL.md +11 -0
  372. package/templates/current/examples/.agents/skills/use-og-search/SKILL.md +14 -0
  373. package/templates/current/examples/.agents/skills/use-og-table/SKILL.md +22 -0
  374. package/templates/current/examples/.agents/skills/use-og-upload/SKILL.md +26 -0
  375. package/templates/current/examples/.api-client-e2e.config.ts +13 -0
  376. package/templates/current/examples/.claude/rules/01-feature-architecture.md +10 -0
  377. package/templates/current/examples/.claude/rules/02-vue-typescript.md +10 -0
  378. package/templates/current/examples/.claude/rules/03-component-policy.md +31 -0
  379. package/templates/current/examples/.claude/rules/04-api-auth-router.md +10 -0
  380. package/templates/current/examples/.claude/rules/05-style.md +10 -0
  381. package/templates/current/examples/.claude/rules/06-quality.md +10 -0
  382. package/templates/current/examples/.claude/skills/admin-component-usage/SKILL.md +28 -0
  383. package/templates/current/examples/.claude/skills/admin-component-usage/references/component-directory.md +270 -0
  384. package/templates/current/examples/.claude/skills/build-admin-feature/SKILL.md +20 -0
  385. package/templates/current/examples/.claude/skills/build-admin-feature/references/component-selection.md +38 -0
  386. package/templates/current/examples/.claude/skills/style-og-origen-ui/SKILL.md +11 -0
  387. package/templates/current/examples/.claude/skills/use-og-dialog/SKILL.md +12 -0
  388. package/templates/current/examples/.claude/skills/use-og-editor/SKILL.md +25 -0
  389. package/templates/current/examples/.claude/skills/use-og-form/SKILL.md +12 -0
  390. package/templates/current/examples/.claude/skills/use-og-form-table/SKILL.md +26 -0
  391. package/templates/current/examples/.claude/skills/use-og-http/SKILL.md +13 -0
  392. package/templates/current/examples/.claude/skills/use-og-router-tabs/SKILL.md +11 -0
  393. package/templates/current/examples/.claude/skills/use-og-search/SKILL.md +14 -0
  394. package/templates/current/examples/.claude/skills/use-og-table/SKILL.md +22 -0
  395. package/templates/current/examples/.claude/skills/use-og-upload/SKILL.md +26 -0
  396. package/templates/current/examples/.codebuddy/rules/01-feature-architecture.md +2 -2
  397. package/templates/current/examples/.codebuddy/rules/03-component-policy.md +4 -1
  398. package/templates/current/examples/.codebuddy/skills/admin-component-usage/SKILL.md +31 -0
  399. package/templates/current/examples/.codebuddy/skills/admin-component-usage/references/component-directory.md +270 -0
  400. package/templates/current/examples/.codebuddy/skills/build-admin-feature/SKILL.md +11 -5
  401. package/templates/current/examples/.codebuddy/skills/build-admin-feature/references/component-selection.md +38 -0
  402. package/templates/current/examples/.codebuddy/skills/use-og-form/SKILL.md +1 -1
  403. package/templates/current/examples/.codebuddy/skills/use-og-form-table/SKILL.md +4 -3
  404. package/templates/current/examples/.codebuddy/skills/use-og-search/SKILL.md +3 -3
  405. package/templates/current/examples/.codebuddy/skills/use-og-table/SKILL.md +16 -10
  406. package/templates/current/examples/.codebuddy/skills/use-og-upload/SKILL.md +6 -5
  407. package/templates/current/examples/.codex/AGENTS.md +55 -8
  408. package/templates/current/examples/.codex/rules/01-feature-architecture.md +2 -2
  409. package/templates/current/examples/.codex/rules/03-component-policy.md +4 -1
  410. package/templates/current/examples/.cursor/rules/.generated +5 -0
  411. package/templates/current/examples/.cursor/rules/01-feature-architecture.mdc +2 -2
  412. package/templates/current/examples/.cursor/rules/03-component-policy.mdc +4 -1
  413. package/templates/current/examples/.cursor/skills/admin-component-usage/SKILL.md +28 -0
  414. package/templates/current/examples/.cursor/skills/admin-component-usage/references/component-directory.md +270 -0
  415. package/templates/current/examples/.cursor/skills/build-admin-feature/SKILL.md +11 -5
  416. package/templates/current/examples/.cursor/skills/build-admin-feature/references/component-selection.md +38 -0
  417. package/templates/current/examples/.cursor/skills/use-og-form/SKILL.md +1 -1
  418. package/templates/current/examples/.cursor/skills/use-og-form-table/SKILL.md +4 -3
  419. package/templates/current/examples/.cursor/skills/use-og-search/SKILL.md +3 -3
  420. package/templates/current/examples/.cursor/skills/use-og-table/SKILL.md +16 -10
  421. package/templates/current/examples/.cursor/skills/use-og-upload/SKILL.md +6 -5
  422. package/templates/current/examples/{.env.example → .env.dev} +3 -2
  423. package/templates/current/examples/.env.mock +4 -0
  424. package/templates/current/examples/.env.production +5 -0
  425. package/templates/current/examples/.env.test +4 -0
  426. package/templates/current/examples/.prettierignore +17 -0
  427. package/templates/current/examples/.prettierrc +8 -0
  428. package/templates/current/examples/.qoder/rules/01-feature-architecture.md +3 -4
  429. package/templates/current/examples/.qoder/rules/02-vue-typescript.md +1 -2
  430. package/templates/current/examples/.qoder/rules/03-component-policy.md +5 -3
  431. package/templates/current/examples/.qoder/rules/04-api-auth-router.md +1 -2
  432. package/templates/current/examples/.qoder/rules/05-style.md +1 -2
  433. package/templates/current/examples/.qoder/rules/06-quality.md +1 -2
  434. package/templates/current/examples/.qoder/skills/admin-component-usage/SKILL.md +28 -0
  435. package/templates/current/examples/.qoder/skills/admin-component-usage/references/component-directory.md +270 -0
  436. package/templates/current/examples/.qoder/skills/build-admin-feature/SKILL.md +11 -5
  437. package/templates/current/examples/.qoder/skills/build-admin-feature/references/component-selection.md +38 -0
  438. package/templates/current/examples/.qoder/skills/use-og-form/SKILL.md +1 -1
  439. package/templates/current/examples/.qoder/skills/use-og-form-table/SKILL.md +4 -3
  440. package/templates/current/examples/.qoder/skills/use-og-search/SKILL.md +3 -3
  441. package/templates/current/examples/.qoder/skills/use-og-table/SKILL.md +16 -10
  442. package/templates/current/examples/.qoder/skills/use-og-upload/SKILL.md +6 -5
  443. package/templates/current/examples/.zcode/skills/admin-component-usage/SKILL.md +28 -0
  444. package/templates/current/examples/.zcode/skills/admin-component-usage/references/component-directory.md +270 -0
  445. package/templates/current/examples/.zcode/skills/build-admin-feature/SKILL.md +20 -0
  446. package/templates/current/examples/.zcode/skills/build-admin-feature/references/component-selection.md +38 -0
  447. package/templates/current/examples/.zcode/skills/style-og-origen-ui/SKILL.md +11 -0
  448. package/templates/current/examples/.zcode/skills/use-og-dialog/SKILL.md +12 -0
  449. package/templates/current/examples/.zcode/skills/use-og-editor/SKILL.md +25 -0
  450. package/templates/current/examples/.zcode/skills/use-og-form/SKILL.md +12 -0
  451. package/templates/current/examples/.zcode/skills/use-og-form-table/SKILL.md +26 -0
  452. package/templates/current/examples/.zcode/skills/use-og-http/SKILL.md +13 -0
  453. package/templates/current/examples/.zcode/skills/use-og-router-tabs/SKILL.md +11 -0
  454. package/templates/current/examples/.zcode/skills/use-og-search/SKILL.md +14 -0
  455. package/templates/current/examples/.zcode/skills/use-og-table/SKILL.md +22 -0
  456. package/templates/current/examples/.zcode/skills/use-og-upload/SKILL.md +26 -0
  457. package/templates/current/examples/AGENTS.md +55 -9
  458. package/templates/current/examples/CHANGELOG.md +107 -0
  459. package/templates/current/examples/CLAUDE.md +3 -0
  460. package/templates/current/examples/README.md +58 -88
  461. package/templates/current/examples/component-catalog.json +766 -348
  462. package/templates/current/examples/component-catalog.v2.json +2040 -0
  463. package/templates/current/examples/docs/components/dialog.md +405 -0
  464. package/templates/current/examples/docs/components/editor-viewer.md +87 -0
  465. package/templates/current/examples/docs/components/editor.md +275 -0
  466. package/templates/current/examples/docs/components/form-table.md +222 -0
  467. package/templates/current/examples/docs/components/form.md +750 -0
  468. package/templates/current/examples/docs/components/index.md +44 -0
  469. package/templates/current/examples/docs/components/router.md +452 -0
  470. package/templates/current/examples/docs/components/search.md +1205 -0
  471. package/templates/current/examples/docs/components/svg-icon.md +124 -0
  472. package/templates/current/examples/docs/components/table-local.md +176 -0
  473. package/templates/current/examples/docs/components/table-with-search.md +207 -0
  474. package/templates/current/examples/docs/components/table.md +813 -0
  475. package/templates/current/examples/docs/components/tabs.md +440 -0
  476. package/templates/current/examples/docs/components/upload.md +349 -0
  477. package/templates/current/examples/eslint.config.js +89 -0
  478. package/templates/current/examples/index.html +1 -1
  479. package/templates/current/examples/openapi.json +10048 -999
  480. package/templates/current/examples/package.json +45 -33
  481. package/templates/current/examples/playwright.config.ts +20 -6
  482. package/templates/current/examples/playwright.mock.config.ts +42 -0
  483. package/templates/current/examples/pnpm-workspace.yaml +19 -3
  484. package/templates/current/examples/recipes/remote-crud-dialog-form.vue +15 -13
  485. package/templates/current/examples/scaffold.lock.json +164 -4
  486. package/templates/current/examples/scripts/api-codegen.config.ts +35 -0
  487. package/templates/current/examples/scripts/api-codegen.ts +2015 -0
  488. package/templates/current/examples/scripts/api-templates/http-client.ejs +359 -0
  489. package/templates/current/examples/scripts/check-admin-scaffold.mjs +311 -17
  490. package/templates/current/examples/scripts/generate-api.ts +290 -85
  491. package/templates/current/examples/scripts/lib/admin-component-catalog.mjs +515 -0
  492. package/templates/current/examples/scripts/lib/repository-root.mjs +9 -0
  493. package/templates/current/examples/scripts/mock-api.ts +1356 -0
  494. package/templates/current/examples/scripts/remove-examples.mjs +9 -34
  495. package/templates/current/examples/src/App.vue +9 -18
  496. package/templates/current/examples/src/api/generated/data-contracts.ts +23 -265
  497. package/templates/current/examples/src/api/generated/http-client.ts +351 -180
  498. package/templates/current/examples/src/api/generated/index.ts +22 -0
  499. package/templates/current/examples/src/api/generated/services/auth.ts +123 -0
  500. package/templates/current/examples/src/api/generated/services/common/files.ts +111 -0
  501. package/templates/current/examples/src/api/generated/services/monitor/cache.ts +164 -0
  502. package/templates/current/examples/src/api/generated/services/monitor/job.ts +195 -0
  503. package/templates/current/examples/src/api/generated/services/monitor/jobLog.ts +126 -0
  504. package/templates/current/examples/src/api/generated/services/monitor/logininfor.ts +126 -0
  505. package/templates/current/examples/src/api/generated/services/monitor/online.ts +66 -0
  506. package/templates/current/examples/src/api/generated/services/monitor/operlog.ts +106 -0
  507. package/templates/current/examples/src/api/generated/services/monitor/server.ts +41 -0
  508. package/templates/current/examples/src/api/generated/services/system/configs.ts +190 -0
  509. package/templates/current/examples/src/api/generated/services/system/departments.ts +173 -0
  510. package/templates/current/examples/src/api/generated/services/system/dictionaries/data.ts +169 -0
  511. package/templates/current/examples/src/api/generated/services/system/dictionaries/types.ts +187 -0
  512. package/templates/current/examples/src/api/generated/services/system/index.ts +158 -0
  513. package/templates/current/examples/src/api/generated/services/system/menus.ts +193 -0
  514. package/templates/current/examples/src/api/generated/services/system/notices.ts +221 -0
  515. package/templates/current/examples/src/api/generated/services/system/posts.ts +168 -0
  516. package/templates/current/examples/src/api/generated/services/system/roles.ts +354 -0
  517. package/templates/current/examples/src/api/generated/services/system/users.ts +425 -0
  518. package/templates/current/examples/src/api/generated/services/tool/code-generator.ts +304 -0
  519. package/templates/current/examples/src/api/generated/types/auth.types.ts +132 -0
  520. package/templates/current/examples/src/api/generated/types/common/files.types.ts +57 -0
  521. package/templates/current/examples/src/api/generated/types/common.ts +174 -0
  522. package/templates/current/examples/src/api/generated/types/enum-dict.ts +94 -0
  523. package/templates/current/examples/src/api/generated/types/enums.ts +155 -0
  524. package/templates/current/examples/src/api/generated/types/monitor/cache.types.ts +149 -0
  525. package/templates/current/examples/src/api/generated/types/monitor/job.types.ts +207 -0
  526. package/templates/current/examples/src/api/generated/types/monitor/jobLog.types.ts +134 -0
  527. package/templates/current/examples/src/api/generated/types/monitor/logininfor.types.ts +135 -0
  528. package/templates/current/examples/src/api/generated/types/monitor/online.types.ts +80 -0
  529. package/templates/current/examples/src/api/generated/types/monitor/operlog.types.ts +126 -0
  530. package/templates/current/examples/src/api/generated/types/monitor/server.types.ts +205 -0
  531. package/templates/current/examples/src/api/generated/types/system/configs.types.ts +200 -0
  532. package/templates/current/examples/src/api/generated/types/system/departments.types.ts +145 -0
  533. package/templates/current/examples/src/api/generated/types/system/dictionaries/data.types.ts +210 -0
  534. package/templates/current/examples/src/api/generated/types/system/dictionaries/types.types.ts +221 -0
  535. package/templates/current/examples/src/api/generated/types/system/index.types.ts +19 -0
  536. package/templates/current/examples/src/api/generated/types/system/menus.types.ts +234 -0
  537. package/templates/current/examples/src/api/generated/types/system/notices.types.ts +270 -0
  538. package/templates/current/examples/src/api/generated/types/system/posts.types.ts +198 -0
  539. package/templates/current/examples/src/api/generated/types/system/roles.types.ts +410 -0
  540. package/templates/current/examples/src/api/generated/types/system/users.types.ts +413 -0
  541. package/templates/current/examples/src/api/generated/types/tool/code-generator.types.ts +388 -0
  542. package/templates/current/examples/src/api/index.ts +44 -39
  543. package/templates/current/examples/src/app/__tests__/api-generated.types.ts +24 -0
  544. package/templates/current/examples/src/app/api.ts +6 -0
  545. package/templates/current/examples/src/app/authorization/permission.ts +9 -0
  546. package/templates/current/{clean/src/app → examples/src/app/config}/runtimeConfig.ts +44 -12
  547. package/templates/current/examples/src/app/errors/errorMessage.ts +80 -0
  548. package/templates/current/examples/src/app/http/client.ts +141 -0
  549. package/templates/current/examples/src/app/http/http-adapter.ts +71 -0
  550. package/templates/current/{clean/src/app → examples/src/app/i18n}/adminLocale.ts +25 -19
  551. package/templates/current/examples/src/app/{localeFormat.ts → i18n/localeFormat.ts} +29 -6
  552. package/templates/current/examples/src/app/i18n/origenUiLocale.ts +15 -0
  553. package/templates/current/examples/src/app/menu/menu.ts +175 -0
  554. package/templates/current/examples/src/app/menu/menuTypes.ts +20 -0
  555. package/templates/current/examples/src/{features → app}/security/devtoolsProtection.ts +8 -7
  556. package/templates/current/examples/src/app/ui/createAdminUi.ts +31 -0
  557. package/templates/current/examples/src/app/ui/iconCatalog.ts +71 -0
  558. package/templates/current/examples/src/assets/icons/appearance.svg +1 -0
  559. package/templates/current/examples/src/assets/icons/arrow-right.svg +1 -0
  560. package/templates/current/examples/src/assets/icons/check.svg +1 -0
  561. package/templates/current/examples/src/assets/icons/circle-check.svg +1 -0
  562. package/templates/current/examples/src/assets/icons/default.svg +4 -0
  563. package/templates/current/examples/src/assets/icons/directory/setting.svg +1 -0
  564. package/templates/current/examples/src/assets/icons/expand.svg +1 -0
  565. package/templates/current/examples/src/assets/icons/fold.svg +1 -0
  566. package/templates/current/examples/src/assets/icons/key.svg +1 -0
  567. package/templates/current/examples/src/assets/icons/lock.svg +1 -0
  568. package/templates/current/examples/src/assets/icons/monitor.svg +1 -0
  569. package/templates/current/examples/src/assets/icons/moon.svg +11 -0
  570. package/templates/current/examples/src/assets/icons/page/department.svg +1 -0
  571. package/templates/current/examples/src/assets/icons/page/dictionary.svg +1 -0
  572. package/templates/current/examples/src/assets/icons/page/menus.svg +1 -0
  573. package/templates/current/examples/src/assets/icons/page/user.svg +1 -0
  574. package/templates/current/examples/src/assets/icons/page/users.svg +1 -0
  575. package/templates/current/examples/src/assets/icons/plus.svg +1 -0
  576. package/templates/current/examples/src/assets/icons/profile.svg +1 -0
  577. package/templates/current/examples/src/assets/icons/refresh.svg +1 -0
  578. package/templates/current/examples/src/assets/icons/roles.svg +1 -0
  579. package/templates/current/examples/src/assets/icons/search.svg +1 -0
  580. package/templates/current/examples/src/assets/icons/sunny.svg +1 -0
  581. package/templates/current/examples/src/assets/icons/system.svg +1 -0
  582. package/templates/current/examples/src/assets/icons/theme-auto.svg +14 -0
  583. package/templates/current/examples/src/assets/icons/tune.svg +13 -0
  584. package/templates/current/examples/src/{features/shell/components → components}/RouteProgress.vue +2 -2
  585. package/templates/current/{clean/src/features/system/access → examples/src}/composables/useAuthorizationRefresh.ts +6 -1
  586. package/templates/current/examples/src/composables/useSystemTableSearchVisibility.ts +33 -0
  587. package/templates/current/examples/src/{features/appearance/composables → composables}/useTheme.ts +1 -1
  588. package/templates/current/examples/src/env.d.ts +6 -19
  589. package/templates/current/examples/src/layouts/AdminLayout.vue +7 -9
  590. package/templates/current/examples/src/{features/shell/components → layouts}/AdminWatermark.vue +2 -2
  591. package/templates/current/examples/src/layouts/BreadcrumbBar.vue +9 -1
  592. package/templates/current/examples/src/layouts/SideMenu.vue +7 -15
  593. package/templates/current/examples/src/{features/appearance/components → layouts}/ThemePanel.vue +39 -11
  594. package/templates/current/examples/src/layouts/TopBar.vue +60 -28
  595. package/templates/current/examples/src/layouts/WorkspaceTabs.vue +10 -1
  596. package/templates/current/examples/src/layouts/topBarMenuSearch.ts +25 -4
  597. package/templates/current/examples/src/locales/en-US.json +227 -219
  598. package/templates/current/examples/src/locales/index.ts +72 -32
  599. package/templates/current/examples/src/locales/messages-types.ts +15 -10
  600. package/templates/current/examples/src/locales/vue-i18n.d.ts +1 -1
  601. package/templates/current/examples/src/locales/zh-CN.json +226 -218
  602. package/templates/current/examples/src/locales/zh-TW.json +222 -214
  603. package/templates/current/examples/src/main.ts +50 -40
  604. package/templates/current/examples/src/router/bootstrap.ts +69 -24
  605. package/templates/current/examples/src/router/dynamic/componentLoader.ts +150 -0
  606. package/templates/current/examples/src/router/{dynamicMenuRefresh.ts → dynamic/dynamicMenuRefresh.ts} +6 -2
  607. package/templates/current/examples/src/router/dynamic/dynamicRoutes.ts +247 -0
  608. package/templates/current/examples/src/router/navigation/guards.ts +12 -0
  609. package/templates/current/examples/src/router/navigation/paths.ts +28 -0
  610. package/templates/current/examples/src/router/navigation/staticRoutes.ts +109 -0
  611. package/templates/current/examples/src/router/{queryEncryption.ts → query/queryEncryption.ts} +29 -12
  612. package/templates/current/examples/src/router/query/routeQuery.ts +29 -0
  613. package/templates/current/examples/src/router/{useRouteQueryDefaults.ts → query/useRouteQueryDefaults.ts} +9 -8
  614. package/templates/current/examples/src/router/query/useRouteQueryDefaults.types.ts +28 -0
  615. package/templates/current/examples/src/router/{runtimeErrorRecovery.ts → recovery/runtimeErrorRecovery.ts} +21 -3
  616. package/templates/current/examples/src/{features/auth/store → store}/auth.ts +96 -61
  617. package/templates/current/examples/src/store/dictionaries.ts +86 -0
  618. package/templates/current/examples/src/{features/shell/store → store}/sidebar.ts +9 -2
  619. package/templates/current/{clean/src/features/appearance → examples/src}/store/theme.ts +8 -4
  620. package/templates/current/examples/src/styles/layout.css +51 -0
  621. package/templates/current/examples/src/templates/og-form.ts +7 -2
  622. package/templates/current/examples/src/templates/og-table.ts +88 -20
  623. package/templates/current/examples/src/templates/router.ts +11 -2
  624. package/templates/current/examples/src/utils/color-mix.ts +6 -2
  625. package/templates/current/examples/src/utils/download.ts +11 -0
  626. package/templates/current/examples/src/utils/permissions.ts +1 -1
  627. package/templates/current/examples/src/utils/retryableDialog.ts +46 -0
  628. package/templates/current/{clean/scripts/clean-overlay/src/features → examples/src/views}/errors/pages/Forbidden.vue +6 -2
  629. package/templates/current/examples/src/views/errors/pages/MethodNotAllowed.vue +34 -0
  630. package/templates/current/examples/{scripts/clean-overlay/src/features → src/views}/errors/pages/NotFound.vue +6 -2
  631. package/templates/current/examples/{scripts/clean-overlay/src/features → src/views}/errors/pages/ServerError.vue +6 -2
  632. package/templates/current/examples/src/{features/auth/pages/Login.vue → views/login/pages/index.vue} +99 -10
  633. package/templates/current/examples/src/views/system/access/services/admin-repository.ts +489 -0
  634. package/templates/current/examples/src/views/system/access/services/rbac.ts +317 -0
  635. package/templates/current/examples/src/views/system/dept/components/DepartmentEditorForm.vue +87 -0
  636. package/templates/current/examples/src/views/system/dept/composables/useDepartmentManagement.ts +314 -0
  637. package/templates/current/examples/src/views/system/dept/pages/index.vue +44 -0
  638. package/templates/current/examples/src/views/system/dept/services/departments.ts +168 -0
  639. package/templates/current/examples/src/views/system/dict/components/DictionaryDataEditorForm.vue +98 -0
  640. package/templates/current/examples/src/views/system/dict/components/DictionaryDataPreview.vue +233 -0
  641. package/templates/current/examples/src/views/system/dict/components/DictionaryTypeEditorForm.vue +66 -0
  642. package/templates/current/examples/src/views/system/dict/composables/useDictionaryDataManagement.ts +406 -0
  643. package/templates/current/examples/src/views/system/dict/composables/useDictionaryTypeManagement.ts +329 -0
  644. package/templates/current/examples/src/views/system/dict/data/pages/index.vue +134 -0
  645. package/templates/current/examples/src/views/system/dict/pages/index.vue +113 -0
  646. package/templates/current/examples/src/views/system/dict/services/dictionaries.ts +239 -0
  647. package/templates/current/examples/src/views/system/menu/components/MenuEditorForm.vue +252 -0
  648. package/templates/current/examples/src/views/system/menu/composables/useMenuManagement.ts +357 -0
  649. package/templates/current/examples/src/views/system/menu/menuDraft.ts +45 -0
  650. package/templates/current/examples/src/views/system/menu/pages/ExternalLink.vue +37 -0
  651. package/templates/current/examples/src/views/system/menu/pages/index.vue +75 -0
  652. package/templates/current/examples/src/views/system/post/components/PostEditorForm.vue +69 -0
  653. package/templates/current/examples/src/views/system/post/composables/usePostManagement.ts +245 -0
  654. package/templates/current/examples/src/views/system/post/pages/index.vue +92 -0
  655. package/templates/current/examples/src/views/system/post/services/posts.ts +100 -0
  656. package/templates/current/examples/src/views/system/role/auth-users/pages/index.vue +100 -0
  657. package/templates/current/examples/src/views/system/role/components/RoleDataScopeForm.vue +167 -0
  658. package/templates/current/examples/src/views/system/role/components/RoleEditorForm.vue +165 -0
  659. package/templates/current/examples/src/views/system/role/components/RoleUserSelectForm.vue +129 -0
  660. package/templates/current/examples/src/views/system/role/composables/useRoleManagement.ts +422 -0
  661. package/templates/current/examples/src/views/system/role/composables/useRoleUserManagement.ts +233 -0
  662. package/templates/current/examples/src/views/system/role/pages/index.vue +110 -0
  663. package/templates/current/examples/src/views/system/role/services/roleAccess.ts +162 -0
  664. package/templates/current/examples/src/views/system/user/auth-roles/pages/index.vue +209 -0
  665. package/templates/current/examples/src/views/system/user/components/UserDetailsForm.vue +108 -0
  666. package/templates/current/examples/src/views/system/user/components/UserEditorForm.vue +207 -0
  667. package/templates/current/examples/src/views/system/user/components/UserImportDialog.vue +80 -0
  668. package/templates/current/examples/src/views/system/user/components/UserResetPasswordForm.vue +56 -0
  669. package/templates/current/examples/src/views/system/user/composables/useUserManagement.ts +502 -0
  670. package/templates/current/examples/src/views/system/user/pages/index.vue +459 -0
  671. package/templates/current/examples/tests/e2e/admin-access-business.spec.ts +33 -0
  672. package/templates/current/examples/tests/e2e/admin-shell.spec.ts +50 -0
  673. package/templates/current/examples/tests/e2e/fixtures/adminMockBackend.ts +95 -0
  674. package/templates/current/examples/tests/e2e/fixtures/labelGeometry.ts +52 -0
  675. package/templates/current/examples/tests/e2e/mock-api-generation.spec.ts +27 -0
  676. package/templates/current/examples/tests/e2e/mock-business.spec.ts +555 -0
  677. package/templates/current/examples/tests/e2e/mock-menu-retry-form-label.spec.ts +100 -0
  678. package/templates/current/examples/tests/e2e/mock-shell.spec.ts +25 -0
  679. package/templates/current/examples/tests/e2e/mock-tree-selection-layout.spec.ts +113 -0
  680. package/templates/current/examples/tests/unit/api/api-codegen.spec.ts +893 -0
  681. package/templates/current/examples/tests/unit/api/client.spec.ts +145 -0
  682. package/templates/current/examples/tests/unit/api/generated-http-client.spec.ts +290 -0
  683. package/templates/current/{clean/src → examples/tests/unit}/api/http-adapter.spec.ts +3 -3
  684. package/templates/current/examples/tests/unit/api/system-apis.spec.ts +118 -0
  685. package/templates/current/examples/tests/unit/app/createAdminUi.spec.ts +79 -0
  686. package/templates/current/examples/{src → tests/unit}/app/errorMessage.spec.ts +1 -1
  687. package/templates/current/examples/tests/unit/app/iconCatalog.spec.ts +12 -0
  688. package/templates/current/examples/tests/unit/app/menu.spec.ts +215 -0
  689. package/templates/current/{clean/src → examples/tests/unit}/app/origenUiLocale.spec.ts +1 -1
  690. package/templates/current/{clean/src → examples/tests/unit}/app/permission.spec.ts +4 -5
  691. package/templates/current/examples/tests/unit/app/runtimeConfig.spec.ts +36 -0
  692. package/templates/current/{clean/src/features → examples/tests/unit/app}/security/devtoolsProtection.spec.ts +17 -7
  693. package/templates/current/{clean/src/features/shell → examples/tests/unit}/composables/useRouteProgress.spec.ts +1 -1
  694. package/templates/current/{clean/src/features/shell/components → examples/tests/unit/layouts}/AdminWatermark.spec.ts +5 -7
  695. package/templates/current/{clean/src → examples/tests/unit}/layouts/topBarMenuSearch.spec.ts +25 -8
  696. package/templates/current/examples/{src → tests/unit}/locales/messages.spec.ts +43 -17
  697. package/templates/current/examples/tests/unit/router/dynamicMenuRefresh.spec.ts +151 -0
  698. package/templates/current/examples/tests/unit/router/dynamicRoutes.spec.ts +374 -0
  699. package/templates/current/examples/tests/unit/router/paths.spec.ts +103 -0
  700. package/templates/current/examples/{src → tests/unit}/router/queryEncryption.spec.ts +49 -12
  701. package/templates/current/{clean/src → examples/tests/unit}/router/routeQuery.spec.ts +8 -1
  702. package/templates/current/examples/{src → tests/unit}/router/runtimeErrorRecovery.spec.ts +11 -6
  703. package/templates/current/{clean/src → examples/tests/unit}/router/useRouteQueryDefaults.spec.ts +46 -12
  704. package/templates/current/examples/tests/unit/scripts/mock-api.spec.ts +440 -0
  705. package/templates/current/examples/{scripts → tests/unit/scripts}/vite-build-policy.spec.ts +35 -6
  706. package/templates/current/examples/{src/features/auth → tests/unit}/store/auth.spec.ts +68 -15
  707. package/templates/current/examples/tests/unit/store/dictionaries.spec.ts +106 -0
  708. package/templates/current/{clean/src → examples/tests/unit}/templates/templates.spec.ts +60 -16
  709. package/templates/current/examples/{src/utils/__tests__ → tests/unit/utils}/color-mix.spec.ts +1 -1
  710. package/templates/current/examples/tests/unit/utils/retryableDialog.spec.ts +61 -0
  711. package/templates/current/examples/{scripts/clean-overlay/src/features/errors/pages → tests/unit/views/errors}/error-pages.spec.ts +12 -9
  712. package/templates/current/examples/tests/unit/views/feature-composables.spec.ts +233 -0
  713. package/templates/current/examples/tests/unit/views/system/access/admin-repository.spec.ts +353 -0
  714. package/templates/current/examples/tests/unit/views/system/access/rbac.spec.ts +329 -0
  715. package/templates/current/examples/tests/unit/views/system/dept/departments.spec.ts +104 -0
  716. package/templates/current/examples/tests/unit/views/system/dict/dictionaries.spec.ts +234 -0
  717. package/templates/current/examples/tests/unit/views/system/menu/menuDraft.spec.ts +77 -0
  718. package/templates/current/examples/tests/unit/views/system/menu/useMenuManagement.spec.ts +339 -0
  719. package/templates/current/examples/tests/unit/views/system/user/searchControl.spec.ts +128 -0
  720. package/templates/current/examples/tsconfig.json +4 -19
  721. package/templates/current/examples/vite.build-policy.ts +97 -22
  722. package/templates/current/examples/vite.config.ts +50 -7
  723. package/templates/current/clean/.codebuddy/AGENTS.md +0 -18
  724. package/templates/current/clean/.codex/skills/build-admin-feature/SKILL.md +0 -14
  725. package/templates/current/clean/.codex/skills/build-admin-feature/references/component-selection.md +0 -25
  726. package/templates/current/clean/.codex/skills/use-og-table/SKILL.md +0 -16
  727. package/templates/current/clean/.cursor/AGENTS.md +0 -18
  728. package/templates/current/clean/.env.production.example +0 -31
  729. package/templates/current/clean/.qoder/AGENTS.md +0 -15
  730. package/templates/current/clean/e2e/admin-shell.spec.ts +0 -156
  731. package/templates/current/clean/e2e/demo-shell.spec.ts +0 -372
  732. package/templates/current/clean/playwright.demo.config.ts +0 -25
  733. package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/NotFound.vue +0 -31
  734. package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/ServerError.vue +0 -31
  735. package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/error-pages.spec.ts +0 -41
  736. package/templates/current/clean/scripts/clean-overlay/src/main.ts +0 -100
  737. package/templates/current/clean/scripts/clean-overlay/src/router/componentCache.ts +0 -12
  738. package/templates/current/clean/scripts/clean-overlay/src/router/componentRegistry.ts +0 -14
  739. package/templates/current/clean/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +0 -77
  740. package/templates/current/clean/scripts/clean-overlay/src/router/paths.ts +0 -21
  741. package/templates/current/clean/scripts/clean-overlay/src/router/staticRoutes.ts +0 -63
  742. package/templates/current/clean/scripts/demo-api.ts +0 -873
  743. package/templates/current/clean/src/api/client.spec.ts +0 -66
  744. package/templates/current/clean/src/api/client.ts +0 -152
  745. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +0 -144
  746. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +0 -50
  747. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +0 -63
  748. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +0 -169
  749. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +0 -180
  750. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +0 -167
  751. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +0 -168
  752. package/templates/current/clean/src/api/generated//350/256/244/350/257/201.ts +0 -95
  753. package/templates/current/clean/src/api/http-adapter.ts +0 -83
  754. package/templates/current/clean/src/app/createAdminUi.spec.ts +0 -166
  755. package/templates/current/clean/src/app/createAdminUi.ts +0 -63
  756. package/templates/current/clean/src/app/embedded-token.spec.ts +0 -40
  757. package/templates/current/clean/src/app/embedded.spec.ts +0 -135
  758. package/templates/current/clean/src/app/embedded.ts +0 -255
  759. package/templates/current/clean/src/app/errorMessage.ts +0 -53
  760. package/templates/current/clean/src/app/menu-host.spec.ts +0 -77
  761. package/templates/current/clean/src/app/menu.spec.ts +0 -320
  762. package/templates/current/clean/src/app/menu.ts +0 -308
  763. package/templates/current/clean/src/app/menuTypes.ts +0 -18
  764. package/templates/current/clean/src/app/origenUiLocale.ts +0 -10
  765. package/templates/current/clean/src/app/permission.ts +0 -9
  766. package/templates/current/clean/src/demo-api.spec.ts +0 -478
  767. package/templates/current/clean/src/features/errors/pages/error-pages.spec.ts +0 -41
  768. package/templates/current/clean/src/features/system/access/api/admin-repository.spec.ts +0 -14
  769. package/templates/current/clean/src/features/system/access/api/admin-repository.ts +0 -298
  770. package/templates/current/clean/src/features/system/access/api/rbac.spec.ts +0 -72
  771. package/templates/current/clean/src/features/system/access/api/rbac.ts +0 -292
  772. package/templates/current/clean/src/features/system/access/composables/useAuthorizationPolling.spec.ts +0 -134
  773. package/templates/current/clean/src/features/system/access/composables/useAuthorizationPolling.ts +0 -96
  774. package/templates/current/clean/src/features/workspace/pages/Profile.vue +0 -185
  775. package/templates/current/clean/src/router/componentCache.ts +0 -12
  776. package/templates/current/clean/src/router/componentRegistry.ts +0 -14
  777. package/templates/current/clean/src/router/dynamicMenuRefresh.spec.ts +0 -101
  778. package/templates/current/clean/src/router/dynamicRoutes.spec.ts +0 -77
  779. package/templates/current/clean/src/router/dynamicRoutes.ts +0 -177
  780. package/templates/current/clean/src/router/guards.ts +0 -5
  781. package/templates/current/clean/src/router/paths.spec.ts +0 -50
  782. package/templates/current/clean/src/router/paths.ts +0 -21
  783. package/templates/current/clean/src/router/routeQuery.ts +0 -6
  784. package/templates/current/clean/src/router/staticRoutes.ts +0 -63
  785. package/templates/current/clean/src/router/useRouteQueryDefaults.types.ts +0 -20
  786. package/templates/current/examples/.codebuddy/AGENTS.md +0 -18
  787. package/templates/current/examples/.codex/skills/build-admin-feature/SKILL.md +0 -14
  788. package/templates/current/examples/.codex/skills/build-admin-feature/references/component-selection.md +0 -25
  789. package/templates/current/examples/.codex/skills/use-og-table/SKILL.md +0 -16
  790. package/templates/current/examples/.cursor/AGENTS.md +0 -18
  791. package/templates/current/examples/.env.production.example +0 -31
  792. package/templates/current/examples/.qoder/AGENTS.md +0 -15
  793. package/templates/current/examples/e2e/admin-shell.spec.ts +0 -156
  794. package/templates/current/examples/e2e/demo-shell.spec.ts +0 -372
  795. package/templates/current/examples/playwright.demo.config.ts +0 -25
  796. package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/Forbidden.vue +0 -31
  797. package/templates/current/examples/scripts/clean-overlay/src/main.ts +0 -100
  798. package/templates/current/examples/scripts/clean-overlay/src/router/componentCache.ts +0 -12
  799. package/templates/current/examples/scripts/clean-overlay/src/router/componentRegistry.ts +0 -14
  800. package/templates/current/examples/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +0 -77
  801. package/templates/current/examples/scripts/clean-overlay/src/router/paths.ts +0 -21
  802. package/templates/current/examples/scripts/clean-overlay/src/router/staticRoutes.ts +0 -63
  803. package/templates/current/examples/scripts/demo-api.ts +0 -873
  804. package/templates/current/examples/src/api/client.spec.ts +0 -66
  805. package/templates/current/examples/src/api/client.ts +0 -152
  806. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +0 -144
  807. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +0 -50
  808. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +0 -63
  809. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +0 -169
  810. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +0 -180
  811. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +0 -167
  812. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +0 -168
  813. package/templates/current/examples/src/api/generated//350/256/244/350/257/201.ts +0 -95
  814. package/templates/current/examples/src/api/http-adapter.ts +0 -83
  815. package/templates/current/examples/src/app/createAdminUi.spec.ts +0 -166
  816. package/templates/current/examples/src/app/createAdminUi.ts +0 -63
  817. package/templates/current/examples/src/app/embedded-token.spec.ts +0 -40
  818. package/templates/current/examples/src/app/embedded.spec.ts +0 -135
  819. package/templates/current/examples/src/app/embedded.ts +0 -255
  820. package/templates/current/examples/src/app/errorMessage.ts +0 -53
  821. package/templates/current/examples/src/app/menu-host.spec.ts +0 -77
  822. package/templates/current/examples/src/app/menu.spec.ts +0 -320
  823. package/templates/current/examples/src/app/menu.ts +0 -308
  824. package/templates/current/examples/src/app/menuTypes.ts +0 -18
  825. package/templates/current/examples/src/app/origenUiLocale.ts +0 -10
  826. package/templates/current/examples/src/app/permission.ts +0 -9
  827. package/templates/current/examples/src/demo-api.spec.ts +0 -478
  828. package/templates/current/examples/src/features/errors/pages/Forbidden.vue +0 -31
  829. package/templates/current/examples/src/features/errors/pages/NotFound.vue +0 -31
  830. package/templates/current/examples/src/features/errors/pages/ServerError.vue +0 -31
  831. package/templates/current/examples/src/features/feature-composables.spec.ts +0 -245
  832. package/templates/current/examples/src/features/system/access/api/admin-repository.spec.ts +0 -14
  833. package/templates/current/examples/src/features/system/access/api/admin-repository.ts +0 -298
  834. package/templates/current/examples/src/features/system/access/api/rbac.spec.ts +0 -72
  835. package/templates/current/examples/src/features/system/access/api/rbac.ts +0 -292
  836. package/templates/current/examples/src/features/system/access/composables/useAuthorizationPolling.spec.ts +0 -134
  837. package/templates/current/examples/src/features/system/access/composables/useAuthorizationPolling.ts +0 -96
  838. package/templates/current/examples/src/features/system/audit/composables/useAuditManagement.ts +0 -122
  839. package/templates/current/examples/src/features/system/audit/pages/AuditList.vue +0 -20
  840. package/templates/current/examples/src/features/system/menus/components/MenuEditorForm.vue +0 -279
  841. package/templates/current/examples/src/features/system/menus/composables/useMenuManagement.ts +0 -435
  842. package/templates/current/examples/src/features/system/menus/menuDraft.spec.ts +0 -204
  843. package/templates/current/examples/src/features/system/menus/menuDraft.ts +0 -116
  844. package/templates/current/examples/src/features/system/menus/menuTreePrecheck.spec.ts +0 -268
  845. package/templates/current/examples/src/features/system/menus/menuTreePrecheck.ts +0 -317
  846. package/templates/current/examples/src/features/system/menus/pages/MenuList.vue +0 -51
  847. package/templates/current/examples/src/features/system/roles/components/RoleEditorForm.vue +0 -116
  848. package/templates/current/examples/src/features/system/roles/composables/useRoleManagement.ts +0 -194
  849. package/templates/current/examples/src/features/system/roles/pages/RoleList.vue +0 -47
  850. package/templates/current/examples/src/features/system/users/components/UserEditorForm.vue +0 -104
  851. package/templates/current/examples/src/features/system/users/composables/useUserManagement.ts +0 -228
  852. package/templates/current/examples/src/features/system/users/pages/UserList.vue +0 -51
  853. package/templates/current/examples/src/features/workspace/pages/Dashboard.spec.ts +0 -41
  854. package/templates/current/examples/src/features/workspace/pages/Dashboard.vue +0 -325
  855. package/templates/current/examples/src/features/workspace/pages/Profile.vue +0 -185
  856. package/templates/current/examples/src/router/componentCache.ts +0 -18
  857. package/templates/current/examples/src/router/componentRegistry.ts +0 -66
  858. package/templates/current/examples/src/router/dynamicMenuRefresh.spec.ts +0 -101
  859. package/templates/current/examples/src/router/dynamicRoutes.spec.ts +0 -144
  860. package/templates/current/examples/src/router/dynamicRoutes.ts +0 -177
  861. package/templates/current/examples/src/router/guards.ts +0 -5
  862. package/templates/current/examples/src/router/paths.spec.ts +0 -50
  863. package/templates/current/examples/src/router/paths.ts +0 -21
  864. package/templates/current/examples/src/router/routeQuery.ts +0 -6
  865. package/templates/current/examples/src/router/staticRoutes.ts +0 -63
  866. package/templates/current/examples/src/router/useRouteQueryDefaults.types.ts +0 -20
  867. /package/templates/current/clean/{.codex → .agents}/skills/style-og-origen-ui/SKILL.md +0 -0
  868. /package/templates/current/clean/{.codex → .agents}/skills/style-og-origen-ui/agents/openai.yaml +0 -0
  869. /package/templates/current/clean/{.codex → .agents}/skills/use-og-dialog/SKILL.md +0 -0
  870. /package/templates/current/clean/{.codex → .agents}/skills/use-og-dialog/agents/openai.yaml +0 -0
  871. /package/templates/current/clean/{.codex → .agents}/skills/use-og-editor/SKILL.md +0 -0
  872. /package/templates/current/clean/{.codex → .agents}/skills/use-og-http/SKILL.md +0 -0
  873. /package/templates/current/clean/{.codex → .agents}/skills/use-og-http/agents/openai.yaml +0 -0
  874. /package/templates/current/clean/{.codex → .agents}/skills/use-og-router-tabs/SKILL.md +0 -0
  875. /package/templates/current/{examples/.codex → clean/.claude}/skills/style-og-origen-ui/SKILL.md +0 -0
  876. /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-dialog/SKILL.md +0 -0
  877. /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-editor/SKILL.md +0 -0
  878. /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-http/SKILL.md +0 -0
  879. /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-router-tabs/SKILL.md +0 -0
  880. /package/templates/current/clean/src/{features/security/components → components}/DevtoolsProtectionOverlay.vue +0 -0
  881. /package/templates/current/clean/src/{features/shell/composables → composables}/useRouteProgress.ts +0 -0
  882. /package/templates/current/clean/src/{features/workspace → views/fallback}/pages/Empty.vue +0 -0
  883. /package/templates/current/examples/{.codex → .agents}/skills/style-og-origen-ui/agents/openai.yaml +0 -0
  884. /package/templates/current/examples/{.codex → .agents}/skills/use-og-dialog/agents/openai.yaml +0 -0
  885. /package/templates/current/examples/{.codex → .agents}/skills/use-og-http/agents/openai.yaml +0 -0
  886. /package/templates/current/examples/src/{features/security/components → components}/DevtoolsProtectionOverlay.vue +0 -0
  887. /package/templates/current/examples/src/{features/shell/composables → composables}/useRouteProgress.ts +0 -0
  888. /package/templates/current/examples/src/{features/workspace → views/fallback}/pages/Empty.vue +0 -0
@@ -51,9 +51,8 @@ function createViewportDetector(): DevtoolsDetector {
51
51
  start(callbacks) {
52
52
  const detect = () => {
53
53
  try {
54
- // Browser DevTools docked to an edge leaves a stable outer/inner
55
- // viewport gap. This is deliberately advisory; it never mutates
56
- // console, clipboard, DOM, or browser shortcuts.
54
+ // 停靠在边缘的浏览器 DevTools 会在 outer/inner 视口之间留下稳定差值,这里只据此做提示性检测;
55
+ // 不改动 console、剪贴板、DOM 或浏览器快捷键。
57
56
  const next = Math.max(
58
57
  window.outerWidth - window.innerWidth,
59
58
  window.outerHeight - window.innerHeight,
@@ -81,8 +80,8 @@ const viewportDetector = createViewportDetector()
81
80
 
82
81
  function isProtectionEnabled(): boolean {
83
82
  if (!import.meta.env.PROD || import.meta.env.MODE === 'debug') return false
84
- // The detector infers DevTools from viewport geometry, which is unreliable
85
- // on touch-first browsers and can block the entire mobile application.
83
+ // 该检测器依据视口几何推断 DevTools,在触屏优先的浏览器上容易误判并拦住整个应用,
84
+ // 因此对 `(pointer: coarse)` 设备禁用保护。
86
85
  return !window.matchMedia?.('(pointer: coarse)').matches
87
86
  }
88
87
 
@@ -106,7 +105,7 @@ function writeUnlock(storage: StorageLike | null | undefined): void {
106
105
  try {
107
106
  storage?.setItem(unlockStorageKey, 'true')
108
107
  } catch {
109
- // Storage can be unavailable in restrictive browser contexts. The in-memory state still unlocks this page.
108
+ // 受限浏览器环境下 sessionStorage 可能不可用;内存中的 unlocked 状态仍让本页保持解锁。
110
109
  }
111
110
  }
112
111
 
@@ -118,7 +117,9 @@ export function createDevtoolsProtection(
118
117
  const enabled = options.enabled ?? isProtectionEnabled()
119
118
  const detector = options.detector ?? viewportDetector
120
119
  const keyboardTarget =
121
- options.keyboardTarget ?? (typeof window === 'undefined' ? undefined : window)
120
+ options.keyboardTarget ?? (typeof window === 'undefined'
121
+ ? undefined
122
+ : window)
122
123
  const storage =
123
124
  'storage' in options
124
125
  ? options.storage
@@ -0,0 +1,31 @@
1
+ // 装配 Admin 专有的 Origen UI 插件配置。
2
+ import type { OrigenUiPlugin } from 'origen-ui'
3
+ import type { Plugin } from 'vue'
4
+ import type { I18n } from 'vue-i18n'
5
+ import { createOrigenUi } from 'origen-ui'
6
+ import { permission } from '@/app/authorization/permission'
7
+ import { appRuntimeConfig } from '@/app/config/runtimeConfig'
8
+ import { createAdminI18nComposer, createAdminLanguageOptions } from '@/locales'
9
+
10
+ /**
11
+ * 创建 Origen UI 插件,接入 Admin 的权限检查器、语言选项与各组件运行时默认配置。
12
+ * @param i18n - 可选的宿主 vue-i18n 实例;缺省时创建 Admin 自己的 Composer。
13
+ * @returns 可供 `app.use` 安装的 Vue 插件,并暴露可选的 `language` 运行时。
14
+ */
15
+ export function createAdminUi(
16
+ i18n?: I18n,
17
+ ): Plugin & Partial<Pick<OrigenUiPlugin, 'language'>> {
18
+ const composer = i18n ?? createAdminI18nComposer()
19
+ return createOrigenUi({
20
+ language: createAdminLanguageOptions(composer) as never,
21
+ permission: permission.can,
22
+ size: appRuntimeConfig.origenUi.size,
23
+ dialog: appRuntimeConfig.origenUi.dialog,
24
+ editor: appRuntimeConfig.origenUi.editor,
25
+ form: appRuntimeConfig.origenUi.form,
26
+ search: appRuntimeConfig.origenUi.search,
27
+ table: appRuntimeConfig.origenUi.table,
28
+ tabs: appRuntimeConfig.origenUi.tabs,
29
+ upload: appRuntimeConfig.origenUi.upload,
30
+ })
31
+ }
@@ -0,0 +1,71 @@
1
+ // 由 `src/assets/icons` 下的 SVG 资源构建 Admin 图标目录,并要求存在 default.svg。
2
+ import type { Component } from 'vue'
3
+ import { createSvgIcon } from '@origen-ui/icons'
4
+
5
+ const iconFiles = import.meta.glob('@/assets/icons/**/*.svg')
6
+ const iconEntries: Array<[string, Component]> = []
7
+ const menuIconEntries: Record<'directory' | 'page', Array<[string, Component]>> = {
8
+ directory: [],
9
+ page: [],
10
+ }
11
+ const catalogKeys = new Set<string>()
12
+
13
+ function toCatalogKey(name: string): string {
14
+ // 把连字符文件名转换为菜单使用的 camelCase key。
15
+ return name.replace(/-([a-z0-9])/gu, (_match: string, character: string) =>
16
+ character.toUpperCase())
17
+ }
18
+
19
+ for (const path of Object.keys(iconFiles)) {
20
+ const marker = '/assets/icons/'
21
+ const markerIndex = path.lastIndexOf(marker)
22
+ if (markerIndex < 0) continue
23
+ const assetPath = path.slice(markerIndex + marker.length)
24
+ if (!assetPath.endsWith('.svg')) continue
25
+
26
+ const pathWithoutExtension = assetPath.slice(0, -4)
27
+ const pathSegments = pathWithoutExtension.split('/')
28
+ const filename = pathSegments.at(-1)
29
+ if (!filename) continue
30
+
31
+ // API 中保存的是文件名 key;sprite 名称包含目录前缀,避免跨目录符号冲突。
32
+ const key = toCatalogKey(filename)
33
+ if (catalogKeys.has(key)) throw new Error(`Duplicate Admin icon catalog key "${key}".`)
34
+ catalogKeys.add(key)
35
+
36
+ const component = createSvgIcon(pathWithoutExtension.replaceAll('/', '-'))
37
+ iconEntries.push([key, component])
38
+
39
+ const group = pathSegments[0]
40
+ if (pathSegments.length > 1 && (group === 'directory' || group === 'page')) {
41
+ menuIconEntries[group].push([key, component])
42
+ }
43
+ }
44
+
45
+ const catalog = Object.freeze(Object.fromEntries(iconEntries)) as Readonly<
46
+ Record<string, Component>
47
+ >
48
+
49
+ if (!catalog.default) throw new Error('The icon directory must contain default.svg.')
50
+
51
+ const menuIconCatalog = Object.freeze({
52
+ directory: Object.freeze(Object.fromEntries(menuIconEntries.directory)),
53
+ page: Object.freeze(Object.fromEntries(menuIconEntries.page)),
54
+ }) as Readonly<
55
+ Record<'directory' | 'page', Readonly<Record<string, Component>>>
56
+ >
57
+
58
+ export type AdminIconKey = keyof typeof catalog
59
+
60
+ /**
61
+ * 解析菜单图标;未提供名称时返回 `undefined`,未命中时回退到目录中必需的 `default` 图标。
62
+ * @param name - 菜单配置的图标名。
63
+ * @returns 对应的图标组件或 `default` 图标;名称为 `undefined` 时返回 `undefined`。
64
+ */
65
+ export function resolveAdminIcon(name: string | undefined): Component | undefined {
66
+ if (!name) return undefined
67
+ return catalog[name] ?? catalog.default
68
+ }
69
+
70
+ // 供应用组件使用的只读图标映射(Object.freeze)。
71
+ export { catalog as adminIconCatalog, menuIconCatalog as adminMenuIconCatalog }
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.6"/><path d="M12 4.3a7.7 7.7 0 0 1 0 15.4Z" fill="currentColor" stroke="none"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 6l6 6-6 6"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12 4 4L19 6"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="m8 12 2.6 2.6L16.5 9"/></svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="12" cy="12" r="9" />
3
+ <path d="M9 12h6M12 9v6" />
4
+ </svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9.53 5.56 9.93 3.04 14.07 3.04 14.47 5.56A6.9 6.9 0 0 1 16.34 6.64L18.73 5.73 20.8 9.31 18.82 10.92A6.9 6.9 0 0 1 18.82 13.08L20.8 14.69 18.73 18.27 16.34 17.36A6.9 6.9 0 0 1 14.47 18.44L14.07 20.96 9.93 20.96 9.53 18.44A6.9 6.9 0 0 1 7.66 17.36L5.27 18.27 3.2 14.69 5.18 13.08A6.9 6.9 0 0 1 5.18 10.92L3.2 9.31 5.27 5.73 7.66 6.64A6.9 6.9 0 0 1 9.53 5.56Z"/><circle cx="12" cy="12" r="3.35"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H3v5M16 3h5v5M8 21H3v-5M21 16v5h-5"/><path d="m3 8 5-5M21 8l-5-5M3 16l5 5M21 16l-5 5"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3v5H3M16 3v5h5M8 21v-5H3M21 16h-5v5"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="15" r="4"/><path d="m11 12 9-9M16 6l2 2M18 4l2 2"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="10" width="14" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/></svg>
@@ -0,0 +1,11 @@
1
+ <svg
2
+ viewBox="0 0 24 24"
3
+ fill="none"
4
+ stroke="currentColor"
5
+ stroke-width="1.8"
6
+ stroke-linecap="round"
7
+ stroke-linejoin="round"
8
+ >
9
+ <path d="M19.5 15.8A8.5 8.5 0 0 1 8.2 4.5a8.5 8.5 0 1 0 11.3 11.3Z" />
10
+ <path d="m17.2 3.5.7 1.7 1.7.7-1.7.7-.7 1.7-.7-1.7-1.7-.7 1.7-.7.7-1.7Z" />
11
+ </svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M10 3h4v4h-4V3ZM3 17h6v4H3v-4Zm12 0h6v4h-6v-4ZM11 7v4H6v6h2v-4h8v4h2v-6h-5V7h-2Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M5 3h12a2 2 0 0 1 2 2v15H7a3 3 0 0 1-3-3V5a2 2 0 0 1 1-2Zm2 2v12a3 3 0 0 1 1-.2h9V5H7Zm2 3h6v2H9V8Zm0 4h6v2H9v-2Zm8 6H8a1 1 0 0 0 0 2h9v-2Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M4 5h16v2H4V5Zm0 6h16v2H4v-2Zm0 6h10v2H4v-2Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm6-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM2 20a7 7 0 0 1 14 0H2Zm14.5 0a6 6 0 0 0-2.3-4.7A5 5 0 0 1 22 20h-5.5Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8a7 7 0 0 1 14 0H5Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20 11a8 8 0 0 0-14.7-4L3 10"/><path d="M3 4v6h6M4 13a8 8 0 0 0 14.7 4L21 14"/><path d="M21 20v-6h-6"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M12 2 4 5v6c0 5 3.4 9.7 8 11 4.6-1.3 8-6 8-11V5l-8-3Zm0 4 4 1.5V11c0 3.2-1.9 6.3-4 7.4-2.1-1.1-4-4.2-4-7.4V7.5L12 6Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M4 4h16v16H4V4Zm3 3v10h10V7H7Zm2 2h6v6H9V9Z"/></svg>
@@ -0,0 +1,14 @@
1
+ <svg
2
+ viewBox="0 0 24 24"
3
+ fill="none"
4
+ stroke="currentColor"
5
+ stroke-width="1.8"
6
+ stroke-linecap="round"
7
+ stroke-linejoin="round"
8
+ >
9
+ <!-- 屏幕与支架一律用 path 绘制:sprite 净化会删掉所有节点的 width/height,rect 会被清零 -->
10
+ <!-- 右半实心先填底、轮廓压在其上,右缘线宽才与左缘一致 -->
11
+ <path d="M12 4.85h7a1.2 1.2 0 0 1 1.2 1.2v7.9a1.2 1.2 0 0 1-1.2 1.2H12Z" fill="currentColor" stroke="none" />
12
+ <path d="M5 4h14a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z" />
13
+ <path d="M12 16v4M8 20h8" />
14
+ </svg>
@@ -0,0 +1,13 @@
1
+ <svg
2
+ viewBox="0 0 24 24"
3
+ fill="none"
4
+ stroke="currentColor"
5
+ stroke-width="1.8"
6
+ stroke-linecap="round"
7
+ stroke-linejoin="round"
8
+ >
9
+ <path d="M4 6h4m4 0h8M4 12h6m4 0h6M4 18h2m4 0h10" />
10
+ <circle cx="10" cy="6" r="2" />
11
+ <circle cx="12" cy="12" r="2" />
12
+ <circle cx="8" cy="18" r="2" />
13
+ </svg>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import { getRouting } from '../../../router/bootstrap'
4
- import { useRouteProgress } from '../composables/useRouteProgress'
3
+ import { useRouteProgress } from '@/composables/useRouteProgress'
4
+ import { getRouting } from '@/router/bootstrap'
5
5
 
6
6
  defineOptions({ name: 'RouteProgress' })
7
7
 
@@ -3,10 +3,15 @@ import { inject } from 'vue'
3
3
 
4
4
  export type AuthorizationRefresh = () => Promise<void>
5
5
 
6
- /** Application-provided action that reconciles session authorization and dynamic routes. */
6
+ // 应用提供的注入键,对应刷新会话授权并重建动态路由的异步动作。
7
7
  export const authorizationRefreshKey: InjectionKey<AuthorizationRefresh> =
8
8
  Symbol('authorization-refresh')
9
9
 
10
+ /**
11
+ * 读取应用注入的授权刷新动作,供页面在权限或菜单变更后主动刷新会话。
12
+ * @returns 由 `main.ts` 通过 `authorizationRefreshKey` 提供的异步刷新函数。
13
+ * @throws 当调用发生在 Admin 应用上下文之外、未提供该注入时抛出 `Error`。
14
+ */
10
15
  export function useAuthorizationRefresh(): AuthorizationRefresh {
11
16
  const refreshAuthorization = inject(authorizationRefreshKey)
12
17
  if (!refreshAuthorization)
@@ -0,0 +1,33 @@
1
+ import type { OgTableRow } from '@origen-ui/table'
2
+ import type { OgTableWithSearchStandardConfig } from '@origen-ui/table-search'
3
+ import type { ComputedRef } from 'vue'
4
+ import { Search } from '@element-plus/icons-vue'
5
+ import { computed, ref } from 'vue'
6
+ import { useI18n } from 'vue-i18n'
7
+
8
+ export function useSystemTableSearchVisibility<
9
+ T extends OgTableRow,
10
+ TQuery extends object,
11
+ >(source: ComputedRef<OgTableWithSearchStandardConfig<T, TQuery>>) {
12
+ const { t } = useI18n()
13
+ const searchVisible = ref(true)
14
+ const config = computed<OgTableWithSearchStandardConfig<T, TQuery>>(() => ({
15
+ ...source.value,
16
+ toolbar: {
17
+ ...source.value.toolbar,
18
+ actions: [
19
+ ...(source.value.toolbar?.actions ?? []),
20
+ {
21
+ key: 'toggle-search-visibility',
22
+ label: t(searchVisible.value ? 'common.actions.hideSearch' : 'common.actions.showSearch'),
23
+ icon: Search,
24
+ onClick: () => {
25
+ searchVisible.value = !searchVisible.value
26
+ },
27
+ },
28
+ ],
29
+ },
30
+ }))
31
+
32
+ return { config, searchVisible }
33
+ }
@@ -1,5 +1,5 @@
1
1
  import { storeToRefs } from 'pinia'
2
- import { useThemeStore } from '../store/theme'
2
+ import { useThemeStore } from '@/store/theme'
3
3
 
4
4
  export function useTheme() {
5
5
  const store = useThemeStore()
@@ -4,29 +4,16 @@ interface ImportMetaEnv {
4
4
  readonly VITE_API_BASE_URL?: string
5
5
  readonly VITE_API_TARGET?: string
6
6
  readonly VITE_DEFAULT_LOCALE?: string
7
- readonly VITE_DEMO_LOGIN_HINT?: string
7
+ readonly VITE_ENABLE_MOCK?: string
8
+ readonly VITE_MOCK_LOGIN_HINT?: string
9
+ readonly VITE_APP_TITLE?: string
10
+ readonly VITE_SHOW_MENU_SEARCH?: string
11
+ readonly VITE_SHOW_LANGUAGE_SWITCH?: string
12
+ readonly VITE_SHOW_THEME_SETTINGS?: string
8
13
  readonly VITE_ROUTE_QUERY_ENCRYPTION?: string
9
14
  readonly VITE_ROUTE_QUERY_KEY?: string
10
- /** 'true' 时意图进入微前端嵌入模式(仍需运行时探测主壳环境,见 app/embedded.ts) */
11
- readonly VITE_EMBEDDED?: string
12
15
  }
13
16
 
14
17
  interface ImportMeta {
15
18
  readonly env: ImportMetaEnv
16
19
  }
17
-
18
- /** micro-app 子应用注入环境(app/embedded.ts 探测与桥接使用) */
19
- interface MicroAppChildEnv {
20
- __MICRO_APP_ENVIRONMENT__?: boolean
21
- __MICRO_APP_NAME__?: string
22
- microApp?: {
23
- getData?: () => Record<string, unknown>
24
- addDataListener?: (
25
- callback: (data: Record<string, unknown>) => void,
26
- autoTrigger?: boolean,
27
- ) => void
28
- dispatch?: (data: Record<string, unknown>) => void
29
- }
30
- }
31
-
32
- interface Window extends MicroAppChildEnv {}
@@ -3,19 +3,17 @@ import { OgDialogHost } from '@origen-ui/dialog'
3
3
  import { RouterViewHost } from '@origen-ui/router'
4
4
  import { ElDrawer } from 'element-plus'
5
5
  import { useI18n } from 'vue-i18n'
6
- import AdminWatermark from '../features/shell/components/AdminWatermark.vue'
7
- import { useSidebarStore } from '../features/shell/store/sidebar'
8
- import { useAuthorizationPolling } from '../features/system/access/composables/useAuthorizationPolling'
9
- import BreadcrumbBar from './BreadcrumbBar.vue'
10
- import SideMenu from './SideMenu.vue'
11
- import TopBar from './TopBar.vue'
12
- import WorkspaceTabs from './WorkspaceTabs.vue'
6
+ import AdminWatermark from '@/layouts/AdminWatermark.vue'
7
+ import BreadcrumbBar from '@/layouts/BreadcrumbBar.vue'
8
+ import SideMenu from '@/layouts/SideMenu.vue'
9
+ import TopBar from '@/layouts/TopBar.vue'
10
+ import WorkspaceTabs from '@/layouts/WorkspaceTabs.vue'
11
+ import { useSidebarStore } from '@/store/sidebar'
12
+ import '@origen-ui/router/style.css'
13
13
 
14
14
  defineOptions({ name: 'AdminLayout' })
15
15
  const sidebar = useSidebarStore()
16
16
  const { t } = useI18n()
17
- // 会话内轮询 RBAC revision:服务端权限/菜单变更经确认后刷新,随布局卸载停止。
18
- useAuthorizationPolling()
19
17
  </script>
20
18
 
21
19
  <template>
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { ElWatermark } from 'element-plus'
3
3
  import { computed } from 'vue'
4
- import { useThemeStore } from '../../appearance/store/theme'
5
- import { useAuthStore } from '../../auth/store/auth'
4
+ import { useAuthStore } from '@/store/auth'
5
+ import { useThemeStore } from '@/store/theme'
6
6
 
7
7
  defineOptions({ name: 'AdminWatermark' })
8
8
 
@@ -1,12 +1,20 @@
1
1
  <script setup lang="ts">
2
+ import { useBreadcrumbs } from '@origen-ui/router'
2
3
  import { RouterBreadcrumb } from '@origen-ui/router/element-plus'
4
+ import { ElBreadcrumbItem } from 'element-plus'
3
5
 
4
6
  defineOptions({ name: 'BreadcrumbBar' })
7
+
8
+ const breadcrumbs = useBreadcrumbs()
5
9
  </script>
6
10
 
7
11
  <template>
8
12
  <div class="breadcrumb-bar">
9
- <RouterBreadcrumb />
13
+ <RouterBreadcrumb>
14
+ <ElBreadcrumbItem v-for="item in breadcrumbs" :key="item.id">
15
+ <span>{{ item.label }}</span>
16
+ </ElBreadcrumbItem>
17
+ </RouterBreadcrumb>
10
18
  </div>
11
19
  </template>
12
20
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import type { Component } from 'vue'
3
- import { DataBoard, Download, Lock, User, UserFilled } from '@element-plus/icons-vue'
4
3
  import { RouterMenu } from '@origen-ui/router/element-plus'
5
4
  import { useI18n } from 'vue-i18n'
6
- import { useSidebarStore } from '../features/shell/store/sidebar'
5
+ import { resolveAdminIcon } from '@/app/ui/iconCatalog'
6
+ import { useSidebarStore } from '@/store/sidebar'
7
7
 
8
8
  defineOptions({ name: 'SideMenu' })
9
9
 
@@ -12,21 +12,13 @@ const emit = defineEmits<{ navigate: [] }>()
12
12
  const sidebar = useSidebarStore()
13
13
  const { t } = useI18n()
14
14
 
15
- const icons: Record<string, Component> = {
16
- dashboard: DataBoard,
17
- profile: User,
18
- system: Lock,
19
- users: UserFilled,
20
- roles: Lock,
21
- download: Download,
22
- }
23
-
24
15
  function resolveIcon(icon: string): Component | undefined {
25
- return icons[icon]
16
+ return resolveAdminIcon(icon)
26
17
  }
27
18
 
28
- function onSelect(): void {
19
+ function onSelect(): boolean {
29
20
  if (props.mobile) emit('navigate')
21
+ return true
30
22
  }
31
23
  </script>
32
24
 
@@ -39,8 +31,8 @@ function onSelect(): void {
39
31
  <RouterMenu
40
32
  :collapse="mobile ? false : sidebar.collapsed"
41
33
  :collapse-transition="false"
42
- :resolve-icon="resolveIcon"
43
- @select="onSelect"
34
+ :og-resolve-icon="resolveIcon"
35
+ :og-menu-events="{ select: onSelect }"
44
36
  />
45
37
  </nav>
46
38
  </template>
@@ -1,11 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import type { Component } from 'vue'
3
- import type { ThemeMode } from '../store/theme'
4
- import { Check, Monitor, Moon, Sunny } from '@element-plus/icons-vue'
3
+ import type { ThemeMode } from '@/store/theme'
5
4
  import { ElColorPicker, ElDropdownItem, ElDropdownMenu, ElIcon } from 'element-plus'
6
5
  import { computed } from 'vue'
7
6
  import { useI18n } from 'vue-i18n'
8
- import { useTheme } from '../composables/useTheme'
7
+ import { adminIconCatalog } from '@/app/ui/iconCatalog'
8
+ import { useTheme } from '@/composables/useTheme'
9
9
 
10
10
  defineOptions({ name: 'ThemePanel' })
11
11
 
@@ -16,19 +16,47 @@ interface ThemeModeOption {
16
16
  }
17
17
 
18
18
  const { t } = useI18n()
19
+ const { check: Check, moon: Moon, sunny: Sunny, themeAuto: ThemeAuto } = adminIconCatalog
19
20
 
20
21
  const modeOptions = computed<ThemeModeOption[]>(() => [
21
- { value: 'light', label: t('appearance.light'), icon: Sunny },
22
- { value: 'dark', label: t('appearance.dark'), icon: Moon },
23
- { value: 'auto', label: t('appearance.system'), icon: Monitor },
22
+ {
23
+ value: 'light',
24
+ label: t('appearance.light'),
25
+ icon: Sunny,
26
+ },
27
+ {
28
+ value: 'dark',
29
+ label: t('appearance.dark'),
30
+ icon: Moon,
31
+ },
32
+ {
33
+ value: 'auto',
34
+ label: t('appearance.system'),
35
+ icon: ThemeAuto,
36
+ },
24
37
  ])
25
38
 
26
39
  const primaryPresets = computed(() => [
27
- { label: t('appearance.presetIndigo'), value: '#5E6AD2' },
28
- { label: t('appearance.presetBlue'), value: '#2563EB' },
29
- { label: t('appearance.presetTeal'), value: '#0F766E' },
30
- { label: t('appearance.presetRose'), value: '#DB2777' },
31
- { label: t('appearance.presetAmber'), value: '#D97706' },
40
+ {
41
+ label: t('appearance.presetIndigo'),
42
+ value: '#5E6AD2',
43
+ },
44
+ {
45
+ label: t('appearance.presetBlue'),
46
+ value: '#2563EB',
47
+ },
48
+ {
49
+ label: t('appearance.presetTeal'),
50
+ value: '#0F766E',
51
+ },
52
+ {
53
+ label: t('appearance.presetRose'),
54
+ value: '#DB2777',
55
+ },
56
+ {
57
+ label: t('appearance.presetAmber'),
58
+ value: '#D97706',
59
+ },
32
60
  ])
33
61
 
34
62
  const { mode, primary, setMode, setPrimary } = useTheme()