@simplysm/sd-cli 13.0.99 → 14.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/dist/commands/build.js +29 -19
- package/dist/commands/build.js.map +1 -6
- package/dist/commands/check.d.ts +1 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +130 -115
- package/dist/commands/check.js.map +1 -6
- package/dist/commands/dev.d.ts +6 -7
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +24 -14
- package/dist/commands/dev.js.map +1 -6
- package/dist/commands/lint.d.ts +1 -1
- package/dist/commands/lint.js +158 -116
- package/dist/commands/lint.js.map +1 -6
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +637 -510
- package/dist/commands/publish.js.map +1 -6
- package/dist/commands/replace-deps.js +12 -12
- package/dist/commands/replace-deps.js.map +1 -6
- package/dist/commands/typecheck.d.ts +5 -30
- package/dist/commands/typecheck.d.ts.map +1 -1
- package/dist/commands/typecheck.js +144 -207
- package/dist/commands/typecheck.js.map +1 -6
- package/dist/commands/watch.d.ts +6 -4
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +25 -16
- package/dist/commands/watch.js.map +1 -6
- package/dist/engines/NgtscEngine.d.ts +47 -0
- package/dist/engines/NgtscEngine.d.ts.map +1 -0
- package/dist/engines/NgtscEngine.js +151 -0
- package/dist/engines/NgtscEngine.js.map +1 -0
- package/dist/engines/ServerEsbuildEngine.d.ts +47 -0
- package/dist/engines/ServerEsbuildEngine.d.ts.map +1 -0
- package/dist/engines/ServerEsbuildEngine.js +159 -0
- package/dist/engines/ServerEsbuildEngine.js.map +1 -0
- package/dist/engines/TscEngine.d.ts +47 -0
- package/dist/engines/TscEngine.d.ts.map +1 -0
- package/dist/engines/TscEngine.js +153 -0
- package/dist/engines/TscEngine.js.map +1 -0
- package/dist/engines/ViteEngine.d.ts +49 -0
- package/dist/engines/ViteEngine.d.ts.map +1 -0
- package/dist/engines/ViteEngine.js +161 -0
- package/dist/engines/ViteEngine.js.map +1 -0
- package/dist/engines/index.d.ts +26 -0
- package/dist/engines/index.d.ts.map +1 -0
- package/dist/engines/index.js +30 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/types.d.ts +77 -0
- package/dist/engines/types.d.ts.map +1 -0
- package/dist/engines/types.js +2 -0
- package/dist/engines/types.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -6
- package/dist/infra/ResultCollector.d.ts +1 -1
- package/dist/infra/ResultCollector.d.ts.map +1 -1
- package/dist/infra/ResultCollector.js +30 -27
- package/dist/infra/ResultCollector.js.map +1 -6
- package/dist/infra/SignalHandler.js +45 -42
- package/dist/infra/SignalHandler.js.map +1 -6
- package/dist/infra/WorkerManager.js +56 -53
- package/dist/infra/WorkerManager.js.map +1 -6
- package/dist/orchestrators/BuildOrchestrator.d.ts +33 -1
- package/dist/orchestrators/BuildOrchestrator.d.ts.map +1 -1
- package/dist/orchestrators/BuildOrchestrator.js +314 -309
- package/dist/orchestrators/BuildOrchestrator.js.map +1 -6
- package/dist/orchestrators/DevWatchOrchestrator.d.ts +60 -0
- package/dist/orchestrators/DevWatchOrchestrator.d.ts.map +1 -0
- package/dist/orchestrators/DevWatchOrchestrator.js +465 -0
- package/dist/orchestrators/DevWatchOrchestrator.js.map +1 -0
- package/dist/sd-cli-entry.d.ts.map +1 -1
- package/dist/sd-cli-entry.js +190 -266
- package/dist/sd-cli-entry.js.map +1 -6
- package/dist/sd-cli.js +77 -49
- package/dist/sd-cli.js.map +1 -6
- package/dist/sd-config.types.d.ts +2 -0
- package/dist/sd-config.types.d.ts.map +1 -1
- package/dist/sd-config.types.js +2 -1
- package/dist/sd-config.types.js.map +1 -6
- package/dist/utils/angular-build.d.ts +77 -0
- package/dist/utils/angular-build.d.ts.map +1 -0
- package/dist/utils/angular-build.js +84 -0
- package/dist/utils/angular-build.js.map +1 -0
- package/dist/utils/build-env.js +9 -9
- package/dist/utils/build-env.js.map +1 -6
- package/dist/utils/concurrency.d.ts +15 -0
- package/dist/utils/concurrency.d.ts.map +1 -0
- package/dist/utils/concurrency.js +38 -0
- package/dist/utils/concurrency.js.map +1 -0
- package/dist/utils/copy-public.js +104 -87
- package/dist/utils/copy-public.js.map +1 -6
- package/dist/utils/copy-src.js +49 -35
- package/dist/utils/copy-src.js.map +1 -6
- package/dist/utils/esbuild-config.d.ts +0 -29
- package/dist/utils/esbuild-config.d.ts.map +1 -1
- package/dist/utils/esbuild-config.js +151 -218
- package/dist/utils/esbuild-config.js.map +1 -6
- package/dist/utils/ngtsc-build-core.d.ts +49 -0
- package/dist/utils/ngtsc-build-core.d.ts.map +1 -0
- package/dist/utils/ngtsc-build-core.js +250 -0
- package/dist/utils/ngtsc-build-core.js.map +1 -0
- package/dist/utils/output-path-rewriter.d.ts +23 -0
- package/dist/utils/output-path-rewriter.d.ts.map +1 -0
- package/dist/utils/output-path-rewriter.js +74 -0
- package/dist/utils/output-path-rewriter.js.map +1 -0
- package/dist/utils/output-utils.js +55 -40
- package/dist/utils/output-utils.js.map +1 -6
- package/dist/utils/package-utils.d.ts +8 -0
- package/dist/utils/package-utils.d.ts.map +1 -1
- package/dist/utils/package-utils.js +103 -73
- package/dist/utils/package-utils.js.map +1 -6
- package/dist/utils/rebuild-manager.js +41 -44
- package/dist/utils/rebuild-manager.js.map +1 -6
- package/dist/utils/replace-deps.js +283 -184
- package/dist/utils/replace-deps.js.map +1 -6
- package/dist/utils/scss-compiler.d.ts +10 -0
- package/dist/utils/scss-compiler.d.ts.map +1 -0
- package/dist/utils/scss-compiler.js +36 -0
- package/dist/utils/scss-compiler.js.map +1 -0
- package/dist/utils/sd-config.js +29 -19
- package/dist/utils/sd-config.js.map +1 -6
- package/dist/utils/tsc-build.d.ts +36 -0
- package/dist/utils/tsc-build.d.ts.map +1 -0
- package/dist/utils/tsc-build.js +130 -0
- package/dist/utils/tsc-build.js.map +1 -0
- package/dist/utils/tsconfig.d.ts +7 -26
- package/dist/utils/tsconfig.d.ts.map +1 -1
- package/dist/utils/tsconfig.js +39 -64
- package/dist/utils/tsconfig.js.map +1 -6
- package/dist/utils/typecheck-non-package.d.ts +18 -0
- package/dist/utils/typecheck-non-package.d.ts.map +1 -0
- package/dist/utils/typecheck-non-package.js +64 -0
- package/dist/utils/typecheck-non-package.js.map +1 -0
- package/dist/utils/typecheck-serialization.js +58 -40
- package/dist/utils/typecheck-serialization.js.map +1 -6
- package/dist/utils/worker-events.js +48 -40
- package/dist/utils/worker-events.js.map +1 -6
- package/dist/utils/worker-utils.js +48 -28
- package/dist/utils/worker-utils.js.map +1 -6
- package/dist/vitest-plugin.d.ts +9 -0
- package/dist/vitest-plugin.d.ts.map +1 -0
- package/dist/vitest-plugin.js +85 -0
- package/dist/vitest-plugin.js.map +1 -0
- package/dist/workers/library-build.worker.d.ts +54 -0
- package/dist/workers/library-build.worker.d.ts.map +1 -0
- package/dist/workers/library-build.worker.js +97 -0
- package/dist/workers/library-build.worker.js.map +1 -0
- package/dist/workers/lint.worker.js +9 -6
- package/dist/workers/lint.worker.js.map +1 -6
- package/dist/workers/ngtsc-build.worker.d.ts +23 -0
- package/dist/workers/ngtsc-build.worker.d.ts.map +1 -0
- package/dist/workers/ngtsc-build.worker.js +98 -0
- package/dist/workers/ngtsc-build.worker.js.map +1 -0
- package/dist/workers/{server.worker.d.ts → server-build.worker.d.ts} +39 -29
- package/dist/workers/server-build.worker.d.ts.map +1 -0
- package/dist/workers/server-build.worker.js +399 -0
- package/dist/workers/server-build.worker.js.map +1 -0
- package/dist/workers/server-runtime.worker.d.ts +3 -2
- package/dist/workers/server-runtime.worker.d.ts.map +1 -1
- package/dist/workers/server-runtime.worker.js +100 -95
- package/dist/workers/server-runtime.worker.js.map +1 -6
- package/dist/workers/vite-build.worker.d.ts +56 -0
- package/dist/workers/vite-build.worker.d.ts.map +1 -0
- package/dist/workers/vite-build.worker.js +167 -0
- package/dist/workers/vite-build.worker.js.map +1 -0
- package/package.json +10 -16
- package/src/commands/check.ts +21 -3
- package/src/commands/dev.ts +10 -8
- package/src/commands/lint.ts +1 -1
- package/src/commands/publish.ts +4 -0
- package/src/commands/typecheck.ts +89 -256
- package/src/commands/watch.ts +9 -8
- package/src/engines/NgtscEngine.ts +190 -0
- package/src/engines/ServerEsbuildEngine.ts +195 -0
- package/src/engines/TscEngine.ts +189 -0
- package/src/engines/ViteEngine.ts +203 -0
- package/src/engines/index.ts +49 -0
- package/src/engines/types.ts +79 -0
- package/src/index.ts +0 -3
- package/src/infra/ResultCollector.ts +1 -1
- package/src/orchestrators/BuildOrchestrator.ts +87 -157
- package/src/orchestrators/DevWatchOrchestrator.ts +573 -0
- package/src/sd-cli-entry.ts +13 -116
- package/src/sd-config.types.ts +2 -0
- package/src/utils/angular-build.ts +157 -0
- package/src/utils/concurrency.ts +43 -0
- package/src/utils/esbuild-config.ts +1 -122
- package/src/utils/ngtsc-build-core.ts +379 -0
- package/src/utils/output-path-rewriter.ts +82 -0
- package/src/utils/package-utils.ts +20 -0
- package/src/utils/scss-compiler.ts +58 -0
- package/src/utils/tsc-build.ts +175 -0
- package/src/utils/tsconfig.ts +27 -95
- package/src/utils/typecheck-non-package.ts +87 -0
- package/src/vitest-plugin.ts +118 -0
- package/src/workers/library-build.worker.ts +153 -0
- package/src/workers/ngtsc-build.worker.ts +146 -0
- package/src/workers/server-build.worker.ts +565 -0
- package/src/workers/server-runtime.worker.ts +17 -26
- package/src/workers/vite-build.worker.ts +252 -0
- package/tests/commands/check.spec.ts +276 -0
- package/tests/commands/dev.spec.ts +53 -0
- package/tests/commands/lint.spec.ts +243 -0
- package/tests/commands/publish.spec.ts +1159 -0
- package/tests/commands/typecheck.spec.ts +294 -0
- package/tests/commands/watch.spec.ts +53 -0
- package/tests/engines/engine-selection.spec.ts +247 -0
- package/tests/engines/ngtsc-engine.spec.ts +274 -0
- package/tests/engines/server-esbuild-engine.spec.ts +256 -0
- package/tests/engines/tsc-engine.spec.ts +213 -0
- package/tests/engines/vite-engine.spec.ts +358 -0
- package/tests/infra/result-collector.spec.ts +46 -0
- package/tests/infra/signal-handler.spec.ts +32 -0
- package/tests/infra/worker-manager.spec.ts +63 -0
- package/tests/orchestrators/build-orchestrator.spec.ts +772 -0
- package/tests/orchestrators/dev-watch-orchestrator.spec.ts +1173 -0
- package/tests/sd-cli-entry.spec.ts +49 -0
- package/tests/utils/angular-build.spec.ts +251 -0
- package/tests/utils/build-env.spec.ts +33 -0
- package/tests/utils/concurrency.spec.ts +65 -0
- package/tests/utils/copy-src.spec.ts +144 -0
- package/tests/utils/esbuild-config.spec.ts +186 -0
- package/tests/utils/external-modules.spec.ts +161 -0
- package/tests/utils/ngtsc-scss-refactor.spec.ts +66 -0
- package/tests/utils/output-path-rewriter.spec.ts +165 -0
- package/tests/utils/output-utils.spec.ts +104 -0
- package/tests/utils/package-utils.spec.ts +52 -0
- package/tests/utils/rebuild-manager.spec.ts +30 -27
- package/tests/utils/replace-deps.spec.ts +69 -0
- package/tests/utils/scss-compiler.spec.ts +131 -0
- package/tests/utils/sd-config.spec.ts +77 -0
- package/tests/utils/tsc-build.spec.ts +358 -0
- package/tests/utils/tsconfig-angular.spec.ts +71 -0
- package/tests/utils/typecheck-non-package.spec.ts +120 -0
- package/tests/utils/worker-events.spec.ts +155 -0
- package/tests/utils/worker-utils.spec.ts +43 -0
- package/tests/vitest-plugin-cwd.spec.ts +68 -0
- package/tests/vitest-plugin.spec.ts +103 -0
- package/tests/workers/library-build-worker.spec.ts +258 -0
- package/tests/workers/ngtsc-build-worker.spec.ts +187 -0
- package/tests/workers/server-build-worker.spec.ts +566 -0
- package/tests/workers/server-runtime-worker.spec.ts +251 -0
- package/README.md +0 -295
- package/dist/builders/BaseBuilder.d.ts +0 -88
- package/dist/builders/BaseBuilder.d.ts.map +0 -1
- package/dist/builders/BaseBuilder.js +0 -142
- package/dist/builders/BaseBuilder.js.map +0 -6
- package/dist/builders/DtsBuilder.d.ts +0 -22
- package/dist/builders/DtsBuilder.d.ts.map +0 -1
- package/dist/builders/DtsBuilder.js +0 -72
- package/dist/builders/DtsBuilder.js.map +0 -6
- package/dist/builders/LibraryBuilder.d.ts +0 -22
- package/dist/builders/LibraryBuilder.d.ts.map +0 -1
- package/dist/builders/LibraryBuilder.js +0 -85
- package/dist/builders/LibraryBuilder.js.map +0 -6
- package/dist/builders/types.d.ts +0 -55
- package/dist/builders/types.d.ts.map +0 -1
- package/dist/builders/types.js +0 -1
- package/dist/builders/types.js.map +0 -6
- package/dist/capacitor/capacitor.d.ts +0 -151
- package/dist/capacitor/capacitor.d.ts.map +0 -1
- package/dist/capacitor/capacitor.js +0 -694
- package/dist/capacitor/capacitor.js.map +0 -6
- package/dist/commands/device.d.ts +0 -22
- package/dist/commands/device.d.ts.map +0 -1
- package/dist/commands/device.js +0 -98
- package/dist/commands/device.js.map +0 -6
- package/dist/commands/init.d.ts +0 -14
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -72
- package/dist/commands/init.js.map +0 -6
- package/dist/electron/electron.d.ts +0 -84
- package/dist/electron/electron.d.ts.map +0 -1
- package/dist/electron/electron.js +0 -263
- package/dist/electron/electron.js.map +0 -6
- package/dist/orchestrators/DevOrchestrator.d.ts +0 -83
- package/dist/orchestrators/DevOrchestrator.d.ts.map +0 -1
- package/dist/orchestrators/DevOrchestrator.js +0 -540
- package/dist/orchestrators/DevOrchestrator.js.map +0 -6
- package/dist/orchestrators/WatchOrchestrator.d.ts +0 -57
- package/dist/orchestrators/WatchOrchestrator.d.ts.map +0 -1
- package/dist/orchestrators/WatchOrchestrator.js +0 -199
- package/dist/orchestrators/WatchOrchestrator.js.map +0 -6
- package/dist/utils/tailwind-config-deps.d.ts +0 -8
- package/dist/utils/tailwind-config-deps.d.ts.map +0 -1
- package/dist/utils/tailwind-config-deps.js +0 -82
- package/dist/utils/tailwind-config-deps.js.map +0 -6
- package/dist/utils/template.d.ts +0 -14
- package/dist/utils/template.d.ts.map +0 -1
- package/dist/utils/template.js +0 -33
- package/dist/utils/template.js.map +0 -6
- package/dist/utils/vite-config.d.ts +0 -35
- package/dist/utils/vite-config.d.ts.map +0 -1
- package/dist/utils/vite-config.js +0 -259
- package/dist/utils/vite-config.js.map +0 -6
- package/dist/workers/client.worker.d.ts +0 -83
- package/dist/workers/client.worker.d.ts.map +0 -1
- package/dist/workers/client.worker.js +0 -111
- package/dist/workers/client.worker.js.map +0 -6
- package/dist/workers/dts.worker.d.ts +0 -75
- package/dist/workers/dts.worker.d.ts.map +0 -1
- package/dist/workers/dts.worker.js +0 -270
- package/dist/workers/dts.worker.js.map +0 -6
- package/dist/workers/library.worker.d.ts +0 -75
- package/dist/workers/library.worker.d.ts.map +0 -1
- package/dist/workers/library.worker.js +0 -166
- package/dist/workers/library.worker.js.map +0 -6
- package/dist/workers/server.worker.d.ts.map +0 -1
- package/dist/workers/server.worker.js +0 -482
- package/dist/workers/server.worker.js.map +0 -6
- package/src/builders/BaseBuilder.ts +0 -218
- package/src/builders/DtsBuilder.ts +0 -92
- package/src/builders/LibraryBuilder.ts +0 -110
- package/src/builders/types.ts +0 -60
- package/src/capacitor/capacitor.ts +0 -931
- package/src/commands/device.ts +0 -140
- package/src/commands/init.ts +0 -113
- package/src/electron/electron.ts +0 -362
- package/src/orchestrators/DevOrchestrator.ts +0 -744
- package/src/orchestrators/WatchOrchestrator.ts +0 -277
- package/src/utils/tailwind-config-deps.ts +0 -98
- package/src/utils/template.ts +0 -56
- package/src/utils/vite-config.ts +0 -390
- package/src/workers/client.worker.ts +0 -250
- package/src/workers/dts.worker.ts +0 -453
- package/src/workers/library.worker.ts +0 -316
- package/src/workers/server.worker.ts +0 -734
- package/templates/init/.gitignore.hbs +0 -34
- package/templates/init/.npmrc.hbs +0 -1
- package/templates/init/.prettierignore +0 -1
- package/templates/init/.prettierrc.yaml +0 -12
- package/templates/init/eslint.config.ts +0 -15
- package/templates/init/mise.toml +0 -3
- package/templates/init/package.json.hbs +0 -32
- package/templates/init/packages/client-admin/index.html.hbs +0 -144
- package/templates/init/packages/client-admin/package.json.hbs +0 -27
- package/templates/init/packages/client-admin/public/assets/logo-landscape.png +0 -0
- package/templates/init/packages/client-admin/public/assets/logo.png +0 -0
- package/templates/init/packages/client-admin/public/favicon.ico +0 -0
- package/templates/init/packages/client-admin/src/App.tsx +0 -42
- package/templates/init/packages/client-admin/src/dev/DevDialog.tsx +0 -34
- package/templates/init/packages/client-admin/src/events/AuthChangeEvent.ts +0 -3
- package/templates/init/packages/client-admin/src/main.css +0 -4
- package/templates/init/packages/client-admin/src/main.tsx.hbs +0 -146
- package/templates/init/packages/client-admin/src/providers/AppServiceProvider.tsx.hbs +0 -103
- package/templates/init/packages/client-admin/src/providers/AppStructureProvider.tsx +0 -84
- package/templates/init/packages/client-admin/src/providers/AuthProvider.tsx.hbs +0 -96
- package/templates/init/packages/client-admin/src/providers/configureSharedData.ts.hbs +0 -67
- package/templates/init/packages/client-admin/src/views/auth/LoginView.tsx +0 -132
- package/templates/init/packages/client-admin/src/views/home/HomeView.tsx +0 -108
- package/templates/init/packages/client-admin/src/views/home/base/employee/EmployeeDetail.tsx.hbs +0 -243
- package/templates/init/packages/client-admin/src/views/home/base/employee/EmployeeSheet.tsx.hbs +0 -271
- package/templates/init/packages/client-admin/src/views/home/base/role-permission/RoleDetail.tsx.hbs +0 -146
- package/templates/init/packages/client-admin/src/views/home/base/role-permission/RolePermissionDetail.tsx.hbs +0 -121
- package/templates/init/packages/client-admin/src/views/home/base/role-permission/RolePermissionView.tsx +0 -52
- package/templates/init/packages/client-admin/src/views/home/base/role-permission/RoleSheet.tsx.hbs +0 -125
- package/templates/init/packages/client-admin/src/views/home/main/MainView.tsx.hbs +0 -13
- package/templates/init/packages/client-admin/src/views/home/my-info/MyInfoDetail.tsx.hbs +0 -241
- package/templates/init/packages/client-admin/src/views/home/system/system-log/SystemLogSheet.tsx.hbs +0 -169
- package/templates/init/packages/client-admin/src/views/not-found/NotFoundView.tsx +0 -15
- package/templates/init/packages/client-admin/tailwind.config.ts +0 -10
- package/templates/init/packages/db-main/package.json.hbs +0 -13
- package/templates/init/packages/db-main/src/MainDbContext.ts +0 -22
- package/templates/init/packages/db-main/src/dataLogExt.ts +0 -127
- package/templates/init/packages/db-main/src/index.ts +0 -14
- package/templates/init/packages/db-main/src/tables/base/Employee.ts +0 -24
- package/templates/init/packages/db-main/src/tables/base/EmployeeConfig.ts +0 -13
- package/templates/init/packages/db-main/src/tables/base/Role.ts +0 -9
- package/templates/init/packages/db-main/src/tables/base/RolePermission.ts +0 -13
- package/templates/init/packages/db-main/src/tables/system/_DataLog.ts +0 -19
- package/templates/init/packages/db-main/src/tables/system/_Log.ts +0 -16
- package/templates/init/packages/server/package.json.hbs +0 -20
- package/templates/init/packages/server/public-dev/dev//354/264/210/352/270/260/355/231/224.xlsx +0 -0
- package/templates/init/packages/server/src/index.ts +0 -4
- package/templates/init/packages/server/src/main.ts.hbs +0 -34
- package/templates/init/packages/server/src/services/AuthService.ts.hbs +0 -171
- package/templates/init/packages/server/src/services/DevService.ts.hbs +0 -94
- package/templates/init/packages/server/src/services/EmployeeService.ts.hbs +0 -122
- package/templates/init/packages/server/src/services/RoleService.ts.hbs +0 -59
- package/templates/init/pnpm-workspace.yaml +0 -15
- package/templates/init/sd.config.ts.hbs +0 -48
- package/templates/init/tsconfig.json.hbs +0 -39
- package/templates/init/vitest.config.ts +0 -36
- package/tests/capacitor-exclude.spec.ts +0 -78
- package/tests/capacitor.spec.ts +0 -49
- package/tests/copy-src.spec.ts +0 -50
- package/tests/electron-exclude.spec.ts +0 -61
- package/tests/get-compiler-options-for-package.spec.ts +0 -80
- package/tests/get-package-source-files.spec.ts +0 -139
- package/tests/get-types-from-package-json.spec.ts +0 -92
- package/tests/infra/ResultCollector.spec.ts +0 -30
- package/tests/infra/SignalHandler.spec.ts +0 -38
- package/tests/infra/WorkerManager.spec.ts +0 -63
- package/tests/load-ignore-patterns.spec.ts +0 -163
- package/tests/load-sd-config.spec.ts +0 -100
- package/tests/package-utils.spec.ts +0 -188
- package/tests/parse-root-tsconfig.spec.ts +0 -89
- package/tests/publish-config-narrowing.spec.ts +0 -20
- package/tests/replace-deps.spec.ts +0 -308
- package/tests/run-lint.spec.ts +0 -366
- package/tests/run-typecheck.spec.ts +0 -544
- package/tests/run-watch.spec.ts +0 -76
- package/tests/sd-cli.spec.ts +0 -265
- package/tests/sd-public-dev-plugin-mime.spec.ts +0 -19
- package/tests/tailwind-config-deps.spec.ts +0 -30
- package/tests/template.spec.ts +0 -70
- package/tests/vite-config-exclude.spec.ts +0 -35
- package/tests/vite-config-outdir.spec.ts +0 -38
- package/tests/write-changed-output-files.spec.ts +0 -97
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { createMemo, createSignal } from "solid-js";
|
|
2
|
-
import { reconcile } from "solid-js/store";
|
|
3
|
-
import {
|
|
4
|
-
type AppPerm,
|
|
5
|
-
Button,
|
|
6
|
-
CrudDetail,
|
|
7
|
-
PermissionTable,
|
|
8
|
-
SharedDataSelect,
|
|
9
|
-
useSharedData,
|
|
10
|
-
} from "@simplysm/solid";
|
|
11
|
-
import { expr } from "@{{projectName}}/db-main";
|
|
12
|
-
import type { AppSharedData, RoleSharedItem } from "../../../../providers/configureSharedData";
|
|
13
|
-
import { useAuth } from "../../../../providers/AuthProvider";
|
|
14
|
-
import { useAppService } from "../../../../providers/AppServiceProvider";
|
|
15
|
-
import { useAppStructure } from "../../../../providers/AppStructureProvider";
|
|
16
|
-
|
|
17
|
-
export function RolePermissionDetail(props: { roleId: number }) {
|
|
18
|
-
const auth = useAuth();
|
|
19
|
-
const appService = useAppService();
|
|
20
|
-
const appStructure = useAppStructure();
|
|
21
|
-
const sharedData = useSharedData<AppSharedData>();
|
|
22
|
-
|
|
23
|
-
const perms = createMemo(() => {
|
|
24
|
-
const p = auth.authInfo()?.permissions ?? {};
|
|
25
|
-
return {
|
|
26
|
-
edit: Boolean(p["/home/base/role-permission/edit"]),
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const [copySourceRoleId, setCopySourceRoleId] = createSignal<number>();
|
|
31
|
-
|
|
32
|
-
async function loadPermissionsByRoleId(roleId: number): Promise<Record<string, boolean>> {
|
|
33
|
-
return appService.orm.connectWithoutTransaction(async (db) => {
|
|
34
|
-
const rows = await db
|
|
35
|
-
.rolePermission()
|
|
36
|
-
.where((c) => [expr.eq(c.roleId, roleId)])
|
|
37
|
-
.select((c) => ({
|
|
38
|
-
code: c.code,
|
|
39
|
-
valueJson: c.valueJson,
|
|
40
|
-
}))
|
|
41
|
-
.result();
|
|
42
|
-
|
|
43
|
-
const record: Record<string, boolean> = {};
|
|
44
|
-
for (const row of rows) {
|
|
45
|
-
record[row.code] = JSON.parse(row.valueJson);
|
|
46
|
-
}
|
|
47
|
-
return record;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
async function handleLoad() {
|
|
52
|
-
const data = await loadPermissionsByRoleId(props.roleId);
|
|
53
|
-
return {
|
|
54
|
-
data,
|
|
55
|
-
info: { isNew: false, isDeleted: false },
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function handleSubmit(data: Record<string, boolean>) {
|
|
60
|
-
await appService.orm.connect(async (db) => {
|
|
61
|
-
await db
|
|
62
|
-
.rolePermission()
|
|
63
|
-
.where((c) => [expr.eq(c.roleId, props.roleId)])
|
|
64
|
-
.delete();
|
|
65
|
-
|
|
66
|
-
const entries = Object.entries(data).filter(([, v]) => v);
|
|
67
|
-
if (entries.length > 0) {
|
|
68
|
-
await db.rolePermission().insert(
|
|
69
|
-
entries.map(([code, value]) => ({
|
|
70
|
-
roleId: props.roleId,
|
|
71
|
-
code,
|
|
72
|
-
valueJson: JSON.stringify(value),
|
|
73
|
-
})),
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<CrudDetail<Record<string, boolean>>
|
|
82
|
-
class={"p-2"}
|
|
83
|
-
editable={perms().edit}
|
|
84
|
-
load={handleLoad}
|
|
85
|
-
submit={handleSubmit}
|
|
86
|
-
>
|
|
87
|
-
{(ctx) => {
|
|
88
|
-
async function onImportClick() {
|
|
89
|
-
const sourceId = copySourceRoleId();
|
|
90
|
-
if (sourceId == null) return;
|
|
91
|
-
const data = await loadPermissionsByRoleId(sourceId);
|
|
92
|
-
ctx.setData(reconcile(data));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
<>
|
|
97
|
-
<CrudDetail.Tools>
|
|
98
|
-
<SharedDataSelect
|
|
99
|
-
data={sharedData.role}
|
|
100
|
-
value={copySourceRoleId()}
|
|
101
|
-
onValueChange={(v) => setCopySourceRoleId(v as number | undefined)}
|
|
102
|
-
>
|
|
103
|
-
{(item: RoleSharedItem) => <>{item.name}</>}
|
|
104
|
-
</SharedDataSelect>
|
|
105
|
-
<Button onClick={onImportClick} disabled={copySourceRoleId() == null}>
|
|
106
|
-
가져오기
|
|
107
|
-
</Button>
|
|
108
|
-
</CrudDetail.Tools>
|
|
109
|
-
|
|
110
|
-
<PermissionTable
|
|
111
|
-
items={appStructure.usablePerms().flatMap((p) => p.children ?? []) as AppPerm<string>[]}
|
|
112
|
-
value={ctx.data}
|
|
113
|
-
onValueChange={(v) => ctx.setData(reconcile(v))}
|
|
114
|
-
disabled={!perms().edit}
|
|
115
|
-
/>
|
|
116
|
-
</>
|
|
117
|
-
);
|
|
118
|
-
}}
|
|
119
|
-
</CrudDetail>
|
|
120
|
-
);
|
|
121
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { createSignal, Show } from "solid-js";
|
|
2
|
-
import { Button, Icon, SharedDataSelectList, useDialog, useSharedData } from "@simplysm/solid";
|
|
3
|
-
import type { AppSharedData, RoleSharedItem } from "../../../../providers/configureSharedData";
|
|
4
|
-
import { RolePermissionDetail } from "./RolePermissionDetail";
|
|
5
|
-
import { RoleSheet } from "./RoleSheet";
|
|
6
|
-
import { IconExternalLink } from "@tabler/icons-solidjs";
|
|
7
|
-
|
|
8
|
-
export function RolePermissionView() {
|
|
9
|
-
const dialog = useDialog();
|
|
10
|
-
const sharedData = useSharedData<AppSharedData>();
|
|
11
|
-
const [selectedRole, setSelectedRole] = createSignal<RoleSharedItem>();
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div class="flex h-full flex-row">
|
|
15
|
-
<SharedDataSelectList
|
|
16
|
-
class={"border-r border-base-200 p-1.5 py-3"}
|
|
17
|
-
data={sharedData.role}
|
|
18
|
-
value={selectedRole()}
|
|
19
|
-
onValueChange={setSelectedRole}
|
|
20
|
-
header={
|
|
21
|
-
<div class={"flex flex-row p-1"}>
|
|
22
|
-
<div class={"flex-1 font-bold text-base-400"}>권한그룹</div>
|
|
23
|
-
<Button
|
|
24
|
-
variant={"ghost"}
|
|
25
|
-
theme={"primary"}
|
|
26
|
-
size={"xs"}
|
|
27
|
-
onClick={() => dialog.show(() => <RoleSheet />, { header: "권한그룹", closeOnInteractOutside: true })}
|
|
28
|
-
>
|
|
29
|
-
<Icon icon={IconExternalLink} />
|
|
30
|
-
</Button>
|
|
31
|
-
</div>
|
|
32
|
-
}
|
|
33
|
-
required
|
|
34
|
-
>
|
|
35
|
-
<SharedDataSelectList.ItemTemplate<RoleSharedItem>>
|
|
36
|
-
{(item) => <>{item.name}</>}
|
|
37
|
-
</SharedDataSelectList.ItemTemplate>
|
|
38
|
-
</SharedDataSelectList>
|
|
39
|
-
|
|
40
|
-
<Show
|
|
41
|
-
when={selectedRole()}
|
|
42
|
-
fallback={
|
|
43
|
-
<div class="flex flex-1 items-center justify-center text-4xl leading-relaxed text-base-300">
|
|
44
|
-
권한그룹을 선택하세요.
|
|
45
|
-
</div>
|
|
46
|
-
}
|
|
47
|
-
>
|
|
48
|
-
<RolePermissionDetail roleId={selectedRole()!.id} />
|
|
49
|
-
</Show>
|
|
50
|
-
</div>
|
|
51
|
-
);
|
|
52
|
-
}
|
package/templates/init/packages/client-admin/src/views/home/base/role-permission/RoleSheet.tsx.hbs
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Checkbox,
|
|
3
|
-
CrudSheet,
|
|
4
|
-
type DialogEditConfig,
|
|
5
|
-
type SortingDef,
|
|
6
|
-
TextInput,
|
|
7
|
-
useDialog,
|
|
8
|
-
} from "@simplysm/solid";
|
|
9
|
-
import { FormGroup } from "@simplysm/solid";
|
|
10
|
-
import { expr } from "@{{projectName}}/db-main";
|
|
11
|
-
import { type ExprUnit } from "@simplysm/orm-common";
|
|
12
|
-
import { objGetChainValue } from "@simplysm/core-common";
|
|
13
|
-
import { useAppService } from "../../../../providers/AppServiceProvider";
|
|
14
|
-
import { useAppStructure } from "../../../../providers/AppStructureProvider";
|
|
15
|
-
import { RoleDetail } from "./RoleDetail";
|
|
16
|
-
|
|
17
|
-
type SheetItem = {
|
|
18
|
-
id?: number;
|
|
19
|
-
name?: string;
|
|
20
|
-
isDeleted: boolean;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type Filter = {
|
|
24
|
-
searchText?: string;
|
|
25
|
-
isIncludeDeleted: boolean;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const ITEMS_PER_PAGE = 50;
|
|
29
|
-
|
|
30
|
-
export function RoleSheet() {
|
|
31
|
-
const appService = useAppService();
|
|
32
|
-
const appStructure = useAppStructure();
|
|
33
|
-
const dialog = useDialog();
|
|
34
|
-
|
|
35
|
-
const rolePerms = appStructure.perms.home.base["role-permission"];
|
|
36
|
-
|
|
37
|
-
const dialogEdit: DialogEditConfig<SheetItem> = {
|
|
38
|
-
editItem: (item) =>
|
|
39
|
-
dialog.show(() => <RoleDetail itemId={item?.id} />, {
|
|
40
|
-
header: item ? "권한그룹 수정" : "권한그룹 등록",
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
async function search(filter: Filter, page: number | undefined, sorts: SortingDef[]) {
|
|
45
|
-
return appService.orm.connect(async (db) => {
|
|
46
|
-
let qr = db.role();
|
|
47
|
-
|
|
48
|
-
const searchText = filter.searchText?.trim();
|
|
49
|
-
if (searchText != null && searchText.length > 0) {
|
|
50
|
-
qr = qr.search((c) => [c.name], searchText);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (!filter.isIncludeDeleted) {
|
|
54
|
-
qr = qr.where((c) => [expr.eq(c.isDeleted, false)]);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const pageCount = page != null ? Math.ceil((await qr.count()) / ITEMS_PER_PAGE) : undefined;
|
|
58
|
-
|
|
59
|
-
let qr2 = qr.select((c) => ({
|
|
60
|
-
id: c.id,
|
|
61
|
-
name: c.name,
|
|
62
|
-
isDeleted: c.isDeleted,
|
|
63
|
-
}));
|
|
64
|
-
|
|
65
|
-
for (const sort of sorts) {
|
|
66
|
-
qr2 = qr2.orderBy(
|
|
67
|
-
(c) => objGetChainValue(c, sort.key) as ExprUnit<any>,
|
|
68
|
-
sort.desc ? "DESC" : "ASC",
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
if (!sorts.some((s) => s.key === "id")) {
|
|
72
|
-
qr2 = qr2.orderBy((c) => c.id, "DESC");
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (page != null) {
|
|
76
|
-
qr2 = qr2.limit((page - 1) * ITEMS_PER_PAGE, ITEMS_PER_PAGE);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const items = (await qr2.result()) as SheetItem[];
|
|
80
|
-
return { items, pageCount };
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<CrudSheet<SheetItem, Filter>
|
|
86
|
-
search={search}
|
|
87
|
-
getItemKey={(item) => item.id}
|
|
88
|
-
isItemDeleted={(item) => item.isDeleted}
|
|
89
|
-
isItemSelectable={(item) => item.id != null}
|
|
90
|
-
persistKey="role-sheet-page"
|
|
91
|
-
editable={rolePerms.edit}
|
|
92
|
-
filterInitial=\{{ isIncludeDeleted: false } as Filter}
|
|
93
|
-
dialogEdit={dialogEdit}
|
|
94
|
-
>
|
|
95
|
-
<CrudSheet.Filter<Filter>>
|
|
96
|
-
{(filter, setFilter) => (
|
|
97
|
-
<>
|
|
98
|
-
<FormGroup.Item label="검색어">
|
|
99
|
-
<TextInput
|
|
100
|
-
value={filter.searchText}
|
|
101
|
-
onValueChange={(v) => setFilter("searchText", v)}
|
|
102
|
-
/>
|
|
103
|
-
</FormGroup.Item>
|
|
104
|
-
<FormGroup.Item>
|
|
105
|
-
<Checkbox
|
|
106
|
-
value={filter.isIncludeDeleted}
|
|
107
|
-
onValueChange={(v) => setFilter("isIncludeDeleted", v)}
|
|
108
|
-
>
|
|
109
|
-
삭제항목 포함
|
|
110
|
-
</Checkbox>
|
|
111
|
-
</FormGroup.Item>
|
|
112
|
-
</>
|
|
113
|
-
)}
|
|
114
|
-
</CrudSheet.Filter>
|
|
115
|
-
|
|
116
|
-
<CrudSheet.Column<SheetItem> key="id" header="#" editTrigger>
|
|
117
|
-
{({ item }) => <div class="px-2 py-1 text-right">{item.id}</div>}
|
|
118
|
-
</CrudSheet.Column>
|
|
119
|
-
|
|
120
|
-
<CrudSheet.Column<SheetItem> key="name" header="이름">
|
|
121
|
-
{({ item }) => <div class="px-2 py-1">{item.name}</div>}
|
|
122
|
-
</CrudSheet.Column>
|
|
123
|
-
</CrudSheet>
|
|
124
|
-
);
|
|
125
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useAuth } from "../../../providers/AuthProvider";
|
|
2
|
-
|
|
3
|
-
export function MainView() {
|
|
4
|
-
const auth = useAuth();
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<div class="flex h-full items-center justify-center">
|
|
8
|
-
<h1 class="text-2xl font-bold text-base-700 dark:text-base-200">
|
|
9
|
-
{{projectName}} ({auth.authInfo()?.employeeName})
|
|
10
|
-
</h1>
|
|
11
|
-
</div>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { createMemo } from "solid-js";
|
|
2
|
-
import { CrudDetail, FormTable, Icon, Select, TextInput } from "@simplysm/solid";
|
|
3
|
-
import { useAuth } from "../../../providers/AuthProvider";
|
|
4
|
-
import { useAppService } from "../../../providers/AppServiceProvider";
|
|
5
|
-
import { useAppStructure } from "../../../providers/AppStructureProvider";
|
|
6
|
-
import { expr } from "@{{projectName}}/db-main";
|
|
7
|
-
import { IconX } from "@tabler/icons-solidjs";
|
|
8
|
-
import { jsonParse } from "@simplysm/core-common";
|
|
9
|
-
|
|
10
|
-
type DetailData = {
|
|
11
|
-
email: string;
|
|
12
|
-
currentPassword: string;
|
|
13
|
-
newPassword: string;
|
|
14
|
-
confirmPassword: string;
|
|
15
|
-
firstRouterLink?: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export function MyInfoDetail() {
|
|
19
|
-
const auth = useAuth();
|
|
20
|
-
const appService = useAppService();
|
|
21
|
-
const appStructure = useAppStructure();
|
|
22
|
-
|
|
23
|
-
const routeMap = createMemo(() => {
|
|
24
|
-
const menus = appStructure.usableMenus();
|
|
25
|
-
const map = new Map<string, string>();
|
|
26
|
-
|
|
27
|
-
const flatten = (items: typeof menus, prefix = ""): void => {
|
|
28
|
-
for (const item of items) {
|
|
29
|
-
const label = prefix !== "" ? `${prefix} > ${item.title}` : item.title;
|
|
30
|
-
if (item.href !== undefined) {
|
|
31
|
-
map.set(item.href, label);
|
|
32
|
-
}
|
|
33
|
-
if (item.children !== undefined) {
|
|
34
|
-
flatten(item.children, label);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
flatten(menus);
|
|
40
|
-
return map;
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const routeOptions = createMemo(() => Array.from(routeMap().keys()));
|
|
44
|
-
|
|
45
|
-
async function handleLoad() {
|
|
46
|
-
const authData = auth.authInfo();
|
|
47
|
-
if (!authData) throw new Error("직원 정보를 불러올 수 없습니다.");
|
|
48
|
-
|
|
49
|
-
return appService.orm.connect(async (db) => {
|
|
50
|
-
const employee = await db
|
|
51
|
-
.employee()
|
|
52
|
-
.where((c: any) => [expr.eq(c.id, authData.employeeId)])
|
|
53
|
-
.single();
|
|
54
|
-
|
|
55
|
-
const config = await db
|
|
56
|
-
.employeeConfig()
|
|
57
|
-
.where((c: any) => [
|
|
58
|
-
expr.eq(c.employeeId, authData.employeeId),
|
|
59
|
-
expr.eq(c.code, "firstRouterLink"),
|
|
60
|
-
])
|
|
61
|
-
.first();
|
|
62
|
-
|
|
63
|
-
let firstRouterLink: string | undefined;
|
|
64
|
-
if (config?.valueJson !== undefined && config.valueJson !== "") {
|
|
65
|
-
try {
|
|
66
|
-
firstRouterLink = jsonParse(config.valueJson);
|
|
67
|
-
} catch {
|
|
68
|
-
// JSON 파싱 실패 시 기본값 유지
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
data: {
|
|
74
|
-
email: employee?.email ?? "",
|
|
75
|
-
currentPassword: "",
|
|
76
|
-
newPassword: "",
|
|
77
|
-
confirmPassword: "",
|
|
78
|
-
firstRouterLink,
|
|
79
|
-
} as DetailData,
|
|
80
|
-
info: { isNew: false, isDeleted: false },
|
|
81
|
-
};
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
async function handleSubmit(data: DetailData) {
|
|
86
|
-
const authData = auth.authInfo();
|
|
87
|
-
if (!authData) throw new Error("직원 정보를 불러올 수 없습니다.");
|
|
88
|
-
|
|
89
|
-
const isPasswordChanging =
|
|
90
|
-
data.currentPassword.trim() !== "" ||
|
|
91
|
-
data.newPassword.trim() !== "" ||
|
|
92
|
-
data.confirmPassword.trim() !== "";
|
|
93
|
-
|
|
94
|
-
if (isPasswordChanging) {
|
|
95
|
-
await appService.auth.changePassword(data.currentPassword.trim(), data.newPassword.trim());
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
await appService.orm.connect(async (db) => {
|
|
99
|
-
await db
|
|
100
|
-
.employee()
|
|
101
|
-
.where((c: any) => [expr.eq(c.id, authData.employeeId)])
|
|
102
|
-
.update(() => ({
|
|
103
|
-
email: expr.val("string", data.email.trim()),
|
|
104
|
-
}));
|
|
105
|
-
|
|
106
|
-
const existingConfig = await db
|
|
107
|
-
.employeeConfig()
|
|
108
|
-
.where((c: any) => [
|
|
109
|
-
expr.eq(c.employeeId, authData.employeeId),
|
|
110
|
-
expr.eq(c.code, "firstRouterLink"),
|
|
111
|
-
])
|
|
112
|
-
.first();
|
|
113
|
-
|
|
114
|
-
const valueJson =
|
|
115
|
-
data.firstRouterLink !== undefined
|
|
116
|
-
? JSON.stringify(data.firstRouterLink)
|
|
117
|
-
: JSON.stringify(null);
|
|
118
|
-
|
|
119
|
-
if (existingConfig) {
|
|
120
|
-
await db
|
|
121
|
-
.employeeConfig()
|
|
122
|
-
.where((c: any) => [
|
|
123
|
-
expr.eq(c.employeeId, authData.employeeId),
|
|
124
|
-
expr.eq(c.code, "firstRouterLink"),
|
|
125
|
-
])
|
|
126
|
-
.update(() => ({
|
|
127
|
-
valueJson: expr.val("string", valueJson),
|
|
128
|
-
}));
|
|
129
|
-
} else {
|
|
130
|
-
await db.employeeConfig().insert([
|
|
131
|
-
{
|
|
132
|
-
employeeId: authData.employeeId,
|
|
133
|
-
code: "firstRouterLink",
|
|
134
|
-
valueJson,
|
|
135
|
-
},
|
|
136
|
-
]);
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
await auth.tryReloadAuth();
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return (
|
|
145
|
-
<CrudDetail<DetailData> class={"px-2 py-4"} load={handleLoad} submit={handleSubmit}>
|
|
146
|
-
{(ctx) => (
|
|
147
|
-
<div class="flex flex-col gap-8">
|
|
148
|
-
<section>
|
|
149
|
-
<h3 class="mb-4 border-l-4 border-base-500 pl-3 font-bold text-base-500">인증정보</h3>
|
|
150
|
-
<FormTable>
|
|
151
|
-
<FormTable.Row>
|
|
152
|
-
<FormTable.Item label="이메일">
|
|
153
|
-
<TextInput
|
|
154
|
-
type="email"
|
|
155
|
-
required
|
|
156
|
-
value={ctx.data.email}
|
|
157
|
-
onValueChange={(v) => ctx.setData("email", v)}
|
|
158
|
-
autocomplete="off"
|
|
159
|
-
/>
|
|
160
|
-
</FormTable.Item>
|
|
161
|
-
</FormTable.Row>
|
|
162
|
-
<FormTable.Row>
|
|
163
|
-
<FormTable.Item label="현재 비밀번호">
|
|
164
|
-
<TextInput
|
|
165
|
-
required={Boolean(ctx.data.newPassword || ctx.data.confirmPassword)}
|
|
166
|
-
class="w-56"
|
|
167
|
-
type="password"
|
|
168
|
-
autocomplete="off"
|
|
169
|
-
value={ctx.data.currentPassword}
|
|
170
|
-
onValueChange={(v) => ctx.setData("currentPassword", v)}
|
|
171
|
-
placeholder="비밀번호 변경 시에만 입력"
|
|
172
|
-
/>
|
|
173
|
-
</FormTable.Item>
|
|
174
|
-
</FormTable.Row>
|
|
175
|
-
<FormTable.Row>
|
|
176
|
-
<FormTable.Item label="새 비밀번호">
|
|
177
|
-
<TextInput
|
|
178
|
-
required={Boolean(ctx.data.currentPassword || ctx.data.confirmPassword)}
|
|
179
|
-
minLength={8}
|
|
180
|
-
class="w-56"
|
|
181
|
-
type="password"
|
|
182
|
-
autocomplete="off"
|
|
183
|
-
value={ctx.data.newPassword}
|
|
184
|
-
onValueChange={(v) => ctx.setData("newPassword", v)}
|
|
185
|
-
placeholder="비밀번호 변경 시에만 입력"
|
|
186
|
-
/>
|
|
187
|
-
</FormTable.Item>
|
|
188
|
-
</FormTable.Row>
|
|
189
|
-
<FormTable.Row>
|
|
190
|
-
<FormTable.Item label="새 비밀번호 확인">
|
|
191
|
-
<TextInput
|
|
192
|
-
required={Boolean(ctx.data.currentPassword || ctx.data.newPassword)}
|
|
193
|
-
minLength={8}
|
|
194
|
-
validate={() =>
|
|
195
|
-
ctx.data.newPassword !== ctx.data.confirmPassword
|
|
196
|
-
? "비밀번호가 일치하지 않습니다"
|
|
197
|
-
: ""
|
|
198
|
-
}
|
|
199
|
-
class="w-56"
|
|
200
|
-
type="password"
|
|
201
|
-
autocomplete="off"
|
|
202
|
-
value={ctx.data.confirmPassword}
|
|
203
|
-
onValueChange={(v) => ctx.setData("confirmPassword", v)}
|
|
204
|
-
placeholder="비밀번호 변경 시에만 입력"
|
|
205
|
-
/>
|
|
206
|
-
</FormTable.Item>
|
|
207
|
-
</FormTable.Row>
|
|
208
|
-
</FormTable>
|
|
209
|
-
</section>
|
|
210
|
-
|
|
211
|
-
<section>
|
|
212
|
-
<h3 class="mb-4 border-l-4 border-base-500 pl-3 font-bold text-base-500">시스템설정</h3>
|
|
213
|
-
<FormTable>
|
|
214
|
-
<FormTable.Row>
|
|
215
|
-
<FormTable.Item label="로그인 시 화면">
|
|
216
|
-
<Select
|
|
217
|
-
class="w-full"
|
|
218
|
-
value={ctx.data.firstRouterLink}
|
|
219
|
-
onValueChange={(v) => ctx.setData("firstRouterLink", v)}
|
|
220
|
-
items={routeOptions()}
|
|
221
|
-
renderValue={(v) => <>{routeMap().get(v) ?? v}</>}
|
|
222
|
-
placeholder="선택 안함"
|
|
223
|
-
>
|
|
224
|
-
<Select.ItemTemplate>
|
|
225
|
-
{(href: string) => <>{routeMap().get(href) ?? href}</>}
|
|
226
|
-
</Select.ItemTemplate>
|
|
227
|
-
<Select.Action
|
|
228
|
-
onClick={() => ctx.setData("firstRouterLink", undefined as any)}
|
|
229
|
-
>
|
|
230
|
-
<Icon icon={IconX} class={"text-danger-500"} />
|
|
231
|
-
</Select.Action>
|
|
232
|
-
</Select>
|
|
233
|
-
</FormTable.Item>
|
|
234
|
-
</FormTable.Row>
|
|
235
|
-
</FormTable>
|
|
236
|
-
</section>
|
|
237
|
-
</div>
|
|
238
|
-
)}
|
|
239
|
-
</CrudDetail>
|
|
240
|
-
);
|
|
241
|
-
}
|