create-react-admin-template 0.0.0-stage → 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 +46 -2
- package/bin/create.mjs +5 -0
- package/package.json +22 -4
- package/template/.dockerignore +12 -0
- package/template/.editorconfig +12 -0
- package/template/.env +14 -0
- package/template/.env.development +5 -0
- package/template/.env.production +2 -0
- package/template/.env.test +5 -0
- package/template/.github/workflows/ci.yml +40 -0
- package/template/.gitlab-ci.yml +208 -0
- package/template/.husky/commit-msg +1 -0
- package/template/.husky/pre-commit +1 -0
- package/template/.nvmrc +1 -0
- package/template/.prettierignore +11 -0
- package/template/.prettierrc +47 -0
- package/template/Dockerfile +16 -0
- package/template/README.md +372 -0
- package/template/build/advancedTable.ts +103 -0
- package/template/build/environment.ts +150 -0
- package/template/commitlint.config.js +32 -0
- package/template/components.json +21 -0
- package/template/deploy/README.md +132 -0
- package/template/deploy/host-nginx/react-admin-api.conf +14 -0
- package/template/deploy/host-nginx/react-admin-web.conf +8 -0
- package/template/deploy/nginx.conf +38 -0
- package/template/docs/activity-status.md +217 -0
- package/template/docs/audit-logs.md +158 -0
- package/template/docs/authentication-adapters.md +219 -0
- package/template/docs/browser-security.md +58 -0
- package/template/docs/bundle-budgets.md +65 -0
- package/template/docs/component-source-governance.md +99 -0
- package/template/docs/data-masking.md +169 -0
- package/template/docs/enterprise-scaffold.md +208 -0
- package/template/docs/feature-data-template.md +227 -0
- package/template/docs/feature-flags.md +169 -0
- package/template/docs/file-capabilities.md +196 -0
- package/template/docs/locale-and-i18n.md +132 -0
- package/template/docs/mutation-idempotency.md +24 -0
- package/template/docs/optional-editors.md +203 -0
- package/template/docs/page-feedback.md +83 -0
- package/template/docs/query-data-conventions.md +178 -0
- package/template/docs/realtime-collaboration.md +140 -0
- package/template/docs/reporting-printing-templates.md +156 -0
- package/template/docs/scaffold-capability-roadmap.md +226 -0
- package/template/docs/scaffold-guide.md +443 -0
- package/template/docs/template-changelog.md +30 -0
- package/template/docs/template-versioning.md +26 -0
- package/template/docs/tenant-workspace-context.md +147 -0
- package/template/docs/unsaved-changes.md +58 -0
- package/template/docs/white-label.md +102 -0
- package/template/eslint.config.js +697 -0
- package/template/gitignore +39 -0
- package/template/index.html +26 -0
- package/template/knip.config.ts +42 -0
- package/template/lint-staged.config.js +8 -0
- package/template/package.json +133 -0
- package/template/pnpm-lock.yaml +8694 -0
- package/template/public/favicon.ico +0 -0
- package/template/public/logo.svg +1 -0
- package/template/public/runtime-config.json +49 -0
- package/template/scaffold.template.json +5 -0
- package/template/src/Application.tsx +114 -0
- package/template/src/api/ApiError.ts +33 -0
- package/template/src/api/activity/ActivityProvider.tsx +167 -0
- package/template/src/api/activity/access.ts +13 -0
- package/template/src/api/activity/errors.ts +17 -0
- package/template/src/api/activity/index.ts +67 -0
- package/template/src/api/activity/model.ts +227 -0
- package/template/src/api/activity/query.ts +163 -0
- package/template/src/api/activity/source.ts +16 -0
- package/template/src/api/activity/subscription.ts +292 -0
- package/template/src/api/activity/transports.ts +271 -0
- package/template/src/api/activity/types.ts +402 -0
- package/template/src/api/authClient.ts +134 -0
- package/template/src/api/authSession.ts +307 -0
- package/template/src/api/clients/configureApiClient.ts +62 -0
- package/template/src/api/clients/httpStatus.ts +4 -0
- package/template/src/api/config/services.json +7 -0
- package/template/src/api/demoAuthClient.ts +46 -0
- package/template/src/api/enums/EnumCatalogProvider.tsx +169 -0
- package/template/src/api/enums/EnumDictionary.ts +55 -0
- package/template/src/api/enums/access.ts +130 -0
- package/template/src/api/enums/catalog.ts +216 -0
- package/template/src/api/enums/errors.ts +21 -0
- package/template/src/api/enums/index.ts +48 -0
- package/template/src/api/enums/query.ts +82 -0
- package/template/src/api/enums/scope.ts +58 -0
- package/template/src/api/enums/types.ts +251 -0
- package/template/src/api/hooks/error.ts +198 -0
- package/template/src/api/hooks/index.ts +4 -0
- package/template/src/api/hooks/request.ts +99 -0
- package/template/src/api/hooks/requestId.ts +65 -0
- package/template/src/api/hooks/response.ts +22 -0
- package/template/src/api/hooks/types.ts +20 -0
- package/template/src/api/idempotency/index.ts +1 -0
- package/template/src/api/idempotency/key.ts +23 -0
- package/template/src/api/index.ts +14 -0
- package/template/src/api/metadata/MetadataProvider.tsx +37 -0
- package/template/src/api/metadata/index.ts +2 -0
- package/template/src/api/metadata/types.ts +30 -0
- package/template/src/api/parameters/GlobalParameterProvider.tsx +210 -0
- package/template/src/api/parameters/access.ts +117 -0
- package/template/src/api/parameters/catalog.ts +170 -0
- package/template/src/api/parameters/errors.ts +21 -0
- package/template/src/api/parameters/index.ts +53 -0
- package/template/src/api/parameters/query.ts +84 -0
- package/template/src/api/parameters/scope.ts +58 -0
- package/template/src/api/parameters/types.ts +214 -0
- package/template/src/api/query/index.ts +13 -0
- package/template/src/api/query/keys.ts +155 -0
- package/template/src/api/query/mutation.ts +48 -0
- package/template/src/api/query/react.ts +36 -0
- package/template/src/api/query/scope.ts +38 -0
- package/template/src/api/query/types.ts +147 -0
- package/template/src/api/types.ts +144 -0
- package/template/src/application/types.ts +52 -0
- package/template/src/auditLogs/errors.ts +17 -0
- package/template/src/auditLogs/export.ts +85 -0
- package/template/src/auditLogs/index.ts +54 -0
- package/template/src/auditLogs/model.ts +526 -0
- package/template/src/auditLogs/query.ts +113 -0
- package/template/src/auditLogs/react.ts +36 -0
- package/template/src/auditLogs/source.ts +51 -0
- package/template/src/auditLogs/types.ts +357 -0
- package/template/src/authentication/controller.ts +351 -0
- package/template/src/authentication/index.ts +8 -0
- package/template/src/authentication/redirect.ts +72 -0
- package/template/src/authentication/types.ts +300 -0
- package/template/src/bootstrap.tsx +96 -0
- package/template/src/components/AppDataTable/AppDataTable.tsx +74 -0
- package/template/src/components/AppDataTable/index.ts +2 -0
- package/template/src/components/AppDataTable/types.ts +27 -0
- package/template/src/components/AppDialog/AppConfirmDialog.tsx +44 -0
- package/template/src/components/AppDialog/AppDialog.tsx +113 -0
- package/template/src/components/AppDialog/index.ts +3 -0
- package/template/src/components/AppDialog/messages.tsx +22 -0
- package/template/src/components/AppDialog/types.ts +53 -0
- package/template/src/components/AppPageForm/AppPageForm.tsx +21 -0
- package/template/src/components/AppPageForm/PageForm.tsx +765 -0
- package/template/src/components/AppPageForm/SOURCE.md +26 -0
- package/template/src/components/AppPageForm/config.ts +253 -0
- package/template/src/components/AppPageForm/controller.ts +580 -0
- package/template/src/components/AppPageForm/index.ts +2 -0
- package/template/src/components/AppPageForm/messages.ts +90 -0
- package/template/src/components/AppPageForm/optionUtils.ts +91 -0
- package/template/src/components/AppPageForm/options.ts +397 -0
- package/template/src/components/AppPageForm/query.ts +44 -0
- package/template/src/components/AppPageForm/style.css +119 -0
- package/template/src/components/AppPageForm/types.ts +632 -0
- package/template/src/components/AppPageForm/validation.ts +233 -0
- package/template/src/components/AppTable/AppTable.tsx +26 -0
- package/template/src/components/AppTable/SOURCE.md +72 -0
- package/template/src/components/AppTable/cell/customCell/TableCellLayer.tsx +73 -0
- package/template/src/components/AppTable/cell/customCell/actions/ActionDropdownCell.tsx +104 -0
- package/template/src/components/AppTable/cell/customCell/cellLayer.ts +358 -0
- package/template/src/components/AppTable/cell/customCell/componentProps.ts +30 -0
- package/template/src/components/AppTable/cell/customCell/date/TemporalPickerEditor.tsx +54 -0
- package/template/src/components/AppTable/cell/customCell/index.ts +2 -0
- package/template/src/components/AppTable/cell/customCell/select/SelectCellEditor.tsx +225 -0
- package/template/src/components/AppTable/cell/customCell/tableCellLayer.css +20 -0
- package/template/src/components/AppTable/cell/customCell/tooltip/TooltipCell.tsx +45 -0
- package/template/src/components/AppTable/cell/customCell/types.ts +63 -0
- package/template/src/components/AppTable/cell/customCell/useCellLayerLifecycle.ts +111 -0
- package/template/src/components/AppTable/cell/frameworkCell/TableCellComponentLayer.tsx +40 -0
- package/template/src/components/AppTable/cell/frameworkCell/cellComponentSession.ts +203 -0
- package/template/src/components/AppTable/cell/frameworkCell/index.ts +3 -0
- package/template/src/components/AppTable/cell/index.ts +2 -0
- package/template/src/components/AppTable/columns/TableColumnEditor.tsx +257 -0
- package/template/src/components/AppTable/columns/index.ts +1 -0
- package/template/src/components/AppTable/columns/useTableColumnPreferenceActions.ts +85 -0
- package/template/src/components/AppTable/config/defaults.ts +46 -0
- package/template/src/components/AppTable/config/index.ts +2 -0
- package/template/src/components/AppTable/config/license.ts +39 -0
- package/template/src/components/AppTable/config/resolver.ts +25 -0
- package/template/src/components/AppTable/config/types.ts +377 -0
- package/template/src/components/AppTable/engine/bottom/index.ts +1 -0
- package/template/src/components/AppTable/engine/bottom/types.ts +14 -0
- package/template/src/components/AppTable/engine/cell/constants.ts +32 -0
- package/template/src/components/AppTable/engine/cell/customCell/actions/index.ts +1 -0
- package/template/src/components/AppTable/engine/cell/customCell/actions/renderer.ts +162 -0
- package/template/src/components/AppTable/engine/cell/customCell/date/index.ts +1 -0
- package/template/src/components/AppTable/engine/cell/customCell/date/renderer.ts +116 -0
- package/template/src/components/AppTable/engine/cell/customCell/editors/editorBounds.ts +57 -0
- package/template/src/components/AppTable/engine/cell/customCell/editors/editorTrigger.ts +46 -0
- package/template/src/components/AppTable/engine/cell/customCell/editors/index.ts +3 -0
- package/template/src/components/AppTable/engine/cell/customCell/editors/layerEditor.ts +244 -0
- package/template/src/components/AppTable/engine/cell/customCell/index.ts +7 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/columnRenderer.ts +245 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/confirmInput.ts +57 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/display.ts +78 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/index.ts +3 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/itemList.ts +60 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/links.ts +131 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/selection.ts +41 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/shared.ts +71 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/step.ts +37 -0
- package/template/src/components/AppTable/engine/cell/customCell/renderers/switch.ts +45 -0
- package/template/src/components/AppTable/engine/cell/customCell/select/index.ts +1 -0
- package/template/src/components/AppTable/engine/cell/customCell/select/renderer.ts +33 -0
- package/template/src/components/AppTable/engine/cell/customCell/tooltip/index.ts +1 -0
- package/template/src/components/AppTable/engine/cell/customCell/tooltip/tooltip.ts +94 -0
- package/template/src/components/AppTable/engine/cell/customCell/types.ts +82 -0
- package/template/src/components/AppTable/engine/cell/formatting.ts +355 -0
- package/template/src/components/AppTable/engine/cell/formula.ts +145 -0
- package/template/src/components/AppTable/engine/cell/index.ts +7 -0
- package/template/src/components/AppTable/engine/cell/multiSelect.ts +96 -0
- package/template/src/components/AppTable/engine/cell/options.ts +339 -0
- package/template/src/components/AppTable/engine/cell/types.ts +53 -0
- package/template/src/components/AppTable/engine/columns/column.ts +430 -0
- package/template/src/components/AppTable/engine/columns/config/columns.ts +33 -0
- package/template/src/components/AppTable/engine/columns/config/index.ts +4 -0
- package/template/src/components/AppTable/engine/columns/config/mutation.ts +138 -0
- package/template/src/components/AppTable/engine/columns/config/temporal.ts +11 -0
- package/template/src/components/AppTable/engine/columns/config/validation.ts +106 -0
- package/template/src/components/AppTable/engine/columns/constants.ts +6 -0
- package/template/src/components/AppTable/engine/columns/gridColumns.ts +332 -0
- package/template/src/components/AppTable/engine/columns/index.ts +4 -0
- package/template/src/components/AppTable/engine/columns/rendererPolicies.ts +129 -0
- package/template/src/components/AppTable/engine/component/resolver.ts +272 -0
- package/template/src/components/AppTable/engine/component/types.ts +384 -0
- package/template/src/components/AppTable/engine/config/constants.ts +33 -0
- package/template/src/components/AppTable/engine/config/grid/compiler.ts +65 -0
- package/template/src/components/AppTable/engine/config/grid/defaults.ts +82 -0
- package/template/src/components/AppTable/engine/config/grid/ownership.ts +35 -0
- package/template/src/components/AppTable/engine/config/grid/runtimeDelta.ts +34 -0
- package/template/src/components/AppTable/engine/config/grid/types.ts +30 -0
- package/template/src/components/AppTable/engine/pagination/config.ts +75 -0
- package/template/src/components/AppTable/engine/pagination/constants.ts +5 -0
- package/template/src/components/AppTable/engine/pagination/index.ts +3 -0
- package/template/src/components/AppTable/engine/pagination/types.ts +70 -0
- package/template/src/components/AppTable/engine/preference/index.ts +2 -0
- package/template/src/components/AppTable/engine/preference/preference.ts +535 -0
- package/template/src/components/AppTable/engine/preference/types.ts +28 -0
- package/template/src/components/AppTable/engine/right/index.ts +1 -0
- package/template/src/components/AppTable/engine/right/types.ts +18 -0
- package/template/src/components/AppTable/engine/search/config.ts +64 -0
- package/template/src/components/AppTable/engine/search/constants.ts +8 -0
- package/template/src/components/AppTable/engine/search/index.ts +7 -0
- package/template/src/components/AppTable/engine/search/localQuery.ts +145 -0
- package/template/src/components/AppTable/engine/search/query.ts +203 -0
- package/template/src/components/AppTable/engine/search/remoteQuery.ts +99 -0
- package/template/src/components/AppTable/engine/search/searchInteraction.ts +46 -0
- package/template/src/components/AppTable/engine/search/types.ts +155 -0
- package/template/src/components/AppTable/engine/selection/config.ts +13 -0
- package/template/src/components/AppTable/engine/selection/index.ts +4 -0
- package/template/src/components/AppTable/engine/selection/selection.ts +357 -0
- package/template/src/components/AppTable/engine/selection/selectionHeader.ts +88 -0
- package/template/src/components/AppTable/engine/selection/types.ts +66 -0
- package/template/src/components/AppTable/engine/shared/action.ts +11 -0
- package/template/src/components/AppTable/engine/shared/constants.ts +2 -0
- package/template/src/components/AppTable/engine/shared/decimal.ts +114 -0
- package/template/src/components/AppTable/engine/shared/feedback.ts +62 -0
- package/template/src/components/AppTable/engine/shared/index.ts +13 -0
- package/template/src/components/AppTable/engine/shared/interaction.ts +55 -0
- package/template/src/components/AppTable/engine/shared/messages.ts +161 -0
- package/template/src/components/AppTable/engine/shared/row.ts +32 -0
- package/template/src/components/AppTable/engine/shared/scheduler.ts +17 -0
- package/template/src/components/AppTable/engine/shared/tableKey.ts +31 -0
- package/template/src/components/AppTable/engine/shared/theme.ts +196 -0
- package/template/src/components/AppTable/engine/shared/treeRows.ts +155 -0
- package/template/src/components/AppTable/engine/shared/types.ts +58 -0
- package/template/src/components/AppTable/engine/shared/valueSnapshot.ts +46 -0
- package/template/src/components/AppTable/engine/summary/config/export.ts +117 -0
- package/template/src/components/AppTable/engine/summary/config/index.ts +3 -0
- package/template/src/components/AppTable/engine/summary/config/summary.ts +62 -0
- package/template/src/components/AppTable/engine/summary/config/types.ts +93 -0
- package/template/src/components/AppTable/engine/summary/constants.ts +13 -0
- package/template/src/components/AppTable/engine/summary/excelJs.ts +133 -0
- package/template/src/components/AppTable/engine/summary/export.ts +311 -0
- package/template/src/components/AppTable/engine/summary/index.ts +6 -0
- package/template/src/components/AppTable/engine/summary/selectionSum.ts +92 -0
- package/template/src/components/AppTable/engine/summary/summary.ts +457 -0
- package/template/src/components/AppTable/engine/table/clipboard/index.ts +1 -0
- package/template/src/components/AppTable/engine/table/clipboard/transfer.ts +9 -0
- package/template/src/components/AppTable/engine/table/controller/TableController.ts +802 -0
- package/template/src/components/AppTable/engine/table/controller/errors.ts +106 -0
- package/template/src/components/AppTable/engine/table/controller/index.ts +4 -0
- package/template/src/components/AppTable/engine/table/controller/latestAbortableTask.ts +33 -0
- package/template/src/components/AppTable/engine/table/controller/tableDataReplacement.ts +60 -0
- package/template/src/components/AppTable/engine/table/controller/tableDomainConfiguration.ts +94 -0
- package/template/src/components/AppTable/engine/table/controller/tableEditingCommands.ts +163 -0
- package/template/src/components/AppTable/engine/table/controller/tableGridHost.ts +324 -0
- package/template/src/components/AppTable/engine/table/controller/tableIdentity.ts +68 -0
- package/template/src/components/AppTable/engine/table/controller/tableMutationPipeline.ts +79 -0
- package/template/src/components/AppTable/engine/table/controller/tableQueryCoordinator.ts +187 -0
- package/template/src/components/AppTable/engine/table/controller/tableReportingCoordinator.ts +143 -0
- package/template/src/components/AppTable/engine/table/controller/tableSaveCoordinator.ts +227 -0
- package/template/src/components/AppTable/engine/table/controller/tableSaveValidation.ts +29 -0
- package/template/src/components/AppTable/engine/table/controller/tableSnapshot.ts +58 -0
- package/template/src/components/AppTable/engine/table/controller/types.ts +202 -0
- package/template/src/components/AppTable/engine/table/editing/baselineStore.ts +134 -0
- package/template/src/components/AppTable/engine/table/editing/changeSet.ts +492 -0
- package/template/src/components/AppTable/engine/table/editing/changeSetSettlement.ts +633 -0
- package/template/src/components/AppTable/engine/table/editing/commitResultIndex.ts +75 -0
- package/template/src/components/AppTable/engine/table/editing/constants.ts +15 -0
- package/template/src/components/AppTable/engine/table/editing/dirtyCellIndex.ts +96 -0
- package/template/src/components/AppTable/engine/table/editing/index.ts +6 -0
- package/template/src/components/AppTable/engine/table/editing/mutation.ts +173 -0
- package/template/src/components/AppTable/engine/table/editing/rowKey.ts +10 -0
- package/template/src/components/AppTable/engine/table/editing/types.ts +404 -0
- package/template/src/components/AppTable/engine/table/editing/validation.ts +452 -0
- package/template/src/components/AppTable/engine/table/grid/cellMeta.ts +90 -0
- package/template/src/components/AppTable/engine/table/grid/handsontable.ts +25 -0
- package/template/src/components/AppTable/engine/table/grid/handsontableExtensions.d.ts +26 -0
- package/template/src/components/AppTable/engine/table/grid/index.ts +5 -0
- package/template/src/components/AppTable/engine/table/grid/moduleRegistry.ts +39 -0
- package/template/src/components/AppTable/engine/table/grid/runtime.ts +31 -0
- package/template/src/components/AppTable/engine/table/grid/types.ts +25 -0
- package/template/src/components/AppTable/engine/table/hooks/fixedEndHooks.ts +44 -0
- package/template/src/components/AppTable/engine/table/hooks/gridHooks.ts +108 -0
- package/template/src/components/AppTable/engine/table/hooks/headerHooks.ts +103 -0
- package/template/src/components/AppTable/engine/table/hooks/index.ts +3 -0
- package/template/src/components/AppTable/engine/table/index.ts +6 -0
- package/template/src/components/AppTable/engine/table/layout/constants.ts +2 -0
- package/template/src/components/AppTable/engine/table/layout/dropdownMenu.ts +89 -0
- package/template/src/components/AppTable/engine/table/layout/fixedColumns.ts +44 -0
- package/template/src/components/AppTable/engine/table/layout/fixedEndOverlay.ts +90 -0
- package/template/src/components/AppTable/engine/table/layout/fixedEndOverlayAccessibility.ts +104 -0
- package/template/src/components/AppTable/engine/table/layout/fixedEndOverlayRenderer.ts +690 -0
- package/template/src/components/AppTable/engine/table/layout/fixedEndOverlaySignature.ts +58 -0
- package/template/src/components/AppTable/engine/table/layout/fixedEndRuntime.ts +137 -0
- package/template/src/components/AppTable/engine/table/layout/handsontableDomAdapter.ts +40 -0
- package/template/src/components/AppTable/engine/table/layout/height.ts +72 -0
- package/template/src/components/AppTable/engine/table/layout/index.ts +14 -0
- package/template/src/components/AppTable/engine/table/layout/layoutScheduler.ts +60 -0
- package/template/src/components/AppTable/engine/table/layout/mergeCells.ts +146 -0
- package/template/src/components/AppTable/engine/table/layout/nestedHeaders.ts +271 -0
- package/template/src/components/AppTable/engine/table/layout/types.ts +10 -0
- package/template/src/components/AppTable/engine/toolbar/index.ts +1 -0
- package/template/src/components/AppTable/engine/toolbar/types.ts +56 -0
- package/template/src/components/AppTable/index.ts +11 -0
- package/template/src/components/AppTable/messages.ts +256 -0
- package/template/src/components/AppTable/pagination/TablePaginationBar.tsx +193 -0
- package/template/src/components/AppTable/pagination/index.ts +1 -0
- package/template/src/components/AppTable/pagination/paginationItems.ts +56 -0
- package/template/src/components/AppTable/preference/index.ts +1 -0
- package/template/src/components/AppTable/preference/useTablePreference.ts +208 -0
- package/template/src/components/AppTable/reporting/index.ts +1 -0
- package/template/src/components/AppTable/reporting/useTableReporting.ts +342 -0
- package/template/src/components/AppTable/search/TableSearchBar.tsx +301 -0
- package/template/src/components/AppTable/search/TableSearchConditionEditor.tsx +254 -0
- package/template/src/components/AppTable/search/TableSearchField.tsx +338 -0
- package/template/src/components/AppTable/search/TableSearchFields.tsx +65 -0
- package/template/src/components/AppTable/search/constants.ts +9 -0
- package/template/src/components/AppTable/search/index.ts +3 -0
- package/template/src/components/AppTable/search/tableSearchBar.css +164 -0
- package/template/src/components/AppTable/search/types.ts +7 -0
- package/template/src/components/AppTable/search/useTableQuery.ts +373 -0
- package/template/src/components/AppTable/selection/index.ts +1 -0
- package/template/src/components/AppTable/selection/useTableSelection.ts +188 -0
- package/template/src/components/AppTable/sensitiveData.tsx +41 -0
- package/template/src/components/AppTable/shared/styles.ts +2 -0
- package/template/src/components/AppTable/styles/index.css +6 -0
- package/template/src/components/AppTable/styles/tableComponent.css +297 -0
- package/template/src/components/AppTable/styles/theme.css +133 -0
- package/template/src/components/AppTable/table/components/TableComponent.tsx +567 -0
- package/template/src/components/AppTable/table/components/TableErrorFeedback.tsx +36 -0
- package/template/src/components/AppTable/table/components/TableGridViewport.tsx +85 -0
- package/template/src/components/AppTable/table/components/index.ts +2 -0
- package/template/src/components/AppTable/table/components/types.ts +90 -0
- package/template/src/components/AppTable/table/controller/configuration.ts +89 -0
- package/template/src/components/AppTable/table/controller/index.ts +2 -0
- package/template/src/components/AppTable/table/controller/useTableController.ts +155 -0
- package/template/src/components/AppTable/table/controller/useTableLifecycle.ts +97 -0
- package/template/src/components/AppTable/table/grid/index.ts +1 -0
- package/template/src/components/AppTable/table/grid/useTableGrid.ts +857 -0
- package/template/src/components/AppTable/table/grid/useTableGridRuntimeSettings.ts +49 -0
- package/template/src/components/AppTable/table/index.ts +4 -0
- package/template/src/components/AppTable/table/layout/TablePanels.tsx +389 -0
- package/template/src/components/AppTable/table/layout/index.ts +7 -0
- package/template/src/components/AppTable/table/layout/types.ts +3 -0
- package/template/src/components/AppTable/table/layout/useResizablePanel.ts +213 -0
- package/template/src/components/AppTable/table/layout/useTableAdaptiveHeight.ts +238 -0
- package/template/src/components/AppTable/table/layout/useTablePanels.ts +329 -0
- package/template/src/components/AppTable/table/layout/useTableTheme.ts +123 -0
- package/template/src/components/AppTable/toolbar/TableToolbar.tsx +336 -0
- package/template/src/components/AppTable/toolbar/index.ts +1 -0
- package/template/src/components/BrandLogo/BrandLogo.tsx +41 -0
- package/template/src/components/BrandLogo/index.ts +1 -0
- package/template/src/components/Can/Can.tsx +19 -0
- package/template/src/components/Can/index.ts +7 -0
- package/template/src/components/Can/types.ts +41 -0
- package/template/src/components/EnumBadge/EnumBadge.tsx +44 -0
- package/template/src/components/EnumBadge/index.ts +2 -0
- package/template/src/components/EnumBadge/types.ts +16 -0
- package/template/src/components/EnumText/EnumText.tsx +33 -0
- package/template/src/components/EnumText/index.ts +2 -0
- package/template/src/components/EnumText/types.ts +13 -0
- package/template/src/components/FilePreview/FilePreview.tsx +120 -0
- package/template/src/components/FilePreview/index.ts +11 -0
- package/template/src/components/FilePreview/preview.ts +88 -0
- package/template/src/components/FilePreview/types.ts +91 -0
- package/template/src/components/FileUpload/FileUpload.tsx +172 -0
- package/template/src/components/FileUpload/index.ts +2 -0
- package/template/src/components/FileUpload/types.ts +32 -0
- package/template/src/components/JsonEditor/JsonEditor.tsx +103 -0
- package/template/src/components/JsonEditor/index.ts +1 -0
- package/template/src/components/JsonEditor/types.ts +14 -0
- package/template/src/components/PageFeedback/PageFeedback.tsx +194 -0
- package/template/src/components/PageFeedback/index.ts +10 -0
- package/template/src/components/PageFeedback/types.ts +31 -0
- package/template/src/components/PasswordInput/PasswordInput.tsx +50 -0
- package/template/src/components/PasswordInput/index.ts +1 -0
- package/template/src/components/RouteDialog/RouteDialog.tsx +20 -0
- package/template/src/components/RouteDialog/index.ts +2 -0
- package/template/src/components/RouteDialog/types.ts +8 -0
- package/template/src/components/RouteDialog/useRouteDialogNavigation.ts +30 -0
- package/template/src/components/SensitiveData/SensitiveData.tsx +337 -0
- package/template/src/components/SensitiveData/index.ts +2 -0
- package/template/src/components/SensitiveData/types.ts +31 -0
- package/template/src/components/StatusBadge/StatusBadge.tsx +28 -0
- package/template/src/components/StatusBadge/index.ts +2 -0
- package/template/src/components/StatusBadge/statusBadgeStyles.ts +30 -0
- package/template/src/components/StatusBadge/types.ts +7 -0
- package/template/src/components/layout/AppHeader/AppHeader.tsx +57 -0
- package/template/src/components/layout/AppHeader/HeaderSearch.tsx +160 -0
- package/template/src/components/layout/AppHeader/HeaderUserMenu.tsx +59 -0
- package/template/src/components/layout/AppHeader/ThemeControls.tsx +44 -0
- package/template/src/components/layout/AppHeader/index.ts +1 -0
- package/template/src/components/layout/AppHeader/themeOptions.ts +13 -0
- package/template/src/components/layout/AppSidebar.tsx +268 -0
- package/template/src/components/layout/PageContainer.tsx +16 -0
- package/template/src/components/ui/avatar.tsx +108 -0
- package/template/src/components/ui/badge.tsx +47 -0
- package/template/src/components/ui/button.tsx +63 -0
- package/template/src/components/ui/card.tsx +60 -0
- package/template/src/components/ui/checkbox.tsx +31 -0
- package/template/src/components/ui/collapsible.tsx +33 -0
- package/template/src/components/ui/command.tsx +181 -0
- package/template/src/components/ui/dialog.tsx +157 -0
- package/template/src/components/ui/dropdown-menu.tsx +254 -0
- package/template/src/components/ui/form.tsx +141 -0
- package/template/src/components/ui/input.tsx +20 -0
- package/template/src/components/ui/label.tsx +23 -0
- package/template/src/components/ui/pagination.tsx +127 -0
- package/template/src/components/ui/popover.tsx +41 -0
- package/template/src/components/ui/select.tsx +187 -0
- package/template/src/components/ui/separator.tsx +25 -0
- package/template/src/components/ui/sheet.tsx +142 -0
- package/template/src/components/ui/sidebar.tsx +878 -0
- package/template/src/components/ui/skeleton.tsx +13 -0
- package/template/src/components/ui/sonner.tsx +33 -0
- package/template/src/components/ui/tooltip.tsx +54 -0
- package/template/src/config/RuntimeConfigErrorPage.tsx +48 -0
- package/template/src/config/appConfig.ts +126 -0
- package/template/src/config/buildInfo.ts +8 -0
- package/template/src/config/observabilityAdapter.ts +8 -0
- package/template/src/config/runtimeConfig.ts +360 -0
- package/template/src/config/types.ts +195 -0
- package/template/src/context/ThemeProvider.tsx +84 -0
- package/template/src/context/UnsavedChangesProvider.tsx +123 -0
- package/template/src/context/applicationScope.ts +39 -0
- package/template/src/context/types.ts +41 -0
- package/template/src/dataMasking/index.ts +14 -0
- package/template/src/dataMasking/masking.ts +139 -0
- package/template/src/dataMasking/types.ts +144 -0
- package/template/src/featureFlags/FeatureFlagProvider.tsx +143 -0
- package/template/src/featureFlags/FeatureGate.tsx +12 -0
- package/template/src/featureFlags/catalog.ts +140 -0
- package/template/src/featureFlags/errors.ts +17 -0
- package/template/src/featureFlags/index.ts +43 -0
- package/template/src/featureFlags/query.ts +103 -0
- package/template/src/featureFlags/registry.ts +149 -0
- package/template/src/featureFlags/scope.ts +27 -0
- package/template/src/featureFlags/types.ts +241 -0
- package/template/src/features/auth/AuthLayout.tsx +17 -0
- package/template/src/features/auth/index.ts +2 -0
- package/template/src/features/auth/signIn/components/UserAuthForm.tsx +121 -0
- package/template/src/features/auth/signIn/index.tsx +71 -0
- package/template/src/features/auth/signIn/messages.ts +37 -0
- package/template/src/features/auth/signIn/types.ts +4 -0
- package/template/src/features/errors/ForbiddenError.tsx +34 -0
- package/template/src/features/errors/GeneralError.tsx +46 -0
- package/template/src/features/errors/MaintenanceError.tsx +31 -0
- package/template/src/features/errors/NotFoundError.tsx +34 -0
- package/template/src/features/errors/RouteError.tsx +72 -0
- package/template/src/features/errors/UnauthorizedError.tsx +34 -0
- package/template/src/features/errors/index.ts +6 -0
- package/template/src/features/errors/messages.ts +56 -0
- package/template/src/features/home/index.tsx +107 -0
- package/template/src/features/home/messages.ts +59 -0
- package/template/src/features/showcase/AccessShowcasePage.tsx +284 -0
- package/template/src/features/showcase/AdvancedTableDemo.tsx +120 -0
- package/template/src/features/showcase/FeedbackShowcasePage.tsx +142 -0
- package/template/src/features/showcase/FileShowcasePage.tsx +110 -0
- package/template/src/features/showcase/FormShowcasePage.tsx +156 -0
- package/template/src/features/showcase/MetadataShowcasePage.tsx +241 -0
- package/template/src/features/showcase/ShowcasePageHeader.tsx +24 -0
- package/template/src/features/showcase/TableShowcasePage.tsx +436 -0
- package/template/src/features/showcase/accessMessages.ts +67 -0
- package/template/src/features/showcase/index.ts +6 -0
- package/template/src/features/showcase/messages.ts +192 -0
- package/template/src/files/download.ts +82 -0
- package/template/src/files/errors.ts +15 -0
- package/template/src/files/filename.ts +61 -0
- package/template/src/files/index.ts +38 -0
- package/template/src/files/types.ts +299 -0
- package/template/src/files/useFileTask.ts +153 -0
- package/template/src/files/useFileUpload.ts +117 -0
- package/template/src/files/validation.ts +109 -0
- package/template/src/layouts/AppLayout.tsx +37 -0
- package/template/src/lib/accessControl.ts +42 -0
- package/template/src/lib/navigationRedirect.ts +26 -0
- package/template/src/lib/utils.ts +6 -0
- package/template/src/locale/LocaleProvider.tsx +37 -0
- package/template/src/locale/context.ts +15 -0
- package/template/src/locale/formatters.ts +123 -0
- package/template/src/locale/hooks.ts +35 -0
- package/template/src/locale/index.ts +17 -0
- package/template/src/locale/messages.ts +151 -0
- package/template/src/locale/types.ts +167 -0
- package/template/src/main.tsx +5 -0
- package/template/src/observability/browser.ts +37 -0
- package/template/src/observability/consoleAdapter.ts +18 -0
- package/template/src/observability/index.ts +26 -0
- package/template/src/observability/observer.ts +118 -0
- package/template/src/observability/redaction.ts +85 -0
- package/template/src/observability/types.ts +119 -0
- package/template/src/optionalEditors/controller.ts +327 -0
- package/template/src/optionalEditors/errors.ts +21 -0
- package/template/src/optionalEditors/index.ts +35 -0
- package/template/src/optionalEditors/model.ts +253 -0
- package/template/src/optionalEditors/react.ts +89 -0
- package/template/src/optionalEditors/types.ts +254 -0
- package/template/src/permissions/index.ts +3 -0
- package/template/src/permissions/types.ts +5 -0
- package/template/src/permissions/usePermission.ts +16 -0
- package/template/src/realtimeCollaboration/controller.ts +355 -0
- package/template/src/realtimeCollaboration/errors.ts +20 -0
- package/template/src/realtimeCollaboration/index.ts +39 -0
- package/template/src/realtimeCollaboration/model.ts +212 -0
- package/template/src/realtimeCollaboration/react.ts +72 -0
- package/template/src/realtimeCollaboration/types.ts +251 -0
- package/template/src/reporting/errors.ts +21 -0
- package/template/src/reporting/generation.ts +87 -0
- package/template/src/reporting/index.ts +42 -0
- package/template/src/reporting/model.ts +373 -0
- package/template/src/reporting/print.ts +16 -0
- package/template/src/reporting/query.ts +50 -0
- package/template/src/reporting/react.ts +17 -0
- package/template/src/reporting/source.ts +13 -0
- package/template/src/reporting/types.ts +219 -0
- package/template/src/router/RootRouteLayout.tsx +11 -0
- package/template/src/router/authLifecycle.ts +39 -0
- package/template/src/router/config.ts +293 -0
- package/template/src/router/interceptors.ts +48 -0
- package/template/src/router/lazyRouteComponents.ts +78 -0
- package/template/src/router/messages.ts +48 -0
- package/template/src/router/navigation.ts +167 -0
- package/template/src/router/router.ts +66 -0
- package/template/src/router/searchSchemas.ts +9 -0
- package/template/src/router/types.ts +76 -0
- package/template/src/stores/authSessionStorage.ts +27 -0
- package/template/src/stores/authStore.ts +165 -0
- package/template/src/stores/types.ts +36 -0
- package/template/src/stores/uiPreferenceStore.ts +34 -0
- package/template/src/styles/index.css +141 -0
- package/template/src/styles/theme.css +213 -0
- package/template/src/tenantWorkspace/TenantWorkspaceProvider.tsx +102 -0
- package/template/src/tenantWorkspace/index.ts +33 -0
- package/template/src/tenantWorkspace/store.ts +184 -0
- package/template/src/tenantWorkspace/switch.ts +206 -0
- package/template/src/tenantWorkspace/types.ts +155 -0
- package/template/src/vite-env.d.ts +20 -0
- package/template/stylelint.config.js +28 -0
- package/template/tests/integration/Application.test.tsx +269 -0
- package/template/tests/integration/layout/AppHeader.test.tsx +182 -0
- package/template/tests/integration/layout/AppSidebar.test.tsx +121 -0
- package/template/tests/integration/layout/__screenshots__/AppHeader.test.tsx/AppHeader-command-search-hides-the-duplicate-header-trigger-when-the-desktop-sidebar-collapses-1.png +0 -0
- package/template/tests/integration/router/__screenshots__/config.test.ts/route-tree-authentication-boundaries-exposes-only-scaffold-navigation-metadata-1.png +0 -0
- package/template/tests/integration/router/config.test.ts +123 -0
- package/template/tests/integration/router/interceptors.test.ts +100 -0
- package/template/tests/setup/accessibility.ts +25 -0
- package/template/tests/setup/runtimeConfig.ts +3 -0
- package/template/tests/unit/api/ApiError.test.ts +25 -0
- package/template/tests/unit/api/__screenshots__/authSession.test.ts/administrator-authentication-clears-the-session-if-a-refresh-identity-loses-administrator-access-1.png +0 -0
- package/template/tests/unit/api/__screenshots__/authSession.test.ts/administrator-authentication-creates-a-session-from-the-generated-login-response-for-an-admin-1.png +0 -0
- package/template/tests/unit/api/__screenshots__/authSession.test.ts/administrator-authentication-rejects-and-revokes-the-generated-login-result-for-an-ordinary-user-1.png +0 -0
- package/template/tests/unit/api/activity/ActivityProvider.test.tsx +131 -0
- package/template/tests/unit/api/activity/__screenshots__/transports.test.ts/activity-transport-adapters-polls-sequentially-and-advances-the-last-event-ID-1.png +0 -0
- package/template/tests/unit/api/activity/modelAndQuery.test.ts +144 -0
- package/template/tests/unit/api/activity/subscription.test.ts +103 -0
- package/template/tests/unit/api/activity/transports.test.ts +145 -0
- package/template/tests/unit/api/authClient.test.ts +110 -0
- package/template/tests/unit/api/authSession.test.ts +289 -0
- package/template/tests/unit/api/clients/configureApiClient.test.ts +198 -0
- package/template/tests/unit/api/demoAuthClient.test.ts +47 -0
- package/template/tests/unit/api/enums/access.test.ts +107 -0
- package/template/tests/unit/api/enums/catalog.test.ts +200 -0
- package/template/tests/unit/api/enums/query.test.ts +110 -0
- package/template/tests/unit/api/enums/useEnum.test.tsx +98 -0
- package/template/tests/unit/api/enums/useEnumCatalog.test.tsx +68 -0
- package/template/tests/unit/api/hooks/error.test.ts +168 -0
- package/template/tests/unit/api/hooks/request.test.ts +170 -0
- package/template/tests/unit/api/hooks/response.test.ts +46 -0
- package/template/tests/unit/api/metadata/MetadataProvider.test.tsx +102 -0
- package/template/tests/unit/api/parameters/catalog.test.ts +147 -0
- package/template/tests/unit/api/parameters/query.test.ts +78 -0
- package/template/tests/unit/api/parameters/useGlobalParameter.test.tsx +89 -0
- package/template/tests/unit/api/query/queryPolicy.test.ts +245 -0
- package/template/tests/unit/api/query/useAppQueryScope.test.tsx +74 -0
- package/template/tests/unit/auditLogs/auditLogHooks.test.tsx +194 -0
- package/template/tests/unit/auditLogs/auditLogs.test.ts +199 -0
- package/template/tests/unit/authentication/__screenshots__/authentication.test.ts/authentication-controller-completes-Step-up-callbacks-without-creating-a-second-login-result-1.png +0 -0
- package/template/tests/unit/authentication/__screenshots__/authentication.test.ts/authentication-controller-moves-from-challenge-to-completion-without-retaining-tokens-in-snapshot-1.png +0 -0
- package/template/tests/unit/authentication/authentication.test.ts +376 -0
- package/template/tests/unit/components/AppDialog.test.tsx +225 -0
- package/template/tests/unit/components/AppTable.test.tsx +129 -0
- package/template/tests/unit/components/AppTableLayoutTransition.test.ts +118 -0
- package/template/tests/unit/components/AppTableLocalization.test.ts +58 -0
- package/template/tests/unit/components/AppTableSensitiveData.test.ts +35 -0
- package/template/tests/unit/components/AppTableUpgrade.test.tsx +179 -0
- package/template/tests/unit/components/AppTableUpgradeCore.test.ts +258 -0
- package/template/tests/unit/components/BrandLogo.test.tsx +24 -0
- package/template/tests/unit/components/Can.test.tsx +80 -0
- package/template/tests/unit/components/Dialog.test.tsx +56 -0
- package/template/tests/unit/components/EnumPresentation.test.tsx +64 -0
- package/template/tests/unit/components/FilePreviewEngine.test.ts +51 -0
- package/template/tests/unit/components/JsonEditor.test.tsx +47 -0
- package/template/tests/unit/components/LocalizedSharedComponents.test.tsx +36 -0
- package/template/tests/unit/components/OverlayLayer.test.tsx +151 -0
- package/template/tests/unit/components/PageFeedback.test.tsx +143 -0
- package/template/tests/unit/components/PageForm.test.tsx +272 -0
- package/template/tests/unit/components/PageFormCore.test.ts +74 -0
- package/template/tests/unit/components/PasswordInput.test.tsx +105 -0
- package/template/tests/unit/components/ScaffoldComponents.test.tsx +64 -0
- package/template/tests/unit/components/SensitiveData.test.tsx +151 -0
- package/template/tests/unit/components/StatusBadge.test.tsx +36 -0
- package/template/tests/unit/components/TableComponent.test.tsx +644 -0
- package/template/tests/unit/components/TableCore.test.ts +145 -0
- package/template/tests/unit/components/ThemeAccessibility.test.tsx +27 -0
- package/template/tests/unit/components/__screenshots__/BatchOperationDialog.test.tsx/confirms-a-batch-action-and-presents-partial-failure-details-1.png +0 -0
- package/template/tests/unit/components/__screenshots__/PageForm.test.tsx/PageForm-writes-uploaded-values-through-the-public-file-field-and-resets-dirty-state-1.png +0 -0
- package/template/tests/unit/components/__screenshots__/PasswordInput.test.tsx/PasswordInput-toggles-the-password-visibility-when-the-show-password-button-is-clicked-1.png +0 -0
- package/template/tests/unit/components/__screenshots__/TableComponent.test.tsx/TableComponent-pins-trailing-action-columns-and-removes-their-header-menu-by-default-1.png +0 -0
- package/template/tests/unit/components/__screenshots__/TableComponent.test.tsx/TableComponent-renders-shadcn-components-through-cellComponent-1.png +0 -0
- package/template/tests/unit/components/__screenshots__/TableComponent.test.tsx/TableComponent-renders-the-toolbar-without-a-bottom-divider-1.png +0 -0
- package/template/tests/unit/components/__screenshots__/TableComponent.test.tsx/TableComponent-resyncs-adaptive-height-after-a-column-resize-changes-wrapped-row-height-1.png +0 -0
- package/template/tests/unit/config/RuntimeConfigErrorPage.test.tsx +23 -0
- package/template/tests/unit/config/appConfig.test.ts +98 -0
- package/template/tests/unit/config/appTableContracts.test.mjs +120 -0
- package/template/tests/unit/config/bundleBudget.test.mjs +190 -0
- package/template/tests/unit/config/componentGovernance.test.mjs +156 -0
- package/template/tests/unit/config/deployConfig.test.mjs +211 -0
- package/template/tests/unit/config/eslintConfig.test.mjs +101 -0
- package/template/tests/unit/config/featureBoundaries.test.mjs +126 -0
- package/template/tests/unit/config/npmPackage.test.mjs +37 -0
- package/template/tests/unit/config/releaseArtifact.test.mjs +105 -0
- package/template/tests/unit/config/runtimeConfig.test.ts +225 -0
- package/template/tests/unit/config/scaffoldCheck.test.mjs +53 -0
- package/template/tests/unit/config/scaffoldFeature.test.mjs +177 -0
- package/template/tests/unit/config/scaffoldInit.test.mjs +218 -0
- package/template/tests/unit/config/scaffoldProject.test.mjs +378 -0
- package/template/tests/unit/config/scaffoldTransaction.test.mjs +77 -0
- package/template/tests/unit/config/viteConfig.test.mjs +371 -0
- package/template/tests/unit/context/ThemeProvider.test.tsx +108 -0
- package/template/tests/unit/context/UnsavedChangesProvider.test.tsx +94 -0
- package/template/tests/unit/context/__screenshots__/ThemeProvider.test.tsx/ThemeProvider-uses-the-neutral-black-palette-for-the-app-and-scoped-table-theme-1.png +0 -0
- package/template/tests/unit/context/applicationScope.test.ts +62 -0
- package/template/tests/unit/dataMasking/dataMasking.test.ts +95 -0
- package/template/tests/unit/featureFlags/featureFlags.test.ts +169 -0
- package/template/tests/unit/featureFlags/useFeatureFlag.test.tsx +108 -0
- package/template/tests/unit/features/FeatureLocalization.test.tsx +54 -0
- package/template/tests/unit/features/RouteError.test.tsx +40 -0
- package/template/tests/unit/features/auth/signIn/UserAuthForm.test.tsx +79 -0
- package/template/tests/unit/features/auth/signIn/__screenshots__/UserAuthForm.test.tsx/UserAuthForm-passes-validated-values-to-onSubmit-1.png +0 -0
- package/template/tests/unit/features/auth/signIn/__screenshots__/UserAuthForm.test.tsx/UserAuthForm-shows-validation-messages-when-submitting-an-empty-form-1.png +0 -0
- package/template/tests/unit/files/fileHooks.test.tsx +130 -0
- package/template/tests/unit/files/files.test.ts +112 -0
- package/template/tests/unit/lib/accessControl.test.ts +69 -0
- package/template/tests/unit/locale/locale.test.tsx +90 -0
- package/template/tests/unit/observability/browser.test.ts +48 -0
- package/template/tests/unit/observability/observer.test.ts +115 -0
- package/template/tests/unit/optionalEditors/__screenshots__/useOptionalEditor.test.tsx/useOptionalEditor-fails-permission-precheck-before-loading-the-project-SDK-1.png +0 -0
- package/template/tests/unit/optionalEditors/__screenshots__/useOptionalEditor.test.tsx/useOptionalEditor-mounts-a-route-scoped-SDK-into-the-dedicated-host-with-permission-1.png +0 -0
- package/template/tests/unit/optionalEditors/optionalEditors.test.ts +313 -0
- package/template/tests/unit/optionalEditors/useOptionalEditor.test.tsx +141 -0
- package/template/tests/unit/realtimeCollaboration/collaboration.test.ts +240 -0
- package/template/tests/unit/realtimeCollaboration/useRealtimeCollaboration.test.tsx +115 -0
- package/template/tests/unit/reporting/reporting.test.ts +195 -0
- package/template/tests/unit/reporting/reportingHooks.test.tsx +203 -0
- package/template/tests/unit/router/authLifecycle.test.ts +55 -0
- package/template/tests/unit/router/navigation.test.ts +55 -0
- package/template/tests/unit/router/redirects.test.ts +22 -0
- package/template/tests/unit/scaffoldFeatureTemplate/featureTemplate.test.ts +42 -0
- package/template/tests/unit/scaffoldFeatureTemplate/publicContract.test.ts +28 -0
- package/template/tests/unit/scaffoldFeatureTemplate/queries.test.tsx +289 -0
- package/template/tests/unit/stores/authStore.test.ts +128 -0
- package/template/tests/unit/stores/uiPreferenceStore.test.ts +56 -0
- package/template/tests/unit/tenantWorkspace/tenantWorkspace.test.tsx +261 -0
- package/template/tools/bundle/budgets.json +48 -0
- package/template/tools/bundle/check.mjs +307 -0
- package/template/tools/component-governance/check.mjs +703 -0
- package/template/tools/component-governance/manifest.json +112 -0
- package/template/tools/deployment/browser-smoke.mjs +76 -0
- package/template/tools/deployment/browser-smoke.sh +141 -0
- package/template/tools/openapi/generate.mjs +268 -0
- package/template/tools/openapi/templates/README.md +14 -0
- package/template/tools/openapi/templates/base/README.md +7 -0
- package/template/tools/openapi/templates/base/data-contracts.eta +44 -0
- package/template/tools/openapi/templates/base/http-client.eta +3 -0
- package/template/tools/openapi/templates/base/http-clients/axios-http-client.eta +132 -0
- package/template/tools/openapi/templates/base/http-clients/fetch-http-client.eta +220 -0
- package/template/tools/openapi/templates/base/route-docs.eta +31 -0
- package/template/tools/openapi/templates/base/route-name.eta +43 -0
- package/template/tools/openapi/templates/base/route-type.eta +22 -0
- package/template/tools/openapi/templates/default/README.md +7 -0
- package/template/tools/openapi/templates/default/api.eta +67 -0
- package/template/tools/openapi/templates/default/http-client.eta +137 -0
- package/template/tools/openapi/templates/default/procedure-call.eta +99 -0
- package/template/tools/openapi/templates/default/route-docs.eta +40 -0
- package/template/tools/openapi/templates/default/route-types.eta +28 -0
- package/template/tools/openapi/templates/modular/README.md +7 -0
- package/template/tools/openapi/templates/modular/api.eta +28 -0
- package/template/tools/openapi/templates/modular/procedure-call.eta +99 -0
- package/template/tools/openapi/templates/modular/route-types.eta +18 -0
- package/template/tools/release/artifact.mjs +258 -0
- package/template/tools/scaffold/add-capability.mjs +409 -0
- package/template/tools/scaffold/capability-catalog.json +163 -0
- package/template/tools/scaffold/check.mjs +326 -0
- package/template/tools/scaffold/create-feature.mjs +444 -0
- package/template/tools/scaffold/create-project.mjs +482 -0
- package/template/tools/scaffold/init.example.json +64 -0
- package/template/tools/scaffold/init.mjs +419 -0
- package/template/tools/scaffold/lockfile.mjs +193 -0
- package/template/tools/scaffold/templates/feature/index.ts +19 -0
- package/template/tools/scaffold/templates/feature/model.ts +142 -0
- package/template/tools/scaffold/templates/feature/queries.ts +154 -0
- package/template/tools/scaffold/templates/feature/repository.ts +206 -0
- package/template/tools/scaffold/templates/feature/types.ts +168 -0
- package/template/tools/scaffold/workspace-transaction.mjs +111 -0
- package/template/tsconfig.app.json +31 -0
- package/template/tsconfig.json +12 -0
- package/template/tsconfig.node.json +24 -0
- package/template/vite.config.ts +121 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
# Enterprise React Admin Scaffold
|
|
2
|
+
|
|
3
|
+
面向团队内部项目的 React 19、TypeScript 与 Vite 管理后台脚手架,精简自
|
|
4
|
+
[satnaing/shadcn-admin](https://github.com/satnaing/shadcn-admin)。本仓库是完整能力源;
|
|
5
|
+
新项目默认生成精简的 `core` 档位,不包含系统管理、产品业务页面和低频可选能力。
|
|
6
|
+
|
|
7
|
+
## 内置能力
|
|
8
|
+
|
|
9
|
+
- `/sign-in`:管理员登录入口
|
|
10
|
+
- `/dashboard`:可进入各项实操页面的脚手架演示首页
|
|
11
|
+
- `/showcase/*`:表格、PageForm、枚举参数、上传预览和页面反馈实操页
|
|
12
|
+
- `/errors/401`、`403`、`404`、`500`、`503`:通用错误页
|
|
13
|
+
- `demo` / `connected` 双运行模式,可先演示再接入真实后端
|
|
14
|
+
- TanStack Router 路由守卫、权限过滤、菜单元数据和命令搜索
|
|
15
|
+
- `usePermission`、`Can`、表格与 Query/Mutation 共用的操作权限闭环
|
|
16
|
+
- TanStack Query 作用域 Key、Mutation 一致性、OpenAPI 客户端与统一请求生命周期
|
|
17
|
+
- Mutation 幂等键、防重复激活、超时恢复与后端结果确认
|
|
18
|
+
- `AppTable` 内建查询、排序、分页、偏好、跨页选择和工具栏操作入口
|
|
19
|
+
- 批量提交、确认与结果反馈由 Feature 组合权限、幂等 Mutation 和 `AppDialog`
|
|
20
|
+
- 工具层中性 Feature 生成器,预览并生成 DTO 映射、Repository、双 Adapter 和契约测试
|
|
21
|
+
- 后端驱动的全局枚举、类型安全全局参数与非阻塞元数据初始化
|
|
22
|
+
- 源码内置的 `AppDataTable` 承载常规 CRUD;高级电子表格源码通过能力清单按需加入
|
|
23
|
+
- PageForm 与可选高级 Table 都以项目源码交付,不依赖内部 Git 包
|
|
24
|
+
- `pnpm components:check` 持续校验内建组件来源、回归证据和第三方许可证边界
|
|
25
|
+
- 页面首次加载、成功空态、请求错误、请求 ID 和手动重试的统一反馈组件
|
|
26
|
+
- 文件上传、下载、图片/PDF 预览与同步/异步任务的可替换 Adapter 契约
|
|
27
|
+
- 统一 Locale、IANA 时区、Intl 格式化及 Feature 自有语言包入口
|
|
28
|
+
- shadcn/ui、Tailwind CSS、浅色/深色主题和响应式侧边栏
|
|
29
|
+
- 可插拔可观测性、Web Vitals、默认拒绝日志采集及版本/Commit/环境上下文
|
|
30
|
+
- CI 单次构建、静态文件摘要、Commit 身份和镜像 Digest 驱动的不可变产物晋级
|
|
31
|
+
- 候选容器使用真实 Chromium 校验 Runtime Config、React 启动和登录路由
|
|
32
|
+
- 默认入口、登录和中性首页按静态 Chunk 图执行 gzip 体积预算
|
|
33
|
+
- 可预览、显式写入、失败回滚且可重复执行的脚手架初始化命令
|
|
34
|
+
- 应用与模板独立版本化,模板变化通过 Changelog、人工评审和完整 Git 回滚管理
|
|
35
|
+
- 同一构建产物按 Runtime Config 切换名称、明暗 Logo、Favicon 和可访问品牌色
|
|
36
|
+
- Vitest Browser、Playwright、ESLint、Prettier、Stylelint、Knip 与 CI
|
|
37
|
+
|
|
38
|
+
品牌、API、认证公开参数和浏览器存储命名空间由 `public/runtime-config.json` 在启动时
|
|
39
|
+
加载;Vite 构建参数保留在 `.env`。新项目的初始化与 Feature 接入流程见
|
|
40
|
+
[`docs/scaffold-guide.md`](docs/scaffold-guide.md)。
|
|
41
|
+
企业能力边界、模块分级和接入契约见
|
|
42
|
+
[`docs/enterprise-scaffold.md`](docs/enterprise-scaffold.md)。
|
|
43
|
+
完整能力状态、验收标准和逐项建设顺序见
|
|
44
|
+
[`docs/scaffold-capability-roadmap.md`](docs/scaffold-capability-roadmap.md)。
|
|
45
|
+
多品牌运行时字段、资产安全和部署回滚规则见
|
|
46
|
+
[`docs/white-label.md`](docs/white-label.md)。
|
|
47
|
+
|
|
48
|
+
## 开始使用
|
|
49
|
+
|
|
50
|
+
通过 npm 创建默认的 `core` 项目:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm create react-admin-template@latest my-admin
|
|
54
|
+
cd my-admin
|
|
55
|
+
pnpm dev
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
需要完整能力源时添加 `--profile full`。npm 包只负责创建项目;React、PageForm、Table、
|
|
59
|
+
枚举和 API 生成工具最终都以源码形式进入新项目,不形成内部运行时包依赖。
|
|
60
|
+
|
|
61
|
+
查看当前仓库的完整演示:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm install
|
|
65
|
+
pnpm dev
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
打开终端输出的地址(默认 `http://localhost:8848`),使用演示账号
|
|
69
|
+
`13800000000`、密码 `admin123` 登录。登录后的 `/dashboard` 是演示导航页,可以进入表格
|
|
70
|
+
CRUD 与高级网格、PageForm 校验与联动、全局枚举与参数、文件上传预览、页面反馈与弹窗等
|
|
71
|
+
独立实操页面。开发端口被占用时 Vite 会明确报错;关闭旧的开发进程,或在 `.env.local`
|
|
72
|
+
中设置新的 `VITE_PORT` 后重新启动,避免误开旧服务页面。
|
|
73
|
+
|
|
74
|
+
从本仓库创建一个新项目:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pnpm install
|
|
78
|
+
pnpm scaffold:create --target ../my-admin
|
|
79
|
+
cd ../my-admin
|
|
80
|
+
cp tools/scaffold/init.example.json scaffold.init.json
|
|
81
|
+
pnpm scaffold:init --config scaffold.init.json
|
|
82
|
+
pnpm scaffold:init --config scaffold.init.json --write
|
|
83
|
+
pnpm scaffold:check
|
|
84
|
+
pnpm dev
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`scaffold:create` 默认生成 `core` 项目;确实需要完整能力源时使用
|
|
88
|
+
`--profile full`。从模板仓库为已有 core 项目加入能力:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pnpm scaffold:add --target ../my-admin --capability advancedTable
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
可选能力为 `activityStatus`、`advancedAuthentication`、`advancedTable`、`auditLogs`、
|
|
95
|
+
`featureFlags`、`optionalEditors`、`realtimeCollaboration`、`reporting` 和
|
|
96
|
+
`tenantWorkspace`。命令复制源码、测试与文档,并同步依赖和组件治理清单;不会安装第三方
|
|
97
|
+
业务 SDK。生成出的
|
|
98
|
+
`.scaffold-state.json` 记录档位、模板版本和已启用能力,应随项目源码提交,供后续能力添加
|
|
99
|
+
时校验来源一致性。
|
|
100
|
+
|
|
101
|
+
Node 版本由 `.nvmrc` 声明,包管理器版本由 `package.json#packageManager` 声明。
|
|
102
|
+
`scaffold:init` 默认只预览,只有 `--write` 才更新包名、公开运行时配置和 OpenAPI 服务清单;
|
|
103
|
+
它不会改动 Logo、认证 Adapter、业务 Feature 或环境密钥。
|
|
104
|
+
`scaffold:check` 会验证工具链、Vite 构建配置、运行时 JSON 和 OpenAPI 服务清单;原始模板
|
|
105
|
+
出现项目名、品牌和 demo 模式提醒属于预期,首次交付前执行 `pnpm scaffold:check --strict`
|
|
106
|
+
必须全部处理。
|
|
107
|
+
应用版本使用 `package.json#version`,已应用模板版本使用 `scaffold.template.json`。
|
|
108
|
+
当前只有首个模板基线,不维护没有真实迁移消费者的升级引擎;后续版本通过 Changelog、
|
|
109
|
+
独立 Git 提交和人工合并升级。详见
|
|
110
|
+
[`docs/template-versioning.md`](docs/template-versioning.md)。
|
|
111
|
+
脚手架默认以 `demo` 模式启动,不依赖后端。项目配置真实 OpenAPI 服务后再执行
|
|
112
|
+
`pnpm api` 生成客户端;生成行为应放在拥有可访问契约地址的独立 CI 任务中。
|
|
113
|
+
|
|
114
|
+
仅模板维护仓库包含创建器,发布说明位于
|
|
115
|
+
`packages/create-react-admin-template/README.md`。
|
|
116
|
+
在该包目录执行 `pnpm publish` 会自动生成模板并运行发布前验证;生成项目不包含该目录,
|
|
117
|
+
根应用不直接发布。
|
|
118
|
+
|
|
119
|
+
## 应用配置
|
|
120
|
+
|
|
121
|
+
浏览器先以 `no-store` 加载 `public/runtime-config.json`,通过 Zod 校验并冻结后才加载认证、
|
|
122
|
+
路由和应用模块。加载或校验失败时会展示独立诊断页,不会带着错误配置继续发送请求。
|
|
123
|
+
|
|
124
|
+
| 运行时字段 | 用途 |
|
|
125
|
+
| ------------------------------ | --------------------------------------------- |
|
|
126
|
+
| `app.strTitle` | 浏览器标题、登录页和侧边栏品牌名 |
|
|
127
|
+
| `app.strDescription` | 页面描述和侧边栏副标题 |
|
|
128
|
+
| `app.strLogoPath` | `public/` 下的 Logo 路径或公开图片地址 |
|
|
129
|
+
| `app.strStorageNamespace` | 认证、主题和 UI 偏好的浏览器存储命名空间 |
|
|
130
|
+
| `app.strMode` | `demo` 使用本地演示适配器;`connected` 接后端 |
|
|
131
|
+
| `api.strBaseUrl` | API 基础地址;空字符串表示当前站点 |
|
|
132
|
+
| `auth.strAudience` | 登录请求使用的认证 Audience |
|
|
133
|
+
| `auth.strClientId` | 登录和刷新请求使用的公开 OAuth Client ID |
|
|
134
|
+
| `auth.strScope` | 登录请求申请的 OAuth Scope |
|
|
135
|
+
| `auth.strSessionStorage` | `memory` 不落盘;`session` 仅保留在当前标签页 |
|
|
136
|
+
| `auth.strSignInPath` | 登录端点 |
|
|
137
|
+
| `auth.strRefreshPath` | Token 刷新端点 |
|
|
138
|
+
| `auth.strSignOutPath` | 注销端点 |
|
|
139
|
+
| `observability.bEnabled` | 是否向项目 Adapter 发送脱敏诊断事件 |
|
|
140
|
+
| `observability.strEnvironment` | local、test、staging、production 等部署环境 |
|
|
141
|
+
| `locale.strLocale` | 共享文案、格式化与后端元数据使用的语言 |
|
|
142
|
+
| `locale.strTimeZone` | 日期时间统一使用的 IANA 时区 |
|
|
143
|
+
|
|
144
|
+
下面的变量属于开发或构建环境,不应放入运行时 JSON:
|
|
145
|
+
|
|
146
|
+
| 构建变量 | 用途 |
|
|
147
|
+
| ------------------------------- | ----------------------------------------- |
|
|
148
|
+
| `VITE_PORT` | 本地 Vite 开发服务端口 |
|
|
149
|
+
| `VITE_DEV_HTTPS_CERT_PATH` | 可选的本地 HTTPS 证书路径 |
|
|
150
|
+
| `VITE_DEV_HTTPS_KEY_PATH` | 可选的本地 HTTPS 私钥路径 |
|
|
151
|
+
| `VITE_PUBLIC_PATH` | 应用部署基础路径 |
|
|
152
|
+
| `VITE_API_PROXY` | 本地同源 API 代理前缀 |
|
|
153
|
+
| `VITE_API_BASE_URL` | OpenAPI 与开发代理使用的后端地址 |
|
|
154
|
+
| `VITE_DEV_API_INSECURE_TLS` | 是否仅在开发代理中跳过上游 TLS 校验 |
|
|
155
|
+
| `VITE_HANDSONTABLE_LICENSE_KEY` | Handsontable 许可证;生产必须使用商业 key |
|
|
156
|
+
|
|
157
|
+
本机差异写入 `.env.local` 或 `.env.<mode>.local`。所有 `VITE_*` 值都会进入浏览器
|
|
158
|
+
产物;运行时 JSON 同样对浏览器公开,两者都不得存放密码、Token、Client Secret 或其他
|
|
159
|
+
密钥。部署时可以替换 `runtime-config.json` 而不重新构建 `dist` 或镜像。
|
|
160
|
+
|
|
161
|
+
Vite 配置不合法时,`dev` 和 `build` 会以 `BUILD_CONFIG_INVALID` 列出具体变量与修复动作,
|
|
162
|
+
不会只输出底层解析堆栈。浏览器运行时配置失败仍由独立诊断页展示稳定错误码和版本信息。
|
|
163
|
+
|
|
164
|
+
## API 与认证
|
|
165
|
+
|
|
166
|
+
后端服务模板位于 `src/api/config/services.json`,执行 `pnpm api` 后生成客户端到
|
|
167
|
+
`src/api/generated/<服务名>`。其中 `backend` 只是中性占位名;初始化项目时应替换
|
|
168
|
+
OpenAPI 地址。生成结果不提交,也不应手工修改。
|
|
169
|
+
|
|
170
|
+
`src/api/generated` 是 `swagger-typescript-api` 生成器拥有的工作目录。它虽然被 Git
|
|
171
|
+
忽略,但不是冗余目录,仓库清理不得手工删除其中的客户端;需要刷新时只能执行
|
|
172
|
+
`pnpm api`。生成脚本先在临时目录完成全部服务,再原子替换正式目录,因此下载或生成
|
|
173
|
+
失败时必须保留上一次成功产物。
|
|
174
|
+
|
|
175
|
+
业务源码必须通过生成客户端访问后端,ESLint 会阻止直接使用 `fetch` 或 Axios 请求方法。
|
|
176
|
+
`src/api/hooks` 负责 Authorization、并发 Token 刷新、401 会话清理和统一错误处理;
|
|
177
|
+
`src/api/authClient.ts` 只封装登录、刷新和退出三个认证端点,避免基础壳层加载完整业务
|
|
178
|
+
客户端。新项目更换认证协议时,应从该适配器和 `src/api/authSession.ts` 开始。
|
|
179
|
+
|
|
180
|
+
实例化生成客户端时,应将 `objAppConfig.api.strBaseUrl` 传给客户端的 `baseURL`,确保
|
|
181
|
+
业务请求和认证请求使用同一份运行时 API 地址。
|
|
182
|
+
|
|
183
|
+
### 标准错误与请求关联
|
|
184
|
+
|
|
185
|
+
所有生成客户端和认证客户端都会在请求前写入 `X-Request-ID`。调用方已经提供合法 ID
|
|
186
|
+
时保持不变,否则使用浏览器生成的新 ID;响应优先采用服务端的 `X-Request-ID`,其次
|
|
187
|
+
读取 `X-Correlation-ID` 或响应体中的 `requestId/traceId`,最后回退到客户端 ID。
|
|
188
|
+
|
|
189
|
+
除主动取消外,请求失败统一抛出 `ApiError`:
|
|
190
|
+
|
|
191
|
+
| 字段 | 含义 |
|
|
192
|
+
| -------------- | ------------------------------------------------------------ |
|
|
193
|
+
| `message` | 已限制长度并过滤控制字符的用户文案 |
|
|
194
|
+
| `strCode` | 后端业务码、`HTTP_<status>` 或稳定客户端错误码 |
|
|
195
|
+
| `strKind` | `http`、`network`、`timeout`、`client` 或 `invalid_response` |
|
|
196
|
+
| `nStatus` | 可选 HTTP 状态码 |
|
|
197
|
+
| `strRequestId` | 服务端或客户端请求关联 ID |
|
|
198
|
+
| `objDetails` | 后端明确提供的 `details/errors`,用于字段错误等业务处理 |
|
|
199
|
+
| `bRetriable` | 是否适合再次尝试;只是提示,不会自动重放请求 |
|
|
200
|
+
|
|
201
|
+
`ApiError` 不保存 Axios config、Authorization 或完整原始响应。全局 Toast 只展示安全文案和
|
|
202
|
+
请求 ID,不展开 `objDetails`;取消请求继续保留 Axios `CanceledError`,业务代码可以正常
|
|
203
|
+
区分用户取消和真实失败。
|
|
204
|
+
|
|
205
|
+
后端应原样接收或重新生成 `X-Request-ID`,将最终 ID 写回响应头和服务端日志。跨域部署还
|
|
206
|
+
必须返回:
|
|
207
|
+
|
|
208
|
+
```http
|
|
209
|
+
Access-Control-Expose-Headers: X-Request-ID, X-Correlation-ID
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
请求 ID 只能用于关联日志,不能放入用户信息、Token、租户密钥或其他敏感内容。
|
|
213
|
+
|
|
214
|
+
## 可观测性、脱敏与版本
|
|
215
|
+
|
|
216
|
+
`src/observability` 提供供应商无关的 Adapter,统一覆盖浏览器未捕获异常、未处理 Promise、
|
|
217
|
+
路由渲染错误、应用启动和 API 错误。每个事件会自动附加 `package.json` 版本、Git Commit、
|
|
218
|
+
构建时间及 `runtime-config.json` 中的部署环境;侧边栏和错误页也会显示可检索的版本信息。
|
|
219
|
+
|
|
220
|
+
生产环境默认没有第三方 SDK。项目在 `src/config/observabilityAdapter.ts` 接入 Sentry、
|
|
221
|
+
OpenTelemetry 或企业日志平台,并在运行时配置中开启 `observability.bEnabled`。Adapter
|
|
222
|
+
只接收 `IObservabilityEvent`,不得要求基础层传递原始 Axios 请求、响应或用户对象:
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
import type { IObservabilityAdapter } from '@/observability'
|
|
226
|
+
|
|
227
|
+
export const objProjectObservabilityAdapter: IObservabilityAdapter = {
|
|
228
|
+
fnCaptureEvent(objEvent) {
|
|
229
|
+
objMonitoringSdk.captureEvent(objEvent)
|
|
230
|
+
},
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
日志上下文采用默认拒绝策略:只允许请求 ID、HTTP 状态、稳定错误码、错误类别、重试
|
|
235
|
+
标记、路由 ID 和生命周期阶段等声明过的标量字段。Token、Authorization、Cookie、
|
|
236
|
+
密码、邮箱、手机号、请求体、响应体、嵌套对象和未知 Key 均不会进入 Adapter;错误消息
|
|
237
|
+
与调用栈还会执行二次脱敏和长度限制。事件自动包含版本和环境,但不发送 URL、DOM 节点
|
|
238
|
+
或用户数据。`bEnabled=false` 时完全不产生诊断事件,供应商
|
|
239
|
+
Adapter 抛错或拒绝 Promise 也不会影响应用运行。
|
|
240
|
+
|
|
241
|
+
浏览器响应头、CSP 变更和依赖审计规则见
|
|
242
|
+
[`docs/browser-security.md`](docs/browser-security.md)。
|
|
243
|
+
|
|
244
|
+
版本和 Commit 在构建时写入静态产物,部署环境在运行时注入,因此同一不可变产物晋级
|
|
245
|
+
到不同环境时不需要重新构建。上述字段都是公开诊断信息,不得把分支凭据、流水线 Token
|
|
246
|
+
或其他密钥作为版本字段。
|
|
247
|
+
|
|
248
|
+
生产运行时配置应使用 `memory`,Bearer Token 不写入 Web Storage,刷新页面后需要重新
|
|
249
|
+
建立会话。`session` 只适合可信的内部演示环境。若后端支持 BFF/HttpOnly Cookie,应替换认证
|
|
250
|
+
适配器并由服务端管理刷新会话;前端环境变量无法把 JavaScript 可见 Token 变成 HttpOnly。
|
|
251
|
+
|
|
252
|
+
脚手架不预置用户、角色、组织等业务 Repository。初始化项目时,应在自己的 Feature
|
|
253
|
+
中定义领域契约,并使用生成的 OpenAPI 客户端实现 connected Adapter;业务页面不能
|
|
254
|
+
直接依赖演示数据,也不能在连接失败时回退到 demo 数据。
|
|
255
|
+
|
|
256
|
+
### 全局枚举目录
|
|
257
|
+
|
|
258
|
+
所有由后端管理、需要跨页面展示的枚举统一通过 `src/api/enums` 消费。后端接口返回完整
|
|
259
|
+
枚举目录,TanStack Query 按语言负责缓存、并发去重、取消和失效;不要再把目录复制到
|
|
260
|
+
Zustand,也不要在 Feature 内维护重复的 `value/label` 数组。
|
|
261
|
+
|
|
262
|
+
后端目录契约为 `/api/v1/meta/enums`,响应 `data` 包含 `version`、`locale` 和以稳定
|
|
263
|
+
Enum Key 为索引的 `enums`。项目生成客户端后,在应用组合点完成一次结构化适配:
|
|
264
|
+
|
|
265
|
+
```tsx
|
|
266
|
+
const objEnumApi = fnConfigureApiClient(new Api<void>())
|
|
267
|
+
const objEnumCatalogSource = fnCreateEnumCatalogSource(
|
|
268
|
+
async ({ objSignal, strLocale }) => {
|
|
269
|
+
const objResponse = await objEnumApi.api.apiV1MetaEnumsGet(
|
|
270
|
+
{ locale: strLocale },
|
|
271
|
+
{ signal: objSignal }
|
|
272
|
+
)
|
|
273
|
+
return objResponse.data
|
|
274
|
+
}
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
objRoot.render(
|
|
278
|
+
<Application
|
|
279
|
+
objMetadata={{ objEnumCatalog: { objSource: objEnumCatalogSource } }}
|
|
280
|
+
/>
|
|
281
|
+
)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
`Application` 默认只在认证完成后加载枚举,自动把当前租户和会话权限版本纳入缓存
|
|
285
|
+
作用域。公共枚举接口可通过 `objMetadata.objEnumCatalog.bIsEnabled` 显式启用;存在工作
|
|
286
|
+
空间或产品模块时,通过 `objMetadata.objEnumCatalog.objScope` 增加 `strWorkspaceId` 或
|
|
287
|
+
`strNamespace`。作用域只能包含稳定
|
|
288
|
+
标识,禁止放入 Access Token 等凭据。
|
|
289
|
+
|
|
290
|
+
Feature 使用 `useEnum('domain.resource.status')` 获取单个枚举的标准选项和查询状态;
|
|
291
|
+
表格、表单、筛选器和状态展示都从同一结果派生。需要枚举管理页或批量转换时,使用
|
|
292
|
+
`useEnumCatalog()` 获取 `arrEntries`、`arrKeys`、`fnGetOptions`、`fnGetValues`、
|
|
293
|
+
`fnGetLabel`、`fnGetLabels` 和 `fnGetValue`。枚举值原样保留后端的 `string`、`number`
|
|
294
|
+
或 `boolean` 类型;停用选项继续展示历史文案,但通过 `disabled` 阻止表单和表格产生
|
|
295
|
+
新的选择。
|
|
296
|
+
|
|
297
|
+
普通文本和状态展示可直接使用 `EnumText`、`EnumBadge`。`EnumBadge` 只接受设计系统
|
|
298
|
+
允许的语义色调,不会把后端颜色字段当作 CSS 执行:
|
|
299
|
+
|
|
300
|
+
```tsx
|
|
301
|
+
<EnumText strEnumKey='activity.status' objValue={objRow.status} />
|
|
302
|
+
<EnumBadge strEnumKey='activity.status' objValue={objRow.status} />
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
React 外部可用 `fnGetCachedEnumCatalog(objQueryClient)` 同步读取缓存,再配合
|
|
306
|
+
`fnGetEnumKeys`、`fnGetEnumOptions`、`fnGetEnumValues` 等纯函数;路由 Loader 仍使用
|
|
307
|
+
`fnEnsureEnumCatalog` 确保目录已加载。后端枚举变更后调用
|
|
308
|
+
`fnInvalidateEnumCatalog(objQueryClient)`,不能在客户端覆盖后端值或显示文本。
|
|
309
|
+
|
|
310
|
+
同一个枚举 Key 内的 Value 和本地化 Label 都必须唯一;目录不满足契约时会抛出带
|
|
311
|
+
`strCode` 的 `EnumCatalogError`,避免 Label 反查静默选择错误值。
|
|
312
|
+
|
|
313
|
+
### 全局参数与元数据编排
|
|
314
|
+
|
|
315
|
+
跨 Feature 的后端公开参数统一由 `src/api/parameters` 管理,支持 `boolean`、有限
|
|
316
|
+
`number`、`string` 和 JSON 值。目录在进入 TanStack Query 缓存前执行类型、语言和版本
|
|
317
|
+
校验,并按租户、权限版本、工作空间、命名空间和语言隔离。禁止把全局参数复制到 Zustand,
|
|
318
|
+
也禁止通过参数接口向浏览器下发秘密。
|
|
319
|
+
|
|
320
|
+
React 中可使用 `useBooleanGlobalParameter`、`useNumberGlobalParameter`、
|
|
321
|
+
`useStringGlobalParameter`、`useJsonGlobalParameter`、`useGlobalParameter` 和
|
|
322
|
+
`useGlobalParameterCatalog`。React 外部使用 `fnEnsureGlobalParameters`、
|
|
323
|
+
`fnGetCachedGlobalParameters` 及各类型读取函数;维护完成后通过
|
|
324
|
+
`fnInvalidateGlobalParameters` 统一失效。
|
|
325
|
+
|
|
326
|
+
`MetadataProvider` 在认证完成后并行装配枚举和参数。登录、租户、权限版本或语言变化会
|
|
327
|
+
自然切换作用域;单个资源失败不会阻塞 Router 和无关页面。需要状态和重试时分别使用
|
|
328
|
+
`useEnumCatalog()` 与 `useGlobalParameterCatalog()`,避免维护重复的聚合状态。生成客户端
|
|
329
|
+
适配和完整后端契约见
|
|
330
|
+
[`docs/scaffold-guide.md`](docs/scaffold-guide.md#全局参数与元数据初始化)。
|
|
331
|
+
|
|
332
|
+
## 目录
|
|
333
|
+
|
|
334
|
+
```text
|
|
335
|
+
src/
|
|
336
|
+
config/ 应用级配置
|
|
337
|
+
router/ 路由组合、守卫和回跳策略
|
|
338
|
+
api/ OpenAPI、请求生命周期和认证适配
|
|
339
|
+
features/ 认证、错误页以及新项目自己的业务 Feature
|
|
340
|
+
components/ 通用组件和 shadcn/ui primitives
|
|
341
|
+
context/ 全局 React Provider
|
|
342
|
+
layouts/ 应用布局
|
|
343
|
+
stores/ 跨 Feature 的持久化客户端状态
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## 验证
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
pnpm verify
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
该命令依次执行代码规范、组件源码治理、死代码检查、真实 Chromium 浏览器测试(包含 axe
|
|
353
|
+
与核心键盘旅程)、类型检查和生产构建。提交信息遵循 Conventional Commits;生成的
|
|
354
|
+
`dist/`、本地缓存、凭据和私有环境配置不得提交。
|
|
355
|
+
|
|
356
|
+
内建组件升级前,使用只读差异命令核对正确来源、前向 revision 和纳入范围:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
pnpm components:diff -- \
|
|
360
|
+
--component AppTable \
|
|
361
|
+
--source-root /absolute/path/to/table-component
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
命令不会同步文件或更新 revision。完整流程见
|
|
365
|
+
[`docs/component-source-governance.md`](docs/component-source-governance.md)。
|
|
366
|
+
|
|
367
|
+
## License
|
|
368
|
+
|
|
369
|
+
当前仓库尚未声明对外分发许可证。发布或开源前需确认仓库许可证,并单独确认
|
|
370
|
+
仅在启用高级 `AppTable`(Handsontable)时确认其商业使用授权;生产构建不会接受
|
|
371
|
+
评估许可证。组件来源、同步和外部分发门禁见
|
|
372
|
+
[`docs/component-source-governance.md`](docs/component-source-governance.md)。
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Plugin, Rolldown } from 'vite'
|
|
2
|
+
|
|
3
|
+
interface IAppTableBuildGuardOptions {
|
|
4
|
+
/** Vite 合并后的 Handsontable 许可证,不会写入诊断信息。 */
|
|
5
|
+
strLicenseKey?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const strAdvancedTableVendorChunk = 'advanced-table-vendor'
|
|
9
|
+
const strHandsontableEvaluationLicense = 'non-commercial-and-evaluation'
|
|
10
|
+
|
|
11
|
+
function fnNormalizeModuleId(strModuleId: string) {
|
|
12
|
+
return strModuleId.replaceAll('\\', '/')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function fnIsAppTableSourceModule(strModuleId: string) {
|
|
16
|
+
return fnNormalizeModuleId(strModuleId).includes('/src/components/AppTable/')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function fnIsHandsontableModule(strModuleId: string) {
|
|
20
|
+
const strNormalizedId = fnNormalizeModuleId(strModuleId)
|
|
21
|
+
return (
|
|
22
|
+
strNormalizedId.includes('/node_modules/handsontable/') ||
|
|
23
|
+
strNormalizedId.includes('/node_modules/.pnpm/handsontable@')
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function fnChunkContainsAdvancedTable(objChunk: Rolldown.OutputChunk) {
|
|
28
|
+
return Object.keys(objChunk.modules).some(
|
|
29
|
+
(strModuleId) =>
|
|
30
|
+
fnIsAppTableSourceModule(strModuleId) ||
|
|
31
|
+
fnIsHandsontableModule(strModuleId)
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function fnCollectInitialChunks(objBundle: Rolldown.OutputBundle) {
|
|
36
|
+
const objChunks = new Map(
|
|
37
|
+
Object.values(objBundle)
|
|
38
|
+
.filter(
|
|
39
|
+
(objOutput): objOutput is Rolldown.OutputChunk =>
|
|
40
|
+
objOutput.type === 'chunk'
|
|
41
|
+
)
|
|
42
|
+
.map((objChunk) => [objChunk.fileName, objChunk])
|
|
43
|
+
)
|
|
44
|
+
const arrPendingFiles = [...objChunks.values()]
|
|
45
|
+
.filter((objChunk) => objChunk.isEntry)
|
|
46
|
+
.map((objChunk) => objChunk.fileName)
|
|
47
|
+
const objInitialFiles = new Set<string>()
|
|
48
|
+
|
|
49
|
+
while (arrPendingFiles.length > 0) {
|
|
50
|
+
const strFileName = arrPendingFiles.pop()
|
|
51
|
+
if (!strFileName || objInitialFiles.has(strFileName)) continue
|
|
52
|
+
objInitialFiles.add(strFileName)
|
|
53
|
+
const objChunk = objChunks.get(strFileName)
|
|
54
|
+
if (objChunk) arrPendingFiles.push(...objChunk.imports)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return [...objInitialFiles]
|
|
58
|
+
.map((strFileName) => objChunks.get(strFileName))
|
|
59
|
+
.filter((objChunk): objChunk is Rolldown.OutputChunk => Boolean(objChunk))
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** 创建高级表格生产许可证与首屏静态依赖守卫。 */
|
|
63
|
+
export function fnCreateAppTableBuildGuard({
|
|
64
|
+
strLicenseKey,
|
|
65
|
+
}: IAppTableBuildGuardOptions): Plugin {
|
|
66
|
+
return {
|
|
67
|
+
name: 'enterprise:app-table-build-guard',
|
|
68
|
+
apply: 'build',
|
|
69
|
+
generateBundle(_objOptions, objBundle) {
|
|
70
|
+
const arrChunks = Object.values(objBundle).filter(
|
|
71
|
+
(objOutput): objOutput is Rolldown.OutputChunk =>
|
|
72
|
+
objOutput.type === 'chunk'
|
|
73
|
+
)
|
|
74
|
+
if (!arrChunks.some(fnChunkContainsAdvancedTable)) return
|
|
75
|
+
|
|
76
|
+
if (
|
|
77
|
+
!strLicenseKey ||
|
|
78
|
+
strLicenseKey === strHandsontableEvaluationLicense
|
|
79
|
+
) {
|
|
80
|
+
this.error(
|
|
81
|
+
'[APP_TABLE_LICENSE_REQUIRED] 生产产物包含 AppTable,' +
|
|
82
|
+
'必须配置 VITE_HANDSONTABLE_LICENSE_KEY 商业许可证。'
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (
|
|
87
|
+
fnCollectInitialChunks(objBundle).some(fnChunkContainsAdvancedTable)
|
|
88
|
+
) {
|
|
89
|
+
this.error(
|
|
90
|
+
'[APP_TABLE_EAGER_LOAD] AppTable 或 Handsontable 进入了首屏静态依赖。' +
|
|
91
|
+
'请仅在按需加载的 Feature 路由中导入 AppTable。'
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** 将 Handsontable 固定到高级表格异步 Vendor Chunk。 */
|
|
99
|
+
export function fnResolveAdvancedTableManualChunk(strModuleId: string) {
|
|
100
|
+
if (fnIsHandsontableModule(strModuleId)) {
|
|
101
|
+
return strAdvancedTableVendorChunk
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import path from 'path'
|
|
2
|
+
import { existsSync } from 'node:fs'
|
|
3
|
+
|
|
4
|
+
interface IBuildConfigIssue {
|
|
5
|
+
/** 对应的公开环境变量名。 */
|
|
6
|
+
strKey: string
|
|
7
|
+
/** 不回显配置值的失败原因。 */
|
|
8
|
+
strProblem: string
|
|
9
|
+
/** 开发者可以直接执行的修复动作。 */
|
|
10
|
+
strFix: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface IResolveBuildEnvironmentOptions {
|
|
14
|
+
/** Vite 按当前 Mode 合并后的公开环境变量。 */
|
|
15
|
+
objEnv: Record<string, string>
|
|
16
|
+
/** 当前执行的是开发服务还是生产构建。 */
|
|
17
|
+
strCommand: 'build' | 'serve'
|
|
18
|
+
/** 用于解析证书等相对文件路径的项目根目录。 */
|
|
19
|
+
strProjectRoot: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function fnIsSafeAbsoluteHttpUrl(strValue: string) {
|
|
23
|
+
try {
|
|
24
|
+
const objUrl = new URL(strValue)
|
|
25
|
+
return (
|
|
26
|
+
['http:', 'https:'].includes(objUrl.protocol) &&
|
|
27
|
+
!objUrl.username &&
|
|
28
|
+
!objUrl.password
|
|
29
|
+
)
|
|
30
|
+
} catch {
|
|
31
|
+
return false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function fnIsValidPublicPath(strValue: string) {
|
|
36
|
+
if (strValue.startsWith('/')) return strValue.endsWith('/')
|
|
37
|
+
return fnIsSafeAbsoluteHttpUrl(strValue) && strValue.endsWith('/')
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function fnThrowBuildConfigIssues(arrIssues: IBuildConfigIssue[]) {
|
|
41
|
+
if (arrIssues.length === 0) return
|
|
42
|
+
|
|
43
|
+
const strDetails = arrIssues
|
|
44
|
+
.map(
|
|
45
|
+
(objIssue) =>
|
|
46
|
+
`- ${objIssue.strKey}: ${objIssue.strProblem}\n 修复:${objIssue.strFix}`
|
|
47
|
+
)
|
|
48
|
+
.join('\n')
|
|
49
|
+
const objError = new Error(
|
|
50
|
+
`[BUILD_CONFIG_INVALID] Vite 配置校验失败。\n${strDetails}\n` +
|
|
51
|
+
'修正后执行 pnpm scaffold:check,再重新启动或构建。'
|
|
52
|
+
)
|
|
53
|
+
objError.name = 'BuildConfigError'
|
|
54
|
+
throw objError
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** 校验并规范化 Vite 构建与开发服务器使用的环境变量。 */
|
|
58
|
+
export function fnResolveBuildEnvironment({
|
|
59
|
+
objEnv,
|
|
60
|
+
strCommand,
|
|
61
|
+
strProjectRoot,
|
|
62
|
+
}: IResolveBuildEnvironmentOptions) {
|
|
63
|
+
const arrIssues: IBuildConfigIssue[] = []
|
|
64
|
+
const strPublicPath = objEnv.VITE_PUBLIC_PATH?.trim() ?? ''
|
|
65
|
+
const nPort = Number(objEnv.VITE_PORT)
|
|
66
|
+
const strApiBaseUrl = objEnv.VITE_API_BASE_URL?.trim()
|
|
67
|
+
const strApiProxy = objEnv.VITE_API_PROXY?.trim()
|
|
68
|
+
const strHttpsCertPath = objEnv.VITE_DEV_HTTPS_CERT_PATH?.trim()
|
|
69
|
+
const strHttpsKeyPath = objEnv.VITE_DEV_HTTPS_KEY_PATH?.trim()
|
|
70
|
+
const strInsecureTls = objEnv.VITE_DEV_API_INSECURE_TLS?.trim().toLowerCase()
|
|
71
|
+
const strHandsontableLicenseKey = objEnv.VITE_HANDSONTABLE_LICENSE_KEY?.trim()
|
|
72
|
+
|
|
73
|
+
if (!strPublicPath || !fnIsValidPublicPath(strPublicPath)) {
|
|
74
|
+
arrIssues.push({
|
|
75
|
+
strKey: 'VITE_PUBLIC_PATH',
|
|
76
|
+
strProblem: '必须是以 / 开头、以 / 结尾的路径或安全的 HTTP(S) URL。',
|
|
77
|
+
strFix: '在 .env 或对应 Mode 文件中配置,例如 VITE_PUBLIC_PATH=/。',
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (strCommand === 'serve') {
|
|
82
|
+
if (!Number.isInteger(nPort) || nPort < 1 || nPort > 65_535) {
|
|
83
|
+
arrIssues.push({
|
|
84
|
+
strKey: 'VITE_PORT',
|
|
85
|
+
strProblem: '开发服务端口必须是 1 到 65535 之间的整数。',
|
|
86
|
+
strFix: '在 .env.local 中设置未被占用的端口,例如 VITE_PORT=8848。',
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
if (strApiBaseUrl && !fnIsSafeAbsoluteHttpUrl(strApiBaseUrl)) {
|
|
90
|
+
arrIssues.push({
|
|
91
|
+
strKey: 'VITE_API_BASE_URL',
|
|
92
|
+
strProblem: '必须是不包含用户名或密码的绝对 HTTP(S) URL。',
|
|
93
|
+
strFix: '在 .env.local 中配置可访问的开发后端地址。',
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
if (
|
|
97
|
+
strApiProxy &&
|
|
98
|
+
!/^\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$/.test(strApiProxy)
|
|
99
|
+
) {
|
|
100
|
+
arrIssues.push({
|
|
101
|
+
strKey: 'VITE_API_PROXY',
|
|
102
|
+
strProblem: '必须是以 / 开头且不包含查询参数或片段的代理前缀。',
|
|
103
|
+
strFix: '使用类似 /api 的路径,或留空以禁用开发代理。',
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
if (strInsecureTls && !['false', 'true'].includes(strInsecureTls)) {
|
|
107
|
+
arrIssues.push({
|
|
108
|
+
strKey: 'VITE_DEV_API_INSECURE_TLS',
|
|
109
|
+
strProblem: '只接受 true 或 false。',
|
|
110
|
+
strFix: '仅本地自签名后端需要设为 true,其他情况使用 false。',
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
if (Boolean(strHttpsCertPath) !== Boolean(strHttpsKeyPath)) {
|
|
114
|
+
arrIssues.push({
|
|
115
|
+
strKey: 'VITE_DEV_HTTPS_CERT_PATH / VITE_DEV_HTTPS_KEY_PATH',
|
|
116
|
+
strProblem: '本地 HTTPS 证书和私钥必须同时配置。',
|
|
117
|
+
strFix: '同时填写两个文件路径,或同时留空关闭本地 HTTPS。',
|
|
118
|
+
})
|
|
119
|
+
} else {
|
|
120
|
+
for (const [strKey, strFilePath] of [
|
|
121
|
+
['VITE_DEV_HTTPS_CERT_PATH', strHttpsCertPath],
|
|
122
|
+
['VITE_DEV_HTTPS_KEY_PATH', strHttpsKeyPath],
|
|
123
|
+
] as const) {
|
|
124
|
+
if (
|
|
125
|
+
strFilePath &&
|
|
126
|
+
!existsSync(path.resolve(strProjectRoot, strFilePath))
|
|
127
|
+
) {
|
|
128
|
+
arrIssues.push({
|
|
129
|
+
strKey,
|
|
130
|
+
strProblem: '配置的文件不存在或当前进程不可访问。',
|
|
131
|
+
strFix: '改为相对项目根目录的有效文件路径,或清空两项配置。',
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
fnThrowBuildConfigIssues(arrIssues)
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
bApiInsecureTls: strInsecureTls === 'true',
|
|
142
|
+
nPort,
|
|
143
|
+
strApiBaseUrl,
|
|
144
|
+
strApiProxy,
|
|
145
|
+
strHandsontableLicenseKey,
|
|
146
|
+
strHttpsCertPath,
|
|
147
|
+
strHttpsKeyPath,
|
|
148
|
+
strPublicPath,
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @type {import('@commitlint/types').UserConfig} */
|
|
2
|
+
export default {
|
|
3
|
+
extends: ['@commitlint/config-conventional'],
|
|
4
|
+
rules: {
|
|
5
|
+
'body-leading-blank': [2, 'always'],
|
|
6
|
+
'footer-leading-blank': [1, 'always'],
|
|
7
|
+
'header-max-length': [2, 'always', 108],
|
|
8
|
+
'subject-empty': [2, 'never'],
|
|
9
|
+
'type-empty': [2, 'never'],
|
|
10
|
+
'type-enum': [
|
|
11
|
+
2,
|
|
12
|
+
'always',
|
|
13
|
+
[
|
|
14
|
+
'feat',
|
|
15
|
+
'fix',
|
|
16
|
+
'perf',
|
|
17
|
+
'style',
|
|
18
|
+
'docs',
|
|
19
|
+
'test',
|
|
20
|
+
'refactor',
|
|
21
|
+
'build',
|
|
22
|
+
'ci',
|
|
23
|
+
'chore',
|
|
24
|
+
'revert',
|
|
25
|
+
'wip',
|
|
26
|
+
'workflow',
|
|
27
|
+
'types',
|
|
28
|
+
'release',
|
|
29
|
+
],
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/styles/index.css",
|
|
9
|
+
"baseColor": "slate",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "@/components",
|
|
15
|
+
"utils": "@/lib/utils",
|
|
16
|
+
"ui": "@/components/ui",
|
|
17
|
+
"lib": "@/lib",
|
|
18
|
+
"hooks": "@/hooks"
|
|
19
|
+
},
|
|
20
|
+
"iconLibrary": "lucide"
|
|
21
|
+
}
|