create-windy 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -0
- package/assets/LICENSE-Apache-2.0.txt +201 -0
- package/dist/cli.js +1662 -0
- package/package.json +37 -0
- package/template/.dockerignore +11 -0
- package/template/.oxfmtrc.json +9 -0
- package/template/.oxlintrc.json +119 -0
- package/template/.windy-template.json +71 -0
- package/template/AGENTS.md +87 -0
- package/template/README.md +128 -0
- package/template/apps/server/Dockerfile +34 -0
- package/template/apps/server/package.json +30 -0
- package/template/apps/server/src/access-guards.ts +112 -0
- package/template/apps/server/src/admin/routes.test.ts +105 -0
- package/template/apps/server/src/admin/routes.ts +95 -0
- package/template/apps/server/src/agent/data-scope-routes.test.ts +143 -0
- package/template/apps/server/src/agent/routes.test.ts +244 -0
- package/template/apps/server/src/agent/routes.ts +257 -0
- package/template/apps/server/src/api-app.ts +32 -0
- package/template/apps/server/src/application-services.ts +154 -0
- package/template/apps/server/src/audit/contracts.ts +21 -0
- package/template/apps/server/src/audit/drizzle-log-store.ts +150 -0
- package/template/apps/server/src/audit/policy.ts +18 -0
- package/template/apps/server/src/audit/recovery-queue.test.ts +42 -0
- package/template/apps/server/src/audit/recovery-queue.ts +63 -0
- package/template/apps/server/src/audit/redaction.ts +55 -0
- package/template/apps/server/src/audit/reliable-writer.test.ts +200 -0
- package/template/apps/server/src/audit/reliable-writer.ts +201 -0
- package/template/apps/server/src/audit/search-summary.ts +32 -0
- package/template/apps/server/src/auth/actor-resolver.test.ts +138 -0
- package/template/apps/server/src/auth/actor-resolver.ts +109 -0
- package/template/apps/server/src/auth/authentication-provider.test.ts +180 -0
- package/template/apps/server/src/auth/authentication-provider.ts +117 -0
- package/template/apps/server/src/auth/authorization-snapshot.test.ts +117 -0
- package/template/apps/server/src/auth/authorization-snapshot.ts +98 -0
- package/template/apps/server/src/auth/bearer-token.ts +5 -0
- package/template/apps/server/src/auth/bootstrap-admin.ts +33 -0
- package/template/apps/server/src/auth/credential-restriction.ts +29 -0
- package/template/apps/server/src/auth/credential-routes.test.ts +190 -0
- package/template/apps/server/src/auth/credential-service.ts +165 -0
- package/template/apps/server/src/auth/development-bypass.ts +22 -0
- package/template/apps/server/src/auth/drizzle-repository.ts +315 -0
- package/template/apps/server/src/auth/drizzle-session-operations.ts +119 -0
- package/template/apps/server/src/auth/login-routes.ts +121 -0
- package/template/apps/server/src/auth/own-session-routes.test.ts +248 -0
- package/template/apps/server/src/auth/own-session-routes.ts +110 -0
- package/template/apps/server/src/auth/password.test.ts +30 -0
- package/template/apps/server/src/auth/password.ts +46 -0
- package/template/apps/server/src/auth/repository.test.ts +61 -0
- package/template/apps/server/src/auth/repository.ts +305 -0
- package/template/apps/server/src/auth/routes.test.ts +350 -0
- package/template/apps/server/src/auth/routes.ts +237 -0
- package/template/apps/server/src/auth/runtime.ts +20 -0
- package/template/apps/server/src/auth/service.ts +329 -0
- package/template/apps/server/src/auth/session-service.ts +123 -0
- package/template/apps/server/src/background/task-guard.test.ts +66 -0
- package/template/apps/server/src/background/task-guard.ts +49 -0
- package/template/apps/server/src/bulk-data/artifact-store.ts +82 -0
- package/template/apps/server/src/bulk-data/dictionary-handler.ts +122 -0
- package/template/apps/server/src/bulk-data/drizzle-repository.integration.test.ts +156 -0
- package/template/apps/server/src/bulk-data/drizzle-repository.ts +298 -0
- package/template/apps/server/src/bulk-data/helpers.ts +36 -0
- package/template/apps/server/src/bulk-data/input-validation.ts +99 -0
- package/template/apps/server/src/bulk-data/repository.ts +246 -0
- package/template/apps/server/src/bulk-data/resource-handler.ts +27 -0
- package/template/apps/server/src/bulk-data/routes.test.ts +169 -0
- package/template/apps/server/src/bulk-data/routes.ts +248 -0
- package/template/apps/server/src/bulk-data/scheduler-integration.test.ts +142 -0
- package/template/apps/server/src/bulk-data/service.test.ts +347 -0
- package/template/apps/server/src/bulk-data/service.ts +319 -0
- package/template/apps/server/src/bulk-data/types.ts +73 -0
- package/template/apps/server/src/configuration/bootstrap.ts +59 -0
- package/template/apps/server/src/configuration/definition.ts +89 -0
- package/template/apps/server/src/configuration/drizzle-repository.ts +166 -0
- package/template/apps/server/src/configuration/repository.ts +138 -0
- package/template/apps/server/src/configuration/routes.test.ts +178 -0
- package/template/apps/server/src/configuration/routes.ts +260 -0
- package/template/apps/server/src/configuration/service.test.ts +128 -0
- package/template/apps/server/src/configuration/service.ts +187 -0
- package/template/apps/server/src/data-access/context.ts +162 -0
- package/template/apps/server/src/data-access/department-tree.ts +27 -0
- package/template/apps/server/src/data-access/drizzle-predicate.test.ts +86 -0
- package/template/apps/server/src/data-access/drizzle-predicate.ts +50 -0
- package/template/apps/server/src/data-access/errors.ts +5 -0
- package/template/apps/server/src/data-access/platform-actor.ts +25 -0
- package/template/apps/server/src/data-access/query-specification.test.ts +82 -0
- package/template/apps/server/src/data-access/query-specification.ts +77 -0
- package/template/apps/server/src/data-access/scoped-repository.integration.test.ts +203 -0
- package/template/apps/server/src/data-access/scoped-repository.ts +268 -0
- package/template/apps/server/src/data-access/scoped-resource.test.ts +158 -0
- package/template/apps/server/src/data-access/scoped-resource.ts +141 -0
- package/template/apps/server/src/data-governance/export/approval-port.ts +84 -0
- package/template/apps/server/src/data-governance/export/authorization-port.test.ts +103 -0
- package/template/apps/server/src/data-governance/export/authorization-port.ts +69 -0
- package/template/apps/server/src/data-governance/export/drizzle-repository.integration.test.ts +88 -0
- package/template/apps/server/src/data-governance/export/drizzle-repository.ts +97 -0
- package/template/apps/server/src/data-governance/export/job-runtime.test.ts +339 -0
- package/template/apps/server/src/data-governance/export/job-runtime.ts +242 -0
- package/template/apps/server/src/data-governance/export/ndjson-stream.ts +62 -0
- package/template/apps/server/src/data-governance/export/postgres-api-actors.ts +140 -0
- package/template/apps/server/src/data-governance/export/postgres-api-assertions.ts +76 -0
- package/template/apps/server/src/data-governance/export/postgres-api-fixture.ts +265 -0
- package/template/apps/server/src/data-governance/export/postgres-api.integration.test.ts +298 -0
- package/template/apps/server/src/data-governance/export/postgres-recovery.integration.test.ts +344 -0
- package/template/apps/server/src/data-governance/export/repository.test.ts +55 -0
- package/template/apps/server/src/data-governance/export/repository.ts +83 -0
- package/template/apps/server/src/data-governance/export/request-fingerprint.test.ts +51 -0
- package/template/apps/server/src/data-governance/export/request-fingerprint.ts +45 -0
- package/template/apps/server/src/data-governance/export/routes-integrity.test.ts +90 -0
- package/template/apps/server/src/data-governance/export/routes-test-fixture.ts +239 -0
- package/template/apps/server/src/data-governance/export/routes.test.ts +182 -0
- package/template/apps/server/src/data-governance/export/routes.ts +215 -0
- package/template/apps/server/src/data-governance/export/scope-snapshot.test.ts +45 -0
- package/template/apps/server/src/data-governance/export/scope-snapshot.ts +27 -0
- package/template/apps/server/src/data-governance/export/service.ts +337 -0
- package/template/apps/server/src/data-governance/export/source.ts +69 -0
- package/template/apps/server/src/data-governance/export/types.ts +55 -0
- package/template/apps/server/src/data-governance/plaintext-access.test.ts +70 -0
- package/template/apps/server/src/data-governance/plaintext-access.ts +88 -0
- package/template/apps/server/src/data-governance/plaintext-postgres.integration.test.ts +223 -0
- package/template/apps/server/src/data-governance/user-plaintext-routes.test.ts +287 -0
- package/template/apps/server/src/data-governance/user-plaintext-routes.ts +181 -0
- package/template/apps/server/src/data-governance/user-projection.ts +54 -0
- package/template/apps/server/src/data-governance/user-sensitive-read-service.ts +54 -0
- package/template/apps/server/src/example-modules.ts +62 -0
- package/template/apps/server/src/example-permissions.ts +5 -0
- package/template/apps/server/src/feature/manifest-feature-repository.test.ts +187 -0
- package/template/apps/server/src/feature/manifest-feature-repository.ts +200 -0
- package/template/apps/server/src/feature/routes.authorization.test.ts +199 -0
- package/template/apps/server/src/feature/routes.ts +193 -0
- package/template/apps/server/src/foundation-access.test.ts +50 -0
- package/template/apps/server/src/foundation-access.ts +34 -0
- package/template/apps/server/src/foundation-route.ts +55 -0
- package/template/apps/server/src/foundation.ts +85 -0
- package/template/apps/server/src/guards.test.ts +74 -0
- package/template/apps/server/src/guards.ts +214 -0
- package/template/apps/server/src/http-app.test.ts +77 -0
- package/template/apps/server/src/http-app.ts +51 -0
- package/template/apps/server/src/index.ts +374 -0
- package/template/apps/server/src/jobs/artifact-service.test.ts +78 -0
- package/template/apps/server/src/jobs/artifact-service.ts +94 -0
- package/template/apps/server/src/jobs/drizzle-artifact.ts +63 -0
- package/template/apps/server/src/jobs/drizzle-claim.ts +111 -0
- package/template/apps/server/src/jobs/drizzle-execution-repository.ts +299 -0
- package/template/apps/server/src/jobs/drizzle-execution.integration.test.ts +232 -0
- package/template/apps/server/src/jobs/drizzle-lease.ts +21 -0
- package/template/apps/server/src/jobs/drizzle-mappers.ts +121 -0
- package/template/apps/server/src/jobs/drizzle-recovery-repository.ts +214 -0
- package/template/apps/server/src/jobs/drizzle-repository.integration.test.ts +135 -0
- package/template/apps/server/src/jobs/drizzle-repository.ts +268 -0
- package/template/apps/server/src/jobs/execution-repository.ts +72 -0
- package/template/apps/server/src/jobs/execution.test.ts +303 -0
- package/template/apps/server/src/jobs/handler-registry.ts +81 -0
- package/template/apps/server/src/jobs/in-memory-claim.ts +96 -0
- package/template/apps/server/src/jobs/in-memory-execution.ts +336 -0
- package/template/apps/server/src/jobs/in-memory-lease.ts +66 -0
- package/template/apps/server/src/jobs/legacy-adapter.integration.test.ts +177 -0
- package/template/apps/server/src/jobs/legacy-adapter.test.ts +199 -0
- package/template/apps/server/src/jobs/legacy-adapter.ts +109 -0
- package/template/apps/server/src/jobs/legacy-service-runtime.ts +95 -0
- package/template/apps/server/src/jobs/repository.ts +141 -0
- package/template/apps/server/src/jobs/service.test.ts +64 -0
- package/template/apps/server/src/jobs/service.ts +44 -0
- package/template/apps/server/src/jobs/types.ts +180 -0
- package/template/apps/server/src/jobs/worker.ts +258 -0
- package/template/apps/server/src/license/legacy-license-resolver.ts +23 -0
- package/template/apps/server/src/license/license-resolver.test.ts +55 -0
- package/template/apps/server/src/license/license-resolver.ts +122 -0
- package/template/apps/server/src/license/reminder.test.ts +61 -0
- package/template/apps/server/src/license/reminder.ts +33 -0
- package/template/apps/server/src/license/restriction.test.ts +54 -0
- package/template/apps/server/src/license/restriction.ts +80 -0
- package/template/apps/server/src/license/routes-offline-code.test.ts +173 -0
- package/template/apps/server/src/license/routes.ts +99 -0
- package/template/apps/server/src/license/runtime-audit-reliability.test.ts +96 -0
- package/template/apps/server/src/license/runtime-reminder.test.ts +147 -0
- package/template/apps/server/src/license/runtime-service-test-http.ts +28 -0
- package/template/apps/server/src/license/runtime-service.test.ts +334 -0
- package/template/apps/server/src/license/runtime-service.ts +308 -0
- package/template/apps/server/src/module-composition.test.ts +70 -0
- package/template/apps/server/src/module-composition.ts +28 -0
- package/template/apps/server/src/notification/drizzle-repository.ts +233 -0
- package/template/apps/server/src/notification/repository.ts +160 -0
- package/template/apps/server/src/notification/routes.test.ts +151 -0
- package/template/apps/server/src/notification/routes.ts +185 -0
- package/template/apps/server/src/observability/bootstrap.ts +56 -0
- package/template/apps/server/src/observability/http-observability.test.ts +53 -0
- package/template/apps/server/src/observability/http-observability.ts +54 -0
- package/template/apps/server/src/observability/metrics.test.ts +36 -0
- package/template/apps/server/src/observability/metrics.ts +105 -0
- package/template/apps/server/src/observability/readiness.test.ts +36 -0
- package/template/apps/server/src/observability/readiness.ts +43 -0
- package/template/apps/server/src/observability/routes.test.ts +61 -0
- package/template/apps/server/src/observability/routes.ts +44 -0
- package/template/apps/server/src/pagination.ts +31 -0
- package/template/apps/server/src/persistence.integration.test.ts +54 -0
- package/template/apps/server/src/persistence.ts +118 -0
- package/template/apps/server/src/profile/routes.test.ts +190 -0
- package/template/apps/server/src/profile/routes.ts +173 -0
- package/template/apps/server/src/request-restriction.ts +29 -0
- package/template/apps/server/src/route-guards.test.ts +148 -0
- package/template/apps/server/src/route-guards.ts +63 -0
- package/template/apps/server/src/runtime-audit-list.test.ts +98 -0
- package/template/apps/server/src/runtime-config.ts +11 -0
- package/template/apps/server/src/runtime-development.ts +68 -0
- package/template/apps/server/src/runtime-license.ts +50 -0
- package/template/apps/server/src/runtime.test.ts +264 -0
- package/template/apps/server/src/runtime.ts +324 -0
- package/template/apps/server/src/scheduler/audit.ts +38 -0
- package/template/apps/server/src/scheduler/definitions.test.ts +35 -0
- package/template/apps/server/src/scheduler/definitions.ts +79 -0
- package/template/apps/server/src/scheduler/drizzle-durable-links.ts +52 -0
- package/template/apps/server/src/scheduler/drizzle-mappers.ts +36 -0
- package/template/apps/server/src/scheduler/drizzle-repository.integration.test.ts +174 -0
- package/template/apps/server/src/scheduler/drizzle-repository.ts +348 -0
- package/template/apps/server/src/scheduler/execution-context.ts +24 -0
- package/template/apps/server/src/scheduler/execution-recorder.ts +101 -0
- package/template/apps/server/src/scheduler/feature-preflight.ts +40 -0
- package/template/apps/server/src/scheduler/history.ts +22 -0
- package/template/apps/server/src/scheduler/overview.test.ts +89 -0
- package/template/apps/server/src/scheduler/overview.ts +125 -0
- package/template/apps/server/src/scheduler/recovery-conflict.ts +19 -0
- package/template/apps/server/src/scheduler/recovery-service.test.ts +238 -0
- package/template/apps/server/src/scheduler/recovery-service.ts +152 -0
- package/template/apps/server/src/scheduler/repository.ts +274 -0
- package/template/apps/server/src/scheduler/routes.test.ts +347 -0
- package/template/apps/server/src/scheduler/routes.ts +222 -0
- package/template/apps/server/src/scheduler/sensitive-text.ts +20 -0
- package/template/apps/server/src/scheduler/service-idle.test.ts +73 -0
- package/template/apps/server/src/scheduler/service.test.ts +330 -0
- package/template/apps/server/src/scheduler/service.ts +339 -0
- package/template/apps/server/src/scheduler/types.ts +103 -0
- package/template/apps/server/src/scheduler/worker.ts +38 -0
- package/template/apps/server/src/search/config.test.ts +43 -0
- package/template/apps/server/src/search/config.ts +62 -0
- package/template/apps/server/src/search/contracts.ts +127 -0
- package/template/apps/server/src/search/cursor.ts +39 -0
- package/template/apps/server/src/search/errors.ts +11 -0
- package/template/apps/server/src/search/host.ts +36 -0
- package/template/apps/server/src/search/masking.ts +6 -0
- package/template/apps/server/src/search/provider-execution.ts +195 -0
- package/template/apps/server/src/search/rate-limiter.ts +23 -0
- package/template/apps/server/src/search/registry.ts +105 -0
- package/template/apps/server/src/search/routes.test.ts +156 -0
- package/template/apps/server/src/search/routes.ts +95 -0
- package/template/apps/server/src/search/service.test.ts +314 -0
- package/template/apps/server/src/search/service.ts +257 -0
- package/template/apps/server/src/search/test-support.ts +122 -0
- package/template/apps/server/src/session/routes.test.ts +111 -0
- package/template/apps/server/src/session/routes.ts +56 -0
- package/template/apps/server/src/settings/drizzle-repository.ts +66 -0
- package/template/apps/server/src/settings/repository.ts +29 -0
- package/template/apps/server/src/settings/routes.test.ts +250 -0
- package/template/apps/server/src/settings/routes.ts +175 -0
- package/template/apps/server/src/settings/runtime.ts +13 -0
- package/template/apps/server/src/storage/blob-reference-registry.test.ts +25 -0
- package/template/apps/server/src/storage/blob-reference-registry.ts +15 -0
- package/template/apps/server/src/storage/drizzle-upload-repository.integration.test.ts +136 -0
- package/template/apps/server/src/storage/drizzle-upload-repository.ts +248 -0
- package/template/apps/server/src/storage/route-support.ts +84 -0
- package/template/apps/server/src/storage/routes.test.ts +288 -0
- package/template/apps/server/src/storage/routes.ts +297 -0
- package/template/apps/server/src/storage/runtime.ts +86 -0
- package/template/apps/server/src/system/audit-query.ts +17 -0
- package/template/apps/server/src/system/audit-routes.test.ts +139 -0
- package/template/apps/server/src/system/audit-routes.ts +113 -0
- package/template/apps/server/src/system/built-in-roles.ts +116 -0
- package/template/apps/server/src/system/department-routes.test.ts +80 -0
- package/template/apps/server/src/system/department-routes.ts +90 -0
- package/template/apps/server/src/system/drizzle-mapping.ts +53 -0
- package/template/apps/server/src/system/drizzle-repository.ts +298 -0
- package/template/apps/server/src/system/drizzle-scoped-repository.ts +235 -0
- package/template/apps/server/src/system/drizzle-system.ts +361 -0
- package/template/apps/server/src/system/entities.ts +78 -0
- package/template/apps/server/src/system/feature-routes.test.ts +55 -0
- package/template/apps/server/src/system/identity-route-config.ts +73 -0
- package/template/apps/server/src/system/interface-catalog.test.ts +103 -0
- package/template/apps/server/src/system/interface-catalog.ts +82 -0
- package/template/apps/server/src/system/menu-registry.test.ts +125 -0
- package/template/apps/server/src/system/menu-registry.ts +259 -0
- package/template/apps/server/src/system/menu-routes.test.ts +68 -0
- package/template/apps/server/src/system/menu-routes.ts +200 -0
- package/template/apps/server/src/system/mutation-runner.ts +33 -0
- package/template/apps/server/src/system/operation-monitoring.test.ts +78 -0
- package/template/apps/server/src/system/operation-monitoring.ts +233 -0
- package/template/apps/server/src/system/operations.test.ts +269 -0
- package/template/apps/server/src/system/operations.ts +155 -0
- package/template/apps/server/src/system/postgres-monitoring.ts +31 -0
- package/template/apps/server/src/system/redis-health.test.ts +116 -0
- package/template/apps/server/src/system/redis-health.ts +230 -0
- package/template/apps/server/src/system/repository.ts +234 -0
- package/template/apps/server/src/system/resource-access-response.ts +47 -0
- package/template/apps/server/src/system/resource-export-route.ts +64 -0
- package/template/apps/server/src/system/resource-route-support.ts +50 -0
- package/template/apps/server/src/system/response-projection.ts +24 -0
- package/template/apps/server/src/system/route-helpers.ts +104 -0
- package/template/apps/server/src/system/route-test-app.ts +27 -0
- package/template/apps/server/src/system/route-types.ts +52 -0
- package/template/apps/server/src/system/routes-validation.test.ts +61 -0
- package/template/apps/server/src/system/routes.test.ts +311 -0
- package/template/apps/server/src/system/routes.ts +354 -0
- package/template/apps/server/src/system/seed.test.ts +129 -0
- package/template/apps/server/src/system/seed.ts +237 -0
- package/template/apps/server/src/system/user-account-policy.test.ts +158 -0
- package/template/apps/server/src/system/user-account-policy.ts +103 -0
- package/template/apps/server/src/system/user-data-scope.ts +10 -0
- package/template/apps/server/src/system/user-department-validation.ts +17 -0
- package/template/apps/server/src/system/user-projection.test.ts +40 -0
- package/template/apps/server/src/system/user-projection.ts +35 -0
- package/template/apps/server/src/work-order/data-scope.integration.test.ts +171 -0
- package/template/apps/server/src/work-order/drizzle-repository.integration.test.ts +78 -0
- package/template/apps/server/src/work-order/drizzle-repository.ts +67 -0
- package/template/apps/server/src/work-order/foundation-modules.test.ts +85 -0
- package/template/apps/server/src/work-order/repository.ts +46 -0
- package/template/apps/server/src/work-order/routes.test.ts +209 -0
- package/template/apps/server/src/work-order/routes.ts +159 -0
- package/template/apps/server/src/work-order/search-api.test.ts +121 -0
- package/template/apps/server/src/work-order/search-provider.test.ts +201 -0
- package/template/apps/server/src/work-order/search-provider.ts +59 -0
- package/template/apps/server/src/work-order/service.ts +82 -0
- package/template/apps/server/src/work-order/task.test.ts +79 -0
- package/template/apps/server/src/work-order/task.ts +30 -0
- package/template/apps/server/src/workflow/assignee-directory.ts +23 -0
- package/template/apps/server/src/workflow/drizzle-repository.integration.test.ts +213 -0
- package/template/apps/server/src/workflow/drizzle-repository.ts +299 -0
- package/template/apps/server/src/workflow/effects.test.ts +64 -0
- package/template/apps/server/src/workflow/effects.ts +112 -0
- package/template/apps/server/src/workflow/repository.ts +160 -0
- package/template/apps/server/src/workflow/routes.test.ts +256 -0
- package/template/apps/server/src/workflow/routes.ts +249 -0
- package/template/apps/server/src/workflow/service.ts +196 -0
- package/template/apps/server/src/workflow/timeout-runtime.test.ts +96 -0
- package/template/apps/server/src/workflow/timeout-runtime.ts +66 -0
- package/template/apps/server/tsconfig.json +17 -0
- package/template/apps/web/Dockerfile +41 -0
- package/template/apps/web/components.json +24 -0
- package/template/apps/web/dev/dev-identity.ts +58 -0
- package/template/apps/web/dev/dev-port.test.ts +53 -0
- package/template/apps/web/dev/dev-port.ts +68 -0
- package/template/apps/web/dev/start.ts +37 -0
- package/template/apps/web/index.html +14 -0
- package/template/apps/web/package.json +44 -0
- package/template/apps/web/runtime-server.test.ts +86 -0
- package/template/apps/web/runtime-server.ts +143 -0
- package/template/apps/web/server.ts +21 -0
- package/template/apps/web/src/App.vue +22 -0
- package/template/apps/web/src/app/home/HomePage.vue +75 -0
- package/template/apps/web/src/app/home/HomeWelcome.vue +85 -0
- package/template/apps/web/src/app/home/HomeWelcome.webtest.ts +32 -0
- package/template/apps/web/src/app/layouts/AppLayout.vue +10 -0
- package/template/apps/web/src/components/auth/DevelopmentAuthWarning.vue +15 -0
- package/template/apps/web/src/components/auth/LoginForm.vue +80 -0
- package/template/apps/web/src/components/auth/LoginForm.webtest.ts +33 -0
- package/template/apps/web/src/components/auth/PasswordChangeForm.vue +90 -0
- package/template/apps/web/src/components/auth/UserSessionMenu.vue +60 -0
- package/template/apps/web/src/components/auth/UserSessionMenu.webtest.ts +45 -0
- package/template/apps/web/src/components/common/ConfirmDialog.vue +75 -0
- package/template/apps/web/src/components/common/DataPagination.vue +79 -0
- package/template/apps/web/src/components/common/DataPagination.webtest.ts +28 -0
- package/template/apps/web/src/components/common/EmptyState.vue +43 -0
- package/template/apps/web/src/components/common/FormDialog.vue +86 -0
- package/template/apps/web/src/components/common/ModalBody.vue +19 -0
- package/template/apps/web/src/components/common/ModalLayout.webtest.ts +54 -0
- package/template/apps/web/src/components/common/PageError.vue +46 -0
- package/template/apps/web/src/components/common/PageLoading.vue +41 -0
- package/template/apps/web/src/components/common/StatusSummary.vue +37 -0
- package/template/apps/web/src/components/common/UnsavedChangesDialog.vue +60 -0
- package/template/apps/web/src/components/common/UnsavedChangesDialog.webtest.ts +60 -0
- package/template/apps/web/src/components/license/LicenseActivationCodeForm.vue +80 -0
- package/template/apps/web/src/components/license/LicenseExpiryBanner.vue +54 -0
- package/template/apps/web/src/components/license/LicenseFlow.webtest.ts +170 -0
- package/template/apps/web/src/components/license/LicenseStatusCard.vue +95 -0
- package/template/apps/web/src/components/license/LicenseUploadForm.vue +79 -0
- package/template/apps/web/src/components/license/license-display.ts +12 -0
- package/template/apps/web/src/components/ui/alert/Alert.vue +21 -0
- package/template/apps/web/src/components/ui/alert/AlertAction.vue +17 -0
- package/template/apps/web/src/components/ui/alert/AlertDescription.vue +22 -0
- package/template/apps/web/src/components/ui/alert/AlertTitle.vue +22 -0
- package/template/apps/web/src/components/ui/alert/index.ts +25 -0
- package/template/apps/web/src/components/ui/badge/Badge.vue +29 -0
- package/template/apps/web/src/components/ui/badge/index.ts +28 -0
- package/template/apps/web/src/components/ui/breadcrumb/Breadcrumb.vue +18 -0
- package/template/apps/web/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +26 -0
- package/template/apps/web/src/components/ui/breadcrumb/BreadcrumbItem.vue +17 -0
- package/template/apps/web/src/components/ui/breadcrumb/BreadcrumbLink.vue +24 -0
- package/template/apps/web/src/components/ui/breadcrumb/BreadcrumbList.vue +22 -0
- package/template/apps/web/src/components/ui/breadcrumb/BreadcrumbPage.vue +20 -0
- package/template/apps/web/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
- package/template/apps/web/src/components/ui/breadcrumb/index.ts +7 -0
- package/template/apps/web/src/components/ui/button/Button.vue +31 -0
- package/template/apps/web/src/components/ui/button/index.ts +42 -0
- package/template/apps/web/src/components/ui/card/Card.vue +29 -0
- package/template/apps/web/src/components/ui/card/CardAction.vue +22 -0
- package/template/apps/web/src/components/ui/card/CardContent.vue +17 -0
- package/template/apps/web/src/components/ui/card/CardDescription.vue +17 -0
- package/template/apps/web/src/components/ui/card/CardFooter.vue +22 -0
- package/template/apps/web/src/components/ui/card/CardHeader.vue +22 -0
- package/template/apps/web/src/components/ui/card/CardTitle.vue +22 -0
- package/template/apps/web/src/components/ui/card/index.ts +7 -0
- package/template/apps/web/src/components/ui/checkbox/Checkbox.vue +41 -0
- package/template/apps/web/src/components/ui/checkbox/index.ts +1 -0
- package/template/apps/web/src/components/ui/dialog/Dialog.vue +15 -0
- package/template/apps/web/src/components/ui/dialog/DialogClose.vue +12 -0
- package/template/apps/web/src/components/ui/dialog/DialogContent.vue +62 -0
- package/template/apps/web/src/components/ui/dialog/DialogDescription.vue +30 -0
- package/template/apps/web/src/components/ui/dialog/DialogFooter.vue +33 -0
- package/template/apps/web/src/components/ui/dialog/DialogHeader.vue +17 -0
- package/template/apps/web/src/components/ui/dialog/DialogOverlay.vue +28 -0
- package/template/apps/web/src/components/ui/dialog/DialogScrollContent.vue +67 -0
- package/template/apps/web/src/components/ui/dialog/DialogTitle.vue +27 -0
- package/template/apps/web/src/components/ui/dialog/DialogTrigger.vue +12 -0
- package/template/apps/web/src/components/ui/dialog/index.ts +10 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +50 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuContent.vue +48 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuItem.vue +41 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +30 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +51 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +22 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +34 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +36 -0
- package/template/apps/web/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/template/apps/web/src/components/ui/dropdown-menu/index.ts +16 -0
- package/template/apps/web/src/components/ui/input/Input.vue +33 -0
- package/template/apps/web/src/components/ui/input/index.ts +1 -0
- package/template/apps/web/src/components/ui/select/Select.vue +15 -0
- package/template/apps/web/src/components/ui/select/SelectContent.vue +61 -0
- package/template/apps/web/src/components/ui/select/SelectGroup.vue +23 -0
- package/template/apps/web/src/components/ui/select/SelectItem.vue +49 -0
- package/template/apps/web/src/components/ui/select/SelectItemText.vue +12 -0
- package/template/apps/web/src/components/ui/select/SelectLabel.vue +19 -0
- package/template/apps/web/src/components/ui/select/SelectScrollDownButton.vue +34 -0
- package/template/apps/web/src/components/ui/select/SelectScrollUpButton.vue +34 -0
- package/template/apps/web/src/components/ui/select/SelectSeparator.vue +21 -0
- package/template/apps/web/src/components/ui/select/SelectTrigger.vue +43 -0
- package/template/apps/web/src/components/ui/select/SelectValue.vue +12 -0
- package/template/apps/web/src/components/ui/select/index.ts +11 -0
- package/template/apps/web/src/components/ui/separator/Separator.vue +30 -0
- package/template/apps/web/src/components/ui/separator/index.ts +1 -0
- package/template/apps/web/src/components/ui/sheet/Sheet.vue +15 -0
- package/template/apps/web/src/components/ui/sheet/SheetClose.vue +12 -0
- package/template/apps/web/src/components/ui/sheet/SheetContent.vue +62 -0
- package/template/apps/web/src/components/ui/sheet/SheetDescription.vue +23 -0
- package/template/apps/web/src/components/ui/sheet/SheetFooter.vue +15 -0
- package/template/apps/web/src/components/ui/sheet/SheetHeader.vue +15 -0
- package/template/apps/web/src/components/ui/sheet/SheetOverlay.vue +28 -0
- package/template/apps/web/src/components/ui/sheet/SheetTitle.vue +25 -0
- package/template/apps/web/src/components/ui/sheet/SheetTrigger.vue +12 -0
- package/template/apps/web/src/components/ui/sheet/index.ts +8 -0
- package/template/apps/web/src/components/ui/sidebar/Sidebar.vue +114 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarContent.vue +23 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarGroupAction.vue +29 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarGroupLabel.vue +29 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarInput.vue +19 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarInset.vue +22 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuAction.vue +37 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuBadge.vue +23 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuButton.vue +60 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuButtonChild.vue +36 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuSkeleton.vue +35 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuSub.vue +23 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuSubButton.vue +39 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarProvider.vue +128 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarRail.vue +94 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarSeparator.vue +19 -0
- package/template/apps/web/src/components/ui/sidebar/SidebarTrigger.vue +28 -0
- package/template/apps/web/src/components/ui/sidebar/index.ts +62 -0
- package/template/apps/web/src/components/ui/sidebar/sidebar-width.ts +29 -0
- package/template/apps/web/src/components/ui/sidebar/sidebar-width.webtest.ts +28 -0
- package/template/apps/web/src/components/ui/sidebar/utils.ts +26 -0
- package/template/apps/web/src/components/ui/skeleton/Skeleton.vue +17 -0
- package/template/apps/web/src/components/ui/skeleton/index.ts +1 -0
- package/template/apps/web/src/components/ui/sonner/Sonner.vue +70 -0
- package/template/apps/web/src/components/ui/sonner/index.ts +1 -0
- package/template/apps/web/src/components/ui/switch/Switch.vue +47 -0
- package/template/apps/web/src/components/ui/switch/Switch.webtest.ts +23 -0
- package/template/apps/web/src/components/ui/switch/index.ts +1 -0
- package/template/apps/web/src/components/ui/table/Table.vue +19 -0
- package/template/apps/web/src/components/ui/table/TableBody.vue +17 -0
- package/template/apps/web/src/components/ui/table/TableCaption.vue +17 -0
- package/template/apps/web/src/components/ui/table/TableCell.vue +22 -0
- package/template/apps/web/src/components/ui/table/TableEmpty.vue +37 -0
- package/template/apps/web/src/components/ui/table/TableFooter.vue +19 -0
- package/template/apps/web/src/components/ui/table/TableHead.vue +22 -0
- package/template/apps/web/src/components/ui/table/TableHeader.vue +14 -0
- package/template/apps/web/src/components/ui/table/TableRow.vue +22 -0
- package/template/apps/web/src/components/ui/table/index.ts +9 -0
- package/template/apps/web/src/components/ui/table/utils.ts +10 -0
- package/template/apps/web/src/components/ui/tabs/Tabs.vue +27 -0
- package/template/apps/web/src/components/ui/tabs/TabsContent.vue +23 -0
- package/template/apps/web/src/components/ui/tabs/TabsList.vue +34 -0
- package/template/apps/web/src/components/ui/tabs/TabsTrigger.vue +33 -0
- package/template/apps/web/src/components/ui/tabs/index.ts +24 -0
- package/template/apps/web/src/components/ui/tooltip/Tooltip.vue +15 -0
- package/template/apps/web/src/components/ui/tooltip/TooltipContent.vue +49 -0
- package/template/apps/web/src/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/template/apps/web/src/components/ui/tooltip/TooltipTrigger.vue +12 -0
- package/template/apps/web/src/components/ui/tooltip/index.ts +4 -0
- package/template/apps/web/src/composables/useAccessSnapshot.ts +55 -0
- package/template/apps/web/src/composables/useAccessSnapshot.webtest.ts +39 -0
- package/template/apps/web/src/composables/useAppToast.ts +30 -0
- package/template/apps/web/src/composables/useAuthSession.ts +127 -0
- package/template/apps/web/src/composables/useAuthSession.webtest.ts +48 -0
- package/template/apps/web/src/composables/useLicenseReminderRefresh.ts +27 -0
- package/template/apps/web/src/composables/useLicenseReminderRefresh.webtest.ts +30 -0
- package/template/apps/web/src/composables/useLicenseRuntime.ts +90 -0
- package/template/apps/web/src/composables/useLoginFlow.ts +39 -0
- package/template/apps/web/src/composables/useModuleConfigurations.ts +116 -0
- package/template/apps/web/src/composables/usePasswordChange.ts +31 -0
- package/template/apps/web/src/composables/usePlatformSettings.ts +90 -0
- package/template/apps/web/src/composables/useSessionContext.ts +56 -0
- package/template/apps/web/src/composables/useTheme.ts +123 -0
- package/template/apps/web/src/composables/useUnsavedChangesConfirmation.ts +55 -0
- package/template/apps/web/src/composables/useWatermarkSettings.ts +56 -0
- package/template/apps/web/src/composables/watermark-settings.ts +45 -0
- package/template/apps/web/src/composables/watermark-settings.webtest.ts +38 -0
- package/template/apps/web/src/env.d.ts +17 -0
- package/template/apps/web/src/layout/AppHeader.vue +107 -0
- package/template/apps/web/src/layout/AppShell.vue +55 -0
- package/template/apps/web/src/layout/AppShell.webtest.ts +75 -0
- package/template/apps/web/src/layout/AppSidebar.vue +262 -0
- package/template/apps/web/src/layout/AppSidebar.webtest.ts +167 -0
- package/template/apps/web/src/layout/GlobalWatermark.vue +38 -0
- package/template/apps/web/src/layout/NavigationSearchDialog.vue +166 -0
- package/template/apps/web/src/layout/NavigationSearchDialog.webtest.ts +84 -0
- package/template/apps/web/src/layout/NotificationMenu.vue +174 -0
- package/template/apps/web/src/layout/NotificationMenu.webtest.ts +102 -0
- package/template/apps/web/src/layout/ThemeToggle.vue +44 -0
- package/template/apps/web/src/layout/navigation.ts +103 -0
- package/template/apps/web/src/layout/navigation.webtest.ts +99 -0
- package/template/apps/web/src/lib/date-time.ts +21 -0
- package/template/apps/web/src/lib/date-time.webtest.ts +14 -0
- package/template/apps/web/src/lib/utils.ts +7 -0
- package/template/apps/web/src/main.ts +11 -0
- package/template/apps/web/src/pages/AccessDeniedPage.vue +61 -0
- package/template/apps/web/src/pages/auth/ChangePasswordPage.vue +46 -0
- package/template/apps/web/src/pages/auth/LoginPage.vue +63 -0
- package/template/apps/web/src/pages/configuration/ModuleConfigurationPage.vue +15 -0
- package/template/apps/web/src/pages/configuration/components/ModuleConfigRollbackDialog.vue +51 -0
- package/template/apps/web/src/pages/configuration/components/ModuleConfigVersionList.vue +116 -0
- package/template/apps/web/src/pages/configuration/components/ModuleConfigurationEditor.vue +126 -0
- package/template/apps/web/src/pages/configuration/components/ModuleConfigurationEditor.webtest.ts +73 -0
- package/template/apps/web/src/pages/configuration/components/ModuleConfigurationWorkbench.vue +236 -0
- package/template/apps/web/src/pages/dashboard/DashboardPage.vue +39 -0
- package/template/apps/web/src/pages/dashboard/DashboardPage.webtest.ts +37 -0
- package/template/apps/web/src/pages/dashboard/components/DashboardAttention.vue +36 -0
- package/template/apps/web/src/pages/dashboard/components/DashboardMetricCards.vue +28 -0
- package/template/apps/web/src/pages/dashboard/dashboard-presenter.ts +115 -0
- package/template/apps/web/src/pages/dashboard/dashboard-presenter.webtest.ts +92 -0
- package/template/apps/web/src/pages/license/LicensePage.vue +65 -0
- package/template/apps/web/src/pages/profile/PersonalSettingsPage.vue +177 -0
- package/template/apps/web/src/pages/profile/PersonalSettingsPage.webtest.ts +78 -0
- package/template/apps/web/src/pages/settings/BrandingSettingsSection.vue +198 -0
- package/template/apps/web/src/pages/settings/GlobalSettingsPage.vue +195 -0
- package/template/apps/web/src/pages/settings/GlobalSettingsPage.webtest.ts +314 -0
- package/template/apps/web/src/pages/settings/WatermarkSettingsSection.vue +115 -0
- package/template/apps/web/src/pages/settings/logo-file.ts +23 -0
- package/template/apps/web/src/pages/settings/logo-file.webtest.ts +14 -0
- package/template/apps/web/src/pages/system/SystemNotificationsPage.vue +262 -0
- package/template/apps/web/src/pages/system/SystemNotificationsPage.webtest.ts +88 -0
- package/template/apps/web/src/pages/system/SystemOperationsPage.vue +151 -0
- package/template/apps/web/src/pages/system/SystemOperationsPage.webtest.ts +146 -0
- package/template/apps/web/src/pages/system/SystemResourceRoutePage.vue +80 -0
- package/template/apps/web/src/pages/system/SystemResourceRoutePage.webtest.ts +100 -0
- package/template/apps/web/src/pages/system/components/AuditActionCell.vue +87 -0
- package/template/apps/web/src/pages/system/components/AuditActionCell.webtest.ts +66 -0
- package/template/apps/web/src/pages/system/components/AuditLogFilters.vue +119 -0
- package/template/apps/web/src/pages/system/components/AuditLogFilters.webtest.ts +59 -0
- package/template/apps/web/src/pages/system/components/DiskUsageChart.vue +62 -0
- package/template/apps/web/src/pages/system/components/FeatureLicensePolicyDialog.vue +136 -0
- package/template/apps/web/src/pages/system/components/FeatureLicensePolicyDialog.webtest.ts +67 -0
- package/template/apps/web/src/pages/system/components/NotificationPublishForm.vue +57 -0
- package/template/apps/web/src/pages/system/components/OperationCacheMonitor.vue +73 -0
- package/template/apps/web/src/pages/system/components/OperationOnlineUsers.vue +60 -0
- package/template/apps/web/src/pages/system/components/OperationOnlineUsers.webtest.ts +35 -0
- package/template/apps/web/src/pages/system/components/OperationServiceMonitor.vue +118 -0
- package/template/apps/web/src/pages/system/components/OperationServiceMonitor.webtest.ts +64 -0
- package/template/apps/web/src/pages/system/components/SchedulerOperationsPanel.vue +297 -0
- package/template/apps/web/src/pages/system/components/SchedulerOperationsPanel.webtest.ts +145 -0
- package/template/apps/web/src/pages/system/components/SchedulerRunTable.vue +127 -0
- package/template/apps/web/src/pages/system/components/SchedulerRunTable.webtest.ts +75 -0
- package/template/apps/web/src/pages/system/components/SchedulerStaleRecoveryForm.vue +125 -0
- package/template/apps/web/src/pages/system/components/SchedulerStaleRecoveryForm.webtest.ts +84 -0
- package/template/apps/web/src/pages/system/components/SystemResourceFilters.vue +64 -0
- package/template/apps/web/src/pages/system/components/SystemResourceForm.vue +102 -0
- package/template/apps/web/src/pages/system/components/SystemResourcePage.vue +360 -0
- package/template/apps/web/src/pages/system/components/SystemResourcePage.webtest.ts +263 -0
- package/template/apps/web/src/pages/system/components/SystemResourceTable.vue +242 -0
- package/template/apps/web/src/pages/system/components/SystemResourceTable.webtest.ts +196 -0
- package/template/apps/web/src/pages/system/components/dictionary-bulk/DictionaryBulkActions.vue +142 -0
- package/template/apps/web/src/pages/system/components/dictionary-bulk/DictionaryBulkJobDetail.vue +109 -0
- package/template/apps/web/src/pages/system/components/dictionary-bulk/DictionaryBulkJobList.vue +127 -0
- package/template/apps/web/src/pages/system/components/dictionary-bulk/DictionaryBulkPanel.vue +72 -0
- package/template/apps/web/src/pages/system/components/dictionary-bulk/DictionaryBulkPanel.webtest.ts +255 -0
- package/template/apps/web/src/pages/system/components/feature-license-policy.ts +12 -0
- package/template/apps/web/src/pages/system/components/menu-management/MenuManagementPage.vue +131 -0
- package/template/apps/web/src/pages/system/components/menu-management/MenuManagementPage.webtest.ts +228 -0
- package/template/apps/web/src/pages/system/components/menu-management/MenuStructureTable.vue +230 -0
- package/template/apps/web/src/pages/system/components/menu-management/menu-model.ts +161 -0
- package/template/apps/web/src/pages/system/components/menu-management/menu-model.webtest.ts +133 -0
- package/template/apps/web/src/pages/system/components/menu-management/useMenuManagement.ts +117 -0
- package/template/apps/web/src/pages/system/components/role-policy/RolePermissionTree.vue +144 -0
- package/template/apps/web/src/pages/system/components/role-policy/RolePermissionTree.webtest.ts +55 -0
- package/template/apps/web/src/pages/system/components/role-policy/RolePolicyForm.vue +134 -0
- package/template/apps/web/src/pages/system/components/role-policy/permission-tree.ts +58 -0
- package/template/apps/web/src/pages/system/components/role-policy/permission-tree.webtest.ts +80 -0
- package/template/apps/web/src/pages/system/components/user-account/UserAccountForm.vue +307 -0
- package/template/apps/web/src/pages/system/components/user-account/UserRoleSelector.vue +111 -0
- package/template/apps/web/src/pages/system/components/user-account/UserRoleSelector.webtest.ts +45 -0
- package/template/apps/web/src/pages/system/components/user-account/save-user-account.ts +47 -0
- package/template/apps/web/src/pages/system/composables/useDictionaryBulkJobs.ts +152 -0
- package/template/apps/web/src/pages/system/composables/useFeatureLicenseEditor.ts +38 -0
- package/template/apps/web/src/pages/system/composables/useSchedulerOperations.ts +141 -0
- package/template/apps/web/src/pages/system/composables/useSchedulerOperations.webtest.ts +224 -0
- package/template/apps/web/src/pages/system/composables/useSystemResource.ts +269 -0
- package/template/apps/web/src/pages/system/composables/useSystemResource.webtest.ts +51 -0
- package/template/apps/web/src/pages/system/dictionary-bulk-presenter.ts +126 -0
- package/template/apps/web/src/pages/system/resource-config.ts +233 -0
- package/template/apps/web/src/router/auth-navigation.ts +76 -0
- package/template/apps/web/src/router/index.ts +246 -0
- package/template/apps/web/src/router/index.webtest.ts +396 -0
- package/template/apps/web/src/router/manifest-routes.ts +59 -0
- package/template/apps/web/src/services/access-api.ts +26 -0
- package/template/apps/web/src/services/auth-api.ts +72 -0
- package/template/apps/web/src/services/bulk-data-api.ts +105 -0
- package/template/apps/web/src/services/configuration-api.ts +43 -0
- package/template/apps/web/src/services/http.ts +145 -0
- package/template/apps/web/src/services/http.webtest.ts +73 -0
- package/template/apps/web/src/services/license-api.ts +53 -0
- package/template/apps/web/src/services/notification-api.ts +51 -0
- package/template/apps/web/src/services/operations-api.ts +128 -0
- package/template/apps/web/src/services/platform-settings-api.ts +21 -0
- package/template/apps/web/src/services/profile-api.ts +17 -0
- package/template/apps/web/src/services/session-context-api.ts +20 -0
- package/template/apps/web/src/services/system-api.ts +156 -0
- package/template/apps/web/src/style.css +142 -0
- package/template/apps/web/src/style.webtest.ts +18 -0
- package/template/apps/web/tsconfig.json +23 -0
- package/template/apps/web/vite.config.ts +26 -0
- package/template/apps/web/vitest.config.ts +14 -0
- package/template/bunfig.toml +2 -0
- package/template/docker-compose.yml +74 -0
- package/template/docs/adapters/ruoyi-vue-compatibility.md +93 -0
- package/template/docs/architecture/admin-surface-boundary.md +24 -0
- package/template/docs/architecture/data-scope-query-enforcement.md +26 -0
- package/template/docs/architecture/durable-jobs.md +101 -0
- package/template/docs/architecture/minimal-approval-workflow.md +60 -0
- package/template/docs/architecture/module-manifest-composition.md +47 -0
- package/template/docs/architecture/object-storage.md +65 -0
- package/template/docs/architecture/search-provider-protocol.md +59 -0
- package/template/docs/development/crud-generator.md +57 -0
- package/template/docs/license/license-offline-activation-code.md +67 -0
- package/template/docs/operations/observability.md +50 -0
- package/template/docs/platform/agent-tools.md +37 -0
- package/template/docs/platform/audit-reliability.md +95 -0
- package/template/docs/platform/bulk-data-jobs.md +156 -0
- package/template/docs/platform/data-access-control.md +62 -0
- package/template/docs/platform/module-configuration.md +98 -0
- package/template/docs/platform/navigation-registry.md +36 -0
- package/template/docs/platform/notifications.md +33 -0
- package/template/docs/platform/operations-overview.md +35 -0
- package/template/docs/platform/organization-membership.md +31 -0
- package/template/docs/platform/platform-authentication.md +127 -0
- package/template/docs/platform/platform-shell-settings.md +88 -0
- package/template/docs/platform/scheduled-task-executor.md +89 -0
- package/template/docs/platform/system-crud-api.md +100 -0
- package/template/docs/platform/web-system-crud.md +96 -0
- package/template/docs/product/built-in-roles.md +26 -0
- package/template/drizzle.config.ts +16 -0
- package/template/examples/inventory-item.crud.json +55 -0
- package/template/package.json +55 -0
- package/template/packages/config/index.test.ts +114 -0
- package/template/packages/config/index.ts +4 -0
- package/template/packages/config/package.json +13 -0
- package/template/packages/config/src/definition.ts +109 -0
- package/template/packages/config/src/environment-loader.ts +240 -0
- package/template/packages/config/src/platform.ts +185 -0
- package/template/packages/config/src/secrets.ts +69 -0
- package/template/packages/crud-generator/index.ts +3 -0
- package/template/packages/crud-generator/package.json +12 -0
- package/template/packages/crud-generator/src/cli.ts +31 -0
- package/template/packages/crud-generator/src/definition.ts +48 -0
- package/template/packages/crud-generator/src/generator.test.ts +180 -0
- package/template/packages/crud-generator/src/generator.ts +99 -0
- package/template/packages/crud-generator/src/template-helpers.ts +72 -0
- package/template/packages/crud-generator/src/templates/domain.ts +27 -0
- package/template/packages/crud-generator/src/templates/drizzle-repository.ts +126 -0
- package/template/packages/crud-generator/src/templates/dto.ts +19 -0
- package/template/packages/crud-generator/src/templates/index.ts +8 -0
- package/template/packages/crud-generator/src/templates/manifest.ts +69 -0
- package/template/packages/crud-generator/src/templates/project.ts +161 -0
- package/template/packages/crud-generator/src/templates/repository.ts +23 -0
- package/template/packages/crud-generator/src/templates/routes.ts +158 -0
- package/template/packages/crud-generator/src/templates/schema.ts +45 -0
- package/template/packages/crud-generator/src/templates/service.ts +32 -0
- package/template/packages/crud-generator/src/validation.ts +205 -0
- package/template/packages/crud-generator/tsconfig.json +15 -0
- package/template/packages/database/drizzle/0000_organic_madame_web.sql +136 -0
- package/template/packages/database/drizzle/0001_flawless_senator_kelly.sql +80 -0
- package/template/packages/database/drizzle/0002_woozy_squadron_supreme.sql +53 -0
- package/template/packages/database/drizzle/0003_far_carnage.sql +17 -0
- package/template/packages/database/drizzle/0004_flat_bastion.sql +2 -0
- package/template/packages/database/drizzle/0005_fixed_enchantress.sql +6 -0
- package/template/packages/database/drizzle/0006_groovy_overlord.sql +146 -0
- package/template/packages/database/drizzle/0007_chubby_may_parker.sql +9 -0
- package/template/packages/database/drizzle/0008_secret_toxin.sql +21 -0
- package/template/packages/database/drizzle/0009_ambiguous_adam_warlock.sql +46 -0
- package/template/packages/database/drizzle/0010_complex_orphan.sql +42 -0
- package/template/packages/database/drizzle/0011_lowly_maria_hill.sql +42 -0
- package/template/packages/database/drizzle/0012_serious_marvex.sql +11 -0
- package/template/packages/database/drizzle/0013_mysterious_miek.sql +48 -0
- package/template/packages/database/drizzle/0014_graceful_husk.sql +1 -0
- package/template/packages/database/drizzle/0015_illegal_jazinda.sql +29 -0
- package/template/packages/database/drizzle/0016_seed_platform_roles.sql +21 -0
- package/template/packages/database/drizzle/0017_silly_thunderbolt.sql +35 -0
- package/template/packages/database/drizzle/0018_cheerful_alex_power.sql +22 -0
- package/template/packages/database/drizzle/0019_omniscient_luckman.sql +3 -0
- package/template/packages/database/drizzle/0020_handy_vertigo.sql +18 -0
- package/template/packages/database/drizzle/0021_plain_paladin.sql +51 -0
- package/template/packages/database/drizzle/0022_icy_rhodey.sql +2 -0
- package/template/packages/database/drizzle/0023_fresh_thunderbolt_ross.sql +138 -0
- package/template/packages/database/drizzle/0024_misty_lizard.sql +13 -0
- package/template/packages/database/drizzle/0025_premium_songbird.sql +6 -0
- package/template/packages/database/drizzle/0026_aberrant_doctor_octopus.sql +42 -0
- package/template/packages/database/drizzle/0027_tiny_diamondback.sql +5 -0
- package/template/packages/database/drizzle/0028_condemned_ulik.sql +27 -0
- package/template/packages/database/drizzle/0029_clean_nightshade.sql +5 -0
- package/template/packages/database/drizzle/0030_governed_export_constraints.sql +84 -0
- package/template/packages/database/drizzle/meta/0000_snapshot.json +973 -0
- package/template/packages/database/drizzle/meta/0001_snapshot.json +1559 -0
- package/template/packages/database/drizzle/meta/0002_snapshot.json +1911 -0
- package/template/packages/database/drizzle/meta/0003_snapshot.json +2047 -0
- package/template/packages/database/drizzle/meta/0004_snapshot.json +2059 -0
- package/template/packages/database/drizzle/meta/0005_snapshot.json +2084 -0
- package/template/packages/database/drizzle/meta/0006_snapshot.json +3192 -0
- package/template/packages/database/drizzle/meta/0007_snapshot.json +3208 -0
- package/template/packages/database/drizzle/meta/0008_snapshot.json +3367 -0
- package/template/packages/database/drizzle/meta/0009_snapshot.json +3629 -0
- package/template/packages/database/drizzle/meta/0010_snapshot.json +3955 -0
- package/template/packages/database/drizzle/meta/0011_snapshot.json +4299 -0
- package/template/packages/database/drizzle/meta/0012_snapshot.json +4368 -0
- package/template/packages/database/drizzle/meta/0013_snapshot.json +4483 -0
- package/template/packages/database/drizzle/meta/0014_snapshot.json +4489 -0
- package/template/packages/database/drizzle/meta/0015_snapshot.json +4771 -0
- package/template/packages/database/drizzle/meta/0016_snapshot.json +4694 -0
- package/template/packages/database/drizzle/meta/0017_snapshot.json +4731 -0
- package/template/packages/database/drizzle/meta/0018_snapshot.json +4978 -0
- package/template/packages/database/drizzle/meta/0019_snapshot.json +4996 -0
- package/template/packages/database/drizzle/meta/0020_snapshot.json +5140 -0
- package/template/packages/database/drizzle/meta/0021_snapshot.json +5535 -0
- package/template/packages/database/drizzle/meta/0022_snapshot.json +5541 -0
- package/template/packages/database/drizzle/meta/0023_snapshot.json +6667 -0
- package/template/packages/database/drizzle/meta/0024_snapshot.json +6780 -0
- package/template/packages/database/drizzle/meta/0025_snapshot.json +6849 -0
- package/template/packages/database/drizzle/meta/0026_snapshot.json +7185 -0
- package/template/packages/database/drizzle/meta/0027_snapshot.json +7225 -0
- package/template/packages/database/drizzle/meta/0028_snapshot.json +7454 -0
- package/template/packages/database/drizzle/meta/0029_snapshot.json +7460 -0
- package/template/packages/database/drizzle/meta/0030_snapshot.json +7473 -0
- package/template/packages/database/drizzle/meta/_journal.json +223 -0
- package/template/packages/database/index.ts +5 -0
- package/template/packages/database/package.json +17 -0
- package/template/packages/database/src/dialects.test.ts +33 -0
- package/template/packages/database/src/dialects.ts +139 -0
- package/template/packages/database/src/runner.test.ts +96 -0
- package/template/packages/database/src/runner.ts +175 -0
- package/template/packages/database/src/schema/bulk-data.ts +87 -0
- package/template/packages/database/src/schema/common.ts +33 -0
- package/template/packages/database/src/schema/durable-jobs.ts +266 -0
- package/template/packages/database/src/schema/file-storage.ts +94 -0
- package/template/packages/database/src/schema/governance.ts +195 -0
- package/template/packages/database/src/schema/governed-exports.ts +90 -0
- package/template/packages/database/src/schema/identity.ts +169 -0
- package/template/packages/database/src/schema/index.ts +33 -0
- package/template/packages/database/src/schema/license-legacy.ts +93 -0
- package/template/packages/database/src/schema/license-v1.ts +246 -0
- package/template/packages/database/src/schema/migration-history.ts +30 -0
- package/template/packages/database/src/schema/notifications.ts +60 -0
- package/template/packages/database/src/schema/platform-settings.ts +55 -0
- package/template/packages/database/src/schema/scheduler.ts +89 -0
- package/template/packages/database/src/schema/work-orders.ts +23 -0
- package/template/packages/database/src/schema/workflow.ts +86 -0
- package/template/packages/database/src/schema-durable-links.test.ts +27 -0
- package/template/packages/database/src/schema-governed-exports.test.ts +49 -0
- package/template/packages/database/src/schema-workflow-notification.test.ts +63 -0
- package/template/packages/database/src/schema.test.ts +343 -0
- package/template/packages/database/src/sql-store.test.ts +92 -0
- package/template/packages/database/src/sql-store.ts +101 -0
- package/template/packages/database/src/store.ts +32 -0
- package/template/packages/database/tsconfig.json +17 -0
- package/template/packages/example-work-order/index.ts +3 -0
- package/template/packages/example-work-order/package.json +13 -0
- package/template/packages/example-work-order/src/contract.ts +50 -0
- package/template/packages/example-work-order/src/manifest.test.ts +54 -0
- package/template/packages/example-work-order/src/manifest.ts +120 -0
- package/template/packages/example-work-order/src/schema.ts +27 -0
- package/template/packages/license-sdk/index.ts +13 -0
- package/template/packages/license-sdk/package.json +18 -0
- package/template/packages/license-sdk/src/bounded-json-body.test.ts +65 -0
- package/template/packages/license-sdk/src/bounded-json-body.ts +135 -0
- package/template/packages/license-sdk/src/canonical-json.test.ts +28 -0
- package/template/packages/license-sdk/src/canonical-json.ts +104 -0
- package/template/packages/license-sdk/src/client.test.ts +82 -0
- package/template/packages/license-sdk/src/client.ts +86 -0
- package/template/packages/license-sdk/src/device.ts +46 -0
- package/template/packages/license-sdk/src/file-storage.test.ts +80 -0
- package/template/packages/license-sdk/src/file-storage.ts +77 -0
- package/template/packages/license-sdk/src/installation.test.ts +241 -0
- package/template/packages/license-sdk/src/installation.ts +150 -0
- package/template/packages/license-sdk/src/license-parser.ts +56 -0
- package/template/packages/license-sdk/src/offline-code-base32.ts +57 -0
- package/template/packages/license-sdk/src/offline-code-decompression.ts +55 -0
- package/template/packages/license-sdk/src/offline-code-limits.ts +10 -0
- package/template/packages/license-sdk/src/offline-code-wire.ts +72 -0
- package/template/packages/license-sdk/src/offline-code.test.ts +172 -0
- package/template/packages/license-sdk/src/offline-code.ts +319 -0
- package/template/packages/license-sdk/src/payload.test.ts +72 -0
- package/template/packages/license-sdk/src/payload.ts +201 -0
- package/template/packages/license-sdk/src/storage.ts +64 -0
- package/template/packages/license-sdk/src/test-fixtures.ts +59 -0
- package/template/packages/license-sdk/src/v1-test-vector.ts +49 -0
- package/template/packages/license-sdk/src/validation.test.ts +62 -0
- package/template/packages/license-sdk/src/validation.ts +143 -0
- package/template/packages/license-sdk/src/verification.test.ts +97 -0
- package/template/packages/license-sdk/src/verification.ts +199 -0
- package/template/packages/license-sdk/tsconfig.json +17 -0
- package/template/packages/modules/index.ts +8 -0
- package/template/packages/modules/package.json +13 -0
- package/template/packages/modules/src/composition.test.ts +267 -0
- package/template/packages/modules/src/composition.ts +342 -0
- package/template/packages/modules/src/installed-business-modules.ts +10 -0
- package/template/packages/modules/src/manifest.ts +97 -0
- package/template/packages/modules/src/menu-composition.test.ts +64 -0
- package/template/packages/modules/src/menu-composition.ts +54 -0
- package/template/packages/modules/src/registry.ts +53 -0
- package/template/packages/modules/src/system-admin-routes.ts +134 -0
- package/template/packages/modules/src/system-agent-tools.ts +28 -0
- package/template/packages/modules/src/system-api-binding.ts +37 -0
- package/template/packages/modules/src/system-api-data-governance.ts +21 -0
- package/template/packages/modules/src/system-api-permissions.ts +344 -0
- package/template/packages/modules/src/system-audit-actions.ts +70 -0
- package/template/packages/modules/src/system-data-governance.ts +30 -0
- package/template/packages/modules/src/system-features.ts +143 -0
- package/template/packages/modules/src/system-governed-export-bindings.ts +31 -0
- package/template/packages/modules/src/system-module-catalog.test.ts +145 -0
- package/template/packages/modules/src/system-module-catalog.ts +250 -0
- package/template/packages/modules/src/system-modules.test.ts +344 -0
- package/template/packages/modules/src/system-modules.ts +335 -0
- package/template/packages/modules/src/system-permissions.ts +142 -0
- package/template/packages/modules/user/module.ts +72 -0
- package/template/packages/shared/index.ts +16 -0
- package/template/packages/shared/package.json +9 -0
- package/template/packages/shared/src/audit.test.ts +17 -0
- package/template/packages/shared/src/audit.ts +237 -0
- package/template/packages/shared/src/correlation.test.ts +10 -0
- package/template/packages/shared/src/correlation.ts +11 -0
- package/template/packages/shared/src/data-governance.test.ts +44 -0
- package/template/packages/shared/src/data-governance.ts +89 -0
- package/template/packages/shared/src/database.ts +67 -0
- package/template/packages/shared/src/feature.test.ts +54 -0
- package/template/packages/shared/src/feature.ts +104 -0
- package/template/packages/shared/src/license-legacy.ts +153 -0
- package/template/packages/shared/src/license.test.ts +63 -0
- package/template/packages/shared/src/license.ts +267 -0
- package/template/packages/shared/src/module-configuration.ts +50 -0
- package/template/packages/shared/src/notification.ts +46 -0
- package/template/packages/shared/src/platform-settings.ts +5 -0
- package/template/packages/shared/src/primitives.ts +47 -0
- package/template/packages/shared/src/profile.ts +13 -0
- package/template/packages/shared/src/rbac.ts +117 -0
- package/template/packages/shared/src/ruoyi.ts +98 -0
- package/template/packages/shared/src/scheduler.ts +108 -0
- package/template/packages/shared/src/search-provider.ts +24 -0
- package/template/packages/shared/src/workflow.test.ts +225 -0
- package/template/packages/shared/src/workflow.ts +307 -0
- package/template/packages/storage/index.ts +11 -0
- package/template/packages/storage/package.json +12 -0
- package/template/packages/storage/src/blob-store.ts +64 -0
- package/template/packages/storage/src/content-hash.ts +24 -0
- package/template/packages/storage/src/file-service.test.ts +100 -0
- package/template/packages/storage/src/file-service.ts +59 -0
- package/template/packages/storage/src/in-memory-upload-repository.ts +154 -0
- package/template/packages/storage/src/local-file-blob-store.test.ts +175 -0
- package/template/packages/storage/src/local-file-blob-store.ts +344 -0
- package/template/packages/storage/src/local-file-maintenance.ts +133 -0
- package/template/packages/storage/src/memory-blob-store.test.ts +16 -0
- package/template/packages/storage/src/memory-blob-store.ts +100 -0
- package/template/packages/storage/src/upload-repository.ts +43 -0
- package/template/packages/storage/src/upload-service.test.ts +246 -0
- package/template/packages/storage/src/upload-service.ts +334 -0
- package/template/packages/storage/src/upload-streams.ts +123 -0
- package/template/packages/storage/src/upload-types.ts +110 -0
- package/template/packages/storage/tsconfig.json +16 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { PanelLeftIcon } from "@lucide/vue";
|
|
3
|
+
|
|
4
|
+
import type { HTMLAttributes } from "vue";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
import { Button } from "@/components/ui/button";
|
|
7
|
+
import { useSidebar } from "./utils";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
class?: HTMLAttributes["class"];
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const { toggleSidebar } = useSidebar();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<Button
|
|
18
|
+
data-sidebar="trigger"
|
|
19
|
+
data-slot="sidebar-trigger"
|
|
20
|
+
variant="ghost"
|
|
21
|
+
size="icon-sm"
|
|
22
|
+
:class="cn('', props.class)"
|
|
23
|
+
@click="toggleSidebar"
|
|
24
|
+
>
|
|
25
|
+
<PanelLeftIcon class="cn-rtl-flip" />
|
|
26
|
+
<span class="sr-only">Toggle Sidebar</span>
|
|
27
|
+
</Button>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
export interface SidebarProps {
|
|
6
|
+
side?: "left" | "right";
|
|
7
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
8
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
9
|
+
class?: HTMLAttributes["class"];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { default as Sidebar } from "./Sidebar.vue";
|
|
13
|
+
export { default as SidebarContent } from "./SidebarContent.vue";
|
|
14
|
+
export { default as SidebarFooter } from "./SidebarFooter.vue";
|
|
15
|
+
export { default as SidebarGroup } from "./SidebarGroup.vue";
|
|
16
|
+
export { default as SidebarGroupAction } from "./SidebarGroupAction.vue";
|
|
17
|
+
export { default as SidebarGroupContent } from "./SidebarGroupContent.vue";
|
|
18
|
+
export { default as SidebarGroupLabel } from "./SidebarGroupLabel.vue";
|
|
19
|
+
export { default as SidebarHeader } from "./SidebarHeader.vue";
|
|
20
|
+
export { default as SidebarInput } from "./SidebarInput.vue";
|
|
21
|
+
export { default as SidebarInset } from "./SidebarInset.vue";
|
|
22
|
+
export { default as SidebarMenu } from "./SidebarMenu.vue";
|
|
23
|
+
export { default as SidebarMenuAction } from "./SidebarMenuAction.vue";
|
|
24
|
+
export { default as SidebarMenuBadge } from "./SidebarMenuBadge.vue";
|
|
25
|
+
export { default as SidebarMenuButton } from "./SidebarMenuButton.vue";
|
|
26
|
+
export { default as SidebarMenuItem } from "./SidebarMenuItem.vue";
|
|
27
|
+
export { default as SidebarMenuSkeleton } from "./SidebarMenuSkeleton.vue";
|
|
28
|
+
export { default as SidebarMenuSub } from "./SidebarMenuSub.vue";
|
|
29
|
+
export { default as SidebarMenuSubButton } from "./SidebarMenuSubButton.vue";
|
|
30
|
+
export { default as SidebarMenuSubItem } from "./SidebarMenuSubItem.vue";
|
|
31
|
+
export { default as SidebarProvider } from "./SidebarProvider.vue";
|
|
32
|
+
export { default as SidebarRail } from "./SidebarRail.vue";
|
|
33
|
+
export { default as SidebarSeparator } from "./SidebarSeparator.vue";
|
|
34
|
+
export { default as SidebarTrigger } from "./SidebarTrigger.vue";
|
|
35
|
+
|
|
36
|
+
export { useSidebar } from "./utils";
|
|
37
|
+
|
|
38
|
+
export const sidebarMenuButtonVariants = cva(
|
|
39
|
+
"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-primary/8 data-active:text-sidebar-foreground data-active:font-medium dark:data-active:bg-sidebar-accent dark:data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding,background-color,color] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 peer/menu-button group/menu-button flex w-full items-center overflow-hidden outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",
|
|
40
|
+
{
|
|
41
|
+
variants: {
|
|
42
|
+
variant: {
|
|
43
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
44
|
+
outline:
|
|
45
|
+
"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]",
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
default: "h-8 text-sm",
|
|
49
|
+
sm: "h-7 text-xs",
|
|
50
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
variant: "default",
|
|
55
|
+
size: "default",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
export type SidebarMenuButtonVariants = VariantProps<
|
|
61
|
+
typeof sidebarMenuButtonVariants
|
|
62
|
+
>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SIDEBAR_COLLAPSE_THRESHOLD_PX,
|
|
3
|
+
SIDEBAR_WIDTH_DEFAULT_PX,
|
|
4
|
+
SIDEBAR_WIDTH_MAX_PX,
|
|
5
|
+
SIDEBAR_WIDTH_MIN_PX,
|
|
6
|
+
} from "./utils";
|
|
7
|
+
|
|
8
|
+
export interface SidebarResizeResult {
|
|
9
|
+
open: boolean;
|
|
10
|
+
width: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function resolveSidebarResize(width: number): SidebarResizeResult {
|
|
14
|
+
if (!Number.isFinite(width) || width <= SIDEBAR_COLLAPSE_THRESHOLD_PX) {
|
|
15
|
+
return { open: false, width: SIDEBAR_WIDTH_MIN_PX };
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
open: true,
|
|
19
|
+
width: Math.min(
|
|
20
|
+
SIDEBAR_WIDTH_MAX_PX,
|
|
21
|
+
Math.max(SIDEBAR_WIDTH_MIN_PX, Math.round(width)),
|
|
22
|
+
),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function restoreSidebarWidth(value: string | null): number {
|
|
27
|
+
const parsed = value ? Number.parseInt(value, 10) : SIDEBAR_WIDTH_DEFAULT_PX;
|
|
28
|
+
return resolveSidebarResize(parsed).width;
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import { SIDEBAR_WIDTH_MAX_PX, SIDEBAR_WIDTH_MIN_PX } from "./utils";
|
|
3
|
+
import { resolveSidebarResize, restoreSidebarWidth } from "./sidebar-width";
|
|
4
|
+
|
|
5
|
+
describe("sidebar width", () => {
|
|
6
|
+
test("拖过窄阈值后折叠", () => {
|
|
7
|
+
expect(resolveSidebarResize(160)).toEqual({
|
|
8
|
+
open: false,
|
|
9
|
+
width: SIDEBAR_WIDTH_MIN_PX,
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test("展开宽度限制在最小和最大边界内", () => {
|
|
14
|
+
expect(resolveSidebarResize(161)).toEqual({
|
|
15
|
+
open: true,
|
|
16
|
+
width: SIDEBAR_WIDTH_MIN_PX,
|
|
17
|
+
});
|
|
18
|
+
expect(resolveSidebarResize(600)).toEqual({
|
|
19
|
+
open: true,
|
|
20
|
+
width: SIDEBAR_WIDTH_MAX_PX,
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test("无效的持久化值恢复为安全宽度", () => {
|
|
25
|
+
expect(restoreSidebarWidth("invalid")).toBe(SIDEBAR_WIDTH_MIN_PX);
|
|
26
|
+
expect(restoreSidebarWidth(null)).toBe(256);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from "vue";
|
|
2
|
+
import { createContext } from "reka-ui";
|
|
3
|
+
|
|
4
|
+
export const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
5
|
+
export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
6
|
+
export const SIDEBAR_WIDTH = "16rem";
|
|
7
|
+
export const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
8
|
+
export const SIDEBAR_WIDTH_ICON = "3rem";
|
|
9
|
+
export const SIDEBAR_WIDTH_DEFAULT_PX = 256;
|
|
10
|
+
export const SIDEBAR_WIDTH_ICON_PX = 48;
|
|
11
|
+
export const SIDEBAR_WIDTH_MIN_PX = 192;
|
|
12
|
+
export const SIDEBAR_WIDTH_MAX_PX = 384;
|
|
13
|
+
export const SIDEBAR_COLLAPSE_THRESHOLD_PX = 160;
|
|
14
|
+
export const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
15
|
+
|
|
16
|
+
export const [useSidebar, provideSidebarContext] = createContext<{
|
|
17
|
+
state: ComputedRef<"expanded" | "collapsed">;
|
|
18
|
+
open: Ref<boolean>;
|
|
19
|
+
setOpen: (value: boolean) => void;
|
|
20
|
+
isMobile: Ref<boolean>;
|
|
21
|
+
openMobile: Ref<boolean>;
|
|
22
|
+
setOpenMobile: (value: boolean) => void;
|
|
23
|
+
sidebarWidth: Ref<number>;
|
|
24
|
+
resizeSidebar: (width: number) => void;
|
|
25
|
+
toggleSidebar: () => void;
|
|
26
|
+
}>("Sidebar");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
interface SkeletonProps {
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = defineProps<SkeletonProps>();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div
|
|
14
|
+
data-slot="skeleton"
|
|
15
|
+
:class="cn('bg-muted rounded-md animate-pulse', props.class)"
|
|
16
|
+
/>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Skeleton } from "./Skeleton.vue";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
CircleCheckIcon,
|
|
5
|
+
InfoIcon,
|
|
6
|
+
TriangleAlertIcon,
|
|
7
|
+
OctagonXIcon,
|
|
8
|
+
Loader2Icon,
|
|
9
|
+
XIcon,
|
|
10
|
+
} from "@lucide/vue";
|
|
11
|
+
|
|
12
|
+
import type { ToasterProps } from "vue-sonner";
|
|
13
|
+
import { Toaster as Sonner } from "vue-sonner";
|
|
14
|
+
import { cn } from "@/lib/utils";
|
|
15
|
+
|
|
16
|
+
const props = defineProps<ToasterProps>();
|
|
17
|
+
|
|
18
|
+
const toasterProps = computed(() => {
|
|
19
|
+
const { toastOptions: _toastOptions, ...rest } = props;
|
|
20
|
+
return rest;
|
|
21
|
+
});
|
|
22
|
+
const resolvedToastOptions = computed(
|
|
23
|
+
() =>
|
|
24
|
+
props.toastOptions ?? {
|
|
25
|
+
classes: {
|
|
26
|
+
toast: "rounded-2xl",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
);
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<Sonner
|
|
34
|
+
:class="cn('toaster group', props.class)"
|
|
35
|
+
:style="{
|
|
36
|
+
'--normal-bg': 'var(--popover)',
|
|
37
|
+
'--normal-text': 'var(--popover-foreground)',
|
|
38
|
+
'--normal-border': 'var(--border)',
|
|
39
|
+
'--border-radius': 'var(--radius)',
|
|
40
|
+
'--gray2': 'hsl(var(--popover) / 0.9)',
|
|
41
|
+
'--gray3': 'var(--border)',
|
|
42
|
+
'--gray4': 'var(--border)',
|
|
43
|
+
'--gray5': 'var(--border)',
|
|
44
|
+
'--gray12': 'var(--popover-foreground)',
|
|
45
|
+
}"
|
|
46
|
+
:toast-options="resolvedToastOptions"
|
|
47
|
+
v-bind="toasterProps"
|
|
48
|
+
>
|
|
49
|
+
<template #success-icon>
|
|
50
|
+
<CircleCheckIcon class="size-4" />
|
|
51
|
+
</template>
|
|
52
|
+
<template #info-icon>
|
|
53
|
+
<InfoIcon class="size-4" />
|
|
54
|
+
</template>
|
|
55
|
+
<template #warning-icon>
|
|
56
|
+
<TriangleAlertIcon class="size-4" />
|
|
57
|
+
</template>
|
|
58
|
+
<template #error-icon>
|
|
59
|
+
<OctagonXIcon class="size-4" />
|
|
60
|
+
</template>
|
|
61
|
+
<template #loading-icon>
|
|
62
|
+
<div>
|
|
63
|
+
<Loader2Icon class="size-4 animate-spin" />
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
<template #close-icon>
|
|
67
|
+
<XIcon class="size-4" />
|
|
68
|
+
</template>
|
|
69
|
+
</Sonner>
|
|
70
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Toaster } from "./Sonner.vue";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SwitchRootEmits, SwitchRootProps } from "reka-ui";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5
|
+
import { SwitchRoot, SwitchThumb, useForwardPropsEmits } from "reka-ui";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(
|
|
9
|
+
defineProps<
|
|
10
|
+
SwitchRootProps & {
|
|
11
|
+
class?: HTMLAttributes["class"];
|
|
12
|
+
size?: "sm" | "default";
|
|
13
|
+
}
|
|
14
|
+
>(),
|
|
15
|
+
{
|
|
16
|
+
size: "default",
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const emits = defineEmits<SwitchRootEmits>();
|
|
21
|
+
|
|
22
|
+
const delegatedProps = reactiveOmit(props, "class", "size");
|
|
23
|
+
|
|
24
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<SwitchRoot
|
|
29
|
+
v-slot="slotProps"
|
|
30
|
+
data-slot="switch"
|
|
31
|
+
:data-size="size"
|
|
32
|
+
v-bind="forwarded"
|
|
33
|
+
:class="
|
|
34
|
+
cn(
|
|
35
|
+
'data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted-foreground/35 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-5 data-[size=default]:w-9 data-[size=sm]:h-4 data-[size=sm]:w-7 peer group/switch relative inline-flex items-center transition-colors outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50',
|
|
36
|
+
props.class,
|
|
37
|
+
)
|
|
38
|
+
"
|
|
39
|
+
>
|
|
40
|
+
<SwitchThumb
|
|
41
|
+
data-slot="switch-thumb"
|
|
42
|
+
class="bg-background rounded-full shadow-xs group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-[state=checked]:translate-x-4 group-data-[size=sm]/switch:data-[state=checked]:translate-x-3 group-data-[size=default]/switch:data-[state=unchecked]:translate-x-0.5 group-data-[size=sm]/switch:data-[state=unchecked]:translate-x-0.5 pointer-events-none block ring-0 transition-transform"
|
|
43
|
+
>
|
|
44
|
+
<slot name="thumb" v-bind="slotProps" />
|
|
45
|
+
</SwitchThumb>
|
|
46
|
+
</SwitchRoot>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import { mount } from "@vue/test-utils";
|
|
3
|
+
import Switch from "./Switch.vue";
|
|
4
|
+
|
|
5
|
+
describe("Switch", () => {
|
|
6
|
+
test("真实点击按 Reka data-state 更新受控状态", async () => {
|
|
7
|
+
const wrapper = mount({
|
|
8
|
+
components: { Switch },
|
|
9
|
+
data: () => ({ checked: true }),
|
|
10
|
+
template: '<Switch v-model="checked" aria-label="测试开关" />',
|
|
11
|
+
});
|
|
12
|
+
const control = wrapper.get('[role="switch"]');
|
|
13
|
+
expect(control.attributes("data-state")).toBe("checked");
|
|
14
|
+
expect(control.classes()).toContain("data-[state=checked]:bg-primary");
|
|
15
|
+
|
|
16
|
+
await control.trigger("click");
|
|
17
|
+
|
|
18
|
+
expect(control.attributes("data-state")).toBe("unchecked");
|
|
19
|
+
expect(control.classes()).toContain(
|
|
20
|
+
"data-[state=unchecked]:bg-muted-foreground/35",
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Switch } from "./Switch.vue";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div data-slot="table-container" class="relative w-full overflow-x-auto">
|
|
12
|
+
<table
|
|
13
|
+
data-slot="table"
|
|
14
|
+
:class="cn('w-full caption-bottom text-sm', props.class)"
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</table>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<tbody
|
|
12
|
+
data-slot="table-body"
|
|
13
|
+
:class="cn('[&_tr:last-child]:border-0', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</tbody>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<caption
|
|
12
|
+
data-slot="table-caption"
|
|
13
|
+
:class="cn('text-muted-foreground mt-4 text-sm', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</caption>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<td
|
|
12
|
+
data-slot="table-cell"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0',
|
|
16
|
+
props.class,
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</td>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
import TableCell from "./TableCell.vue";
|
|
6
|
+
import TableRow from "./TableRow.vue";
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(
|
|
9
|
+
defineProps<{
|
|
10
|
+
class?: HTMLAttributes["class"];
|
|
11
|
+
colspan?: number;
|
|
12
|
+
}>(),
|
|
13
|
+
{
|
|
14
|
+
colspan: 1,
|
|
15
|
+
},
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<TableRow>
|
|
23
|
+
<TableCell
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'p-4 whitespace-nowrap align-middle text-sm text-foreground',
|
|
27
|
+
props.class,
|
|
28
|
+
)
|
|
29
|
+
"
|
|
30
|
+
v-bind="delegatedProps"
|
|
31
|
+
>
|
|
32
|
+
<div class="flex items-center justify-center py-10">
|
|
33
|
+
<slot />
|
|
34
|
+
</div>
|
|
35
|
+
</TableCell>
|
|
36
|
+
</TableRow>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<tfoot
|
|
12
|
+
data-slot="table-footer"
|
|
13
|
+
:class="
|
|
14
|
+
cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', props.class)
|
|
15
|
+
"
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</tfoot>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<th
|
|
12
|
+
data-slot="table-head"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0',
|
|
16
|
+
props.class,
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</th>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<thead data-slot="table-header" :class="cn('[&_tr]:border-b', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</thead>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<tr
|
|
12
|
+
data-slot="table-row"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50',
|
|
16
|
+
props.class,
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</tr>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Table } from "./Table.vue";
|
|
2
|
+
export { default as TableBody } from "./TableBody.vue";
|
|
3
|
+
export { default as TableCaption } from "./TableCaption.vue";
|
|
4
|
+
export { default as TableCell } from "./TableCell.vue";
|
|
5
|
+
export { default as TableEmpty } from "./TableEmpty.vue";
|
|
6
|
+
export { default as TableFooter } from "./TableFooter.vue";
|
|
7
|
+
export { default as TableHead } from "./TableHead.vue";
|
|
8
|
+
export { default as TableHeader } from "./TableHeader.vue";
|
|
9
|
+
export { default as TableRow } from "./TableRow.vue";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Updater } from "@tanstack/vue-table";
|
|
2
|
+
|
|
3
|
+
import type { Ref } from "vue";
|
|
4
|
+
import { isFunction } from "@tanstack/vue-table";
|
|
5
|
+
|
|
6
|
+
export function valueUpdater<T>(updaterOrValue: Updater<T>, ref: Ref<T>) {
|
|
7
|
+
ref.value = isFunction(updaterOrValue)
|
|
8
|
+
? updaterOrValue(ref.value)
|
|
9
|
+
: updaterOrValue;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TabsRootEmits, TabsRootProps } from "reka-ui";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5
|
+
import { TabsRoot, useForwardPropsEmits } from "reka-ui";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
TabsRootProps & { class?: HTMLAttributes["class"] }
|
|
10
|
+
>();
|
|
11
|
+
const emits = defineEmits<TabsRootEmits>();
|
|
12
|
+
|
|
13
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
14
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<TabsRoot
|
|
19
|
+
v-slot="slotProps"
|
|
20
|
+
data-slot="tabs"
|
|
21
|
+
:data-orientation="forwarded.orientation || 'horizontal'"
|
|
22
|
+
v-bind="forwarded"
|
|
23
|
+
:class="cn('gap-2 group/tabs flex data-horizontal:flex-col', props.class)"
|
|
24
|
+
>
|
|
25
|
+
<slot v-bind="slotProps" />
|
|
26
|
+
</TabsRoot>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TabsContentProps } from "reka-ui";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5
|
+
import { TabsContent } from "reka-ui";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
TabsContentProps & { class?: HTMLAttributes["class"] }
|
|
10
|
+
>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<TabsContent
|
|
17
|
+
data-slot="tabs-content"
|
|
18
|
+
:class="cn('text-sm flex-1 outline-none', props.class)"
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</TabsContent>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TabsListProps } from "reka-ui";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import type { TabsListVariants } from ".";
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
6
|
+
import { TabsList } from "reka-ui";
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
8
|
+
import { tabsListVariants } from ".";
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(
|
|
11
|
+
defineProps<
|
|
12
|
+
TabsListProps & {
|
|
13
|
+
class?: HTMLAttributes["class"];
|
|
14
|
+
variant?: TabsListVariants["variant"];
|
|
15
|
+
}
|
|
16
|
+
>(),
|
|
17
|
+
{
|
|
18
|
+
variant: "default",
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const delegatedProps = reactiveOmit(props, "class", "variant");
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<TabsList
|
|
27
|
+
data-slot="tabs-list"
|
|
28
|
+
:data-variant="variant"
|
|
29
|
+
v-bind="delegatedProps"
|
|
30
|
+
:class="cn(tabsListVariants({ variant }), props.class)"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</TabsList>
|
|
34
|
+
</template>
|