@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.
- package/README.md +20 -9
- package/bin/contract-sync.mjs +112 -0
- package/bin/lib/errors.mjs +8 -0
- package/bin/lib/fs-json.mjs +18 -0
- package/bin/lib/hash.mjs +9 -0
- package/bin/og-admin.mjs +165 -35
- package/bin/sync-project.mjs +717 -0
- package/package.json +20 -17
- package/templates/current/clean/.agents/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/clean/.agents/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/clean/.agents/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/clean/.agents/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/{.codex → .agents}/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.agents/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.api-client-e2e.config.ts +13 -0
- package/templates/current/clean/.claude/rules/01-feature-architecture.md +10 -0
- package/templates/current/clean/.claude/rules/02-vue-typescript.md +10 -0
- package/templates/current/clean/.claude/rules/03-component-policy.md +31 -0
- package/templates/current/clean/.claude/rules/04-api-auth-router.md +10 -0
- package/templates/current/clean/.claude/rules/05-style.md +10 -0
- package/templates/current/clean/.claude/rules/06-quality.md +10 -0
- package/templates/current/clean/.claude/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/clean/.claude/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/clean/.claude/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/clean/.claude/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/clean/{.codex → .claude}/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/{.codex → .claude}/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.claude/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/clean/{.codex → .claude}/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.codebuddy/rules/01-feature-architecture.md +2 -2
- package/templates/current/clean/.codebuddy/rules/03-component-policy.md +4 -1
- package/templates/current/clean/.codebuddy/skills/admin-component-usage/SKILL.md +31 -0
- package/templates/current/clean/.codebuddy/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/clean/.codebuddy/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/clean/.codebuddy/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/clean/.codebuddy/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/.codebuddy/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/.codebuddy/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.codebuddy/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/clean/.codebuddy/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.codex/AGENTS.md +55 -8
- package/templates/current/clean/.codex/rules/01-feature-architecture.md +2 -2
- package/templates/current/clean/.codex/rules/03-component-policy.md +4 -1
- package/templates/current/clean/.cursor/rules/.generated +5 -0
- package/templates/current/clean/.cursor/rules/01-feature-architecture.mdc +2 -2
- package/templates/current/clean/.cursor/rules/03-component-policy.mdc +4 -1
- package/templates/current/clean/.cursor/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/clean/.cursor/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/clean/.cursor/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/clean/.cursor/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/clean/.cursor/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/.cursor/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/.cursor/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.cursor/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/clean/.cursor/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/{.env.example → .env.dev} +3 -2
- package/templates/current/clean/.env.mock +4 -0
- package/templates/current/clean/.env.production +5 -0
- package/templates/current/clean/.env.test +4 -0
- package/templates/current/clean/.prettierignore +17 -0
- package/templates/current/clean/.prettierrc +8 -0
- package/templates/current/clean/.qoder/rules/01-feature-architecture.md +3 -4
- package/templates/current/clean/.qoder/rules/02-vue-typescript.md +1 -2
- package/templates/current/clean/.qoder/rules/03-component-policy.md +5 -3
- package/templates/current/clean/.qoder/rules/04-api-auth-router.md +1 -2
- package/templates/current/clean/.qoder/rules/05-style.md +1 -2
- package/templates/current/clean/.qoder/rules/06-quality.md +1 -2
- package/templates/current/clean/.qoder/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/clean/.qoder/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/clean/.qoder/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/clean/.qoder/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/clean/.qoder/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/.qoder/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/.qoder/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.qoder/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/clean/.qoder/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.zcode/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/clean/.zcode/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/clean/.zcode/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/clean/.zcode/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/clean/.zcode/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/clean/.zcode/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/clean/.zcode/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/clean/.zcode/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/clean/.zcode/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/clean/.zcode/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/clean/.zcode/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/clean/.zcode/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/clean/.zcode/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/clean/.zcode/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/clean/AGENTS.md +55 -9
- package/templates/current/clean/CHANGELOG.md +107 -0
- package/templates/current/clean/CLAUDE.md +3 -0
- package/templates/current/clean/README.md +58 -88
- package/templates/current/clean/component-catalog.json +766 -348
- package/templates/current/clean/component-catalog.v2.json +2040 -0
- package/templates/current/clean/docs/components/dialog.md +405 -0
- package/templates/current/clean/docs/components/editor-viewer.md +87 -0
- package/templates/current/clean/docs/components/editor.md +275 -0
- package/templates/current/clean/docs/components/form-table.md +222 -0
- package/templates/current/clean/docs/components/form.md +750 -0
- package/templates/current/clean/docs/components/index.md +44 -0
- package/templates/current/clean/docs/components/router.md +452 -0
- package/templates/current/clean/docs/components/search.md +1205 -0
- package/templates/current/clean/docs/components/svg-icon.md +124 -0
- package/templates/current/clean/docs/components/table-local.md +176 -0
- package/templates/current/clean/docs/components/table-with-search.md +207 -0
- package/templates/current/clean/docs/components/table.md +813 -0
- package/templates/current/clean/docs/components/tabs.md +440 -0
- package/templates/current/clean/docs/components/upload.md +349 -0
- package/templates/current/clean/eslint.config.js +89 -0
- package/templates/current/clean/index.html +1 -1
- package/templates/current/clean/openapi.json +10048 -999
- package/templates/current/clean/package.json +45 -33
- package/templates/current/clean/playwright.config.ts +20 -6
- package/templates/current/clean/playwright.mock.config.ts +42 -0
- package/templates/current/clean/pnpm-workspace.yaml +19 -3
- package/templates/current/clean/recipes/remote-crud-dialog-form.vue +15 -13
- package/templates/current/clean/scaffold.lock.json +164 -4
- package/templates/current/clean/scripts/api-codegen.config.ts +35 -0
- package/templates/current/clean/scripts/api-codegen.ts +2015 -0
- package/templates/current/clean/scripts/api-templates/http-client.ejs +359 -0
- package/templates/current/clean/scripts/check-admin-scaffold.mjs +311 -17
- package/templates/current/clean/scripts/generate-api.ts +290 -85
- package/templates/current/clean/scripts/lib/admin-component-catalog.mjs +515 -0
- package/templates/current/clean/scripts/lib/repository-root.mjs +9 -0
- package/templates/current/clean/scripts/mock-api.ts +1356 -0
- package/templates/current/clean/scripts/remove-examples.mjs +9 -34
- package/templates/current/clean/src/App.vue +9 -18
- package/templates/current/clean/src/api/generated/data-contracts.ts +23 -265
- package/templates/current/clean/src/api/generated/http-client.ts +351 -180
- package/templates/current/clean/src/api/generated/index.ts +22 -0
- package/templates/current/clean/src/api/generated/services/auth.ts +123 -0
- package/templates/current/clean/src/api/generated/services/common/files.ts +111 -0
- package/templates/current/clean/src/api/generated/services/monitor/cache.ts +164 -0
- package/templates/current/clean/src/api/generated/services/monitor/job.ts +195 -0
- package/templates/current/clean/src/api/generated/services/monitor/jobLog.ts +126 -0
- package/templates/current/clean/src/api/generated/services/monitor/logininfor.ts +126 -0
- package/templates/current/clean/src/api/generated/services/monitor/online.ts +66 -0
- package/templates/current/clean/src/api/generated/services/monitor/operlog.ts +106 -0
- package/templates/current/clean/src/api/generated/services/monitor/server.ts +41 -0
- package/templates/current/clean/src/api/generated/services/system/configs.ts +190 -0
- package/templates/current/clean/src/api/generated/services/system/departments.ts +173 -0
- package/templates/current/clean/src/api/generated/services/system/dictionaries/data.ts +169 -0
- package/templates/current/clean/src/api/generated/services/system/dictionaries/types.ts +187 -0
- package/templates/current/clean/src/api/generated/services/system/index.ts +158 -0
- package/templates/current/clean/src/api/generated/services/system/menus.ts +193 -0
- package/templates/current/clean/src/api/generated/services/system/notices.ts +221 -0
- package/templates/current/clean/src/api/generated/services/system/posts.ts +168 -0
- package/templates/current/clean/src/api/generated/services/system/roles.ts +354 -0
- package/templates/current/clean/src/api/generated/services/system/users.ts +425 -0
- package/templates/current/clean/src/api/generated/services/tool/code-generator.ts +304 -0
- package/templates/current/clean/src/api/generated/types/auth.types.ts +132 -0
- package/templates/current/clean/src/api/generated/types/common/files.types.ts +57 -0
- package/templates/current/clean/src/api/generated/types/common.ts +174 -0
- package/templates/current/clean/src/api/generated/types/enum-dict.ts +94 -0
- package/templates/current/clean/src/api/generated/types/enums.ts +155 -0
- package/templates/current/clean/src/api/generated/types/monitor/cache.types.ts +149 -0
- package/templates/current/clean/src/api/generated/types/monitor/job.types.ts +207 -0
- package/templates/current/clean/src/api/generated/types/monitor/jobLog.types.ts +134 -0
- package/templates/current/clean/src/api/generated/types/monitor/logininfor.types.ts +135 -0
- package/templates/current/clean/src/api/generated/types/monitor/online.types.ts +80 -0
- package/templates/current/clean/src/api/generated/types/monitor/operlog.types.ts +126 -0
- package/templates/current/clean/src/api/generated/types/monitor/server.types.ts +205 -0
- package/templates/current/clean/src/api/generated/types/system/configs.types.ts +200 -0
- package/templates/current/clean/src/api/generated/types/system/departments.types.ts +145 -0
- package/templates/current/clean/src/api/generated/types/system/dictionaries/data.types.ts +210 -0
- package/templates/current/clean/src/api/generated/types/system/dictionaries/types.types.ts +221 -0
- package/templates/current/clean/src/api/generated/types/system/index.types.ts +19 -0
- package/templates/current/clean/src/api/generated/types/system/menus.types.ts +234 -0
- package/templates/current/clean/src/api/generated/types/system/notices.types.ts +270 -0
- package/templates/current/clean/src/api/generated/types/system/posts.types.ts +198 -0
- package/templates/current/clean/src/api/generated/types/system/roles.types.ts +410 -0
- package/templates/current/clean/src/api/generated/types/system/users.types.ts +413 -0
- package/templates/current/clean/src/api/generated/types/tool/code-generator.types.ts +388 -0
- package/templates/current/clean/src/api/index.ts +44 -39
- package/templates/current/clean/src/app/__tests__/api-generated.types.ts +24 -0
- package/templates/current/clean/src/app/api.ts +6 -0
- package/templates/current/clean/src/app/authorization/permission.ts +9 -0
- package/templates/current/{examples/src/app → clean/src/app/config}/runtimeConfig.ts +44 -12
- package/templates/current/clean/src/app/errors/errorMessage.ts +80 -0
- package/templates/current/clean/src/app/http/client.ts +141 -0
- package/templates/current/clean/src/app/http/http-adapter.ts +71 -0
- package/templates/current/{examples/src/app → clean/src/app/i18n}/adminLocale.ts +25 -19
- package/templates/current/clean/src/app/{localeFormat.ts → i18n/localeFormat.ts} +29 -6
- package/templates/current/clean/src/app/i18n/origenUiLocale.ts +15 -0
- package/templates/current/clean/src/app/menu/menu.ts +175 -0
- package/templates/current/clean/src/app/menu/menuTypes.ts +20 -0
- package/templates/current/clean/src/{features → app}/security/devtoolsProtection.ts +8 -7
- package/templates/current/clean/src/app/ui/createAdminUi.ts +31 -0
- package/templates/current/clean/src/app/ui/iconCatalog.ts +71 -0
- package/templates/current/clean/src/assets/icons/appearance.svg +1 -0
- package/templates/current/clean/src/assets/icons/arrow-right.svg +1 -0
- package/templates/current/clean/src/assets/icons/check.svg +1 -0
- package/templates/current/clean/src/assets/icons/circle-check.svg +1 -0
- package/templates/current/clean/src/assets/icons/default.svg +4 -0
- package/templates/current/clean/src/assets/icons/directory/setting.svg +1 -0
- package/templates/current/clean/src/assets/icons/expand.svg +1 -0
- package/templates/current/clean/src/assets/icons/fold.svg +1 -0
- package/templates/current/clean/src/assets/icons/key.svg +1 -0
- package/templates/current/clean/src/assets/icons/lock.svg +1 -0
- package/templates/current/clean/src/assets/icons/monitor.svg +1 -0
- package/templates/current/clean/src/assets/icons/moon.svg +11 -0
- package/templates/current/clean/src/assets/icons/page/department.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/dictionary.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/menus.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/user.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/users.svg +1 -0
- package/templates/current/clean/src/assets/icons/plus.svg +1 -0
- package/templates/current/clean/src/assets/icons/profile.svg +1 -0
- package/templates/current/clean/src/assets/icons/refresh.svg +1 -0
- package/templates/current/clean/src/assets/icons/roles.svg +1 -0
- package/templates/current/clean/src/assets/icons/search.svg +1 -0
- package/templates/current/clean/src/assets/icons/sunny.svg +1 -0
- package/templates/current/clean/src/assets/icons/system.svg +1 -0
- package/templates/current/clean/src/assets/icons/theme-auto.svg +14 -0
- package/templates/current/clean/src/assets/icons/tune.svg +13 -0
- package/templates/current/clean/src/{features/shell/components → components}/RouteProgress.vue +2 -2
- package/templates/current/{examples/src/features/system/access → clean/src}/composables/useAuthorizationRefresh.ts +6 -1
- package/templates/current/clean/src/composables/useSystemTableSearchVisibility.ts +33 -0
- package/templates/current/clean/src/{features/appearance/composables → composables}/useTheme.ts +1 -1
- package/templates/current/clean/src/env.d.ts +6 -19
- package/templates/current/clean/src/layouts/AdminLayout.vue +7 -9
- package/templates/current/clean/src/{features/shell/components → layouts}/AdminWatermark.vue +2 -2
- package/templates/current/clean/src/layouts/BreadcrumbBar.vue +9 -1
- package/templates/current/clean/src/layouts/SideMenu.vue +7 -15
- package/templates/current/clean/src/{features/appearance/components → layouts}/ThemePanel.vue +39 -11
- package/templates/current/clean/src/layouts/TopBar.vue +60 -28
- package/templates/current/clean/src/layouts/WorkspaceTabs.vue +10 -1
- package/templates/current/clean/src/layouts/topBarMenuSearch.ts +25 -4
- package/templates/current/clean/src/locales/en-US.json +227 -219
- package/templates/current/clean/src/locales/index.ts +72 -32
- package/templates/current/clean/src/locales/messages-types.ts +15 -10
- package/templates/current/clean/src/locales/vue-i18n.d.ts +1 -1
- package/templates/current/clean/src/locales/zh-CN.json +226 -218
- package/templates/current/clean/src/locales/zh-TW.json +222 -214
- package/templates/current/clean/src/main.ts +59 -30
- package/templates/current/clean/src/router/bootstrap.ts +69 -24
- package/templates/current/clean/src/router/dynamic/componentLoader.ts +150 -0
- package/templates/current/clean/src/router/{dynamicMenuRefresh.ts → dynamic/dynamicMenuRefresh.ts} +6 -2
- package/templates/current/clean/src/router/dynamic/dynamicRoutes.ts +247 -0
- package/templates/current/clean/src/router/navigation/guards.ts +12 -0
- package/templates/current/clean/src/router/navigation/paths.ts +28 -0
- package/templates/current/clean/src/router/navigation/staticRoutes.ts +109 -0
- package/templates/current/clean/src/router/{queryEncryption.ts → query/queryEncryption.ts} +29 -12
- package/templates/current/clean/src/router/query/routeQuery.ts +29 -0
- package/templates/current/clean/src/router/{useRouteQueryDefaults.ts → query/useRouteQueryDefaults.ts} +9 -8
- package/templates/current/clean/src/router/query/useRouteQueryDefaults.types.ts +28 -0
- package/templates/current/clean/src/router/{runtimeErrorRecovery.ts → recovery/runtimeErrorRecovery.ts} +21 -3
- package/templates/current/clean/src/{features/auth/store → store}/auth.ts +96 -61
- package/templates/current/clean/src/store/dictionaries.ts +86 -0
- package/templates/current/clean/src/{features/shell/store → store}/sidebar.ts +9 -2
- package/templates/current/{examples/src/features/appearance → clean/src}/store/theme.ts +8 -4
- package/templates/current/clean/src/styles/layout.css +51 -0
- package/templates/current/clean/src/templates/og-form.ts +7 -2
- package/templates/current/clean/src/templates/og-table.ts +88 -20
- package/templates/current/clean/src/templates/router.ts +11 -2
- package/templates/current/clean/src/utils/color-mix.ts +6 -2
- package/templates/current/clean/src/utils/download.ts +11 -0
- package/templates/current/clean/src/utils/permissions.ts +1 -1
- package/templates/current/clean/src/utils/retryableDialog.ts +46 -0
- package/templates/current/clean/src/{features → views}/errors/pages/Forbidden.vue +6 -2
- package/templates/current/clean/src/views/errors/pages/MethodNotAllowed.vue +34 -0
- package/templates/current/clean/src/{features → views}/errors/pages/NotFound.vue +6 -2
- package/templates/current/clean/src/{features → views}/errors/pages/ServerError.vue +6 -2
- package/templates/current/clean/src/{features/auth/pages/Login.vue → views/login/pages/index.vue} +99 -10
- package/templates/current/clean/src/views/system/access/services/admin-repository.ts +489 -0
- package/templates/current/clean/src/views/system/access/services/rbac.ts +317 -0
- package/templates/current/clean/src/views/system/dept/components/DepartmentEditorForm.vue +87 -0
- package/templates/current/clean/src/views/system/dept/composables/useDepartmentManagement.ts +314 -0
- package/templates/current/clean/src/views/system/dept/pages/index.vue +44 -0
- package/templates/current/clean/src/views/system/dept/services/departments.ts +168 -0
- package/templates/current/clean/src/views/system/dict/components/DictionaryDataEditorForm.vue +98 -0
- package/templates/current/clean/src/views/system/dict/components/DictionaryDataPreview.vue +233 -0
- package/templates/current/clean/src/views/system/dict/components/DictionaryTypeEditorForm.vue +66 -0
- package/templates/current/clean/src/views/system/dict/composables/useDictionaryDataManagement.ts +406 -0
- package/templates/current/clean/src/views/system/dict/composables/useDictionaryTypeManagement.ts +329 -0
- package/templates/current/clean/src/views/system/dict/data/pages/index.vue +134 -0
- package/templates/current/clean/src/views/system/dict/pages/index.vue +113 -0
- package/templates/current/clean/src/views/system/dict/services/dictionaries.ts +239 -0
- package/templates/current/clean/src/views/system/menu/components/MenuEditorForm.vue +252 -0
- package/templates/current/clean/src/views/system/menu/composables/useMenuManagement.ts +357 -0
- package/templates/current/clean/src/views/system/menu/menuDraft.ts +45 -0
- package/templates/current/clean/src/views/system/menu/pages/ExternalLink.vue +37 -0
- package/templates/current/clean/src/views/system/menu/pages/index.vue +75 -0
- package/templates/current/clean/src/views/system/post/components/PostEditorForm.vue +69 -0
- package/templates/current/clean/src/views/system/post/composables/usePostManagement.ts +245 -0
- package/templates/current/clean/src/views/system/post/pages/index.vue +92 -0
- package/templates/current/clean/src/views/system/post/services/posts.ts +100 -0
- package/templates/current/clean/src/views/system/role/auth-users/pages/index.vue +100 -0
- package/templates/current/clean/src/views/system/role/components/RoleDataScopeForm.vue +167 -0
- package/templates/current/clean/src/views/system/role/components/RoleEditorForm.vue +165 -0
- package/templates/current/clean/src/views/system/role/components/RoleUserSelectForm.vue +129 -0
- package/templates/current/clean/src/views/system/role/composables/useRoleManagement.ts +422 -0
- package/templates/current/clean/src/views/system/role/composables/useRoleUserManagement.ts +233 -0
- package/templates/current/clean/src/views/system/role/pages/index.vue +110 -0
- package/templates/current/clean/src/views/system/role/services/roleAccess.ts +162 -0
- package/templates/current/clean/src/views/system/user/auth-roles/pages/index.vue +209 -0
- package/templates/current/clean/src/views/system/user/components/UserDetailsForm.vue +108 -0
- package/templates/current/clean/src/views/system/user/components/UserEditorForm.vue +207 -0
- package/templates/current/clean/src/views/system/user/components/UserImportDialog.vue +80 -0
- package/templates/current/clean/src/views/system/user/components/UserResetPasswordForm.vue +56 -0
- package/templates/current/clean/src/views/system/user/composables/useUserManagement.ts +502 -0
- package/templates/current/clean/src/views/system/user/pages/index.vue +459 -0
- package/templates/current/clean/tests/e2e/admin-access-business.spec.ts +33 -0
- package/templates/current/clean/tests/e2e/admin-shell.spec.ts +50 -0
- package/templates/current/clean/tests/e2e/fixtures/adminMockBackend.ts +95 -0
- package/templates/current/clean/tests/e2e/fixtures/labelGeometry.ts +52 -0
- package/templates/current/clean/tests/e2e/mock-api-generation.spec.ts +27 -0
- package/templates/current/clean/tests/e2e/mock-business.spec.ts +555 -0
- package/templates/current/clean/tests/e2e/mock-menu-retry-form-label.spec.ts +100 -0
- package/templates/current/clean/tests/e2e/mock-shell.spec.ts +25 -0
- package/templates/current/clean/tests/e2e/mock-tree-selection-layout.spec.ts +113 -0
- package/templates/current/clean/tests/unit/api/api-codegen.spec.ts +893 -0
- package/templates/current/clean/tests/unit/api/client.spec.ts +145 -0
- package/templates/current/clean/tests/unit/api/generated-http-client.spec.ts +290 -0
- package/templates/current/{examples/src → clean/tests/unit}/api/http-adapter.spec.ts +3 -3
- package/templates/current/clean/tests/unit/api/system-apis.spec.ts +118 -0
- package/templates/current/clean/tests/unit/app/createAdminUi.spec.ts +79 -0
- package/templates/current/clean/{src → tests/unit}/app/errorMessage.spec.ts +1 -1
- package/templates/current/clean/tests/unit/app/iconCatalog.spec.ts +12 -0
- package/templates/current/clean/tests/unit/app/menu.spec.ts +215 -0
- package/templates/current/{examples/src → clean/tests/unit}/app/origenUiLocale.spec.ts +1 -1
- package/templates/current/{examples/src → clean/tests/unit}/app/permission.spec.ts +4 -5
- package/templates/current/clean/tests/unit/app/runtimeConfig.spec.ts +36 -0
- package/templates/current/{examples/src/features → clean/tests/unit/app}/security/devtoolsProtection.spec.ts +17 -7
- package/templates/current/{examples/src/features/shell → clean/tests/unit}/composables/useRouteProgress.spec.ts +1 -1
- package/templates/current/{examples/src/features/shell/components → clean/tests/unit/layouts}/AdminWatermark.spec.ts +5 -7
- package/templates/current/{examples/src → clean/tests/unit}/layouts/topBarMenuSearch.spec.ts +25 -8
- package/templates/current/clean/{src → tests/unit}/locales/messages.spec.ts +43 -17
- package/templates/current/clean/tests/unit/router/dynamicMenuRefresh.spec.ts +151 -0
- package/templates/current/clean/tests/unit/router/dynamicRoutes.spec.ts +374 -0
- package/templates/current/clean/tests/unit/router/paths.spec.ts +103 -0
- package/templates/current/clean/{src → tests/unit}/router/queryEncryption.spec.ts +49 -12
- package/templates/current/{examples/src → clean/tests/unit}/router/routeQuery.spec.ts +8 -1
- package/templates/current/clean/{src → tests/unit}/router/runtimeErrorRecovery.spec.ts +11 -6
- package/templates/current/{examples/src → clean/tests/unit}/router/useRouteQueryDefaults.spec.ts +46 -12
- package/templates/current/clean/tests/unit/scripts/mock-api.spec.ts +440 -0
- package/templates/current/clean/{scripts → tests/unit/scripts}/vite-build-policy.spec.ts +35 -6
- package/templates/current/clean/{src/features/auth → tests/unit}/store/auth.spec.ts +68 -15
- package/templates/current/clean/tests/unit/store/dictionaries.spec.ts +106 -0
- package/templates/current/{examples/src → clean/tests/unit}/templates/templates.spec.ts +60 -16
- package/templates/current/clean/{src/utils/__tests__ → tests/unit/utils}/color-mix.spec.ts +1 -1
- package/templates/current/clean/tests/unit/utils/retryableDialog.spec.ts +61 -0
- package/templates/current/{examples/src/features/errors/pages → clean/tests/unit/views/errors}/error-pages.spec.ts +11 -7
- package/templates/current/clean/tests/unit/views/feature-composables.spec.ts +233 -0
- package/templates/current/clean/tests/unit/views/system/access/admin-repository.spec.ts +353 -0
- package/templates/current/clean/tests/unit/views/system/access/rbac.spec.ts +329 -0
- package/templates/current/clean/tests/unit/views/system/dept/departments.spec.ts +104 -0
- package/templates/current/clean/tests/unit/views/system/dict/dictionaries.spec.ts +234 -0
- package/templates/current/clean/tests/unit/views/system/menu/menuDraft.spec.ts +77 -0
- package/templates/current/clean/tests/unit/views/system/menu/useMenuManagement.spec.ts +339 -0
- package/templates/current/clean/tests/unit/views/system/user/searchControl.spec.ts +128 -0
- package/templates/current/clean/tsconfig.json +4 -19
- package/templates/current/clean/vite.build-policy.ts +97 -22
- package/templates/current/clean/vite.config.ts +50 -7
- package/templates/current/examples/.agents/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/examples/.agents/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/examples/.agents/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/examples/.agents/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/examples/.agents/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.agents/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.agents/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.agents/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.agents/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/examples/.agents/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.agents/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.agents/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.agents/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/examples/.agents/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/examples/.api-client-e2e.config.ts +13 -0
- package/templates/current/examples/.claude/rules/01-feature-architecture.md +10 -0
- package/templates/current/examples/.claude/rules/02-vue-typescript.md +10 -0
- package/templates/current/examples/.claude/rules/03-component-policy.md +31 -0
- package/templates/current/examples/.claude/rules/04-api-auth-router.md +10 -0
- package/templates/current/examples/.claude/rules/05-style.md +10 -0
- package/templates/current/examples/.claude/rules/06-quality.md +10 -0
- package/templates/current/examples/.claude/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/examples/.claude/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/examples/.claude/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/examples/.claude/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/examples/.claude/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.claude/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.claude/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.claude/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.claude/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/examples/.claude/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.claude/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.claude/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.claude/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/examples/.claude/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/examples/.codebuddy/rules/01-feature-architecture.md +2 -2
- package/templates/current/examples/.codebuddy/rules/03-component-policy.md +4 -1
- package/templates/current/examples/.codebuddy/skills/admin-component-usage/SKILL.md +31 -0
- package/templates/current/examples/.codebuddy/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/examples/.codebuddy/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/examples/.codebuddy/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/examples/.codebuddy/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/examples/.codebuddy/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/examples/.codebuddy/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/examples/.codebuddy/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/examples/.codebuddy/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/examples/.codex/AGENTS.md +55 -8
- package/templates/current/examples/.codex/rules/01-feature-architecture.md +2 -2
- package/templates/current/examples/.codex/rules/03-component-policy.md +4 -1
- package/templates/current/examples/.cursor/rules/.generated +5 -0
- package/templates/current/examples/.cursor/rules/01-feature-architecture.mdc +2 -2
- package/templates/current/examples/.cursor/rules/03-component-policy.mdc +4 -1
- package/templates/current/examples/.cursor/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/examples/.cursor/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/examples/.cursor/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/examples/.cursor/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/examples/.cursor/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/examples/.cursor/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/examples/.cursor/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/examples/.cursor/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/examples/.cursor/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/examples/{.env.example → .env.dev} +3 -2
- package/templates/current/examples/.env.mock +4 -0
- package/templates/current/examples/.env.production +5 -0
- package/templates/current/examples/.env.test +4 -0
- package/templates/current/examples/.prettierignore +17 -0
- package/templates/current/examples/.prettierrc +8 -0
- package/templates/current/examples/.qoder/rules/01-feature-architecture.md +3 -4
- package/templates/current/examples/.qoder/rules/02-vue-typescript.md +1 -2
- package/templates/current/examples/.qoder/rules/03-component-policy.md +5 -3
- package/templates/current/examples/.qoder/rules/04-api-auth-router.md +1 -2
- package/templates/current/examples/.qoder/rules/05-style.md +1 -2
- package/templates/current/examples/.qoder/rules/06-quality.md +1 -2
- package/templates/current/examples/.qoder/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/examples/.qoder/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/examples/.qoder/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/examples/.qoder/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/examples/.qoder/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/examples/.qoder/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/examples/.qoder/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/examples/.qoder/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/examples/.qoder/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/examples/.zcode/skills/admin-component-usage/SKILL.md +28 -0
- package/templates/current/examples/.zcode/skills/admin-component-usage/references/component-directory.md +270 -0
- package/templates/current/examples/.zcode/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/examples/.zcode/skills/build-admin-feature/references/component-selection.md +38 -0
- package/templates/current/examples/.zcode/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.zcode/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.zcode/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.zcode/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.zcode/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/examples/.zcode/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.zcode/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.zcode/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.zcode/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/examples/.zcode/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/examples/AGENTS.md +55 -9
- package/templates/current/examples/CHANGELOG.md +107 -0
- package/templates/current/examples/CLAUDE.md +3 -0
- package/templates/current/examples/README.md +58 -88
- package/templates/current/examples/component-catalog.json +766 -348
- package/templates/current/examples/component-catalog.v2.json +2040 -0
- package/templates/current/examples/docs/components/dialog.md +405 -0
- package/templates/current/examples/docs/components/editor-viewer.md +87 -0
- package/templates/current/examples/docs/components/editor.md +275 -0
- package/templates/current/examples/docs/components/form-table.md +222 -0
- package/templates/current/examples/docs/components/form.md +750 -0
- package/templates/current/examples/docs/components/index.md +44 -0
- package/templates/current/examples/docs/components/router.md +452 -0
- package/templates/current/examples/docs/components/search.md +1205 -0
- package/templates/current/examples/docs/components/svg-icon.md +124 -0
- package/templates/current/examples/docs/components/table-local.md +176 -0
- package/templates/current/examples/docs/components/table-with-search.md +207 -0
- package/templates/current/examples/docs/components/table.md +813 -0
- package/templates/current/examples/docs/components/tabs.md +440 -0
- package/templates/current/examples/docs/components/upload.md +349 -0
- package/templates/current/examples/eslint.config.js +89 -0
- package/templates/current/examples/index.html +1 -1
- package/templates/current/examples/openapi.json +10048 -999
- package/templates/current/examples/package.json +45 -33
- package/templates/current/examples/playwright.config.ts +20 -6
- package/templates/current/examples/playwright.mock.config.ts +42 -0
- package/templates/current/examples/pnpm-workspace.yaml +19 -3
- package/templates/current/examples/recipes/remote-crud-dialog-form.vue +15 -13
- package/templates/current/examples/scaffold.lock.json +164 -4
- package/templates/current/examples/scripts/api-codegen.config.ts +35 -0
- package/templates/current/examples/scripts/api-codegen.ts +2015 -0
- package/templates/current/examples/scripts/api-templates/http-client.ejs +359 -0
- package/templates/current/examples/scripts/check-admin-scaffold.mjs +311 -17
- package/templates/current/examples/scripts/generate-api.ts +290 -85
- package/templates/current/examples/scripts/lib/admin-component-catalog.mjs +515 -0
- package/templates/current/examples/scripts/lib/repository-root.mjs +9 -0
- package/templates/current/examples/scripts/mock-api.ts +1356 -0
- package/templates/current/examples/scripts/remove-examples.mjs +9 -34
- package/templates/current/examples/src/App.vue +9 -18
- package/templates/current/examples/src/api/generated/data-contracts.ts +23 -265
- package/templates/current/examples/src/api/generated/http-client.ts +351 -180
- package/templates/current/examples/src/api/generated/index.ts +22 -0
- package/templates/current/examples/src/api/generated/services/auth.ts +123 -0
- package/templates/current/examples/src/api/generated/services/common/files.ts +111 -0
- package/templates/current/examples/src/api/generated/services/monitor/cache.ts +164 -0
- package/templates/current/examples/src/api/generated/services/monitor/job.ts +195 -0
- package/templates/current/examples/src/api/generated/services/monitor/jobLog.ts +126 -0
- package/templates/current/examples/src/api/generated/services/monitor/logininfor.ts +126 -0
- package/templates/current/examples/src/api/generated/services/monitor/online.ts +66 -0
- package/templates/current/examples/src/api/generated/services/monitor/operlog.ts +106 -0
- package/templates/current/examples/src/api/generated/services/monitor/server.ts +41 -0
- package/templates/current/examples/src/api/generated/services/system/configs.ts +190 -0
- package/templates/current/examples/src/api/generated/services/system/departments.ts +173 -0
- package/templates/current/examples/src/api/generated/services/system/dictionaries/data.ts +169 -0
- package/templates/current/examples/src/api/generated/services/system/dictionaries/types.ts +187 -0
- package/templates/current/examples/src/api/generated/services/system/index.ts +158 -0
- package/templates/current/examples/src/api/generated/services/system/menus.ts +193 -0
- package/templates/current/examples/src/api/generated/services/system/notices.ts +221 -0
- package/templates/current/examples/src/api/generated/services/system/posts.ts +168 -0
- package/templates/current/examples/src/api/generated/services/system/roles.ts +354 -0
- package/templates/current/examples/src/api/generated/services/system/users.ts +425 -0
- package/templates/current/examples/src/api/generated/services/tool/code-generator.ts +304 -0
- package/templates/current/examples/src/api/generated/types/auth.types.ts +132 -0
- package/templates/current/examples/src/api/generated/types/common/files.types.ts +57 -0
- package/templates/current/examples/src/api/generated/types/common.ts +174 -0
- package/templates/current/examples/src/api/generated/types/enum-dict.ts +94 -0
- package/templates/current/examples/src/api/generated/types/enums.ts +155 -0
- package/templates/current/examples/src/api/generated/types/monitor/cache.types.ts +149 -0
- package/templates/current/examples/src/api/generated/types/monitor/job.types.ts +207 -0
- package/templates/current/examples/src/api/generated/types/monitor/jobLog.types.ts +134 -0
- package/templates/current/examples/src/api/generated/types/monitor/logininfor.types.ts +135 -0
- package/templates/current/examples/src/api/generated/types/monitor/online.types.ts +80 -0
- package/templates/current/examples/src/api/generated/types/monitor/operlog.types.ts +126 -0
- package/templates/current/examples/src/api/generated/types/monitor/server.types.ts +205 -0
- package/templates/current/examples/src/api/generated/types/system/configs.types.ts +200 -0
- package/templates/current/examples/src/api/generated/types/system/departments.types.ts +145 -0
- package/templates/current/examples/src/api/generated/types/system/dictionaries/data.types.ts +210 -0
- package/templates/current/examples/src/api/generated/types/system/dictionaries/types.types.ts +221 -0
- package/templates/current/examples/src/api/generated/types/system/index.types.ts +19 -0
- package/templates/current/examples/src/api/generated/types/system/menus.types.ts +234 -0
- package/templates/current/examples/src/api/generated/types/system/notices.types.ts +270 -0
- package/templates/current/examples/src/api/generated/types/system/posts.types.ts +198 -0
- package/templates/current/examples/src/api/generated/types/system/roles.types.ts +410 -0
- package/templates/current/examples/src/api/generated/types/system/users.types.ts +413 -0
- package/templates/current/examples/src/api/generated/types/tool/code-generator.types.ts +388 -0
- package/templates/current/examples/src/api/index.ts +44 -39
- package/templates/current/examples/src/app/__tests__/api-generated.types.ts +24 -0
- package/templates/current/examples/src/app/api.ts +6 -0
- package/templates/current/examples/src/app/authorization/permission.ts +9 -0
- package/templates/current/{clean/src/app → examples/src/app/config}/runtimeConfig.ts +44 -12
- package/templates/current/examples/src/app/errors/errorMessage.ts +80 -0
- package/templates/current/examples/src/app/http/client.ts +141 -0
- package/templates/current/examples/src/app/http/http-adapter.ts +71 -0
- package/templates/current/{clean/src/app → examples/src/app/i18n}/adminLocale.ts +25 -19
- package/templates/current/examples/src/app/{localeFormat.ts → i18n/localeFormat.ts} +29 -6
- package/templates/current/examples/src/app/i18n/origenUiLocale.ts +15 -0
- package/templates/current/examples/src/app/menu/menu.ts +175 -0
- package/templates/current/examples/src/app/menu/menuTypes.ts +20 -0
- package/templates/current/examples/src/{features → app}/security/devtoolsProtection.ts +8 -7
- package/templates/current/examples/src/app/ui/createAdminUi.ts +31 -0
- package/templates/current/examples/src/app/ui/iconCatalog.ts +71 -0
- package/templates/current/examples/src/assets/icons/appearance.svg +1 -0
- package/templates/current/examples/src/assets/icons/arrow-right.svg +1 -0
- package/templates/current/examples/src/assets/icons/check.svg +1 -0
- package/templates/current/examples/src/assets/icons/circle-check.svg +1 -0
- package/templates/current/examples/src/assets/icons/default.svg +4 -0
- package/templates/current/examples/src/assets/icons/directory/setting.svg +1 -0
- package/templates/current/examples/src/assets/icons/expand.svg +1 -0
- package/templates/current/examples/src/assets/icons/fold.svg +1 -0
- package/templates/current/examples/src/assets/icons/key.svg +1 -0
- package/templates/current/examples/src/assets/icons/lock.svg +1 -0
- package/templates/current/examples/src/assets/icons/monitor.svg +1 -0
- package/templates/current/examples/src/assets/icons/moon.svg +11 -0
- package/templates/current/examples/src/assets/icons/page/department.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/dictionary.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/menus.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/user.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/users.svg +1 -0
- package/templates/current/examples/src/assets/icons/plus.svg +1 -0
- package/templates/current/examples/src/assets/icons/profile.svg +1 -0
- package/templates/current/examples/src/assets/icons/refresh.svg +1 -0
- package/templates/current/examples/src/assets/icons/roles.svg +1 -0
- package/templates/current/examples/src/assets/icons/search.svg +1 -0
- package/templates/current/examples/src/assets/icons/sunny.svg +1 -0
- package/templates/current/examples/src/assets/icons/system.svg +1 -0
- package/templates/current/examples/src/assets/icons/theme-auto.svg +14 -0
- package/templates/current/examples/src/assets/icons/tune.svg +13 -0
- package/templates/current/examples/src/{features/shell/components → components}/RouteProgress.vue +2 -2
- package/templates/current/{clean/src/features/system/access → examples/src}/composables/useAuthorizationRefresh.ts +6 -1
- package/templates/current/examples/src/composables/useSystemTableSearchVisibility.ts +33 -0
- package/templates/current/examples/src/{features/appearance/composables → composables}/useTheme.ts +1 -1
- package/templates/current/examples/src/env.d.ts +6 -19
- package/templates/current/examples/src/layouts/AdminLayout.vue +7 -9
- package/templates/current/examples/src/{features/shell/components → layouts}/AdminWatermark.vue +2 -2
- package/templates/current/examples/src/layouts/BreadcrumbBar.vue +9 -1
- package/templates/current/examples/src/layouts/SideMenu.vue +7 -15
- package/templates/current/examples/src/{features/appearance/components → layouts}/ThemePanel.vue +39 -11
- package/templates/current/examples/src/layouts/TopBar.vue +60 -28
- package/templates/current/examples/src/layouts/WorkspaceTabs.vue +10 -1
- package/templates/current/examples/src/layouts/topBarMenuSearch.ts +25 -4
- package/templates/current/examples/src/locales/en-US.json +227 -219
- package/templates/current/examples/src/locales/index.ts +72 -32
- package/templates/current/examples/src/locales/messages-types.ts +15 -10
- package/templates/current/examples/src/locales/vue-i18n.d.ts +1 -1
- package/templates/current/examples/src/locales/zh-CN.json +226 -218
- package/templates/current/examples/src/locales/zh-TW.json +222 -214
- package/templates/current/examples/src/main.ts +50 -40
- package/templates/current/examples/src/router/bootstrap.ts +69 -24
- package/templates/current/examples/src/router/dynamic/componentLoader.ts +150 -0
- package/templates/current/examples/src/router/{dynamicMenuRefresh.ts → dynamic/dynamicMenuRefresh.ts} +6 -2
- package/templates/current/examples/src/router/dynamic/dynamicRoutes.ts +247 -0
- package/templates/current/examples/src/router/navigation/guards.ts +12 -0
- package/templates/current/examples/src/router/navigation/paths.ts +28 -0
- package/templates/current/examples/src/router/navigation/staticRoutes.ts +109 -0
- package/templates/current/examples/src/router/{queryEncryption.ts → query/queryEncryption.ts} +29 -12
- package/templates/current/examples/src/router/query/routeQuery.ts +29 -0
- package/templates/current/examples/src/router/{useRouteQueryDefaults.ts → query/useRouteQueryDefaults.ts} +9 -8
- package/templates/current/examples/src/router/query/useRouteQueryDefaults.types.ts +28 -0
- package/templates/current/examples/src/router/{runtimeErrorRecovery.ts → recovery/runtimeErrorRecovery.ts} +21 -3
- package/templates/current/examples/src/{features/auth/store → store}/auth.ts +96 -61
- package/templates/current/examples/src/store/dictionaries.ts +86 -0
- package/templates/current/examples/src/{features/shell/store → store}/sidebar.ts +9 -2
- package/templates/current/{clean/src/features/appearance → examples/src}/store/theme.ts +8 -4
- package/templates/current/examples/src/styles/layout.css +51 -0
- package/templates/current/examples/src/templates/og-form.ts +7 -2
- package/templates/current/examples/src/templates/og-table.ts +88 -20
- package/templates/current/examples/src/templates/router.ts +11 -2
- package/templates/current/examples/src/utils/color-mix.ts +6 -2
- package/templates/current/examples/src/utils/download.ts +11 -0
- package/templates/current/examples/src/utils/permissions.ts +1 -1
- package/templates/current/examples/src/utils/retryableDialog.ts +46 -0
- package/templates/current/{clean/scripts/clean-overlay/src/features → examples/src/views}/errors/pages/Forbidden.vue +6 -2
- package/templates/current/examples/src/views/errors/pages/MethodNotAllowed.vue +34 -0
- package/templates/current/examples/{scripts/clean-overlay/src/features → src/views}/errors/pages/NotFound.vue +6 -2
- package/templates/current/examples/{scripts/clean-overlay/src/features → src/views}/errors/pages/ServerError.vue +6 -2
- package/templates/current/examples/src/{features/auth/pages/Login.vue → views/login/pages/index.vue} +99 -10
- package/templates/current/examples/src/views/system/access/services/admin-repository.ts +489 -0
- package/templates/current/examples/src/views/system/access/services/rbac.ts +317 -0
- package/templates/current/examples/src/views/system/dept/components/DepartmentEditorForm.vue +87 -0
- package/templates/current/examples/src/views/system/dept/composables/useDepartmentManagement.ts +314 -0
- package/templates/current/examples/src/views/system/dept/pages/index.vue +44 -0
- package/templates/current/examples/src/views/system/dept/services/departments.ts +168 -0
- package/templates/current/examples/src/views/system/dict/components/DictionaryDataEditorForm.vue +98 -0
- package/templates/current/examples/src/views/system/dict/components/DictionaryDataPreview.vue +233 -0
- package/templates/current/examples/src/views/system/dict/components/DictionaryTypeEditorForm.vue +66 -0
- package/templates/current/examples/src/views/system/dict/composables/useDictionaryDataManagement.ts +406 -0
- package/templates/current/examples/src/views/system/dict/composables/useDictionaryTypeManagement.ts +329 -0
- package/templates/current/examples/src/views/system/dict/data/pages/index.vue +134 -0
- package/templates/current/examples/src/views/system/dict/pages/index.vue +113 -0
- package/templates/current/examples/src/views/system/dict/services/dictionaries.ts +239 -0
- package/templates/current/examples/src/views/system/menu/components/MenuEditorForm.vue +252 -0
- package/templates/current/examples/src/views/system/menu/composables/useMenuManagement.ts +357 -0
- package/templates/current/examples/src/views/system/menu/menuDraft.ts +45 -0
- package/templates/current/examples/src/views/system/menu/pages/ExternalLink.vue +37 -0
- package/templates/current/examples/src/views/system/menu/pages/index.vue +75 -0
- package/templates/current/examples/src/views/system/post/components/PostEditorForm.vue +69 -0
- package/templates/current/examples/src/views/system/post/composables/usePostManagement.ts +245 -0
- package/templates/current/examples/src/views/system/post/pages/index.vue +92 -0
- package/templates/current/examples/src/views/system/post/services/posts.ts +100 -0
- package/templates/current/examples/src/views/system/role/auth-users/pages/index.vue +100 -0
- package/templates/current/examples/src/views/system/role/components/RoleDataScopeForm.vue +167 -0
- package/templates/current/examples/src/views/system/role/components/RoleEditorForm.vue +165 -0
- package/templates/current/examples/src/views/system/role/components/RoleUserSelectForm.vue +129 -0
- package/templates/current/examples/src/views/system/role/composables/useRoleManagement.ts +422 -0
- package/templates/current/examples/src/views/system/role/composables/useRoleUserManagement.ts +233 -0
- package/templates/current/examples/src/views/system/role/pages/index.vue +110 -0
- package/templates/current/examples/src/views/system/role/services/roleAccess.ts +162 -0
- package/templates/current/examples/src/views/system/user/auth-roles/pages/index.vue +209 -0
- package/templates/current/examples/src/views/system/user/components/UserDetailsForm.vue +108 -0
- package/templates/current/examples/src/views/system/user/components/UserEditorForm.vue +207 -0
- package/templates/current/examples/src/views/system/user/components/UserImportDialog.vue +80 -0
- package/templates/current/examples/src/views/system/user/components/UserResetPasswordForm.vue +56 -0
- package/templates/current/examples/src/views/system/user/composables/useUserManagement.ts +502 -0
- package/templates/current/examples/src/views/system/user/pages/index.vue +459 -0
- package/templates/current/examples/tests/e2e/admin-access-business.spec.ts +33 -0
- package/templates/current/examples/tests/e2e/admin-shell.spec.ts +50 -0
- package/templates/current/examples/tests/e2e/fixtures/adminMockBackend.ts +95 -0
- package/templates/current/examples/tests/e2e/fixtures/labelGeometry.ts +52 -0
- package/templates/current/examples/tests/e2e/mock-api-generation.spec.ts +27 -0
- package/templates/current/examples/tests/e2e/mock-business.spec.ts +555 -0
- package/templates/current/examples/tests/e2e/mock-menu-retry-form-label.spec.ts +100 -0
- package/templates/current/examples/tests/e2e/mock-shell.spec.ts +25 -0
- package/templates/current/examples/tests/e2e/mock-tree-selection-layout.spec.ts +113 -0
- package/templates/current/examples/tests/unit/api/api-codegen.spec.ts +893 -0
- package/templates/current/examples/tests/unit/api/client.spec.ts +145 -0
- package/templates/current/examples/tests/unit/api/generated-http-client.spec.ts +290 -0
- package/templates/current/{clean/src → examples/tests/unit}/api/http-adapter.spec.ts +3 -3
- package/templates/current/examples/tests/unit/api/system-apis.spec.ts +118 -0
- package/templates/current/examples/tests/unit/app/createAdminUi.spec.ts +79 -0
- package/templates/current/examples/{src → tests/unit}/app/errorMessage.spec.ts +1 -1
- package/templates/current/examples/tests/unit/app/iconCatalog.spec.ts +12 -0
- package/templates/current/examples/tests/unit/app/menu.spec.ts +215 -0
- package/templates/current/{clean/src → examples/tests/unit}/app/origenUiLocale.spec.ts +1 -1
- package/templates/current/{clean/src → examples/tests/unit}/app/permission.spec.ts +4 -5
- package/templates/current/examples/tests/unit/app/runtimeConfig.spec.ts +36 -0
- package/templates/current/{clean/src/features → examples/tests/unit/app}/security/devtoolsProtection.spec.ts +17 -7
- package/templates/current/{clean/src/features/shell → examples/tests/unit}/composables/useRouteProgress.spec.ts +1 -1
- package/templates/current/{clean/src/features/shell/components → examples/tests/unit/layouts}/AdminWatermark.spec.ts +5 -7
- package/templates/current/{clean/src → examples/tests/unit}/layouts/topBarMenuSearch.spec.ts +25 -8
- package/templates/current/examples/{src → tests/unit}/locales/messages.spec.ts +43 -17
- package/templates/current/examples/tests/unit/router/dynamicMenuRefresh.spec.ts +151 -0
- package/templates/current/examples/tests/unit/router/dynamicRoutes.spec.ts +374 -0
- package/templates/current/examples/tests/unit/router/paths.spec.ts +103 -0
- package/templates/current/examples/{src → tests/unit}/router/queryEncryption.spec.ts +49 -12
- package/templates/current/{clean/src → examples/tests/unit}/router/routeQuery.spec.ts +8 -1
- package/templates/current/examples/{src → tests/unit}/router/runtimeErrorRecovery.spec.ts +11 -6
- package/templates/current/{clean/src → examples/tests/unit}/router/useRouteQueryDefaults.spec.ts +46 -12
- package/templates/current/examples/tests/unit/scripts/mock-api.spec.ts +440 -0
- package/templates/current/examples/{scripts → tests/unit/scripts}/vite-build-policy.spec.ts +35 -6
- package/templates/current/examples/{src/features/auth → tests/unit}/store/auth.spec.ts +68 -15
- package/templates/current/examples/tests/unit/store/dictionaries.spec.ts +106 -0
- package/templates/current/{clean/src → examples/tests/unit}/templates/templates.spec.ts +60 -16
- package/templates/current/examples/{src/utils/__tests__ → tests/unit/utils}/color-mix.spec.ts +1 -1
- package/templates/current/examples/tests/unit/utils/retryableDialog.spec.ts +61 -0
- package/templates/current/examples/{scripts/clean-overlay/src/features/errors/pages → tests/unit/views/errors}/error-pages.spec.ts +12 -9
- package/templates/current/examples/tests/unit/views/feature-composables.spec.ts +233 -0
- package/templates/current/examples/tests/unit/views/system/access/admin-repository.spec.ts +353 -0
- package/templates/current/examples/tests/unit/views/system/access/rbac.spec.ts +329 -0
- package/templates/current/examples/tests/unit/views/system/dept/departments.spec.ts +104 -0
- package/templates/current/examples/tests/unit/views/system/dict/dictionaries.spec.ts +234 -0
- package/templates/current/examples/tests/unit/views/system/menu/menuDraft.spec.ts +77 -0
- package/templates/current/examples/tests/unit/views/system/menu/useMenuManagement.spec.ts +339 -0
- package/templates/current/examples/tests/unit/views/system/user/searchControl.spec.ts +128 -0
- package/templates/current/examples/tsconfig.json +4 -19
- package/templates/current/examples/vite.build-policy.ts +97 -22
- package/templates/current/examples/vite.config.ts +50 -7
- package/templates/current/clean/.codebuddy/AGENTS.md +0 -18
- package/templates/current/clean/.codex/skills/build-admin-feature/SKILL.md +0 -14
- package/templates/current/clean/.codex/skills/build-admin-feature/references/component-selection.md +0 -25
- package/templates/current/clean/.codex/skills/use-og-table/SKILL.md +0 -16
- package/templates/current/clean/.cursor/AGENTS.md +0 -18
- package/templates/current/clean/.env.production.example +0 -31
- package/templates/current/clean/.qoder/AGENTS.md +0 -15
- package/templates/current/clean/e2e/admin-shell.spec.ts +0 -156
- package/templates/current/clean/e2e/demo-shell.spec.ts +0 -372
- package/templates/current/clean/playwright.demo.config.ts +0 -25
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/NotFound.vue +0 -31
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/ServerError.vue +0 -31
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/error-pages.spec.ts +0 -41
- package/templates/current/clean/scripts/clean-overlay/src/main.ts +0 -100
- package/templates/current/clean/scripts/clean-overlay/src/router/componentCache.ts +0 -12
- package/templates/current/clean/scripts/clean-overlay/src/router/componentRegistry.ts +0 -14
- package/templates/current/clean/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +0 -77
- package/templates/current/clean/scripts/clean-overlay/src/router/paths.ts +0 -21
- package/templates/current/clean/scripts/clean-overlay/src/router/staticRoutes.ts +0 -63
- package/templates/current/clean/scripts/demo-api.ts +0 -873
- package/templates/current/clean/src/api/client.spec.ts +0 -66
- package/templates/current/clean/src/api/client.ts +0 -152
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/templates/current/clean/src/api/generated//350/256/244/350/257/201.ts +0 -95
- package/templates/current/clean/src/api/http-adapter.ts +0 -83
- package/templates/current/clean/src/app/createAdminUi.spec.ts +0 -166
- package/templates/current/clean/src/app/createAdminUi.ts +0 -63
- package/templates/current/clean/src/app/embedded-token.spec.ts +0 -40
- package/templates/current/clean/src/app/embedded.spec.ts +0 -135
- package/templates/current/clean/src/app/embedded.ts +0 -255
- package/templates/current/clean/src/app/errorMessage.ts +0 -53
- package/templates/current/clean/src/app/menu-host.spec.ts +0 -77
- package/templates/current/clean/src/app/menu.spec.ts +0 -320
- package/templates/current/clean/src/app/menu.ts +0 -308
- package/templates/current/clean/src/app/menuTypes.ts +0 -18
- package/templates/current/clean/src/app/origenUiLocale.ts +0 -10
- package/templates/current/clean/src/app/permission.ts +0 -9
- package/templates/current/clean/src/demo-api.spec.ts +0 -478
- package/templates/current/clean/src/features/errors/pages/error-pages.spec.ts +0 -41
- package/templates/current/clean/src/features/system/access/api/admin-repository.spec.ts +0 -14
- package/templates/current/clean/src/features/system/access/api/admin-repository.ts +0 -298
- package/templates/current/clean/src/features/system/access/api/rbac.spec.ts +0 -72
- package/templates/current/clean/src/features/system/access/api/rbac.ts +0 -292
- package/templates/current/clean/src/features/system/access/composables/useAuthorizationPolling.spec.ts +0 -134
- package/templates/current/clean/src/features/system/access/composables/useAuthorizationPolling.ts +0 -96
- package/templates/current/clean/src/features/workspace/pages/Profile.vue +0 -185
- package/templates/current/clean/src/router/componentCache.ts +0 -12
- package/templates/current/clean/src/router/componentRegistry.ts +0 -14
- package/templates/current/clean/src/router/dynamicMenuRefresh.spec.ts +0 -101
- package/templates/current/clean/src/router/dynamicRoutes.spec.ts +0 -77
- package/templates/current/clean/src/router/dynamicRoutes.ts +0 -177
- package/templates/current/clean/src/router/guards.ts +0 -5
- package/templates/current/clean/src/router/paths.spec.ts +0 -50
- package/templates/current/clean/src/router/paths.ts +0 -21
- package/templates/current/clean/src/router/routeQuery.ts +0 -6
- package/templates/current/clean/src/router/staticRoutes.ts +0 -63
- package/templates/current/clean/src/router/useRouteQueryDefaults.types.ts +0 -20
- package/templates/current/examples/.codebuddy/AGENTS.md +0 -18
- package/templates/current/examples/.codex/skills/build-admin-feature/SKILL.md +0 -14
- package/templates/current/examples/.codex/skills/build-admin-feature/references/component-selection.md +0 -25
- package/templates/current/examples/.codex/skills/use-og-table/SKILL.md +0 -16
- package/templates/current/examples/.cursor/AGENTS.md +0 -18
- package/templates/current/examples/.env.production.example +0 -31
- package/templates/current/examples/.qoder/AGENTS.md +0 -15
- package/templates/current/examples/e2e/admin-shell.spec.ts +0 -156
- package/templates/current/examples/e2e/demo-shell.spec.ts +0 -372
- package/templates/current/examples/playwright.demo.config.ts +0 -25
- package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/Forbidden.vue +0 -31
- package/templates/current/examples/scripts/clean-overlay/src/main.ts +0 -100
- package/templates/current/examples/scripts/clean-overlay/src/router/componentCache.ts +0 -12
- package/templates/current/examples/scripts/clean-overlay/src/router/componentRegistry.ts +0 -14
- package/templates/current/examples/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +0 -77
- package/templates/current/examples/scripts/clean-overlay/src/router/paths.ts +0 -21
- package/templates/current/examples/scripts/clean-overlay/src/router/staticRoutes.ts +0 -63
- package/templates/current/examples/scripts/demo-api.ts +0 -873
- package/templates/current/examples/src/api/client.spec.ts +0 -66
- package/templates/current/examples/src/api/client.ts +0 -152
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/templates/current/examples/src/api/generated//350/256/244/350/257/201.ts +0 -95
- package/templates/current/examples/src/api/http-adapter.ts +0 -83
- package/templates/current/examples/src/app/createAdminUi.spec.ts +0 -166
- package/templates/current/examples/src/app/createAdminUi.ts +0 -63
- package/templates/current/examples/src/app/embedded-token.spec.ts +0 -40
- package/templates/current/examples/src/app/embedded.spec.ts +0 -135
- package/templates/current/examples/src/app/embedded.ts +0 -255
- package/templates/current/examples/src/app/errorMessage.ts +0 -53
- package/templates/current/examples/src/app/menu-host.spec.ts +0 -77
- package/templates/current/examples/src/app/menu.spec.ts +0 -320
- package/templates/current/examples/src/app/menu.ts +0 -308
- package/templates/current/examples/src/app/menuTypes.ts +0 -18
- package/templates/current/examples/src/app/origenUiLocale.ts +0 -10
- package/templates/current/examples/src/app/permission.ts +0 -9
- package/templates/current/examples/src/demo-api.spec.ts +0 -478
- package/templates/current/examples/src/features/errors/pages/Forbidden.vue +0 -31
- package/templates/current/examples/src/features/errors/pages/NotFound.vue +0 -31
- package/templates/current/examples/src/features/errors/pages/ServerError.vue +0 -31
- package/templates/current/examples/src/features/feature-composables.spec.ts +0 -245
- package/templates/current/examples/src/features/system/access/api/admin-repository.spec.ts +0 -14
- package/templates/current/examples/src/features/system/access/api/admin-repository.ts +0 -298
- package/templates/current/examples/src/features/system/access/api/rbac.spec.ts +0 -72
- package/templates/current/examples/src/features/system/access/api/rbac.ts +0 -292
- package/templates/current/examples/src/features/system/access/composables/useAuthorizationPolling.spec.ts +0 -134
- package/templates/current/examples/src/features/system/access/composables/useAuthorizationPolling.ts +0 -96
- package/templates/current/examples/src/features/system/audit/composables/useAuditManagement.ts +0 -122
- package/templates/current/examples/src/features/system/audit/pages/AuditList.vue +0 -20
- package/templates/current/examples/src/features/system/menus/components/MenuEditorForm.vue +0 -279
- package/templates/current/examples/src/features/system/menus/composables/useMenuManagement.ts +0 -435
- package/templates/current/examples/src/features/system/menus/menuDraft.spec.ts +0 -204
- package/templates/current/examples/src/features/system/menus/menuDraft.ts +0 -116
- package/templates/current/examples/src/features/system/menus/menuTreePrecheck.spec.ts +0 -268
- package/templates/current/examples/src/features/system/menus/menuTreePrecheck.ts +0 -317
- package/templates/current/examples/src/features/system/menus/pages/MenuList.vue +0 -51
- package/templates/current/examples/src/features/system/roles/components/RoleEditorForm.vue +0 -116
- package/templates/current/examples/src/features/system/roles/composables/useRoleManagement.ts +0 -194
- package/templates/current/examples/src/features/system/roles/pages/RoleList.vue +0 -47
- package/templates/current/examples/src/features/system/users/components/UserEditorForm.vue +0 -104
- package/templates/current/examples/src/features/system/users/composables/useUserManagement.ts +0 -228
- package/templates/current/examples/src/features/system/users/pages/UserList.vue +0 -51
- package/templates/current/examples/src/features/workspace/pages/Dashboard.spec.ts +0 -41
- package/templates/current/examples/src/features/workspace/pages/Dashboard.vue +0 -325
- package/templates/current/examples/src/features/workspace/pages/Profile.vue +0 -185
- package/templates/current/examples/src/router/componentCache.ts +0 -18
- package/templates/current/examples/src/router/componentRegistry.ts +0 -66
- package/templates/current/examples/src/router/dynamicMenuRefresh.spec.ts +0 -101
- package/templates/current/examples/src/router/dynamicRoutes.spec.ts +0 -144
- package/templates/current/examples/src/router/dynamicRoutes.ts +0 -177
- package/templates/current/examples/src/router/guards.ts +0 -5
- package/templates/current/examples/src/router/paths.spec.ts +0 -50
- package/templates/current/examples/src/router/paths.ts +0 -21
- package/templates/current/examples/src/router/routeQuery.ts +0 -6
- package/templates/current/examples/src/router/staticRoutes.ts +0 -63
- package/templates/current/examples/src/router/useRouteQueryDefaults.types.ts +0 -20
- /package/templates/current/clean/{.codex → .agents}/skills/style-og-origen-ui/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/style-og-origen-ui/agents/openai.yaml +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-dialog/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-dialog/agents/openai.yaml +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-editor/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-http/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-http/agents/openai.yaml +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-router-tabs/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/style-og-origen-ui/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-dialog/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-editor/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-http/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-router-tabs/SKILL.md +0 -0
- /package/templates/current/clean/src/{features/security/components → components}/DevtoolsProtectionOverlay.vue +0 -0
- /package/templates/current/clean/src/{features/shell/composables → composables}/useRouteProgress.ts +0 -0
- /package/templates/current/clean/src/{features/workspace → views/fallback}/pages/Empty.vue +0 -0
- /package/templates/current/examples/{.codex → .agents}/skills/style-og-origen-ui/agents/openai.yaml +0 -0
- /package/templates/current/examples/{.codex → .agents}/skills/use-og-dialog/agents/openai.yaml +0 -0
- /package/templates/current/examples/{.codex → .agents}/skills/use-og-http/agents/openai.yaml +0 -0
- /package/templates/current/examples/src/{features/security/components → components}/DevtoolsProtectionOverlay.vue +0 -0
- /package/templates/current/examples/src/{features/shell/composables → composables}/useRouteProgress.ts +0 -0
- /package/templates/current/examples/src/{features/workspace → views/fallback}/pages/Empty.vue +0 -0
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import type { RouteSourceNode } from '@origen-ui/router'
|
|
2
|
-
import type { BackendMenuNode } from '../app/menuTypes'
|
|
3
|
-
import { componentCacheNames, fallbackComponentKey } from './componentCache'
|
|
4
|
-
|
|
5
|
-
function routeName(source: BackendMenuNode, used: Set<string>): string {
|
|
6
|
-
const base = `dyn-${source.code.replace(/[^\w-]+/g, '-').replace(/^-|-$/g, '') || 'route'}`
|
|
7
|
-
let name = base
|
|
8
|
-
let suffix = 2
|
|
9
|
-
while (used.has(name)) {
|
|
10
|
-
name = `${base}-${suffix}`
|
|
11
|
-
suffix += 1
|
|
12
|
-
}
|
|
13
|
-
used.add(name)
|
|
14
|
-
return name
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function routePath(source: BackendMenuNode, isRoot: boolean): string {
|
|
18
|
-
const path = source.path.trim()
|
|
19
|
-
if (!path) return isRoot ? '/workspace' : 'empty'
|
|
20
|
-
if (isRoot && !path.startsWith('/')) return `/${path}`
|
|
21
|
-
return path
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function routeMeta(source: BackendMenuNode, hasChildren: boolean): RouteSourceNode['meta'] {
|
|
25
|
-
const cache = source.cache
|
|
26
|
-
? { enabled: true, name: source.componentKey ? componentCacheNames[source.componentKey] : undefined }
|
|
27
|
-
: undefined
|
|
28
|
-
return {
|
|
29
|
-
title: source.title,
|
|
30
|
-
...(source.titleKey ? { titleKey: source.titleKey } : {}),
|
|
31
|
-
icon: source.icon,
|
|
32
|
-
permissions: source.permissions,
|
|
33
|
-
menu: { hidden: source.hidden === true || source.menu === false, order: source.order },
|
|
34
|
-
breadcrumb: {
|
|
35
|
-
label: source.title,
|
|
36
|
-
...(source.titleKey ? { labelKey: source.titleKey } : {}),
|
|
37
|
-
},
|
|
38
|
-
tab: { hidden: source.tabHidden === true || hasChildren },
|
|
39
|
-
cache,
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
interface FlatMenuNode {
|
|
44
|
-
id: string
|
|
45
|
-
node: BackendMenuNode
|
|
46
|
-
structuralParentId?: string
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function flattenSources(
|
|
50
|
-
nodes: readonly BackendMenuNode[],
|
|
51
|
-
output: FlatMenuNode[],
|
|
52
|
-
structuralParentId?: string,
|
|
53
|
-
): void {
|
|
54
|
-
for (const node of nodes) {
|
|
55
|
-
const id = `route-${output.length}`
|
|
56
|
-
const copy: BackendMenuNode = {
|
|
57
|
-
...node,
|
|
58
|
-
children: undefined,
|
|
59
|
-
}
|
|
60
|
-
output.push({ id, node: copy, structuralParentId })
|
|
61
|
-
if (node.children?.length) flattenSources(node.children, output, id)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function buildTree(nodes: readonly BackendMenuNode[]): readonly BackendMenuNode[] {
|
|
66
|
-
const flat: FlatMenuNode[] = []
|
|
67
|
-
flattenSources(nodes, flat)
|
|
68
|
-
const byCode = new Map<string, FlatMenuNode>()
|
|
69
|
-
const children = new Map<string, BackendMenuNode[]>()
|
|
70
|
-
const roots: BackendMenuNode[] = []
|
|
71
|
-
|
|
72
|
-
for (const item of flat) {
|
|
73
|
-
if (byCode.has(item.node.code)) continue
|
|
74
|
-
byCode.set(item.node.code, item)
|
|
75
|
-
children.set(item.node.code, [])
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const entries = [...byCode.values()]
|
|
79
|
-
const byId = new Map(entries.map((item) => [item.id, item]))
|
|
80
|
-
const parents = new Map<string, FlatMenuNode>()
|
|
81
|
-
const byPath = new Map<string, FlatMenuNode[]>()
|
|
82
|
-
for (const item of entries) {
|
|
83
|
-
const matches = byPath.get(item.node.path) ?? []
|
|
84
|
-
matches.push(item)
|
|
85
|
-
byPath.set(item.node.path, matches)
|
|
86
|
-
const structuralParent = item.structuralParentId ? byId.get(item.structuralParentId) : undefined
|
|
87
|
-
if (structuralParent) parents.set(item.id, structuralParent)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function fullPath(item: FlatMenuNode, seen = new Set<string>()): string | undefined {
|
|
91
|
-
if (seen.has(item.id)) return undefined
|
|
92
|
-
seen.add(item.id)
|
|
93
|
-
const parent = parents.get(item.id)
|
|
94
|
-
const path = item.node.path.trim()
|
|
95
|
-
if (!path) return undefined
|
|
96
|
-
if (path.startsWith('/')) return path
|
|
97
|
-
if (!parent) return `/${path}`
|
|
98
|
-
const parentPath = fullPath(parent, seen)
|
|
99
|
-
return parentPath ? `${parentPath.replace(/\/$/, '')}/${path}` : undefined
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const unresolved = entries.filter((item) => !parents.has(item.id) && item.node.parentPath)
|
|
103
|
-
let changed = true
|
|
104
|
-
while (changed && unresolved.length) {
|
|
105
|
-
changed = false
|
|
106
|
-
for (let index = unresolved.length - 1; index >= 0; index -= 1) {
|
|
107
|
-
const item = unresolved[index]!
|
|
108
|
-
const parentPath = item.node.parentPath!
|
|
109
|
-
const candidates = new Set([
|
|
110
|
-
...(byPath.get(parentPath) ?? []),
|
|
111
|
-
...entries.filter((candidate) => fullPath(candidate) === parentPath),
|
|
112
|
-
])
|
|
113
|
-
candidates.delete(item)
|
|
114
|
-
if (candidates.size !== 1) continue
|
|
115
|
-
parents.set(item.id, [...candidates][0]!)
|
|
116
|
-
unresolved.splice(index, 1)
|
|
117
|
-
changed = true
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
for (const item of unresolved) {
|
|
122
|
-
const parentPath = item.node.parentPath!
|
|
123
|
-
const candidates = new Set([
|
|
124
|
-
...(byPath.get(parentPath) ?? []),
|
|
125
|
-
...entries.filter((candidate) => fullPath(candidate) === parentPath),
|
|
126
|
-
])
|
|
127
|
-
candidates.delete(item)
|
|
128
|
-
if (candidates.size > 1) throw new Error(`Ambiguous dynamic route parent path: ${parentPath}`)
|
|
129
|
-
if (candidates.size === 0)
|
|
130
|
-
throw new Error(`Unresolved dynamic route parent path: ${parentPath}`)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
for (const item of entries) {
|
|
134
|
-
const parent = parents.get(item.id)
|
|
135
|
-
if (parent) children.get(parent.node.code)?.push(item.node)
|
|
136
|
-
else roots.push(item.node)
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function materialize(node: BackendMenuNode): BackendMenuNode {
|
|
140
|
-
const nested = children.get(node.code) ?? []
|
|
141
|
-
return { ...node, children: nested.length ? nested.map(materialize) : undefined }
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return roots.map(materialize)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function assertUniqueCodes(nodes: readonly BackendMenuNode[], seen = new Set<string>()): void {
|
|
148
|
-
for (const node of nodes) {
|
|
149
|
-
if (seen.has(node.code)) throw new Error(`Duplicate dynamic route code: ${node.code}`)
|
|
150
|
-
seen.add(node.code)
|
|
151
|
-
assertUniqueCodes(node.children ?? [], seen)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function routeTransformer(sources: readonly BackendMenuNode[]): readonly RouteSourceNode[] {
|
|
156
|
-
// buildTree 按 code 去重会静默丢弃后到的重复节点,连同其子树一起消失;
|
|
157
|
-
// 在此显式失败,给出可定位的数据错误。
|
|
158
|
-
assertUniqueCodes(sources)
|
|
159
|
-
const usedNames = new Set<string>()
|
|
160
|
-
const tree = buildTree(sources)
|
|
161
|
-
|
|
162
|
-
function transform(source: BackendMenuNode, isRoot: boolean): RouteSourceNode {
|
|
163
|
-
const children = source.children?.map((child) => transform(child, false))
|
|
164
|
-
const hasChildren = Boolean(children?.length)
|
|
165
|
-
const componentKey = source.componentKey ?? (hasChildren ? 'outlet' : fallbackComponentKey)
|
|
166
|
-
return {
|
|
167
|
-
name: routeName(source, usedNames),
|
|
168
|
-
path: routePath(source, isRoot),
|
|
169
|
-
componentKey,
|
|
170
|
-
redirect: source.redirect,
|
|
171
|
-
meta: routeMeta(source, hasChildren),
|
|
172
|
-
children,
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return tree.map((source) => transform(source, true))
|
|
177
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { RouteMenuItem } from '@origen-ui/router'
|
|
2
|
-
import { describe, expect, it } from 'vitest'
|
|
3
|
-
import { firstMenuTarget, HOME_ROUTE, NOT_FOUND_ROUTE_NAME } from './paths'
|
|
4
|
-
import { staticRoutes } from './staticRoutes'
|
|
5
|
-
|
|
6
|
-
describe('router paths', () => {
|
|
7
|
-
it('keeps the root static redirect aligned with HOME_ROUTE', () => {
|
|
8
|
-
const root = staticRoutes.find((route) => route.name === 'root')
|
|
9
|
-
expect(root?.redirect).toBe(HOME_ROUTE)
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
it('pins the not-found fallback to the static 404 route', () => {
|
|
13
|
-
expect(staticRoutes.some((route) => route.name === NOT_FOUND_ROUTE_NAME)).toBe(true)
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
it('resolves the first navigable menu target depth-first', () => {
|
|
17
|
-
const items = [
|
|
18
|
-
{ id: 'locked', label: 'Locked', children: [] },
|
|
19
|
-
{
|
|
20
|
-
id: 'section',
|
|
21
|
-
label: 'Section',
|
|
22
|
-
to: { name: 'section' },
|
|
23
|
-
children: [{ id: 'inner', label: 'Inner', to: { name: 'inner' }, children: [] }],
|
|
24
|
-
},
|
|
25
|
-
] as readonly RouteMenuItem[]
|
|
26
|
-
|
|
27
|
-
expect(firstMenuTarget(items)).toEqual({ name: 'section' })
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
it('returns undefined when no menu item is navigable', () => {
|
|
31
|
-
const items = [{ id: 'empty', label: 'Empty', children: [] }] as readonly RouteMenuItem[]
|
|
32
|
-
|
|
33
|
-
expect(firstMenuTarget(items)).toBeUndefined()
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
it('skips entries rejected by the reachability predicate', () => {
|
|
37
|
-
const items = [
|
|
38
|
-
{ id: 'gone', label: 'Gone', to: { path: '/gone' }, children: [] },
|
|
39
|
-
{ id: 'live', label: 'Live', to: { name: 'live' }, children: [] },
|
|
40
|
-
] as readonly RouteMenuItem[]
|
|
41
|
-
|
|
42
|
-
expect(
|
|
43
|
-
firstMenuTarget(items, (to) => {
|
|
44
|
-
const path = typeof to === 'string' ? to : to.path
|
|
45
|
-
return path !== '/gone'
|
|
46
|
-
}),
|
|
47
|
-
).toEqual({ name: 'live' })
|
|
48
|
-
expect(firstMenuTarget(items, () => false)).toBeUndefined()
|
|
49
|
-
})
|
|
50
|
-
})
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { RouteMenuItem } from '@origen-ui/router'
|
|
2
|
-
import type { RouteLocationRaw } from 'vue-router'
|
|
3
|
-
|
|
4
|
-
/** 授权后的默认首页路由;与 staticRoutes 根路由 redirect 由 paths.spec 钉住一致。 */
|
|
5
|
-
export const HOME_ROUTE = '/workspace'
|
|
6
|
-
|
|
7
|
-
/** staticRoutes 中 404 兜底页的路由名。 */
|
|
8
|
-
export const NOT_FOUND_ROUTE_NAME = '404'
|
|
9
|
-
|
|
10
|
-
/** 深度优先取菜单树中首个可导航入口;isReachable 用于剔除重定向到已裁撤路由的目录项。 */
|
|
11
|
-
export function firstMenuTarget(
|
|
12
|
-
items: readonly RouteMenuItem[],
|
|
13
|
-
isReachable: (to: RouteLocationRaw) => boolean = () => true,
|
|
14
|
-
): RouteLocationRaw | undefined {
|
|
15
|
-
for (const item of items) {
|
|
16
|
-
if (item.to && isReachable(item.to)) return item.to
|
|
17
|
-
const child = firstMenuTarget(item.children, isReachable)
|
|
18
|
-
if (child) return child
|
|
19
|
-
}
|
|
20
|
-
return undefined
|
|
21
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { getRouteQueryString } from '@origen-ui/router'
|
|
2
|
-
|
|
3
|
-
export function routeStatus(value: unknown): 'active' | 'suspended' | undefined {
|
|
4
|
-
const normalized = getRouteQueryString(value)
|
|
5
|
-
return normalized === 'active' || normalized === 'suspended' ? normalized : undefined
|
|
6
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { RouteRecordRaw } from 'vue-router'
|
|
2
|
-
|
|
3
|
-
const Forbidden = () => import('../features/errors/pages/Forbidden.vue')
|
|
4
|
-
const NotFound = () => import('../features/errors/pages/NotFound.vue')
|
|
5
|
-
const ServerError = () => import('../features/errors/pages/ServerError.vue')
|
|
6
|
-
const Login = () => import('../features/auth/pages/Login.vue')
|
|
7
|
-
const Profile = () => import('../features/workspace/pages/Profile.vue')
|
|
8
|
-
|
|
9
|
-
const hiddenPublic = {
|
|
10
|
-
public: true,
|
|
11
|
-
menu: { hidden: true },
|
|
12
|
-
breadcrumb: { hidden: true },
|
|
13
|
-
tab: { hidden: true },
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const staticRoutes: RouteRecordRaw[] = [
|
|
17
|
-
{
|
|
18
|
-
path: '/',
|
|
19
|
-
name: 'root',
|
|
20
|
-
redirect: '/workspace',
|
|
21
|
-
meta: {
|
|
22
|
-
adapter: { menu: { hidden: true }, breadcrumb: { hidden: true }, tab: { hidden: true } },
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
path: '/login',
|
|
27
|
-
name: 'login',
|
|
28
|
-
component: Login,
|
|
29
|
-
meta: { adapter: { titleKey: 'auth.login', ...hiddenPublic } },
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
path: '/profile',
|
|
33
|
-
name: 'profile',
|
|
34
|
-
component: Profile,
|
|
35
|
-
meta: {
|
|
36
|
-
adapter: {
|
|
37
|
-
titleKey: 'menu.profile',
|
|
38
|
-
icon: 'profile',
|
|
39
|
-
menu: { order: 20 },
|
|
40
|
-
breadcrumb: { labelKey: 'menu.profile' },
|
|
41
|
-
cache: { enabled: true, name: 'ProfilePage' },
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
path: '/403',
|
|
47
|
-
name: '403',
|
|
48
|
-
component: Forbidden,
|
|
49
|
-
meta: { adapter: { titleKey: 'errors.forbidden.title', ...hiddenPublic } },
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
path: '/404',
|
|
53
|
-
name: '404',
|
|
54
|
-
component: NotFound,
|
|
55
|
-
meta: { adapter: { titleKey: 'errors.notFound.title', ...hiddenPublic } },
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
path: '/500',
|
|
59
|
-
name: '500',
|
|
60
|
-
component: ServerError,
|
|
61
|
-
meta: { adapter: { titleKey: 'errors.serverError.title', ...hiddenPublic } },
|
|
62
|
-
},
|
|
63
|
-
]
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { RouteQueryParsers } from './useRouteQueryDefaults'
|
|
2
|
-
import { routeStatus } from './routeQuery'
|
|
3
|
-
import { useRouteQueryDefaults } from './useRouteQueryDefaults'
|
|
4
|
-
|
|
5
|
-
interface Query {
|
|
6
|
-
status?: 'active' | 'suspended'
|
|
7
|
-
team?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const parsers: RouteQueryParsers<Query> = {
|
|
11
|
-
status: routeStatus,
|
|
12
|
-
team: (value) => (typeof value === 'string' ? value : undefined),
|
|
13
|
-
}
|
|
14
|
-
useRouteQueryDefaults(parsers)
|
|
15
|
-
|
|
16
|
-
// @ts-expect-error route mappings must target a declared query field
|
|
17
|
-
useRouteQueryDefaults<Query>({ missing: routeStatus })
|
|
18
|
-
|
|
19
|
-
// @ts-expect-error parser output must match its query field type
|
|
20
|
-
useRouteQueryDefaults<Query>({ status: (value) => (value === 'pending' ? 'pending' : undefined) })
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: og-admin-scaffold
|
|
3
|
-
description: Official guidance for the standalone @origen-ui Admin scaffold.
|
|
4
|
-
alwaysApply: true
|
|
5
|
-
globs:
|
|
6
|
-
- '**/*'
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# @origen-ui Admin scaffold
|
|
10
|
-
|
|
11
|
-
Read `AGENTS.local.md` when it exists. Keep product code in `src/app` and
|
|
12
|
-
`src/features`; do not modify managed files or generated agent files without an
|
|
13
|
-
upgrade migration. Run `pnpm type-check` and `pnpm test` for every application change.
|
|
14
|
-
|
|
15
|
-
Use `build-admin-feature` before adding a feature. Use matching `use-og-*` skills
|
|
16
|
-
for tables, search, forms, dialogs, routing, or HTTP. Remote lists must use
|
|
17
|
-
`OgTableWithSearch`; forms use `OgForm`; dialogs use `OgDialog`; network
|
|
18
|
-
requests use `@origen-ui/http`. Do not replace these with Element Plus equivalents.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build-admin-feature
|
|
3
|
-
description: Build a typed Vue Admin business feature. Use when adding a page, CRUD workflow, feature folder, business API adapter, permissioned menu, or route in the standalone @origen-ui Admin scaffold.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Build an Admin feature
|
|
7
|
-
|
|
8
|
-
1. Define the feature model, permissions, API contract, and route before writing a page.
|
|
9
|
-
2. Create `api`, `composables`, `components`, and `pages` only when the responsibility exists.
|
|
10
|
-
3. Select the mandatory @origen-ui business component before writing view code.
|
|
11
|
-
4. Register a local component key for a remote menu; never trust a backend import path.
|
|
12
|
-
5. Add a focused test and run application quality gates.
|
|
13
|
-
|
|
14
|
-
Read `references/component-selection.md` before choosing a UI primitive.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Component selection
|
|
2
|
-
|
|
3
|
-
<!-- component-catalog:start -->
|
|
4
|
-
| Use case | Required API | Skill | Avoid |
|
|
5
|
-
| --- | --- | --- | --- |
|
|
6
|
-
| Parent-controlled dialog UI | `OgDialog` from `@origen-ui/dialog` | `use-og-dialog` | Element Plus ElDialog in business features |
|
|
7
|
-
| Awaitable or manager-owned dialog workflows | `createOgDialog`, `useDialog`, `OgDialogHost` from `@origen-ui/dialog` | `use-og-dialog` | createApp or a global fallback manager |
|
|
8
|
-
| Rich text authoring | `OgEditor`, `OgEditorSetup` from `@origen-ui/editor` | `use-og-editor` | Unsanitized HTML persistence or direct DOM insertion |
|
|
9
|
-
| Readonly rich text rendering | `OgEditorViewer` from `@origen-ui/editor` | `use-og-editor` | Rendering untrusted HTML without server sanitization |
|
|
10
|
-
| Schema-driven create, edit, or readonly forms | `OgForm` from `@origen-ui/form` | `use-og-form` | Element Plus ElForm or removed legacy APIs |
|
|
11
|
-
| Editable array fields and line-item forms | `OgFormTable`, `createOgFormTableField` from `@origen-ui/form-table` | `use-og-form-table` | Mutating parent form arrays or duplicate remote table fetching |
|
|
12
|
-
| Standalone query/filter panels | `OgSearch` from `@origen-ui/search` | `use-og-search` | Owning list loading or pagination |
|
|
13
|
-
| Typed local or remote data tables | `OgTable` from `@origen-ui/table` | `use-og-table` | Legacy fetch/searchSchema APIs or ElTable |
|
|
14
|
-
| Editable local tables embedded in a form or workflow | `OgTableLocal` from `@origen-ui/table` | `use-og-table` | Treating local rows as an implicit remote data source |
|
|
15
|
-
| Remote CRUD lists with search and paging | `OgTableWithSearch` from `@origen-ui/table-search` | `use-og-table` | Separate ad-hoc search and table state |
|
|
16
|
-
| Page-local business tabs | `OgTabs` from `@origen-ui/tabs` | `use-og-router-tabs` | Using page-local tabs for route workspace state |
|
|
17
|
-
| Validated file uploads and URL projection | `OgUpload`, `createXhrUploadAdapter` from `@origen-ui/upload` | `use-og-upload` | Package-level transport clients or mutating internal files |
|
|
18
|
-
| A single schema-aware field needs to participate in an existing OgForm context | `OgFormItem` from `@origen-ui/form` | `use-og-form` | Using it as a transparent Element Plus ElFormItem replacement |
|
|
19
|
-
| An advanced integration needs the registered OgForm control renderer | `FieldRenderer` from `@origen-ui/form` | `use-og-form` | Treating it as a general-purpose Element Plus control wrapper |
|
|
20
|
-
| Rendering a project SVG sprite icon | `SvgIcon` from `@origen-ui/icons` | `style-og-origen-ui` | Passing untrusted or arbitrary symbol identifiers |
|
|
21
|
-
| Rendering a route workspace with keep-alive semantics | `RouterViewHost` from `@origen-ui/router` | `use-og-router-tabs` | Using it as a transparent vue-router RouterView replacement |
|
|
22
|
-
<!-- component-catalog:end -->
|
|
23
|
-
|
|
24
|
-
Route menu, breadcrumbs, and workspace tabs use `@origen-ui/router`; application
|
|
25
|
-
HTTP uses `ApiClient` from `@origen-ui/http`.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: use-og-table
|
|
3
|
-
description: Build typed remote lists, CRUD tables, paging, search, row actions, batch actions, drafts, exports, or virtual tables with @origen-ui/table and OgTableWithSearch.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Use OgTable
|
|
7
|
-
|
|
8
|
-
Declare `tableId`, `rowKey`, typed columns, and `dataSource` explicitly. Implement
|
|
9
|
-
`dataSource.list(request, context)` as the only read entry and pass
|
|
10
|
-
`context.signal` to the service. Use `config.search.fields`, action columns, and
|
|
11
|
-
`config.actions.batch`; do not restore `fetch`, `searchSchema`, or legacy search
|
|
12
|
-
v-model APIs. Configure built-ins only through named config blocks: state is
|
|
13
|
-
under `config.state`, while masking and analytics keep their own named blocks.
|
|
14
|
-
Register application extensions with `createOgTable({ extensions })` and
|
|
15
|
-
configure them only through `config.extensions`; never put built-in IDs there.
|
|
16
|
-
Provide `config.permissions.has` whenever permissions are declared.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: og-admin-scaffold
|
|
3
|
-
description: Official guidance for the standalone @origen-ui Admin scaffold.
|
|
4
|
-
globs:
|
|
5
|
-
- '**/*'
|
|
6
|
-
alwaysApply: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# @origen-ui Admin scaffold
|
|
10
|
-
|
|
11
|
-
Read `AGENTS.local.md` when it exists. Keep product code in `src/app` and
|
|
12
|
-
`src/features`; do not modify managed files or generated agent files without an
|
|
13
|
-
upgrade migration. Run `pnpm type-check` and `pnpm test` for every application change.
|
|
14
|
-
|
|
15
|
-
Use `build-admin-feature` before adding a feature. Use matching `use-og-*` skills
|
|
16
|
-
for tables, search, forms, dialogs, routing, or HTTP. Remote lists must use
|
|
17
|
-
`OgTableWithSearch`; forms use `OgForm`; dialogs use `OgDialog`; network
|
|
18
|
-
requests use `@origen-ui/http`. Do not replace these with Element Plus equivalents.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# ============================================
|
|
2
|
-
# Production Environment Configuration
|
|
3
|
-
# ============================================
|
|
4
|
-
# Copy this file to .env.production and fill in the values.
|
|
5
|
-
# DO NOT commit .env.production to version control.
|
|
6
|
-
|
|
7
|
-
# Application title shown in the browser tab
|
|
8
|
-
VITE_APP_TITLE=禾数运营控制台
|
|
9
|
-
|
|
10
|
-
# API base URL (use relative path for CDN deployments)
|
|
11
|
-
VITE_API_BASE_URL=/api
|
|
12
|
-
|
|
13
|
-
# API backend target server
|
|
14
|
-
VITE_API_TARGET=https://api.example.com
|
|
15
|
-
|
|
16
|
-
# Default locale
|
|
17
|
-
VITE_DEFAULT_LOCALE=zh-CN
|
|
18
|
-
|
|
19
|
-
# Scaffolding Gitee API configuration
|
|
20
|
-
VITE_SCAFFOLD_GITEE_API_BASE=https://gitee.com/api/v5
|
|
21
|
-
VITE_SCAFFOLD_GITEE_OWNER=zapcenter
|
|
22
|
-
VITE_SCAFFOLD_GITEE_REPO=origen-ui
|
|
23
|
-
|
|
24
|
-
# Optional: use a fixed CDN or Release manifest URL
|
|
25
|
-
# VITE_SCAFFOLD_MANIFEST_URL=https://cdn.example.com/manifest.json
|
|
26
|
-
|
|
27
|
-
# Optional: enable analytics
|
|
28
|
-
# VITE_ANALYTICS_ID=UA-XXXXXXXX-X
|
|
29
|
-
|
|
30
|
-
# Optional: enable error tracking (e.g., Sentry)
|
|
31
|
-
# VITE_SENTRY_DSN=https://xxxxx@sentry.io/xxxxx
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: always_on
|
|
3
|
-
description: Official guidance for the standalone @origen-ui Admin scaffold.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# @origen-ui Admin scaffold
|
|
7
|
-
|
|
8
|
-
Read `AGENTS.local.md` when it exists. Keep product code in `src/app` and
|
|
9
|
-
`src/features`; do not modify managed files or generated agent files without an
|
|
10
|
-
upgrade migration. Run `pnpm type-check` and `pnpm test` for every application change.
|
|
11
|
-
|
|
12
|
-
Use `build-admin-feature` before adding a feature. Use matching `use-og-*` skills
|
|
13
|
-
for tables, search, forms, dialogs, routing, or HTTP. Remote lists must use
|
|
14
|
-
`OgTableWithSearch`; forms use `OgForm`; dialogs use `OgDialog`; network
|
|
15
|
-
requests use `@origen-ui/http`. Do not replace these with Element Plus equivalents.
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import type { Page } from '@playwright/test'
|
|
2
|
-
import { expect, test } from '@playwright/test'
|
|
3
|
-
|
|
4
|
-
const permissions = [
|
|
5
|
-
'workspace:dashboard:read',
|
|
6
|
-
'system:user:read',
|
|
7
|
-
'system:role:read',
|
|
8
|
-
'system:menu:read',
|
|
9
|
-
'system:audit:read',
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
const menus = [
|
|
13
|
-
{
|
|
14
|
-
code: 'dashboard',
|
|
15
|
-
path: '/dashboard',
|
|
16
|
-
title: '工作台',
|
|
17
|
-
titleKey: 'menu.dashboard',
|
|
18
|
-
componentKey: 'dashboard',
|
|
19
|
-
icon: 'dashboard',
|
|
20
|
-
permissions: ['workspace:dashboard:read'],
|
|
21
|
-
menu: true,
|
|
22
|
-
cache: true,
|
|
23
|
-
order: 10,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
code: 'system',
|
|
27
|
-
path: '/system',
|
|
28
|
-
title: '系统管理',
|
|
29
|
-
titleKey: 'menu.system',
|
|
30
|
-
componentKey: 'outlet',
|
|
31
|
-
icon: 'system',
|
|
32
|
-
menu: true,
|
|
33
|
-
order: 20,
|
|
34
|
-
children: [
|
|
35
|
-
{
|
|
36
|
-
code: 'users',
|
|
37
|
-
path: 'users',
|
|
38
|
-
title: '用户管理',
|
|
39
|
-
titleKey: 'menu.users',
|
|
40
|
-
componentKey: 'user-list',
|
|
41
|
-
permissions: ['system:user:read'],
|
|
42
|
-
menu: true,
|
|
43
|
-
order: 10,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
code: 'roles',
|
|
47
|
-
path: 'roles',
|
|
48
|
-
title: '角色管理',
|
|
49
|
-
titleKey: 'menu.roles',
|
|
50
|
-
componentKey: 'role-list',
|
|
51
|
-
permissions: ['system:role:read'],
|
|
52
|
-
menu: true,
|
|
53
|
-
order: 20,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
code: 'menus',
|
|
57
|
-
path: 'menus',
|
|
58
|
-
title: '菜单管理',
|
|
59
|
-
titleKey: 'menu.menus',
|
|
60
|
-
componentKey: 'menu-list',
|
|
61
|
-
permissions: ['system:menu:read'],
|
|
62
|
-
menu: true,
|
|
63
|
-
order: 30,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
code: 'audit',
|
|
67
|
-
path: 'audit',
|
|
68
|
-
title: '审计日志',
|
|
69
|
-
titleKey: 'menu.audit',
|
|
70
|
-
componentKey: 'audit-list',
|
|
71
|
-
permissions: ['system:audit:read'],
|
|
72
|
-
menu: true,
|
|
73
|
-
order: 40,
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
]
|
|
78
|
-
|
|
79
|
-
function envelope(data: unknown): { code: number, data: unknown, message: string } {
|
|
80
|
-
return { code: 0, data, message: 'ok' }
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
async function mockBackend(page: Page): Promise<{ login: number, menus: number, profile: number }> {
|
|
84
|
-
const calls = { login: 0, menus: 0, profile: 0 }
|
|
85
|
-
await page.route('**/api/auth/login', async (route) => {
|
|
86
|
-
calls.login += 1
|
|
87
|
-
await route.fulfill({
|
|
88
|
-
json: envelope({
|
|
89
|
-
accessToken: 'production-e2e-token',
|
|
90
|
-
user: { id: 'admin-1', username: 'admin', displayName: 'E2E 管理员' },
|
|
91
|
-
permissions,
|
|
92
|
-
roleIds: ['role-admin'],
|
|
93
|
-
authorizationRevision: 7,
|
|
94
|
-
}),
|
|
95
|
-
})
|
|
96
|
-
})
|
|
97
|
-
await page.route('**/api/auth/profile', async (route) => {
|
|
98
|
-
calls.profile += 1
|
|
99
|
-
await route.fulfill({
|
|
100
|
-
json: envelope({
|
|
101
|
-
user: { id: 'admin-1', username: 'admin', displayName: 'E2E 管理员' },
|
|
102
|
-
permissions,
|
|
103
|
-
roleIds: ['role-admin'],
|
|
104
|
-
authorizationRevision: 7,
|
|
105
|
-
}),
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
await page.route('**/api/system/menus*', async (route) => {
|
|
109
|
-
calls.menus += 1
|
|
110
|
-
await route.fulfill({ json: envelope(menus) })
|
|
111
|
-
})
|
|
112
|
-
return calls
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async function signIn(page: Page): Promise<void> {
|
|
116
|
-
await page.goto('/login')
|
|
117
|
-
await page.getByLabel('账号').fill('admin')
|
|
118
|
-
await page.getByLabel('密码').fill('secure-password')
|
|
119
|
-
await page.getByRole('button', { name: '登录' }).click()
|
|
120
|
-
await expect(page).toHaveURL(/\/dashboard$/)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const adapterError = 'No @origen-ui/router adapter has been installed on this application.'
|
|
124
|
-
|
|
125
|
-
test.describe('admin production shell', () => {
|
|
126
|
-
test('loads authentication, profile, and menus through remote API contracts', async ({
|
|
127
|
-
page,
|
|
128
|
-
}) => {
|
|
129
|
-
const pageErrors: string[] = []
|
|
130
|
-
page.on('pageerror', (error) => {
|
|
131
|
-
pageErrors.push(error.message)
|
|
132
|
-
})
|
|
133
|
-
await page.addInitScript(() => {
|
|
134
|
-
sessionStorage.setItem('og-admin-devtools-unlocked', 'true')
|
|
135
|
-
})
|
|
136
|
-
const calls = await mockBackend(page)
|
|
137
|
-
|
|
138
|
-
await signIn(page)
|
|
139
|
-
await page.reload()
|
|
140
|
-
|
|
141
|
-
await expect(page.locator('.admin-shell')).toBeVisible()
|
|
142
|
-
if (test.info().project.name === 'mobile-chromium')
|
|
143
|
-
await page.locator('.top-bar__icon-btn').first().click()
|
|
144
|
-
await expect(page.getByRole('navigation', { name: '应用导航' })).toHaveCount(1)
|
|
145
|
-
await expect(page.locator('.breadcrumb-bar')).toBeVisible()
|
|
146
|
-
await expect(page.locator('.workspace-tabs')).toBeVisible()
|
|
147
|
-
await expect(page.locator('.admin-shell__route-view')).toBeVisible()
|
|
148
|
-
await expect(page.locator('.dashboard-page')).toBeVisible()
|
|
149
|
-
await expect(page.locator('.page-header')).toHaveCount(0)
|
|
150
|
-
|
|
151
|
-
expect(calls.login).toBe(1)
|
|
152
|
-
expect(calls.profile).toBeGreaterThanOrEqual(1)
|
|
153
|
-
expect(calls.menus).toBeGreaterThanOrEqual(1)
|
|
154
|
-
expect(pageErrors).not.toContain(adapterError)
|
|
155
|
-
})
|
|
156
|
-
})
|