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,113 @@
|
|
|
1
|
+
import { queryOptions, type QueryClient } from '@tanstack/react-query'
|
|
2
|
+
import {
|
|
3
|
+
fnCreateAppQueryKeys,
|
|
4
|
+
type IAppQueryScope,
|
|
5
|
+
type TAppQueryParameters,
|
|
6
|
+
} from '@/api/query'
|
|
7
|
+
import { fnNormalizeAuditLogFilter } from './model'
|
|
8
|
+
import type { IAuditLogFilter, IAuditLogPage, IAuditLogSource } from './types'
|
|
9
|
+
|
|
10
|
+
const strAuditLogFeatureKey = 'auditLogs'
|
|
11
|
+
const strAuditLogResourceKey = 'entries'
|
|
12
|
+
const nAuditLogListStaleTimeMs = 15_000
|
|
13
|
+
const nAuditLogDetailStaleTimeMs = 30_000
|
|
14
|
+
const nAuditLogGcTimeMs = 5 * 60_000
|
|
15
|
+
|
|
16
|
+
function fnCreateAuditLogQueryParameters(
|
|
17
|
+
objFilter: ReturnType<typeof fnNormalizeAuditLogFilter>
|
|
18
|
+
): TAppQueryParameters {
|
|
19
|
+
const objParameters: Record<string, boolean | number | string | null> = {
|
|
20
|
+
nPageSize: objFilter.nPageSize,
|
|
21
|
+
}
|
|
22
|
+
Object.entries(objFilter).forEach(([strKey, objValue]) => {
|
|
23
|
+
if (objValue !== undefined) objParameters[strKey] = objValue
|
|
24
|
+
})
|
|
25
|
+
return Object.freeze(objParameters)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** 返回当前身份与筛选条件对应的精确审计列表 Key。 */
|
|
29
|
+
export function fnAuditLogListQueryKey(
|
|
30
|
+
objScope: IAppQueryScope,
|
|
31
|
+
objFilter: IAuditLogFilter
|
|
32
|
+
) {
|
|
33
|
+
const objNormalizedFilter = fnNormalizeAuditLogFilter(objFilter)
|
|
34
|
+
return fnCreateAppQueryKeys(strAuditLogFeatureKey, objScope).fnList(
|
|
35
|
+
strAuditLogResourceKey,
|
|
36
|
+
fnCreateAuditLogQueryParameters(objNormalizedFilter)
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** 返回当前身份与审计事实 ID 对应的精确详情 Key。 */
|
|
41
|
+
export function fnAuditLogDetailQueryKey(
|
|
42
|
+
objScope: IAppQueryScope,
|
|
43
|
+
strAuditLogId: string
|
|
44
|
+
) {
|
|
45
|
+
return fnCreateAppQueryKeys(strAuditLogFeatureKey, objScope).fnDetail(
|
|
46
|
+
strAuditLogResourceKey,
|
|
47
|
+
strAuditLogId
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** 创建当前身份作用域下的审计列表 Query 配置。 */
|
|
52
|
+
export function fnAuditLogListQueryOptions(
|
|
53
|
+
objSource: IAuditLogSource,
|
|
54
|
+
objScope: IAppQueryScope,
|
|
55
|
+
objFilter: IAuditLogFilter
|
|
56
|
+
) {
|
|
57
|
+
const objNormalizedFilter = fnNormalizeAuditLogFilter(objFilter)
|
|
58
|
+
return queryOptions({
|
|
59
|
+
gcTime: nAuditLogGcTimeMs,
|
|
60
|
+
queryFn: ({ signal: objSignal }) =>
|
|
61
|
+
objSource.fnList({
|
|
62
|
+
objFilter: objNormalizedFilter,
|
|
63
|
+
objScope,
|
|
64
|
+
objSignal,
|
|
65
|
+
}),
|
|
66
|
+
queryKey: fnAuditLogListQueryKey(objScope, objNormalizedFilter),
|
|
67
|
+
staleTime: nAuditLogListStaleTimeMs,
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** 创建当前身份作用域下的单个审计详情 Query 配置。 */
|
|
72
|
+
export function fnAuditLogDetailQueryOptions(
|
|
73
|
+
objSource: IAuditLogSource,
|
|
74
|
+
objScope: IAppQueryScope,
|
|
75
|
+
strAuditLogId: string
|
|
76
|
+
) {
|
|
77
|
+
return queryOptions({
|
|
78
|
+
gcTime: nAuditLogGcTimeMs,
|
|
79
|
+
queryFn: ({ signal: objSignal }) =>
|
|
80
|
+
objSource.fnGetDetail({ objScope, objSignal, strAuditLogId }),
|
|
81
|
+
queryKey: fnAuditLogDetailQueryKey(objScope, strAuditLogId),
|
|
82
|
+
staleTime: nAuditLogDetailStaleTimeMs,
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** 使当前身份作用域内的审计列表、详情或全部缓存失效。 */
|
|
87
|
+
export function fnInvalidateAuditLogs(
|
|
88
|
+
objQueryClient: QueryClient,
|
|
89
|
+
objScope: IAppQueryScope,
|
|
90
|
+
strAuditLogId?: string
|
|
91
|
+
) {
|
|
92
|
+
const objKeys = fnCreateAppQueryKeys(strAuditLogFeatureKey, objScope)
|
|
93
|
+
if (strAuditLogId) {
|
|
94
|
+
return objQueryClient.invalidateQueries({
|
|
95
|
+
exact: true,
|
|
96
|
+
queryKey: objKeys.fnDetail(strAuditLogResourceKey, strAuditLogId),
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
return objQueryClient.invalidateQueries({
|
|
100
|
+
queryKey: objKeys.fnResource(strAuditLogResourceKey),
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** 从 QueryClient 同步读取一个精确审计列表页。 */
|
|
105
|
+
export function fnGetCachedAuditLogPage(
|
|
106
|
+
objQueryClient: QueryClient,
|
|
107
|
+
objScope: IAppQueryScope,
|
|
108
|
+
objFilter: IAuditLogFilter
|
|
109
|
+
): IAuditLogPage | undefined {
|
|
110
|
+
return objQueryClient.getQueryData<IAuditLogPage>(
|
|
111
|
+
fnAuditLogListQueryKey(objScope, objFilter)
|
|
112
|
+
)
|
|
113
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useQuery } from '@tanstack/react-query'
|
|
2
|
+
import { useAppQueryScope } from '@/api/query'
|
|
3
|
+
import {
|
|
4
|
+
fnAuditLogDetailQueryOptions,
|
|
5
|
+
fnAuditLogListQueryOptions,
|
|
6
|
+
} from './query'
|
|
7
|
+
import type {
|
|
8
|
+
IUseAuditLogDetailOptions,
|
|
9
|
+
IUseAuditLogListOptions,
|
|
10
|
+
} from './types'
|
|
11
|
+
|
|
12
|
+
/** 查询当前身份有权查看的审计列表;远端错误与权限错误保持可观察。 */
|
|
13
|
+
export function useAuditLogList({
|
|
14
|
+
bIsEnabled = true,
|
|
15
|
+
objFilter = {},
|
|
16
|
+
objSource,
|
|
17
|
+
}: IUseAuditLogListOptions) {
|
|
18
|
+
const objScope = useAppQueryScope()
|
|
19
|
+
return useQuery({
|
|
20
|
+
...fnAuditLogListQueryOptions(objSource, objScope, objFilter),
|
|
21
|
+
enabled: bIsEnabled,
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** 查询一个后端已授权且已脱敏的审计详情。 */
|
|
26
|
+
export function useAuditLogDetail({
|
|
27
|
+
bIsEnabled = true,
|
|
28
|
+
objSource,
|
|
29
|
+
strAuditLogId,
|
|
30
|
+
}: IUseAuditLogDetailOptions) {
|
|
31
|
+
const objScope = useAppQueryScope()
|
|
32
|
+
return useQuery({
|
|
33
|
+
...fnAuditLogDetailQueryOptions(objSource, objScope, strAuditLogId),
|
|
34
|
+
enabled: bIsEnabled,
|
|
35
|
+
})
|
|
36
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AuditLogError } from './errors'
|
|
2
|
+
import {
|
|
3
|
+
fnNormalizeAuditLogDetail,
|
|
4
|
+
fnNormalizeAuditLogFilter,
|
|
5
|
+
fnNormalizeAuditLogPage,
|
|
6
|
+
} from './model'
|
|
7
|
+
import type {
|
|
8
|
+
IAuditLogDetailRequestContext,
|
|
9
|
+
IAuditLogListRequestContext,
|
|
10
|
+
IAuditLogSource,
|
|
11
|
+
IAuditLogSourceRequests,
|
|
12
|
+
} from './types'
|
|
13
|
+
|
|
14
|
+
function fnNormalizeAuditLogId(strAuditLogId: string) {
|
|
15
|
+
const strNormalizedId = strAuditLogId.trim()
|
|
16
|
+
if (!strNormalizedId || strNormalizedId.length > 200) {
|
|
17
|
+
throw new AuditLogError(
|
|
18
|
+
'INVALID_DETAIL',
|
|
19
|
+
'审计事实 ID 必须是长度不超过 200 的非空字符串。'
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
return strNormalizedId
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** 将 Swagger 生成客户端请求适配为已校验的审计列表与详情数据源。 */
|
|
26
|
+
export function fnCreateAuditLogSource(
|
|
27
|
+
objRequests: IAuditLogSourceRequests
|
|
28
|
+
): IAuditLogSource {
|
|
29
|
+
return Object.freeze({
|
|
30
|
+
fnGetDetail: async (objContext: IAuditLogDetailRequestContext) => {
|
|
31
|
+
const strAuditLogId = fnNormalizeAuditLogId(objContext.strAuditLogId)
|
|
32
|
+
const objDetail = fnNormalizeAuditLogDetail(
|
|
33
|
+
await objRequests.fnGetDetail({ ...objContext, strAuditLogId })
|
|
34
|
+
)
|
|
35
|
+
if (objDetail.objEntry.strAuditLogId !== strAuditLogId) {
|
|
36
|
+
throw new AuditLogError(
|
|
37
|
+
'INVALID_DETAIL',
|
|
38
|
+
'审计详情返回的事实 ID 与请求不一致。'
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
return objDetail
|
|
42
|
+
},
|
|
43
|
+
fnList: async (objContext: IAuditLogListRequestContext) =>
|
|
44
|
+
fnNormalizeAuditLogPage(
|
|
45
|
+
await objRequests.fnList({
|
|
46
|
+
...objContext,
|
|
47
|
+
objFilter: fnNormalizeAuditLogFilter(objContext.objFilter),
|
|
48
|
+
})
|
|
49
|
+
),
|
|
50
|
+
})
|
|
51
|
+
}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IFileTaskContext,
|
|
3
|
+
IUseFileTaskResult,
|
|
4
|
+
TFileTaskPollResult,
|
|
5
|
+
TFileTaskStartResult,
|
|
6
|
+
} from '@/files'
|
|
7
|
+
import type { IAppQueryScope } from '@/api/query'
|
|
8
|
+
|
|
9
|
+
/** 审计操作的权威执行结果。 */
|
|
10
|
+
export type TAuditLogOutcome = 'denied' | 'failed' | 'succeeded'
|
|
11
|
+
|
|
12
|
+
/** 审计操作者的稳定类别。 */
|
|
13
|
+
export type TAuditLogActorType = 'service' | 'system' | 'user'
|
|
14
|
+
|
|
15
|
+
/** 后端已处理的字段展示级别。 */
|
|
16
|
+
export type TAuditLogDisplayMode = 'masked' | 'plain' | 'redacted'
|
|
17
|
+
|
|
18
|
+
/** 审计导出的受支持格式。 */
|
|
19
|
+
export type TAuditLogExportFormat = 'csv' | 'xlsx'
|
|
20
|
+
|
|
21
|
+
/** 审计能力边界的稳定错误分类。 */
|
|
22
|
+
export type TAuditLogErrorCode =
|
|
23
|
+
| 'INVALID_DETAIL'
|
|
24
|
+
| 'INVALID_ENTRY'
|
|
25
|
+
| 'INVALID_EXPORT_RESULT'
|
|
26
|
+
| 'INVALID_FILTER'
|
|
27
|
+
| 'INVALID_PAGE'
|
|
28
|
+
|
|
29
|
+
/** 审计列表允许提交给后端的筛选条件。 */
|
|
30
|
+
export interface IAuditLogFilter {
|
|
31
|
+
/** 精确操作者稳定 ID。 */
|
|
32
|
+
readonly strActorId?: string
|
|
33
|
+
/** 精确操作码,例如 `order.approve`。 */
|
|
34
|
+
readonly strAction?: string
|
|
35
|
+
/** 游标分页中由后端返回的不透明下一页游标。 */
|
|
36
|
+
readonly strCursor?: string
|
|
37
|
+
/** 查询结束 ISO 8601 时间,包含边界。 */
|
|
38
|
+
readonly strEndedAt?: string
|
|
39
|
+
/** 权威执行结果。 */
|
|
40
|
+
readonly strOutcome?: TAuditLogOutcome
|
|
41
|
+
/** API 请求关联 ID,用于从错误提示追溯审计事实。 */
|
|
42
|
+
readonly strRequestId?: string
|
|
43
|
+
/** 查询开始 ISO 8601 时间,包含边界。 */
|
|
44
|
+
readonly strStartedAt?: string
|
|
45
|
+
/** 精确业务对象稳定 ID。 */
|
|
46
|
+
readonly strTargetId?: string
|
|
47
|
+
/** 精确业务对象类型,例如 `order`。 */
|
|
48
|
+
readonly strTargetType?: string
|
|
49
|
+
/** 具备跨租户审计权限时由后端重新授权的目标租户 ID。 */
|
|
50
|
+
readonly strTenantId?: string
|
|
51
|
+
/** 具备跨空间审计权限时由后端重新授权的工作空间 ID。 */
|
|
52
|
+
readonly strWorkspaceId?: string
|
|
53
|
+
/** 单页条数,默认 50,最大 100。 */
|
|
54
|
+
readonly nPageSize?: number
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** 不包含分页游标和单页条数的审计导出筛选。 */
|
|
58
|
+
export type TAuditLogExportFilter = Omit<
|
|
59
|
+
IAuditLogFilter,
|
|
60
|
+
'nPageSize' | 'strCursor'
|
|
61
|
+
>
|
|
62
|
+
|
|
63
|
+
/** Swagger Adapter 返回的审计列表单项原始数据。 */
|
|
64
|
+
export interface IAuditLogEntryInput {
|
|
65
|
+
/** 操作者稳定 ID;系统匿名动作可以省略。 */
|
|
66
|
+
strActorId?: string
|
|
67
|
+
/** 后端已授权返回且可直接作为纯文本显示的操作者名称。 */
|
|
68
|
+
strActorLabel?: string
|
|
69
|
+
/** 操作者类别。 */
|
|
70
|
+
strActorType?: string
|
|
71
|
+
/** 跨系统稳定的操作码。 */
|
|
72
|
+
strAction?: string
|
|
73
|
+
/** 审计事实稳定唯一 ID。 */
|
|
74
|
+
strAuditLogId?: string
|
|
75
|
+
/** 后端已脱敏的来源 IP 展示值。 */
|
|
76
|
+
strMaskedIpAddress?: string
|
|
77
|
+
/** 审计事实发生的 ISO 8601 时间。 */
|
|
78
|
+
strOccurredAt?: string
|
|
79
|
+
/** 权威执行结果。 */
|
|
80
|
+
strOutcome?: string
|
|
81
|
+
/** API 请求关联 ID。 */
|
|
82
|
+
strRequestId?: string
|
|
83
|
+
/** 后端生成且可直接作为纯文本显示的安全摘要。 */
|
|
84
|
+
strSummary?: string
|
|
85
|
+
/** 业务对象稳定 ID。 */
|
|
86
|
+
strTargetId?: string
|
|
87
|
+
/** 后端已授权返回的业务对象展示名称。 */
|
|
88
|
+
strTargetLabel?: string
|
|
89
|
+
/** 业务对象类型。 */
|
|
90
|
+
strTargetType?: string
|
|
91
|
+
/** 该事实所属租户稳定 ID。 */
|
|
92
|
+
strTenantId?: string
|
|
93
|
+
/** 该事实所属工作空间稳定 ID。 */
|
|
94
|
+
strWorkspaceId?: string
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** 经过运行时校验、可供列表展示的审计事实摘要。 */
|
|
98
|
+
export interface IAuditLogEntry {
|
|
99
|
+
/** 操作者稳定 ID;系统匿名动作可以省略。 */
|
|
100
|
+
readonly strActorId?: string
|
|
101
|
+
/** 后端已授权返回的操作者纯文本名称。 */
|
|
102
|
+
readonly strActorLabel?: string
|
|
103
|
+
/** 操作者类别。 */
|
|
104
|
+
readonly strActorType: TAuditLogActorType
|
|
105
|
+
/** 跨系统稳定的操作码。 */
|
|
106
|
+
readonly strAction: string
|
|
107
|
+
/** 审计事实稳定唯一 ID。 */
|
|
108
|
+
readonly strAuditLogId: string
|
|
109
|
+
/** 后端已脱敏的来源 IP 展示值。 */
|
|
110
|
+
readonly strMaskedIpAddress?: string
|
|
111
|
+
/** 审计事实发生的标准 ISO 8601 时间。 */
|
|
112
|
+
readonly strOccurredAt: string
|
|
113
|
+
/** 权威执行结果。 */
|
|
114
|
+
readonly strOutcome: TAuditLogOutcome
|
|
115
|
+
/** API 请求关联 ID。 */
|
|
116
|
+
readonly strRequestId?: string
|
|
117
|
+
/** 后端生成的安全纯文本摘要。 */
|
|
118
|
+
readonly strSummary: string
|
|
119
|
+
/** 业务对象稳定 ID。 */
|
|
120
|
+
readonly strTargetId?: string
|
|
121
|
+
/** 后端已授权返回的业务对象纯文本名称。 */
|
|
122
|
+
readonly strTargetLabel?: string
|
|
123
|
+
/** 业务对象类型。 */
|
|
124
|
+
readonly strTargetType?: string
|
|
125
|
+
/** 该事实所属租户稳定 ID。 */
|
|
126
|
+
readonly strTenantId?: string
|
|
127
|
+
/** 该事实所属工作空间稳定 ID。 */
|
|
128
|
+
readonly strWorkspaceId?: string
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Swagger Adapter 返回的单个变更字段原始数据。 */
|
|
132
|
+
export interface IAuditLogChangeInput {
|
|
133
|
+
/** 后端已脱敏的变更后展示值。 */
|
|
134
|
+
strAfterDisplayValue?: string
|
|
135
|
+
/** 后端已脱敏的变更前展示值。 */
|
|
136
|
+
strBeforeDisplayValue?: string
|
|
137
|
+
/** 字段展示级别。 */
|
|
138
|
+
strDisplayMode?: string
|
|
139
|
+
/** 稳定字段 Key。 */
|
|
140
|
+
strField?: string
|
|
141
|
+
/** 后端可直接作为纯文本显示的字段名称。 */
|
|
142
|
+
strFieldLabel?: string
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** 经过校验且仅包含后端安全展示值的审计变更字段。 */
|
|
146
|
+
export interface IAuditLogChange {
|
|
147
|
+
/** 后端已脱敏的变更后展示值。 */
|
|
148
|
+
readonly strAfterDisplayValue?: string
|
|
149
|
+
/** 后端已脱敏的变更前展示值。 */
|
|
150
|
+
readonly strBeforeDisplayValue?: string
|
|
151
|
+
/** 字段展示级别;`plain` 仍必须由后端确认可见。 */
|
|
152
|
+
readonly strDisplayMode: TAuditLogDisplayMode
|
|
153
|
+
/** 稳定字段 Key。 */
|
|
154
|
+
readonly strField: string
|
|
155
|
+
/** 后端可直接作为纯文本显示的字段名称。 */
|
|
156
|
+
readonly strFieldLabel: string
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Swagger Adapter 返回的审计安全上下文字段。 */
|
|
160
|
+
export interface IAuditLogContextFieldInput {
|
|
161
|
+
/** 字段展示级别。 */
|
|
162
|
+
strDisplayMode?: string
|
|
163
|
+
/** 稳定上下文 Key。 */
|
|
164
|
+
strKey?: string
|
|
165
|
+
/** 后端可直接作为纯文本显示的字段名称。 */
|
|
166
|
+
strLabel?: string
|
|
167
|
+
/** 后端已脱敏且可直接作为纯文本显示的值。 */
|
|
168
|
+
strDisplayValue?: string
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** 审计详情中的受限安全上下文字段。 */
|
|
172
|
+
export interface IAuditLogContextField {
|
|
173
|
+
/** 字段展示级别;不允许携带原始请求体或任意嵌套对象。 */
|
|
174
|
+
readonly strDisplayMode: TAuditLogDisplayMode
|
|
175
|
+
/** 后端已脱敏且可直接作为纯文本显示的值。 */
|
|
176
|
+
readonly strDisplayValue: string
|
|
177
|
+
/** 稳定上下文 Key。 */
|
|
178
|
+
readonly strKey: string
|
|
179
|
+
/** 后端可直接作为纯文本显示的字段名称。 */
|
|
180
|
+
readonly strLabel: string
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** Swagger Adapter 返回的审计详情原始数据。 */
|
|
184
|
+
export interface IAuditLogDetailInput {
|
|
185
|
+
/** 已脱敏的字段变更集合。 */
|
|
186
|
+
arrChanges?: readonly IAuditLogChangeInput[]
|
|
187
|
+
/** 受限的安全上下文字段集合。 */
|
|
188
|
+
arrContextFields?: readonly IAuditLogContextFieldInput[]
|
|
189
|
+
/** 详情对应的列表摘要。 */
|
|
190
|
+
objEntry?: IAuditLogEntryInput
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** 审计详情,不包含原始请求体、凭据或任意 JSON。 */
|
|
194
|
+
export interface IAuditLogDetail {
|
|
195
|
+
/** 已脱敏的字段变更集合,最多 100 项。 */
|
|
196
|
+
readonly arrChanges: readonly IAuditLogChange[]
|
|
197
|
+
/** 受限安全上下文字段集合,最多 50 项。 */
|
|
198
|
+
readonly arrContextFields: readonly IAuditLogContextField[]
|
|
199
|
+
/** 详情对应的权威审计摘要。 */
|
|
200
|
+
readonly objEntry: IAuditLogEntry
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** Swagger Adapter 返回的游标分页原始数据。 */
|
|
204
|
+
export interface IAuditLogPageInput {
|
|
205
|
+
/** 当前页审计摘要。 */
|
|
206
|
+
arrEntries?: readonly IAuditLogEntryInput[]
|
|
207
|
+
/** 是否仍有更早的数据。 */
|
|
208
|
+
bHasMore?: boolean
|
|
209
|
+
/** 可选的后端估算或精确总数。 */
|
|
210
|
+
nTotal?: number
|
|
211
|
+
/** 下一页不透明游标;`bHasMore` 为真时必须存在。 */
|
|
212
|
+
strNextCursor?: string
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** 经过校验、按时间倒序排列的审计列表页。 */
|
|
216
|
+
export interface IAuditLogPage {
|
|
217
|
+
/** 当前页审计摘要,最多 100 项。 */
|
|
218
|
+
readonly arrEntries: readonly IAuditLogEntry[]
|
|
219
|
+
/** 是否仍有更早的数据。 */
|
|
220
|
+
readonly bHasMore: boolean
|
|
221
|
+
/** 可选的后端估算或精确总数。 */
|
|
222
|
+
readonly nTotal?: number
|
|
223
|
+
/** 下一页不透明游标。 */
|
|
224
|
+
readonly strNextCursor?: string
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** 审计列表请求的安全运行时上下文。 */
|
|
228
|
+
export interface IAuditLogListRequestContext {
|
|
229
|
+
/** 已标准化的筛选与游标。 */
|
|
230
|
+
readonly objFilter: Readonly<
|
|
231
|
+
Required<Pick<IAuditLogFilter, 'nPageSize'>> & IAuditLogFilter
|
|
232
|
+
>
|
|
233
|
+
/** 当前用户、会话、租户、工作空间和语言组成的缓存作用域。 */
|
|
234
|
+
readonly objScope: IAppQueryScope
|
|
235
|
+
/** Query 取消或替换请求时触发的信号。 */
|
|
236
|
+
readonly objSignal: AbortSignal
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** 审计详情请求的安全运行时上下文。 */
|
|
240
|
+
export interface IAuditLogDetailRequestContext {
|
|
241
|
+
/** 当前用户、会话、租户、工作空间和语言组成的缓存作用域。 */
|
|
242
|
+
readonly objScope: IAppQueryScope
|
|
243
|
+
/** Query 取消或替换请求时触发的信号。 */
|
|
244
|
+
readonly objSignal: AbortSignal
|
|
245
|
+
/** 需要读取的审计事实稳定 ID。 */
|
|
246
|
+
readonly strAuditLogId: string
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** 由 Swagger 生成客户端实现的审计列表请求。 */
|
|
250
|
+
export type TAuditLogListRequest = (
|
|
251
|
+
objContext: IAuditLogListRequestContext
|
|
252
|
+
) => Promise<IAuditLogPageInput>
|
|
253
|
+
|
|
254
|
+
/** 由 Swagger 生成客户端实现的审计详情请求。 */
|
|
255
|
+
export type TAuditLogDetailRequest = (
|
|
256
|
+
objContext: IAuditLogDetailRequestContext
|
|
257
|
+
) => Promise<IAuditLogDetailInput>
|
|
258
|
+
|
|
259
|
+
/** 项目审计后端的列表与详情数据源。 */
|
|
260
|
+
export interface IAuditLogSource {
|
|
261
|
+
/** 加载后端已授权、已脱敏的审计列表页。 */
|
|
262
|
+
readonly fnList: (
|
|
263
|
+
objContext: IAuditLogListRequestContext
|
|
264
|
+
) => Promise<IAuditLogPage>
|
|
265
|
+
/** 加载后端已授权、已脱敏的单个审计详情。 */
|
|
266
|
+
readonly fnGetDetail: (
|
|
267
|
+
objContext: IAuditLogDetailRequestContext
|
|
268
|
+
) => Promise<IAuditLogDetail>
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** 创建审计数据源时注入的 Swagger 请求。 */
|
|
272
|
+
export interface IAuditLogSourceRequests {
|
|
273
|
+
/** 审计详情生成客户端请求。 */
|
|
274
|
+
readonly fnGetDetail: TAuditLogDetailRequest
|
|
275
|
+
/** 审计列表生成客户端请求。 */
|
|
276
|
+
readonly fnList: TAuditLogListRequest
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/** 审计列表 React Hook 的公共参数。 */
|
|
280
|
+
export interface IUseAuditLogListOptions {
|
|
281
|
+
/** 是否允许发起请求,默认启用。 */
|
|
282
|
+
readonly bIsEnabled?: boolean
|
|
283
|
+
/** 列表筛选与游标。 */
|
|
284
|
+
readonly objFilter?: IAuditLogFilter
|
|
285
|
+
/** 项目审计后端数据源。 */
|
|
286
|
+
readonly objSource: IAuditLogSource
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** 审计详情 React Hook 的公共参数。 */
|
|
290
|
+
export interface IUseAuditLogDetailOptions {
|
|
291
|
+
/** 是否允许发起请求,默认启用。 */
|
|
292
|
+
readonly bIsEnabled?: boolean
|
|
293
|
+
/** 项目审计后端数据源。 */
|
|
294
|
+
readonly objSource: IAuditLogSource
|
|
295
|
+
/** 需要读取的审计事实稳定 ID。 */
|
|
296
|
+
readonly strAuditLogId: string
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** 审计导出请求。 */
|
|
300
|
+
export interface IAuditLogExportRequest {
|
|
301
|
+
/** 不包含分页游标的完整导出筛选。 */
|
|
302
|
+
readonly objFilter?: TAuditLogExportFilter
|
|
303
|
+
/** 受支持的导出格式。 */
|
|
304
|
+
readonly strFormat: TAuditLogExportFormat
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** 后端完成审计导出后返回的文件身份,不包含任意外部 URL。 */
|
|
308
|
+
export interface IAuditLogExportResult {
|
|
309
|
+
/** 本次导出事实的稳定 ID,用于后续审计和问题追踪。 */
|
|
310
|
+
readonly strExportId: string
|
|
311
|
+
/** 由受保护下载接口使用的稳定文件 ID。 */
|
|
312
|
+
readonly strFileId: string
|
|
313
|
+
/** 已清理、可作为下载回退值的文件名。 */
|
|
314
|
+
readonly strFileName: string
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** 启动审计导出的安全上下文。 */
|
|
318
|
+
export interface IAuditLogExportStartContext extends IFileTaskContext {
|
|
319
|
+
/** 已标准化的格式与筛选。 */
|
|
320
|
+
readonly objRequest: IAuditLogExportRequest
|
|
321
|
+
/** 当前用户、会话、租户、工作空间和语言组成的作用域。 */
|
|
322
|
+
readonly objScope: IAppQueryScope
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/** 轮询审计导出任务的安全上下文。 */
|
|
326
|
+
export interface IAuditLogExportPollContext extends IFileTaskContext {
|
|
327
|
+
/** 当前用户、会话、租户、工作空间和语言组成的作用域。 */
|
|
328
|
+
readonly objScope: IAppQueryScope
|
|
329
|
+
/** 服务端任务稳定 ID。 */
|
|
330
|
+
readonly strTaskId: string
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/** 项目使用 Swagger 生成客户端实现的审计导出数据源。 */
|
|
334
|
+
export interface IAuditLogExportSource {
|
|
335
|
+
/** 启动同步或后台导出;服务端必须限制时间范围、行数和字段。 */
|
|
336
|
+
readonly fnStartExport: (
|
|
337
|
+
objContext: IAuditLogExportStartContext
|
|
338
|
+
) => Promise<TFileTaskStartResult<IAuditLogExportResult>>
|
|
339
|
+
/** 查询后台导出任务;同步完成的项目可以省略。 */
|
|
340
|
+
readonly fnPollExport?: (
|
|
341
|
+
objContext: IAuditLogExportPollContext
|
|
342
|
+
) => Promise<TFileTaskPollResult<IAuditLogExportResult>>
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/** 审计导出 Hook 的公共参数。 */
|
|
346
|
+
export interface IUseAuditLogExportOptions {
|
|
347
|
+
/** 后台任务轮询间隔,默认沿用文件任务策略。 */
|
|
348
|
+
readonly nPollIntervalMs?: number
|
|
349
|
+
/** 项目审计导出数据源。 */
|
|
350
|
+
readonly objSource: IAuditLogExportSource
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** 审计导出 Hook 的标准任务结果。 */
|
|
354
|
+
export type TUseAuditLogExportResult = IUseFileTaskResult<
|
|
355
|
+
IAuditLogExportRequest,
|
|
356
|
+
IAuditLogExportResult
|
|
357
|
+
>
|