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,33 @@
|
|
|
1
|
+
/** engine 与 React 层共享的稳定默认值。 */
|
|
2
|
+
export const TABLE_DEFAULT_LOCALE = 'zh-CN'
|
|
3
|
+
export const TABLE_DEFAULT_ROW_KEY = 'id'
|
|
4
|
+
export const TABLE_DEFAULT_DIMENSION = '100%'
|
|
5
|
+
export const TABLE_DEFAULT_VIEWPORT_ROW_OFFSET = 5
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* engine 与 React 层共享的组件级标量默认值。
|
|
9
|
+
*
|
|
10
|
+
* 集合和运行时许可证仍由每个组件实例创建;这里仅保存不可变标量,避免适配包复制后
|
|
11
|
+
* 出现同一配置在不同框架中采用不同默认行为。
|
|
12
|
+
*/
|
|
13
|
+
export const TABLE_COMPONENT_DEFAULTS = Object.freeze({
|
|
14
|
+
searchResetBehavior: 'query' as const,
|
|
15
|
+
autoQuery: true,
|
|
16
|
+
showIndex: true,
|
|
17
|
+
striped: true,
|
|
18
|
+
highlightCurrentRow: true,
|
|
19
|
+
headerMenuTrigger: 'always' as const,
|
|
20
|
+
autoFreezeStartActions: false,
|
|
21
|
+
autoFreezeEndActions: true,
|
|
22
|
+
summarySelected: true,
|
|
23
|
+
allowBulkEdit: false,
|
|
24
|
+
keepSelection: false,
|
|
25
|
+
showToolbar: true,
|
|
26
|
+
showColumnEditor: true,
|
|
27
|
+
showDensityControl: true,
|
|
28
|
+
loadingMask: 'initial' as const,
|
|
29
|
+
theme: 'auto' as const,
|
|
30
|
+
density: 'comfortable' as const,
|
|
31
|
+
locale: TABLE_DEFAULT_LOCALE,
|
|
32
|
+
height: 'content' as const,
|
|
33
|
+
})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { GridSettings } from '../../table/grid'
|
|
2
|
+
import { composeTableGridHook, type TableGridHook } from '../../table/hooks'
|
|
3
|
+
import type { CompileTableGridSettingsOptions } from './types'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 编译最终 Handsontable settings。
|
|
7
|
+
*
|
|
8
|
+
* 优先级为 `defaults < consumer < controlled < internalHooks`。consumer 是安装版本原生
|
|
9
|
+
* `GridSettings`,所以未知的新配置天然透传;只有列在 controlled 中的字段才会被组件
|
|
10
|
+
* 接管。内部 hook 必须登记所有权,不能依赖对象展开顺序。
|
|
11
|
+
*/
|
|
12
|
+
export const compileTableGridSettings = ({
|
|
13
|
+
defaults,
|
|
14
|
+
consumer,
|
|
15
|
+
controlled,
|
|
16
|
+
internalHooks,
|
|
17
|
+
hookPolicies,
|
|
18
|
+
}: CompileTableGridSettingsOptions): GridSettings => {
|
|
19
|
+
// beforeAutofill 的 false 取消信号由组件合同补齐,但 Handsontable v18 声明文件遗漏;
|
|
20
|
+
// 先从官方 GridSettings 对象展开中排除,再在下面的统一 hook 合成边界写入。
|
|
21
|
+
const { beforeAutofill: _beforeAutofill, ...officialInternalHooks } =
|
|
22
|
+
internalHooks
|
|
23
|
+
const result: GridSettings = {
|
|
24
|
+
...defaults,
|
|
25
|
+
...consumer,
|
|
26
|
+
...controlled,
|
|
27
|
+
...officialInternalHooks,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (result.nestedRows) {
|
|
31
|
+
// Handsontable 官方明确说明 NestedRows 不能与本地排序、过滤组合使用。
|
|
32
|
+
result.columnSorting = false
|
|
33
|
+
result.filters = false
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
for (const [name, internalValue] of Object.entries(internalHooks)) {
|
|
37
|
+
if (typeof internalValue !== 'function') continue
|
|
38
|
+
const policy = Reflect.get(hookPolicies, name) as
|
|
39
|
+
| {
|
|
40
|
+
strategy?: 'compose' | 'internal'
|
|
41
|
+
order?: 'internal-first' | 'consumer-first'
|
|
42
|
+
stopOnFalse?: boolean
|
|
43
|
+
}
|
|
44
|
+
| undefined
|
|
45
|
+
if (!policy) {
|
|
46
|
+
throw new Error(
|
|
47
|
+
`[TableComponent] Internal Handsontable hook "${name}" has no ownership policy.`
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
if (policy.strategy === 'internal') continue
|
|
51
|
+
const consumerValue = Reflect.get(consumer, name)
|
|
52
|
+
Reflect.set(
|
|
53
|
+
result,
|
|
54
|
+
name,
|
|
55
|
+
composeTableGridHook(
|
|
56
|
+
internalValue as TableGridHook,
|
|
57
|
+
typeof consumerValue === 'function'
|
|
58
|
+
? (consumerValue as TableGridHook)
|
|
59
|
+
: undefined,
|
|
60
|
+
policy
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
return result
|
|
65
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { GridSettings } from '../../table/grid'
|
|
2
|
+
import {
|
|
3
|
+
TABLE_DEFAULT_DIMENSION,
|
|
4
|
+
TABLE_DEFAULT_LOCALE,
|
|
5
|
+
TABLE_DEFAULT_VIEWPORT_ROW_OFFSET,
|
|
6
|
+
} from '../constants'
|
|
7
|
+
|
|
8
|
+
const escapeTableHtml = (value: string) =>
|
|
9
|
+
value.replace(
|
|
10
|
+
/[&<>"']/g,
|
|
11
|
+
(character) =>
|
|
12
|
+
({
|
|
13
|
+
'&': '&',
|
|
14
|
+
'<': '<',
|
|
15
|
+
'>': '>',
|
|
16
|
+
'"': '"',
|
|
17
|
+
"'": ''',
|
|
18
|
+
})[character]!
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Handsontable v18 默认会把菜单、粘贴和部分插件文本写入 innerHTML。
|
|
23
|
+
* 产品默认只允许其 alignment 菜单使用的 selected 标记,其余标签全部降级为文本;
|
|
24
|
+
* 确实需要富 HTML 的业务仍可通过原生 settings.sanitizer 显式覆盖。
|
|
25
|
+
*/
|
|
26
|
+
const sanitizeTableGridHtml = (html: string, context = '') => {
|
|
27
|
+
if (typeof document === 'undefined') return escapeTableHtml(html)
|
|
28
|
+
const template = document.createElement('template')
|
|
29
|
+
template.innerHTML = html
|
|
30
|
+
const serialize = (node: Node): string => {
|
|
31
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
32
|
+
return escapeTableHtml(node.textContent ?? '')
|
|
33
|
+
}
|
|
34
|
+
if (!(node instanceof HTMLElement)) return ''
|
|
35
|
+
const content = [...node.childNodes].map(serialize).join('')
|
|
36
|
+
return context === 'contextMenu' &&
|
|
37
|
+
node.tagName === 'SPAN' &&
|
|
38
|
+
node.classList.length === 1 &&
|
|
39
|
+
node.classList.contains('selected')
|
|
40
|
+
? `<span class="selected">${content}</span>`
|
|
41
|
+
: content
|
|
42
|
+
}
|
|
43
|
+
return [...template.content.childNodes].map(serialize).join('')
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 创建产品级 Handsontable 默认值。
|
|
48
|
+
*
|
|
49
|
+
* 这些值全部允许原生 `settings` 覆盖。这里不读取数据和业务状态,因此 Handsontable
|
|
50
|
+
* 新增普通 setting 时会自然透传,不需要同步扩充此函数的参数列表。
|
|
51
|
+
*/
|
|
52
|
+
export const createTableGridDefaultSettings = (): GridSettings => ({
|
|
53
|
+
language: TABLE_DEFAULT_LOCALE,
|
|
54
|
+
width: TABLE_DEFAULT_DIMENSION,
|
|
55
|
+
height: TABLE_DEFAULT_DIMENSION,
|
|
56
|
+
stretchH: 'all',
|
|
57
|
+
navigableHeaders: true,
|
|
58
|
+
tabNavigation: true,
|
|
59
|
+
autoWrapRow: true,
|
|
60
|
+
autoWrapCol: true,
|
|
61
|
+
viewportRowRenderingOffset: TABLE_DEFAULT_VIEWPORT_ROW_OFFSET,
|
|
62
|
+
// 行高、文本换行和滚动范围统一由 Handsontable 测量,避免适配层维护第二套高度真相。
|
|
63
|
+
autoRowSize: true,
|
|
64
|
+
autoColumnSize: false,
|
|
65
|
+
filters: true,
|
|
66
|
+
dropdownMenu: true,
|
|
67
|
+
columnSorting: true,
|
|
68
|
+
manualColumnResize: true,
|
|
69
|
+
manualColumnMove: true,
|
|
70
|
+
manualColumnFreeze: true,
|
|
71
|
+
manualRowResize: true,
|
|
72
|
+
sanitizer: sanitizeTableGridHtml,
|
|
73
|
+
contextMenu: [
|
|
74
|
+
'copy',
|
|
75
|
+
'cut',
|
|
76
|
+
'undo',
|
|
77
|
+
'redo',
|
|
78
|
+
'freeze_column',
|
|
79
|
+
'unfreeze_column',
|
|
80
|
+
'alignment',
|
|
81
|
+
],
|
|
82
|
+
})
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { TableGridHookOwnershipPolicies } from './types'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 内部 hook 的显式所有权台账。
|
|
5
|
+
*
|
|
6
|
+
* 新增内部 hook 时必须在这里选择组合顺序;否则编译器会直接报错,避免对象展开把
|
|
7
|
+
* 业务方 hook 静默覆盖。`cells` 内部会主动读取 consumer cells,因此不能二次组合。
|
|
8
|
+
*/
|
|
9
|
+
export const TABLE_GRID_HOOK_OWNERSHIP = {
|
|
10
|
+
cells: { strategy: 'internal' },
|
|
11
|
+
beforeCopy: { strategy: 'compose' },
|
|
12
|
+
beforePaste: { strategy: 'compose', order: 'consumer-first' },
|
|
13
|
+
beforeAutofill: { strategy: 'compose', order: 'consumer-first' },
|
|
14
|
+
afterFilter: { strategy: 'compose' },
|
|
15
|
+
afterDropdownMenuShow: { strategy: 'compose' },
|
|
16
|
+
afterScrollHorizontally: { strategy: 'compose' },
|
|
17
|
+
afterScrollVertically: { strategy: 'compose' },
|
|
18
|
+
afterViewRender: { strategy: 'compose' },
|
|
19
|
+
beforeChange: { strategy: 'compose', order: 'consumer-first' },
|
|
20
|
+
beforeCreateRow: { strategy: 'compose', order: 'consumer-first' },
|
|
21
|
+
afterChange: { strategy: 'compose' },
|
|
22
|
+
afterRenderer: { strategy: 'compose' },
|
|
23
|
+
afterGetColHeader: { strategy: 'compose' },
|
|
24
|
+
afterOnCellMouseOver: { strategy: 'compose' },
|
|
25
|
+
afterOnCellMouseOut: { strategy: 'compose' },
|
|
26
|
+
afterOnCellMouseUp: { strategy: 'compose' },
|
|
27
|
+
afterSelectionEnd: { strategy: 'compose' },
|
|
28
|
+
afterDeselect: { strategy: 'compose' },
|
|
29
|
+
afterColumnResize: { strategy: 'compose' },
|
|
30
|
+
beforeColumnMove: { strategy: 'compose' },
|
|
31
|
+
beforeColumnSort: { strategy: 'compose', order: 'consumer-first' },
|
|
32
|
+
afterColumnMove: { strategy: 'compose' },
|
|
33
|
+
afterColumnFreeze: { strategy: 'compose' },
|
|
34
|
+
afterColumnUnfreeze: { strategy: 'compose' },
|
|
35
|
+
} satisfies TableGridHookOwnershipPolicies
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { GridSettings } from '../../table/grid'
|
|
2
|
+
|
|
3
|
+
const TABLE_GRID_RUNTIME_EXCLUDED_KEYS = new Set<keyof GridSettings>(['data'])
|
|
4
|
+
|
|
5
|
+
const isRuntimeSettingEqual = (previous: unknown, next: unknown) => {
|
|
6
|
+
if (Object.is(previous, next)) return true
|
|
7
|
+
if (!Array.isArray(previous) || !Array.isArray(next)) return false
|
|
8
|
+
return (
|
|
9
|
+
previous.length === next.length &&
|
|
10
|
+
previous.every((item, index) => Object.is(item, next[index]))
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** data 由专用投影管线更新,其余字段仅在真正变化时同步到 Handsontable。 */
|
|
15
|
+
export const diffTableGridRuntimeSettings = (
|
|
16
|
+
previous: GridSettings,
|
|
17
|
+
next: GridSettings
|
|
18
|
+
): GridSettings => {
|
|
19
|
+
const delta: GridSettings = {}
|
|
20
|
+
const keys = new Set([
|
|
21
|
+
...Reflect.ownKeys(previous),
|
|
22
|
+
...Reflect.ownKeys(next),
|
|
23
|
+
] as Array<keyof GridSettings>)
|
|
24
|
+
keys.forEach((key) => {
|
|
25
|
+
if (TABLE_GRID_RUNTIME_EXCLUDED_KEYS.has(key)) return
|
|
26
|
+
if (!isRuntimeSettingEqual(previous[key], next[key])) {
|
|
27
|
+
Reflect.set(delta, key, next[key])
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
return delta
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const hasTableGridRuntimeSettings = (settings: GridSettings) =>
|
|
34
|
+
Reflect.ownKeys(settings).length > 0
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Events } from 'handsontable'
|
|
2
|
+
import type { GridSettings } from '../../table/grid'
|
|
3
|
+
import type {
|
|
4
|
+
ComposeTableGridHookOptions,
|
|
5
|
+
TableGridHooks,
|
|
6
|
+
} from '../../table/hooks'
|
|
7
|
+
|
|
8
|
+
/** 内部 hook 的所有权决定其是否与调用方 hook 组合。 */
|
|
9
|
+
export interface TableGridHookOwnership extends ComposeTableGridHookOptions {
|
|
10
|
+
/** compose 组合调用方 hook;internal 则只保留组件一致性逻辑。 */
|
|
11
|
+
strategy: 'compose' | 'internal'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type TableGridHookOwnershipPolicies = Partial<
|
|
15
|
+
Record<keyof Events, TableGridHookOwnership>
|
|
16
|
+
>
|
|
17
|
+
|
|
18
|
+
/** settings 编译器的四层输入,优先级从上到下递增。 */
|
|
19
|
+
export interface CompileTableGridSettingsOptions {
|
|
20
|
+
/** 组件统一基础默认值,优先级最低。 */
|
|
21
|
+
defaults: GridSettings
|
|
22
|
+
/** 业务通过 table.settings 传入的原生 Handsontable 配置。 */
|
|
23
|
+
consumer: GridSettings
|
|
24
|
+
/** 数据、列、主题等必须由组件托管的配置。 */
|
|
25
|
+
controlled: GridSettings
|
|
26
|
+
/** 组件内部为交互和一致性提供的 Hooks。 */
|
|
27
|
+
internalHooks: TableGridHooks
|
|
28
|
+
/** 每个 Hook 的组合顺序、取消语义和所有权策略。 */
|
|
29
|
+
hookPolicies: TableGridHookOwnershipPolicies
|
|
30
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TABLE_DEFAULT_ALL_ROWS_LIMIT,
|
|
3
|
+
TABLE_DEFAULT_PAGE_SIZE,
|
|
4
|
+
TABLE_DEFAULT_PAGE_SIZES,
|
|
5
|
+
} from './constants'
|
|
6
|
+
import type {
|
|
7
|
+
ResolvedTablePaginationConfig,
|
|
8
|
+
TablePaginationConfig,
|
|
9
|
+
TablePageSize,
|
|
10
|
+
} from './types'
|
|
11
|
+
|
|
12
|
+
/** 同时保护 JavaScript 调用方、持久化配置和被断言绕过的 TypeScript 输入。 */
|
|
13
|
+
export const isTablePageSize = (value: unknown): value is TablePageSize =>
|
|
14
|
+
typeof value === 'number' && Number.isInteger(value) && value > 0
|
|
15
|
+
|
|
16
|
+
const toPositiveInteger = (value: unknown, fallback: number) => {
|
|
17
|
+
const number = Number(value)
|
|
18
|
+
return Number.isFinite(number) && number > 0
|
|
19
|
+
? Math.max(1, Math.trunc(number))
|
|
20
|
+
: fallback
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const normalizeConfiguredPageSize = (
|
|
24
|
+
value: unknown,
|
|
25
|
+
fallback: number
|
|
26
|
+
): number => (isTablePageSize(value) ? value : fallback)
|
|
27
|
+
|
|
28
|
+
const normalizeSiblingCount = (value: unknown) => {
|
|
29
|
+
const number = Number(value)
|
|
30
|
+
return Number.isFinite(number)
|
|
31
|
+
? Math.min(3, Math.max(0, Math.trunc(number)))
|
|
32
|
+
: 1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const normalizeTableTotal = (value: unknown) => {
|
|
36
|
+
const number = Number(value)
|
|
37
|
+
return Number.isFinite(number) && number >= 0 ? Math.trunc(number) : 0
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 解析分页公共配置,不修改调用方数组。
|
|
42
|
+
*
|
|
43
|
+
* 无效 pageSize 回退到产品默认值;pageSizes 去重并剔除非正整数,同时确保当前
|
|
44
|
+
* pageSize 一定出现在下拉选项中,避免选择器展示值与候选项不一致。
|
|
45
|
+
*/
|
|
46
|
+
export const resolveTablePaginationConfig = (
|
|
47
|
+
config: TablePaginationConfig | false | undefined
|
|
48
|
+
): ResolvedTablePaginationConfig => {
|
|
49
|
+
const source = config === false ? {} : (config ?? {})
|
|
50
|
+
const pageSize = normalizeConfiguredPageSize(
|
|
51
|
+
source.pageSize,
|
|
52
|
+
TABLE_DEFAULT_PAGE_SIZE
|
|
53
|
+
)
|
|
54
|
+
const normalizedSizes = (
|
|
55
|
+
source.pageSizes?.length ? source.pageSizes : TABLE_DEFAULT_PAGE_SIZES
|
|
56
|
+
).filter(isTablePageSize)
|
|
57
|
+
const pageSizes = [...new Set(normalizedSizes)]
|
|
58
|
+
if (!pageSizes.includes(pageSize)) pageSizes.unshift(pageSize)
|
|
59
|
+
const mode = source.mode === 'all' ? 'all' : 'page'
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
// all 模式没有分页交互;即使 JavaScript 调用方传入非法组合也在运行时归一化。
|
|
63
|
+
enabled: mode === 'page' && config !== false && source.enabled !== false,
|
|
64
|
+
mode,
|
|
65
|
+
maxRows: toPositiveInteger(source.maxRows, TABLE_DEFAULT_ALL_ROWS_LIMIT),
|
|
66
|
+
pageSize,
|
|
67
|
+
pageSizes,
|
|
68
|
+
showTotal: source.showTotal !== false,
|
|
69
|
+
showPageSize: source.showPageSize !== false,
|
|
70
|
+
showPageNumbers: source.showPageNumbers !== false,
|
|
71
|
+
showJumper: source.showJumper !== false,
|
|
72
|
+
siblingCount: normalizeSiblingCount(source.siblingCount),
|
|
73
|
+
queryOnChange: source.queryOnChange !== false,
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** 正整数分页条数;运行时解析器会过滤非法值。 */
|
|
2
|
+
export type TablePageSize = number
|
|
3
|
+
|
|
4
|
+
export type TablePaginationDataMode = 'page' | 'all'
|
|
5
|
+
|
|
6
|
+
interface TablePaginationBaseConfig {
|
|
7
|
+
/** all 模式允许的最大行数;超限或后端截断时查询失败且不覆盖旧数据。 */
|
|
8
|
+
maxRows?: number
|
|
9
|
+
/** 每页条数候选值,可按业务和后端能力自由配置。 */
|
|
10
|
+
pageSizes?: readonly TablePageSize[]
|
|
11
|
+
/** 初始每页条数,默认 20,并可被用户偏好覆盖。 */
|
|
12
|
+
pageSize?: TablePageSize
|
|
13
|
+
/** 是否显示总条数,默认 true。 */
|
|
14
|
+
showTotal?: boolean
|
|
15
|
+
/** 是否显示每页条数选择器,默认 true。 */
|
|
16
|
+
showPageSize?: boolean
|
|
17
|
+
/** 是否显示数字页码,默认 true。 */
|
|
18
|
+
showPageNumbers?: boolean
|
|
19
|
+
/** 是否显示页码跳转器,默认 true。 */
|
|
20
|
+
showJumper?: boolean
|
|
21
|
+
/** 当前页两侧保留的数字页码数量,默认 1。 */
|
|
22
|
+
siblingCount?: number
|
|
23
|
+
/** 页码或每页条数改变后是否自动查询;设为 false 时只发送事件。 */
|
|
24
|
+
queryOnChange?: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** 按页加载;enabled 只控制分页 UI,不改变请求的 page/pageSize。 */
|
|
28
|
+
export interface TablePagedPaginationConfig extends TablePaginationBaseConfig {
|
|
29
|
+
/** 是否显示分页交互,默认 `true`;关闭后仍按页请求数据。 */
|
|
30
|
+
enabled?: boolean
|
|
31
|
+
/** 按页加载模式,默认 `page`。 */
|
|
32
|
+
mode?: 'page'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** 全量加载没有可切换的页码,类型层禁止同时开启分页 UI。 */
|
|
36
|
+
export interface TableAllRowsPaginationConfig extends TablePaginationBaseConfig {
|
|
37
|
+
/** 全量模式固定不显示分页交互。 */
|
|
38
|
+
enabled?: false
|
|
39
|
+
/** 一次请求全部数据,并受 `maxRows` 安全上限约束。 */
|
|
40
|
+
mode: 'all'
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type TablePaginationConfig =
|
|
44
|
+
| TablePagedPaginationConfig
|
|
45
|
+
| TableAllRowsPaginationConfig
|
|
46
|
+
|
|
47
|
+
export interface ResolvedTablePaginationConfig {
|
|
48
|
+
/** 规范化后的分页启用状态。 */
|
|
49
|
+
enabled: boolean
|
|
50
|
+
/** 规范化后的数据加载模式。 */
|
|
51
|
+
mode: TablePaginationDataMode
|
|
52
|
+
/** all 模式的最大安全行数。 */
|
|
53
|
+
maxRows: number
|
|
54
|
+
/** 规范化、去重后的每页条数候选项。 */
|
|
55
|
+
pageSizes: TablePageSize[]
|
|
56
|
+
/** 规范化后的当前每页条数。 */
|
|
57
|
+
pageSize: TablePageSize
|
|
58
|
+
/** 是否显示总条数。 */
|
|
59
|
+
showTotal: boolean
|
|
60
|
+
/** 是否显示每页条数选择器。 */
|
|
61
|
+
showPageSize: boolean
|
|
62
|
+
/** 是否显示数字页码。 */
|
|
63
|
+
showPageNumbers: boolean
|
|
64
|
+
/** 是否显示页码跳转器。 */
|
|
65
|
+
showJumper: boolean
|
|
66
|
+
/** 当前页两侧保留的数字页码数量。 */
|
|
67
|
+
siblingCount: number
|
|
68
|
+
/** 分页变化后是否触发查询。 */
|
|
69
|
+
queryOnChange: boolean
|
|
70
|
+
}
|