From 3e58c54aa84136e6b977649271b76c408140760b Mon Sep 17 00:00:00 2001 From: sealday Date: Wed, 8 May 2024 16:20:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=93=E5=BA=93=E4=BA=8C=E6=9C=9F=20?= =?UTF-8?q?(#719)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: hello@lv <2256334253@qq.com> Co-authored-by: wjh Co-authored-by: sealday Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/719 --- .changeset/chatty-shrimps-boil.md | 5 + .changeset/clean-grapes-serve.md | 7 + .changeset/cold-cougars-watch.md | 5 + .changeset/cool-elephants-vanish.md | 5 + .changeset/fuzzy-snails-arrive.md | 6 + .changeset/good-garlics-sparkle.md | 5 + .changeset/happy-ducks-dance.md | 5 + .changeset/mighty-queens-draw.md | 5 + .changeset/polite-dots-smash.md | 5 + .changeset/poor-panthers-begin.md | 5 + .changeset/proud-ants-destroy.md | 5 + .changeset/seven-jeans-end.md | 5 + .changeset/silver-fans-refuse.md | 5 + .changeset/tidy-scissors-obey.md | 5 + .changeset/tricky-garlics-pay.md | 5 + .changeset/warm-flowers-turn.md | 5 + .gitea/workflows/build-docker-base.yaml | 39 + .gitea/workflows/build-docker-beta.yaml | 45 + packages/core/acl/LICENSE => LICENSE | 0 LICENSE-APACHE-2.0 | 201 --- SECURITY.md | 4 +- benchmark/README.md | 37 - benchmark/koa-database/index.js | 88 - benchmark/koa-resourcer/index.js | 106 -- benchmark/koa-sequelize/index.js | 47 - benchmark/nocobase-server/index.js | 97 -- docker/tachybase/Dockerfile | 17 + docker/tachybase/Dockerfile.base | 5 + docker/tachybase/docker-entrypoint.sh | 5 + docker/tachybase/tachybase.conf | 89 ++ examples/api-client/api.request.ts | 25 - examples/api-client/api.resource.ts | 25 - examples/api-client/server.ts | 51 - examples/app/__tests__/app.test.ts | 34 - examples/app/acl.ts | 69 - examples/app/association2resource.ts | 91 -- examples/app/collection2resource.ts | 59 - .../app/context/ctx.action.mergeParams.ts | 77 - examples/app/context/ctx.action.ts | 75 - examples/app/context/ctx.db.ts | 56 - examples/app/context/ctx.i18n.ts | 75 - examples/app/custom-command.ts | 38 - examples/app/custom-plugin.ts | 58 - examples/app/i18n.ts | 72 - examples/app/middleware/acl.ts | 87 - examples/app/middleware/app.ts | 43 - examples/app/middleware/resourcer.ts | 60 - examples/app/migrations/add-migration.ts | 62 - examples/app/multi-app.ts | 70 - .../resource-actions/action-merge-params.ts | 91 -- .../action-with-default-options.ts | 54 - .../app/resource-actions/global-action.ts | 68 - examples/app/resource-actions/simple.ts | 47 - examples/app/single-app.ts | 50 - .../collections/tree/adjacency-list.ts | 54 - .../collections/tree/closure-table.ts | 50 - .../collections/tree/materialized-path.ts | 50 - .../database/collections/tree/nested-set.ts | 50 - examples/index.md | 47 - examples/index.ts | 14 - package.json | 5 +- packages/core/acl/package.json | 11 +- packages/core/acl/src/__tests__/acl.test.ts | 2 +- packages/core/acl/src/acl.ts | 4 +- packages/core/acl/src/fixed-params-manager.ts | 2 +- packages/core/actions/LICENSE | 201 --- packages/core/actions/package.json | 10 +- .../actions/src/__tests__/add-action.test.ts | 2 +- .../src/__tests__/create-action.test.ts | 2 +- .../src/__tests__/destroy-action.test.ts | 2 +- .../src/__tests__/first-or-create.test.ts | 4 +- .../actions/src/__tests__/get-action.test.ts | 2 +- packages/core/actions/src/__tests__/index.ts | 4 +- .../actions/src/__tests__/list-action.test.ts | 2 +- .../actions/src/__tests__/move-action.test.ts | 6 +- .../src/__tests__/remove-action.test.ts | 2 +- .../actions/src/__tests__/set-action.test.ts | 2 +- .../src/__tests__/toggle-action.test.ts | 2 +- .../src/__tests__/update-action.test.ts | 2 +- .../src/__tests__/update-or-create.test.ts | 4 +- packages/core/actions/src/actions/add.ts | 2 +- packages/core/actions/src/actions/list.ts | 59 +- packages/core/actions/src/actions/move.ts | 2 +- packages/core/actions/src/actions/toggle.ts | 2 +- packages/core/actions/src/index.ts | 6 +- packages/core/actions/src/utils.ts | 2 +- packages/core/app/LICENSE | 661 -------- packages/core/app/client/.umirc.ts | 2 +- packages/core/app/client/src/pages/index.tsx | 2 +- packages/core/app/client/tsconfig.json | 2 +- packages/core/app/package.json | 23 +- .../core/app/src/__tests__/commands.test.ts | 4 +- packages/core/app/src/config/cache.ts | 2 +- packages/core/app/src/config/database.ts | 2 +- packages/core/app/src/config/logger.ts | 4 +- packages/core/app/src/config/plugins.ts | 5 +- packages/core/app/src/config/telemetry.ts | 2 +- packages/core/app/src/index.ts | 2 +- packages/core/auth/LICENSE | 201 --- packages/core/auth/package.json | 12 +- .../auth/src/__tests__/auth-manager.test.ts | 8 +- packages/core/auth/src/actions.ts | 2 +- packages/core/auth/src/auth-manager.ts | 4 +- packages/core/auth/src/auth.ts | 4 +- packages/core/auth/src/base/auth.ts | 4 +- packages/core/build/LICENSE | 201 --- packages/core/build/package.json | 2 +- packages/core/build/src/build.ts | 2 +- packages/core/build/src/buildEsm.ts | 2 +- packages/core/build/src/buildPlugin.ts | 38 +- packages/core/build/src/constant.ts | 2 +- packages/core/build/src/utils/getPackages.ts | 2 +- packages/core/cache/LICENSE | 201 --- packages/core/cache/package.json | 7 +- packages/core/cli/nocobase.conf.tpl | 4 +- packages/core/cli/package.json | 6 +- packages/core/cli/src/commands/build.ts | 6 +- packages/core/cli/src/commands/postinstall.ts | 2 +- packages/core/cli/src/commands/tar.ts | 6 +- packages/core/cli/src/commands/upgrade.ts | 2 +- packages/core/cli/src/util.ts | 8 +- .../cli/templates/plugin/package.json.tpl | 6 +- .../templates/plugin/src/client/index.tsx.tpl | 2 +- .../templates/plugin/src/server/plugin.ts.tpl | 2 +- packages/core/client/package.json | 10 +- .../client/src/antd-config-provider/index.tsx | 2 +- .../core/client/src/api-client/APIClient.ts | 2 +- .../client/src/api-client/demos/demo1.tsx | 2 +- .../client/src/api-client/demos/demo2.tsx | 2 +- .../client/src/api-client/demos/demo3.tsx | 2 +- .../client/src/api-client/hooks/assign.ts | 5 +- .../client/src/application/Application.tsx | 2 +- .../client/src/application/WebSocketClient.ts | 2 +- .../__tests__/Application.test.tsx | 2 +- .../__tests__/RouterManager.test.tsx | 2 +- .../__tests__/SchemaToolbar.test.tsx | 4 +- .../hoc/withDynamicSchemaProps.test.tsx | 2 +- .../src/application/__tests__/hooks.test.tsx | 2 +- .../src/application/__tests__/utils.test.tsx | 2 +- .../client/src/application/demos/demo1.tsx | 2 +- .../client/src/application/demos/demo2.tsx | 2 +- .../client/src/application/demos/demo3.tsx | 2 +- packages/core/client/src/application/index.md | 12 +- .../src/application/utils/globalDeps.ts | 22 +- .../src/block-provider/FormFieldProvider.tsx | 2 +- .../client/src/block-provider/hooks/index.ts | 2 +- .../block-provider/hooks/useParsedFilter.ts | 2 +- .../core/client/src/china-region/index.tsx | 2 +- .../Configuration/AddFieldAction.tsx | 2 +- .../src/collection-manager/demos/demo2.tsx | 2 +- .../src/collection-manager/demos/demo3.tsx | 2 +- .../src/collection-manager/demos/demo4.tsx | 2 +- .../src/collection-manager/demos/demo5.tsx | 2 +- .../interfaces/__tests__/json.tsx | 2 +- .../sql-collection/FieldsConfigure.tsx | 2 +- .../templates/expression.tsx | 2 +- .../CollectionFieldInterfaceManager.test.ts | 2 +- .../collection-field/CollectionField.test.tsx | 4 +- .../CollectionFieldProvider.test.tsx | 4 +- .../CollectionRecordProvider.test.tsx | 2 +- .../CollectionTemplateManager.test.ts | 2 +- .../collection/AssociationProvider.test.tsx | 4 +- .../__tests__/collection/Collection.test.tsx | 2 +- .../collection/CollectionManager.test.tsx | 2 +- .../CollectionManagerProvider.test.tsx | 4 +- .../collection/CollectionProvider.test.tsx | 4 +- .../ExtendCollectionsProvider.test.tsx | 2 +- .../CollectionDeletedPlaceholder.test.tsx | 4 +- .../data-block/DataBlockProvider.test.tsx | 2 +- ...sociation-table-list-and-parent-record.tsx | 2 +- .../association-table-list-and-source-id.tsx | 2 +- .../collection-form-create.tsx | 2 +- .../collection-form-get-and-update.tsx | 2 +- .../collection-form-record-and-update.tsx | 2 +- .../collection-table-list.tsx | 2 +- .../data-block/data-block-demos/createApp.tsx | 2 +- .../CollectionDataSourceProvider.test.tsx | 4 +- .../__tests__/data-source/DataSource.test.ts | 2 +- .../data-source/DataSourceManager.test.ts | 2 +- .../DataSourceManagerProvider.test.tsx | 2 +- .../data-source/DataSourceProvider.test.tsx | 4 +- .../src/data-source/__tests__/utils.test.ts | 2 +- .../collection/CollectionManager.ts | 2 +- .../data-block/DataBlockResourceProvider.tsx | 2 +- .../core/client/src/filter-provider/utils.ts | 2 +- .../__tests__/flag-provider.test.tsx | 2 +- .../client/src/icon/__tests__/icon.test.tsx | 2 +- .../core/client/src/icon/demos/antd-icon.tsx | 2 +- .../client/src/icon/demos/custom-icon.tsx | 2 +- .../core/client/src/icon/demos/iconfont.tsx | 2 +- .../client/src/icon/demos/register-icon.tsx | 2 +- packages/core/client/src/icon/index.md | 2 +- packages/core/client/src/locale/en_US.json | 3 +- packages/core/client/src/locale/zh-CN.json | 3 +- .../disassociate/__e2e__/disassociate.test.ts | 2 +- .../disassociate/__e2e__/templatesOfPage.ts | 2 +- .../__e2e__/schemaInitializer.test.ts | 2 +- .../__e2e__/schemaSettings.test.ts | 2 +- .../__e2e__/schemaInitializer.test.ts | 2 +- .../__e2e__/schemaSettings.test.ts | 2 +- .../form-create/associationForm.test.ts | 2 +- .../__e2e__/form-create/dragAndDrop.test.ts | 2 +- .../lazyLoadAssociationFields.test.ts | 2 +- .../form-create/lazyLoadVariables.test.ts | 2 +- .../form-create/schemaInitializer.test.ts | 2 +- .../form-create/schemaSettings.test.ts | 2 +- .../__e2e__/form-create/templatesOfBug.ts | 2 +- .../form-edit/schemaInitializer.test.ts | 2 +- .../__e2e__/form-edit/schemaSettings.test.ts | 2 +- .../form/fieldSettingsFormItem.tsx | 2 +- .../__e2e__/schemaInitializer.test.ts | 2 +- .../grid-card/__e2e__/schemaSettings.test.ts | 2 +- .../list/__e2e__/schemaInitializer.test.ts | 2 +- .../list/__e2e__/schemaSettings.test.ts | 2 +- .../__e2e__/schemaInitializer.test.ts | 2 +- .../__e2e__/schemaSettings.test.ts | 2 +- .../table-selector/__e2e__/templatesOfBug.ts | 2 +- .../table-selector/__e2e__/utils.ts | 2 +- .../table/__e2e__/actions/duplicate.test.ts | 2 +- .../table/__e2e__/actions/filter.test.ts | 2 +- .../table/__e2e__/checkboxForTableRow.test.ts | 2 +- .../table/__e2e__/dragAndDrop.test.ts | 2 +- .../table/__e2e__/schemaInitializer.test.ts | 2 +- .../table/__e2e__/schemaSettings.test.ts | 2 +- .../table/__e2e__/templatesOfBug.ts | 2 +- .../table/__e2e__/tree/schemaSettings.test.ts | 2 +- .../__e2e__/schemaInitializer.test.ts | 2 +- .../collapse/__e2e__/schemaSettings.test.ts | 2 +- .../form/__e2e__/schemaInitializer.test.ts | 2 +- .../form/__e2e__/schemaSettings.test.ts | 2 +- .../__e2e__/schemaInitializer.test.ts | 2 +- .../markdown/__e2e__/schemaSettings.test.ts | 2 +- .../dialog/__e2e__/schemaInitializer.test.ts | 2 +- .../dialog/__e2e__/schemaSettings.test.ts | 2 +- .../modules/dialog/__e2e__/templatesOfBug.ts | 2 +- .../src/modules/dialog/__e2e__/zIndex.test.ts | 2 +- .../cascaderComponentFieldSettings.tsx | 43 +- .../DatePicker/__e2e__/schemaSettings.test.ts | 2 +- .../component/DatePicker/__e2e__/utils.ts | 2 +- .../drawerSubTableComponentFieldSettings.tsx | 140 ++ .../modules/menu/__e2e__/dragAndDrop.test.ts | 2 +- .../menu/__e2e__/schemaInitializer.test.ts | 2 +- .../menu/__e2e__/schemaSettings.test.ts | 2 +- .../page/__e2e__/blockInitializers.test.ts | 2 +- .../modules/page/__e2e__/dragAndDrop.test.ts | 2 +- .../page/__e2e__/schemaInitailizer.test.ts | 2 +- .../page/__e2e__/schemaSettings.test.ts | 2 +- .../__e2e__/pluginManager.test.ts | 2 +- .../user-center/__e2e__/settings.test.ts | 2 +- .../src/nocobase-buildin-plugin/index.tsx | 2 +- packages/core/client/src/pm/PluginSetting.tsx | 17 +- .../schema-component/antd/action/Action.tsx | 2 +- .../antd/action/__tests__/action.test.tsx | 2 +- .../antd/action/demos/demo1.tsx | 2 +- .../antd/action/demos/demo2.tsx | 2 +- .../antd/action/demos/demo3.tsx | 2 +- .../antd/action/demos/demo4.tsx | 2 +- .../antd/action/demos/demo6.tsx | 2 +- .../association-field/InternalCascader.tsx | 14 +- .../InternalDrawerSubTable.tsx | 48 +- .../antd/association-field/hooks.ts | 2 +- .../antd/association-field/util.ts | 2 +- .../__tests__/association-select.test.tsx | 2 +- .../antd/association-select/demos/demo1.tsx | 2 +- .../antd/block-item/demos/demo1.tsx | 2 +- .../card-item/__tests__/card-item.test.tsx | 2 +- .../antd/card-item/demos/demo1.tsx | 2 +- .../antd/cascader/__tests__/cascader.test.tsx | 2 +- .../antd/cascader/demos/demo1.tsx | 2 +- .../antd/cascader/demos/demo2.tsx | 2 +- .../antd/checkbox/__tests__/checkbox.test.tsx | 2 +- .../antd/checkbox/demos/checkbox.group.tsx | 2 +- .../antd/checkbox/demos/checkbox.tsx | 2 +- .../__tests__/collection-select.test.tsx | 2 +- .../antd/collection-select/demos/demo1.tsx | 2 +- .../antd/color-picker/demos/demo1.tsx | 2 +- .../antd/color-picker/util.ts | 2 +- .../__tests__/color-select.test.tsx | 2 +- .../antd/color-select/demos/demo1.tsx | 2 +- .../src/schema-component/antd/cron/Cron.tsx | 2 +- .../antd/cron/__tests__/cron-set.test.tsx | 2 +- .../antd/cron/demos/demo1.tsx | 2 +- .../antd/cron/demos/demo2.tsx | 2 +- .../antd/custom-cascader/CustomCascader.tsx | 3 +- .../antd/date-picker/ReadPretty.tsx | 2 +- .../__tests__/date-picker.test.tsx | 2 +- .../antd/date-picker/__tests__/util.test.ts | 2 +- .../antd/date-picker/demos/demo1.tsx | 2 +- .../antd/date-picker/demos/demo10.tsx | 2 +- .../antd/date-picker/demos/demo11.tsx | 2 +- .../antd/date-picker/demos/demo2.tsx | 2 +- .../antd/date-picker/demos/demo3.tsx | 2 +- .../antd/date-picker/demos/demo4.tsx | 2 +- .../antd/date-picker/demos/demo5.tsx | 2 +- .../antd/date-picker/demos/demo6.tsx | 2 +- .../antd/date-picker/demos/demo7.tsx | 2 +- .../antd/date-picker/demos/demo8.tsx | 2 +- .../antd/date-picker/demos/demo9.tsx | 2 +- .../schema-component/antd/date-picker/util.ts | 2 +- .../antd/details/__tests__/details.test.tsx | 2 +- .../antd/details/demos/demo1.tsx | 2 +- .../__tests__/error-fallback.test.tsx | 2 +- .../antd/filter/FilterAction.tsx | 2 +- .../antd/filter/__tests__/filter.test.tsx | 2 +- .../antd/filter/demos/demo2.tsx | 8 +- .../antd/filter/demos/demo3.tsx | 2 +- .../antd/filter/demos/demo4.tsx | 2 +- .../antd/filter/demos/demo5.tsx | 2 +- .../antd/filter/demos/demo6.tsx | 2 +- .../form-item/__tests__/form-item.test.tsx | 2 +- .../antd/form-item/demos/demo1.tsx | 2 +- ...eLazyLoadDisplayAssociationFieldsOfForm.ts | 2 +- .../form-item/hooks/useParseDefaultValue.ts | 2 +- .../schema-component/antd/form-v2/Form.tsx | 2 +- .../antd/form-v2/Templates.tsx | 2 +- .../antd/form-v2/__tests__/form-v2.test.tsx | 2 +- .../antd/form-v2/demos/demo1.tsx | 2 +- .../antd/form-v2/demos/demo2.tsx | 2 +- .../antd/form-v2/demos/demo3.tsx | 2 +- .../schema-component/antd/form-v2/utils.tsx | 4 +- .../antd/form/__tests__/form.test.tsx | 2 +- .../antd/form/demos/apiClient.ts | 2 +- .../antd/form/demos/demo1.tsx | 2 +- .../antd/form/demos/demo2.tsx | 2 +- .../antd/form/demos/demo3.tsx | 2 +- .../antd/form/demos/demo4.tsx | 2 +- .../antd/form/demos/demo5.tsx | 2 +- .../antd/form/demos/demo6.tsx | 2 +- .../antd/form/demos/demo7.tsx | 2 +- .../antd/form/demos/demo8.tsx | 2 +- .../antd/g2plot/__tests__/g2plot.test.tsx | 2 +- .../antd/g2plot/demos/demo1.tsx | 2 +- .../grid-card/__tests__/grid-card.test.tsx | 2 +- .../antd/grid/__tests__/grid.test.tsx | 2 +- .../antd/grid/demos/demo1.tsx | 2 +- .../antd/grid/demos/demo2.tsx | 2 +- .../antd/grid/demos/demo3.tsx | 2 +- .../antd/icon-picker/IconPicker.tsx | 2 +- .../__tests__/icon-picker.test.tsx | 2 +- .../antd/icon-picker/demos/icon-picker.tsx | 2 +- .../antd/input-number/ReadPretty.tsx | 2 +- .../__tests__/input-number.test.tsx | 2 +- .../demos/addonBefore&addonAfter.tsx | 2 +- .../demos/highPrecisionDecimals.tsx | 2 +- .../antd/input-number/demos/inputNumber.tsx | 2 +- .../antd/input/__tests__/Input.test.tsx | 2 +- .../antd/input/demos/input.tsx | 2 +- .../antd/input/demos/json.tsx | 2 +- .../antd/input/demos/textarea.tsx | 2 +- .../schema-component/antd/input/demos/url.tsx | 2 +- .../antd/list/__tests__/list.test.tsx | 2 +- .../antd/markdown/__tests__/markdown.test.tsx | 2 +- .../antd/markdown/demos/demo1.tsx | 2 +- .../antd/markdown/demos/demo2.tsx | 2 +- .../src/schema-component/antd/menu/Menu.tsx | 2 +- .../antd/menu/__tests__/menu.test.tsx | 2 +- .../antd/menu/demos/demo1.tsx | 2 +- .../antd/menu/demos/demo2.tsx | 2 +- .../antd/menu/demos/demo3.tsx | 2 +- .../antd/page/__tests__/page.test.tsx | 2 +- .../antd/page/demos/demo1.tsx | 2 +- .../antd/password/__tests__/password.test.tsx | 2 +- .../antd/password/demos/demo1.tsx | 2 +- .../antd/password/demos/demo2.tsx | 2 +- .../antd/percent/__tests__/percent.test.tsx | 2 +- .../antd/percent/demos/percent.tsx | 2 +- .../antd/preview/__tests__/preview.test.tsx | 2 +- .../antd/preview/demos/demo1.tsx | 2 +- .../antd/radio/__tests__/radio.test.tsx | 2 +- .../antd/radio/demos/demo1.tsx | 2 +- .../antd/radio/demos/demo2.tsx | 2 +- .../antd/radio/demos/demo3.tsx | 2 +- .../__tests__/record-picker.test.tsx | 2 +- .../antd/record-picker/demos/demo1.tsx | 2 +- .../antd/record-picker/util.ts | 2 +- .../__tests__/remote-select.test.tsx | 2 +- .../antd/remote-select/demos/demo1.tsx | 2 +- .../rich-text/__tests__/rich-text.test.tsx | 2 +- .../antd/rich-text/demos/demo1.tsx | 2 +- .../antd/select/FormulaSelect.tsx | 2 +- .../schema-component/antd/select/Select.tsx | 2 +- .../antd/select/__tests__/select.test.tsx | 2 +- .../antd/select/demos/demo1.tsx | 2 +- .../antd/select/demos/demo2.tsx | 2 +- .../antd/select/demos/demo3.tsx | 2 +- .../src/schema-component/antd/select/utils.ts | 2 +- .../schema-component/antd/table-v2/Table.tsx | 2 +- .../antd/table-v2/__tests__/table-v2.test.tsx | 2 +- .../antd/table-v2/demos/demo1.tsx | 2 +- .../antd/table-v2/demos/demo2.tsx | 2 +- .../antd/table/__tests__/table.test.tsx | 2 +- .../antd/table/demos/demo1.tsx | 2 +- .../antd/table/demos/demo2.tsx | 2 +- .../antd/table/demos/demo3.tsx | 2 +- .../antd/table/demos/demo4.tsx | 2 +- .../antd/tabs/__tests__/tabs.test.tsx | 2 +- .../antd/tabs/demos/demo1.tsx | 2 +- .../__tests__/time-picker.test.tsx | 2 +- .../antd/time-picker/demos/demo1.tsx | 2 +- .../antd/time-picker/demos/demo2.tsx | 2 +- .../__tests__/tree-select.test.tsx | 2 +- .../antd/tree-select/demos/demo1.tsx | 2 +- .../antd/upload/ReadPretty.tsx | 2 +- .../antd/upload/__tests__/upload.test.tsx | 2 +- .../antd/upload/demos/demo1.tsx | 2 +- .../antd/upload/demos/demo2.tsx | 2 +- .../schema-component/antd/variable/Input.tsx | 2 +- .../antd/variable/TextArea.tsx | 2 +- .../antd/variable/__tests__/variable.test.tsx | 2 +- .../antd/variable/demos/demo1.tsx | 2 +- .../antd/variable/demos/demo2.tsx | 2 +- .../antd/variable/demos/demo3.tsx | 2 +- .../src/schema-component/demos/demo1.tsx | 2 +- .../src/schema-component/demos/demo2.tsx | 2 +- .../src/schema-component/demos/demo3.tsx | 2 +- .../src/schema-component/demos/demo4.tsx | 2 +- .../src/schema-initializer/demos/basic.tsx | 2 +- .../schema-initializer/demos/build-type.tsx | 2 +- .../demos/custom-button.tsx | 2 +- .../demos/custom-items-component.tsx | 2 +- .../demos/dynamic-visible-children.tsx | 2 +- .../demos/insert-schema-action.tsx | 2 +- .../demos/insert-schema-basic.tsx | 2 +- .../demos/insert-schema-form-item.tsx | 2 +- .../schema-initializer/demos/nested-items.tsx | 2 +- .../DataTemplates/components/Designer.tsx | 2 +- .../src/schema-settings/SchemaSettings.tsx | 2 +- .../schema-settings/SchemaSettingsPlugin.ts | 2 + .../hooks/useContextAssociationFields.tsx | 2 +- .../src/schema-settings/demos/basic.tsx | 2 +- .../src/schema-settings/demos/built-type.tsx | 2 +- .../demos/custom-component.tsx | 2 +- .../src/schema-settings/demos/demo3.tsx | 2 +- .../schema-settings/demos/schema-basic.tsx | 2 +- .../hooks/useParseDataScopeFilter.ts | 2 +- packages/core/client/src/user/CurrentUser.tsx | 2 +- .../user/CurrentUserSettingsMenuProvider.tsx | 2 +- packages/core/client/src/user/Help.tsx | 2 +- ...rrent-user-settings-menu-provider.test.tsx | 2 +- .../src/variables/VariablesProvider.tsx | 2 +- .../variables/__tests__/useVariables.test.tsx | 2 +- .../variables/hooks/useBuiltinVariables.ts | 2 +- packages/core/components/LICENSE | 201 --- packages/core/create-tachybase-app/LICENSE | 201 --- .../create-tachybase-app/src/generator.js | 8 +- .../templates/app/package.json.tpl | 4 +- .../templates/app/playwright.config.ts | 2 +- .../templates/app/vitest.config.mts | 2 +- packages/core/data-source-manager/LICENSE | 201 --- .../core/data-source-manager/package.json | 14 +- .../src/__tests__/data-source-factory.test.ts | 2 +- .../src/__tests__/data-source-manager.test.ts | 2 +- .../src/__tests__/koa.test.ts | 2 +- .../src/data-source-manager.ts | 2 +- .../src/data-source-with-database.ts | 2 +- .../data-source-manager/src/data-source.ts | 4 +- .../src/default-actions/list.ts | 4 +- .../src/default-actions/move.ts | 2 +- .../src/default-actions/utils.ts | 2 +- .../src/resource-manager.ts | 2 +- .../src/sequelize-collection-manager.ts | 2 +- packages/core/database/LICENSE | 201 --- packages/core/database/package.json | 11 +- .../eager-loading/eager-loading-tree.test.ts | 2 +- .../__tests__/field-options/sort-by.test.ts | 2 +- .../src/__tests__/fixtures/migrations/m1.ts | 2 +- .../src/__tests__/fixtures/migrations/m2.ts | 2 +- .../core/database/src/__tests__/group.test.ts | 2 +- .../inhertits/collection-inherits.test.ts | 4 +- .../database/src/__tests__/migrator.test.ts | 2 +- .../core/database/src/__tests__/model.test.ts | 2 +- .../src/__tests__/non-id-primary-key.test.ts | 2 +- .../operator/string-operator.test.ts | 2 +- .../src/__tests__/postgres/schema.test.ts | 2 +- .../relation-repository/appends.test.ts | 2 +- .../belongs-to-many-repository.test.ts | 4 +- .../has-many-repository.test.ts | 2 +- .../database/src/__tests__/repository.test.ts | 2 +- .../src/__tests__/repository/destroy.test.ts | 2 +- .../src/__tests__/repository/find.test.ts | 2 +- .../__tests__/repository/update-many.test.ts | 2 +- .../src/__tests__/repository/update.test.ts | 2 +- .../core/database/src/__tests__/sync.test.ts | 2 +- .../src/__tests__/sync/empty-table.test.ts | 2 +- .../src/__tests__/sync/unique-index.test.ts | 2 +- .../src/__tests__/underscored-options.test.ts | 2 +- .../src/__tests__/view/list-view.test.ts | 2 +- .../__tests__/view/view-collection.test.ts | 2 +- .../src/__tests__/view/view-inference.test.ts | 2 +- .../__tests__/view/view-repository.test.ts | 4 +- .../view/view-with-association.test.ts | 4 +- .../core/database/src/collection-importer.ts | 2 +- packages/core/database/src/database.ts | 6 +- .../core/database/src/fields/uid-field.ts | 2 +- .../database/src/magic-attribute-model.ts | 2 +- packages/core/database/src/migration.ts | 2 +- packages/core/database/src/mock-database.ts | 2 +- packages/core/database/src/operators/date.ts | 2 +- .../src/sql-collection/query-generator.ts | 2 +- packages/core/database/src/sync-runner.ts | 7 +- .../src/value-parsers/date-value-parser.ts | 2 +- packages/core/devtools/LICENSE | 201 --- packages/core/devtools/package.json | 8 +- packages/core/evaluators/package.json | 4 +- packages/core/evaluators/src/client/index.tsx | 2 +- packages/core/evaluators/src/server/index.ts | 2 +- packages/core/logger/LICENSE | 201 --- packages/core/logger/package.json | 2 +- packages/core/resourcer/LICENSE | 201 --- packages/core/resourcer/package.json | 4 +- packages/core/resourcer/src/action.ts | 2 +- packages/core/resourcer/src/middleware.ts | 2 +- packages/core/resourcer/src/resourcer.ts | 2 +- packages/core/sdk/LICENSE | 201 --- packages/core/sdk/package.json | 2 +- packages/core/server/package.json | 26 +- .../server/src/__tests__/app-command.test.ts | 2 +- .../core/server/src/__tests__/app.test.ts | 4 +- .../core/server/src/__tests__/command.test.ts | 2 +- .../core/server/src/__tests__/cron.test.ts | 2 +- .../core/server/src/__tests__/gateway.test.ts | 2 +- .../src/__tests__/main-data-source.test.ts | 2 +- .../__tests__/multiple-application.test.ts | 6 +- .../core/server/src/__tests__/plugin.test.ts | 2 +- packages/core/server/src/__tests__/pm.test.ts | 2 +- .../core/server/src/acl/available-action.ts | 2 +- packages/core/server/src/acl/index.ts | 2 +- packages/core/server/src/app-supervisor.ts | 2 +- packages/core/server/src/application.ts | 20 +- packages/core/server/src/cache/index.ts | 2 +- .../server/src/commands/create-migration.ts | 4 +- packages/core/server/src/commands/start.ts | 2 +- packages/core/server/src/gateway/index.ts | 6 +- .../server/src/gateway/ipc-socket-client.ts | 2 +- packages/core/server/src/gateway/ws-server.ts | 2 +- packages/core/server/src/helper.ts | 6 +- .../server/src/helpers/application-version.ts | 4 +- packages/core/server/src/locale/locale.ts | 4 +- packages/core/server/src/locale/resource.ts | 6 +- packages/core/server/src/main-data-source.ts | 2 +- .../server/src/middlewares/data-template.ts | 4 +- .../server/src/middlewares/data-wrapping.ts | 2 +- .../server/src/middlewares/db2resource.ts | 4 +- .../server/src/middlewares/parse-variables.ts | 2 +- packages/core/server/src/migration.ts | 2 +- .../20230912193824-package-name-unique.ts | 2 +- .../server/src/plugin-manager/constants.ts | 36 +- .../server/src/plugin-manager/middleware.ts | 4 +- .../src/plugin-manager/options/collection.ts | 4 +- .../src/plugin-manager/options/resource.ts | 2 +- .../plugin-manager-repository.ts | 2 +- .../src/plugin-manager/plugin-manager.ts | 6 +- .../core/server/src/plugin-manager/utils.ts | 8 +- packages/core/server/src/plugin.ts | 6 +- packages/core/telemetry/LICENSE | 201 --- packages/core/telemetry/package.json | 6 +- packages/core/telemetry/src/metric.ts | 2 +- packages/core/telemetry/src/trace.ts | 2 +- packages/core/test/package.json | 6 +- packages/core/test/src/server/index.ts | 2 +- packages/core/test/src/server/mockServer.ts | 4 +- packages/core/test/vitest.mjs | 4 +- packages/core/utils/package.json | 2 +- packages/core/utils/plugin-symlink.js | 4 +- .../utils/src/__tests__/toFixedByStep.test.ts | 2 +- .../@hera/plugin-approval-mobile/package.json | 8 +- .../approval/ApprovalBlockInitializer.tsx | 2 +- .../src/client/approval/ApprovalSettings.tsx | 2 +- .../src/client/approval/InitiationsBlock.tsx | 2 +- .../src/client/approval/TodosBlock.tsx | 2 +- .../src/client/approval/index.ts | 2 +- .../src/client/approval/locale.tsx | 4 +- .../src/client/index.tsx | 2 +- .../src/server/plugin.ts | 2 +- .../@hera/plugin-approval/package.json | 16 +- .../src/client/common/Pd.FormBlock.tsx | 2 +- .../src/client/configuration/index.ts | 2 +- .../VC.ApprovalInstructionNode.tsx | 2 +- .../approval-config/VC.AssigneesSelect.tsx | 2 +- .../approval-config/VC.ContentTooltip.tsx | 2 +- .../approval-config/VC.NegotiationConfig.tsx | 2 +- .../VC.SchemaConfigButtonApprover.tsx | 2 +- .../Iz.ApproverActionConfig.tsx | 2 +- .../Iz.ApproverAddBlock.tsx | 2 +- .../VC.ApprovalActionConfig.tsx | 2 +- .../VC.ApprovalFormBlockProvider.tsx | 2 +- .../VC.ApproverAddBlock.tsx | 2 +- .../VC.ApproverAddBlockKit.tsx | 2 +- .../approver-interface/VC.ApproverBlock.tsx | 4 +- .../VC.ApproverInterface.tsx | 4 +- .../useApprovalFormBlockProps.tsx | 2 +- .../client/configuration/instruction/index.ts | 2 +- .../instruction/node.ApprovalInstruction.tsx | 4 +- .../configuration/trigger/VC.ConfigButton.tsx | 2 +- .../src/client/configuration/trigger/index.ts | 2 +- .../Iz.LauncherActionConfig.tsx | 2 +- .../Iz.LauncherAddBlockButton.tsx | 2 +- .../Sm.LauncherInterface.tsx | 2 +- .../VC.LauncherActionConfig.tsx | 2 +- .../VC.LauncherBlockButton.tsx | 2 +- .../VC.LauncherInterface.tsx | 2 +- .../launcher-interface/VC.SchemaAddBlock.tsx | 4 +- .../trigger/node.ApprovalTrigger.tsx | 2 +- .../@hera/plugin-approval/src/client/index.ts | 2 +- .../plugin-approval/src/client/locale.ts | 2 +- .../usage/approval-block/Dt.ApprovalBlock.tsx | 2 +- .../usage/approval-block/VC.ApprovalBlock.tsx | 4 +- .../common/Pd.SchemaComponent.tsx | 2 +- .../src/client/usage/approval-block/index.ts | 2 +- .../usage/approval-block/launch/Dt.Record.tsx | 2 +- .../approval-block/launch/Pd.ActionBar.tsx | 2 +- .../launch/Pd.ApplyActionStatus.tsx | 2 +- .../launch/Pd.WithdrawAction.tsx | 2 +- .../launch/Sm.ApprovalBlockLaunch.tsx | 2 +- .../launch/VC.ApprovalBlockLaunch.tsx | 2 +- .../launch/VC.ViewActionLaunch.tsx | 2 +- .../launch/VC.ViewActionLaunchContent.tsx | 2 +- .../launch/apply-button/VC.ApplyButton.tsx | 2 +- .../launch/apply-button/hooks/useSubmit.tsx | 2 +- .../launch/hooks/useDestroyAction.tsx | 2 +- .../launch/hooks/useFormBlockProps.tsx | 2 +- .../approval-block/launch/hooks/useSubmit.tsx | 2 +- .../launch/hooks/useWithdrawAction.tsx | 2 +- .../todos/Dt.ApprovalFormBlock.tsx | 2 +- .../todos/Pd.ActionBarProvider.tsx | 4 +- .../todos/Sm.ApprovalBlockTodos.tsx | 2 +- .../todos/VC.ApprovalBlockTodos.tsx | 2 +- .../todos/VC.ViewActionTodos.tsx | 2 +- .../todos/VC.ViewActionTodosContent.tsx | 2 +- .../hooks/useApprovalDetailBlockProps.tsx | 2 +- .../todos/hooks/useApprovalFormBlockProps.tsx | 2 +- .../approval-block/todos/hooks/useSubmit.tsx | 2 +- .../usage/approval-common/Pd.ApprovalData.tsx | 2 +- .../approval-common/VC.ApprovalProcess.tsx | 2 +- .../approval-columns/column.status.tsx | 2 +- .../approval-columns/column.workflow.tsx | 2 +- .../src/client/usage/approval-common/index.ts | 2 +- .../process-columns/render.detail.tsx | 2 +- .../process-columns/render.status.tsx | 3 +- .../process-columns/render.taskNode.tsx | 3 +- .../Dt.RecordApprovals.tsx | 2 +- .../Iz.RecordApprovals.tsx | 4 +- .../VC.RecordApprovals.tsx | 2 +- .../usage/approval-record-block/index.ts | 2 +- .../plugin-approval/src/client/usage/index.ts | 2 +- .../src/server/ApprovalInstruction.ts | 2 +- .../src/server/ApprovalTrigger.ts | 4 +- .../plugin-approval/src/server/actions.ts | 4 +- .../server/collections/approvalExecutions.ts | 2 +- .../src/server/collections/approvalRecords.ts | 2 +- .../src/server/collections/approvals.ts | 2 +- .../plugin-approval/src/server/plugin.ts | 2 +- .../@hera/plugin-audit-logs/package.json | 12 +- .../src/client/AuditLogsBlockInitializer.tsx | 2 +- .../src/client/AuditLogsBlockProvider.tsx | 2 +- .../src/client/AuditLogsProvider.tsx | 2 +- .../src/client/components/AuditLogsField.tsx | 2 +- .../src/client/components/AuditLogsValue.tsx | 2 +- .../AuditLogsViewActionInitializer.tsx | 4 +- .../src/client/deplicated/AuditLogs.tsx | 2 +- .../client/deplicated/AuditLogsDesigner.tsx | 2 +- .../plugin-audit-logs/src/client/index.ts | 2 +- .../AuditLogsTableActionColumnInitializer.tsx | 2 +- ...AuditLogsTableActionColumnInitializers.tsx | 2 +- .../AuditLogsTableActionInitializers.tsx | 2 +- .../AuditLogsTableColumnInitializers.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/server/__tests__/hook.test.ts | 4 +- .../src/server/collections/auditChanges.ts | 2 +- .../src/server/collections/auditLogs.ts | 2 +- .../plugin-audit-logs/src/server/index.ts | 2 +- .../plugins/@hera/plugin-core/package.json | 17 +- .../src/client/components/PDFViewer.tsx | 2 +- .../CustomAssociatedField.tsx | 2 +- .../CustomComponentDispatcher.tsx | 4 +- .../custom-components/CustomField.tsx | 2 +- .../client/components/excel-table/Sheet.tsx | 2 +- .../components/fields/AssociatedField.tsx | 2 +- .../client/components/fields/CalcResult.tsx | 4 +- .../client/components/fields/Expression.tsx | 2 +- .../filter-form/FormFilterScope.tsx | 4 +- .../components/filter-form/VariableInput.tsx | 2 +- .../modal-full-screen/ModalFullScreen.tsx | 2 +- .../ModalFullScreenChild.tsx | 2 +- .../client/components/system/MobileLink.tsx | 2 +- .../components/system/Notifications.tsx | 4 +- .../components/system/OnlineUserProvider.tsx | 2 +- .../features/assistant/Assistant.provider.tsx | 2 +- .../src/client/features/assistant/index.ts | 2 +- .../context-menu/ContextMenu.provider.tsx | 2 +- .../src/client/features/context-menu/index.ts | 2 +- .../src/client/features/departments/index.tsx | 2 +- .../src/client/features/embed/EmbedLayout.tsx | 2 +- .../src/client/features/embed/EmbedPage.tsx | 2 +- .../features/embed/EmbedSchemaComponent.tsx | 2 +- .../src/client/features/embed/index.tsx | 2 +- .../client/features/embed/useEmbedToken.tsx | 2 +- .../features/extended-filter-form/index.ts | 2 +- .../hera-version/HeraVersion.provider.tsx | 2 +- .../src/client/features/hera-version/index.ts | 2 +- .../mode-highlight/ModeHighlight.provider.tsx | 19 + .../client/features/mode-highlight/index.tsx | 8 + .../OutboundLinkActionInitializer.tsx | 4 +- .../client/features/outbound/OutboundPage.tsx | 2 +- .../src/client/features/outbound/index.ts | 2 +- .../page-style/PageStyle.provider.tsx | 2 +- .../client/features/page-style/PageTab.tsx | 2 +- .../src/client/features/page-style/index.ts | 2 +- .../features/page-style/useTabSettings.tsx | 4 +- .../src/client/features/pdf/index.ts | 2 +- .../features/workflow-bulk/ApiTrigger.tsx | 2 +- .../BulkUpdateAction.Settings.tsx | 2 +- .../BulkUpdateActionInitializer.tsx | 2 +- .../CustomizeActionInitializer.tsx | 2 +- .../client/features/workflow-bulk/index.tsx | 2 +- .../client/features/workflow-bulk/utils.tsx | 2 +- .../WorkflowTriggerInterceptor.tsx | 2 +- .../features/workflow-interceptor/index.ts | 2 +- .../src/client/hooks/useCustomComponent.tsx | 2 +- .../hooks/useFilterBlockActionProps.tsx | 2 +- .../client/hooks/useFilterFormCustomProps.tsx | 2 +- .../src/client/hooks/useNotifications.ts | 2 +- .../src/client/hooks/usePluginVersion.ts | 2 +- .../src/client/hooks/useTokenConfiguration.ts | 2 +- .../@hera/plugin-core/src/client/index.tsx | 4 +- .../interfaces/AssociatedFieldInterface.ts | 2 +- .../client/interfaces/CalcFieldInterface.ts | 2 +- .../CustomAssociatedFieldInterface.ts | 2 +- .../client/interfaces/CustomFieldInterface.ts | 2 +- .../client/interfaces/ExcelFieldInterface.ts | 2 +- .../interfaces/SignaturePadFieldInterface.ts | 2 +- .../interfaces/TstzrangeFieldInterface.ts | 2 +- .../@hera/plugin-core/src/client/locale.tsx | 2 +- .../src/client/pages/AdminLayout.tsx | 36 +- .../src/client/pages/DetailsPage.tsx | 2 +- .../plugin-core/src/client/pages/Home.tsx | 2 +- .../plugin-core/src/client/pages/style.ts | 2 +- .../AssociationCascader.tsx | 2 +- .../auto-complete/AutoComplete.tsx | 2 +- .../schema-components/blocks/GroupBlock.tsx | 2 +- .../schema-components/blocks/PDFViewer.tsx | 2 +- .../actions/CreateSubmitActionInitializer.tsx | 2 +- .../actions/hooks/useCreateActionProps.tsx | 4 +- .../blocks/GroupBlockInitializer.tsx | 4 +- .../blocks/PDFVIewerBlockInitializer.tsx | 2 +- .../blocks/SettingBlockInitializer.tsx | 4 +- .../blocks/SheetBlockInitializer.tsx | 4 +- .../items/CustomFilterFormItemInitializer.tsx | 2 +- .../schema-settings/GroupBlockConfigure.tsx | 2 +- .../SchemaSettingsDatePickerType.tsx | 2 +- .../SchemaSettingsDatePresets.tsx | 4 +- .../schema-settings/SchemaSettingsRemove.tsx | 2 +- .../SchemaSettingsSubmitDataType.tsx | 2 +- .../src/client/schema-settings/index.tsx | 2 +- .../settings-manager-components/Features.tsx | 2 +- .../HomePageConfiguration.tsx | 2 +- .../LinkManager.tsx | 2 +- .../TokenConfiguration.tsx | 2 +- .../settings-manager-components/index.ts | 2 +- .../src/server/actions/departments.ts | 2 +- .../server/actions/link-manager-controller.ts | 4 +- .../src/server/actions/plugin-version.ts | 4 +- .../src/server/actions/robot-controller.ts | 4 +- .../actions/system-message-controller.ts | 4 +- .../actions/token-configuration-controller.ts | 4 +- .../plugin-core/src/server/actions/users.ts | 2 +- .../src/server/collections/departmentRoles.ts | 2 +- .../src/server/collections/departments.ts | 2 +- .../server/collections/departmentsUsers.ts | 2 +- .../home-page-presentations-attachments.ts | 2 +- .../collections/home-page-presentations.ts | 2 +- .../src/server/collections/link-manage.ts | 2 +- .../src/server/collections/roles.ts | 2 +- .../src/server/collections/systemSettings.ts | 2 +- .../src/server/collections/system_message.ts | 2 +- .../server/collections/token-configuration.ts | 2 +- .../src/server/collections/users.ts | 2 +- .../features/RequestInterceptionTrigger.ts | 4 +- .../src/server/features/departments.ts | 2 +- .../src/server/features/interception.ts | 2 +- .../plugin-core/src/server/fields/calc.ts | 2 +- .../src/server/fields/tstzrange.ts | 2 +- .../middlewares/destroy-department-check.ts | 2 +- .../reset-user-departments-cache.ts | 2 +- .../middlewares/set-department-owners.ts | 2 +- .../middlewares/set-departments-roles.ts | 4 +- .../server/middlewares/set-main-department.ts | 2 +- .../middlewares/update-department-isleaf.ts | 2 +- .../src/server/models/department.ts | 2 +- .../@hera/plugin-core/src/server/plugin.ts | 4 +- .../src/server/services/connection-manager.ts | 4 +- .../src/server/services/font-manager.ts | 2 +- .../src/server/services/home-page-service.ts | 6 +- .../src/server/services/plugin-version.ts | 7 +- .../src/server/services/sql-loader.ts | 4 +- .../server/services/system-setting-service.ts | 4 +- .../src/server/services/web-service.ts | 6 +- .../plugin-external-data-source/package.json | 9 +- .../src/client/index.tsx | 4 +- .../src/client/locale.ts | 2 +- .../src/server/plugin.ts | 2 +- .../src/server/postgres-collection-manager.ts | 2 +- .../src/server/postgres-data-source.ts | 4 +- .../server/services/database-introspector.ts | 2 +- .../plugins/@hera/plugin-rental/package.json | 14 +- .../client/custom-components/DetailChecks.tsx | 2 +- .../custom-components/MovementStatus.tsx | 50 + .../custom-components/RecordDetails.tsx | 125 +- .../custom-components/RecordFeeConverted.tsx | 355 ++-- .../RecordFeeConvertedRead.tsx | 2 +- .../custom-components/RecordFeeScope.tsx | 99 +- .../custom-components/RecordItemCount.tsx | 21 +- .../RecordItemValuationQuantity.tsx | 188 +-- .../custom-components/RecordItemWeight.tsx | 6 +- .../custom-components/RecordProductScope.tsx | 160 +- .../custom-components/RecordSummary.tsx | 427 +++-- .../custom-components/RecordTotalPrice.tsx | 3 +- .../plugin-rental/src/client/hooks/index.tsx | 239 ++- .../hooks/useAddToChecklistActionProps.tsx | 2 +- .../src/client/hooks/usePdfPath.tsx | 53 +- .../@hera/plugin-rental/src/client/index.tsx | 55 +- .../src/client/interfaces/movement.ts | 6 +- .../@hera/plugin-rental/src/client/locale.tsx | 2 +- .../src/client/schema-components/Movement.tsx | 7 +- .../AddToChecklistActionInitializer.tsx | 2 +- .../actions/ColumnSwitchActionInitializer.tsx | 2 +- .../PDFViewerPrintActionInitializer.tsx | 2 +- .../RecordPrintAnnotateActionInitializer.tsx | 30 + .../RecordPrintFontSizeInitializer.tsx | 36 + .../RecordPrintSetupActionInitializer.tsx | 6 +- .../RecordPrintSetupMargingTopInitializer.tsx | 6 +- ...SettlementExcelExportActionInitializer.tsx | 2 +- .../actions/SettlementExportExcel.tsx | 124 +- ...SettlementStyleSwitchActionInitializer.tsx | 2 +- .../actions/paperSwitching.tsx | 66 + .../blocks/UnusedRecordsBlockInitializer.tsx | 2 +- .../plugin-rental/src/interfaces/options.ts | 2 + .../plugin-rental/src/interfaces/waybill.ts | 42 +- .../server/actions/contracts-controller.ts | 4 +- .../src/server/actions/records-controller.ts | 222 ++- .../server/actions/settlement-controller.ts | 76 +- .../src/server/actions/waybills-controller.ts | 16 +- .../server/collections/inventory-orders.ts | 2 +- .../src/server/collections/transfer-orders.ts | 2 +- .../collections/undetermined-projects.ts | 2 +- ...122202859-update-record_category_script.ts | 2 +- .../20240202134835-update-contract_name.ts | 2 +- .../server/migrations/delect-notifications.ts | 2 +- .../migrations/import-contract-rule-v2.ts | 2 +- .../migrations/update-contracts_rule_items.ts | 2 +- .../migrations/update-record-all_price.ts | 2 +- .../migrations/update-record-contract_id.ts | 2 +- .../pdf-documents/records-documentV2.tsx | 647 ++++---- .../pdf-documents/settlements-document.tsx | 26 +- .../pdf-documents/waybills-document.tsx | 65 +- .../@hera/plugin-rental/src/server/plugin.ts | 9 +- .../server/services/contract-rule-service.ts | 195 +-- .../src/server/services/contract-service.ts | 6 +- .../server/services/detail-check-service.ts | 4 +- .../src/server/services/project-service.ts | 4 +- .../src/server/services/record-pdf-service.ts | 576 ++++--- .../src/server/services/record-service.ts | 588 ++----- .../services/settlement-products-service.ts | 598 +++++++ .../src/server/services/settlement-service.ts | 12 +- .../src/server/services/vehicles-service.ts | 4 +- .../src/server/sqls/pdf_record.sql | 120 -- .../src/server/sqls/pdf_record_fee.sql | 122 -- .../src/server/sqls/pdf_record_lease.sql | 112 -- .../sqls/pdf_record_no_porduct_fees.sql | 59 + .../sqls/pdf_record_product_fee_item.sql | 39 + .../server/sqls/pdf_record_product_item.sql | 42 + .../src/server/sqls/pdf_waybills.sql | 158 +- .../sqls/products_search_rule_special.sql | 24 + .../src/server/sqls/settlement_calc.sql | 276 ---- .../sqls/settlement_calc_fee_no_products.sql | 21 + .../sqls/settlement_calc_fee_products.sql | 59 + .../server/sqls/settlement_calc_products.sql | 60 + .../settlement_calc_record_fee_products.sql | 19 + .../src/server/sqls/settlement_select.sql | 22 + .../server/sqls/view_records_contracts.sql | 56 + .../src/server/sqls/waybills_products.sql | 19 + .../plugin-rental/src/utils/constants.ts | 12 - .../@hera/plugin-sancongtou/package.json | 6 +- .../plugin-sancongtou/src/client/index.tsx | 2 +- .../src/client/pages/ProductDetail.tsx | 2 +- .../plugin-sancongtou/src/server/plugin.ts | 2 +- .../plugins/@nocobase/plugin-acl/package.json | 16 +- .../plugin-acl/src/client/NewRole.tsx | 2 +- .../plugin-acl/src/client/RolesManagement.tsx | 2 +- .../plugin-acl/src/client/RolesMenu.tsx | 2 +- .../src/client/__e2e__/association.test.ts | 2 +- .../src/client/__e2e__/collection.test.ts | 2 +- .../src/client/__e2e__/configure.test.ts | 2 +- .../src/client/__e2e__/menu.test.ts | 2 +- .../plugin-acl/src/client/__e2e__/utils.ts | 2 +- .../@nocobase/plugin-acl/src/client/index.ts | 2 +- .../client/permissions/ActionPermissions.tsx | 2 +- .../client/permissions/AvailableActions.tsx | 2 +- .../client/permissions/GeneralPermissions.tsx | 2 +- .../client/permissions/MenuItemsProvider.tsx | 2 +- .../client/permissions/MenuPermissions.tsx | 2 +- .../src/client/permissions/Permissions.tsx | 2 +- .../client/permissions/PluginPermissions.tsx | 2 +- .../permissions/RolesResourcesActions.tsx | 2 +- .../src/client/permissions/ScopeSelect.tsx | 2 +- .../client/permissions/StrategyActions.tsx | 2 +- .../plugin-acl/src/client/roles-manager.ts | 2 +- .../plugin-acl/src/client/schemas/roles.ts | 2 +- .../plugin-acl/src/client/schemas/scopes.ts | 2 +- .../src/server/__tests__/acl.test.ts | 6 +- .../src/server/__tests__/actions.test.ts | 2 +- .../__tests__/association-field.test.ts | 6 +- .../server/__tests__/configuration.test.ts | 4 +- .../src/server/__tests__/list-action.test.ts | 4 +- .../src/server/__tests__/middleware.test.ts | 6 +- .../src/server/__tests__/own.test.ts | 6 +- .../src/server/__tests__/prepare.ts | 2 +- .../src/server/__tests__/role-check.test.ts | 4 +- .../server/__tests__/role-resource.test.ts | 4 +- .../src/server/__tests__/role-user.test.ts | 4 +- .../src/server/__tests__/role.test.ts | 4 +- .../src/server/__tests__/scope.test.ts | 4 +- .../server/__tests__/setCurrentRole.test.ts | 4 +- .../src/server/__tests__/snippets.test.ts | 2 +- .../src/server/__tests__/users.test.ts | 4 +- .../__tests__/write-role-to-acl.test.ts | 4 +- .../src/server/actions/role-collections.ts | 2 +- .../src/server/actions/user-setDefaultRole.ts | 2 +- .../src/server/collections/roles-users.ts | 2 +- .../src/server/collections/roles.ts | 2 +- .../src/server/collections/rolesResources.ts | 2 +- .../collections/rolesResourcesActions.ts | 2 +- .../collections/rolesResourcesScopes.ts | 2 +- .../src/server/collections/users.ts | 2 +- .../src/server/middlewares/setCurrentRole.ts | 6 +- .../src/server/middlewares/with-acl-meta.ts | 4 +- .../20221214072638-set-role-snippets.ts | 2 +- .../plugin-acl/src/server/model/RoleModel.ts | 4 +- .../server/model/RoleResourceActionModel.ts | 4 +- .../src/server/model/RoleResourceModel.ts | 4 +- .../@nocobase/plugin-acl/src/server/server.ts | 8 +- .../plugin-action-bulk-edit/package.json | 8 +- .../src/client/BulkEditAction.Settings.tsx | 2 +- .../src/client/BulkEditActionInitializer.tsx | 2 +- .../src/client/BulkEditBlockInitializers.tsx | 2 +- .../client/BulkEditFormActionInitializers.tsx | 2 +- .../client/BulkEditFormItemInitializers.tsx | 2 +- .../BulkEditSubmitActionInitializer.tsx | 2 +- .../CreateFormBulkEditBlockInitializer.tsx | 2 +- .../client/__e2e__/schemaInitailizer.test.ts | 2 +- .../src/client/__e2e__/schemaSettings.test.ts | 2 +- .../src/client/__e2e__/utils.ts | 2 +- .../src/client/bulkEditFormItemSettings.ts | 2 +- .../src/client/component/BulkEditField.tsx | 2 +- .../src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/client/utils.tsx | 4 +- .../src/server/plugin.ts | 2 +- .../plugin-action-bulk-update/package.json | 8 +- .../src/client/BulkUpdateAction.Settings.tsx | 2 +- .../client/BulkUpdateActionInitializer.tsx | 2 +- .../src/client/CustomizeActionInitializer.tsx | 2 +- .../client/__e2e__/schemaInitailizer.test.ts | 2 +- .../src/client/__e2e__/schemaSettings.test.ts | 2 +- .../src/client/__e2e__/utils.ts | 2 +- .../src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/client/utils.tsx | 4 +- .../src/server/plugin.ts | 2 +- .../plugin-action-duplicate/package.json | 6 +- .../src/client/DuplicateAction.Settings.tsx | 2 +- .../src/client/DuplicateAction.tsx | 2 +- .../src/client/DuplicateActionInitializer.tsx | 2 +- .../src/client/DuplicatePluginProvider.tsx | 2 +- .../client/__e2e__/schemaInitailizer.test.ts | 2 +- .../src/client/__e2e__/schemaSettings.test.ts | 2 +- .../src/client/__e2e__/utils.ts | 2 +- .../src/client/index.ts | 2 +- .../src/server/plugin.ts | 2 +- .../plugin-action-print/package.json | 6 +- .../src/client/PrintAction.Settings.tsx | 2 +- .../src/client/PrintActionInitializer.tsx | 2 +- .../src/client/PrintActionPluginProvider.tsx | 2 +- .../client/__e2e__/schemaInitailizer.test.ts | 2 +- .../src/client/__e2e__/utils.ts | 2 +- .../plugin-action-print/src/client/index.tsx | 2 +- .../plugin-action-print/src/client/utils.ts | 2 +- .../plugin-action-print/src/server/plugin.ts | 2 +- .../@nocobase/plugin-api-doc/package.json | 12 +- .../plugin-api-doc/src/client/Document.tsx | 4 +- .../plugin-api-doc/src/client/index.tsx | 2 +- .../plugin-api-doc/src/locale/index.ts | 2 +- .../plugin-api-doc/src/server/server.ts | 4 +- .../collections/components/field-type-map.ts | 2 +- .../swagger/collections/components/index.ts | 2 +- .../collections/components/parameters.ts | 2 +- .../swagger/collections/components/schemas.ts | 2 +- .../src/server/swagger/collections/index.ts | 2 +- .../collections/paths/associations/index.ts | 2 +- .../associations/multiple-association.ts | 2 +- .../paths/associations/single-association.ts | 2 +- .../swagger/collections/paths/collection.ts | 2 +- .../server/swagger/collections/paths/index.ts | 2 +- .../server/swagger/collections/tags/index.ts | 2 +- .../src/server/swagger/index.ts | 4 +- .../src/server/swagger/loader.ts | 2 +- .../src/server/swagger/merge.ts | 2 +- .../@nocobase/plugin-api-keys/package.json | 14 +- .../client/Configuration/ExpiresSelect.tsx | 2 +- .../src/client/Configuration/index.tsx | 2 +- .../src/client/Configuration/roles.ts | 2 +- .../src/client/Configuration/schema.tsx | 2 +- .../plugin-api-keys/src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/collections/apiKeys.ts | 2 +- .../src/server/__tests__/actions.test.ts | 4 +- .../src/server/actions/api-keys.ts | 4 +- .../plugin-api-keys/src/server/plugin.ts | 2 +- .../plugins/@nocobase/plugin-auth/README.md | 4 +- .../@nocobase/plugin-auth/package.json | 16 +- .../plugin-auth/src/client/AuthProvider.tsx | 2 +- .../src/client/__e2e__/auth.test.ts | 2 +- .../plugin-auth/src/client/basic/Options.tsx | 2 +- .../src/client/basic/SignInForm.tsx | 2 +- .../src/client/basic/SignUpForm.tsx | 4 +- .../plugin-auth/src/client/index.tsx | 4 +- .../src/client/pages/AuthLayout.tsx | 2 +- .../src/client/pages/SignInPage.tsx | 2 +- .../src/client/pages/SignUpPage.tsx | 2 +- .../src/client/settings/Authenticator.tsx | 2 +- .../src/client/settings/Options.tsx | 2 +- .../client/settings/schemas/authenticators.ts | 2 +- .../src/server/__tests__/actions.test.ts | 4 +- .../src/server/__tests__/auth.test.ts | 6 +- .../src/server/__tests__/storer.test.ts | 2 +- .../server/__tests__/token-blacklist.test.ts | 6 +- .../plugin-auth/src/server/actions/auth.ts | 2 +- .../src/server/actions/authenticators.ts | 6 +- .../plugin-auth/src/server/basic-auth.ts | 4 +- .../src/server/collections/authenticators.ts | 2 +- .../src/server/collections/token-blacklist.ts | 2 +- .../collections/users-authenticators.ts | 2 +- .../20230506152253-basic-authenticator.ts | 2 +- .../migrations/20230607174500-update-basic.ts | 2 +- .../20231218132032-fix-allow-signup.ts | 2 +- .../src/server/model/authenticator.ts | 4 +- .../plugin-auth/src/server/plugin.ts | 10 +- .../plugin-auth/src/server/storer.ts | 6 +- .../plugin-auth/src/server/token-blacklist.ts | 6 +- .../plugin-backup-restore/package.json | 12 +- .../src/client/Configuration.tsx | 2 +- .../src/client/DuplicatorProvider.tsx | 2 +- .../src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/server/__tests__/api.test.ts | 4 +- .../src/server/__tests__/dump-action.test.ts | 4 +- .../src/server/__tests__/dumper.test.ts | 6 +- .../src/server/__tests__/index.ts | 2 +- .../src/server/__tests__/on-dump.test.ts | 4 +- .../src/server/app-migrator.ts | 4 +- .../src/server/collection-group-manager.ts | 2 +- .../src/server/commands/restore-command.ts | 4 +- .../src/server/dumper.ts | 6 +- .../src/server/field-value-writer.ts | 2 +- .../src/server/resourcers/backup-files.ts | 6 +- .../src/server/restorer.ts | 4 +- .../src/server/server.ts | 2 +- .../plugin-backup-restore/src/server/utils.ts | 2 +- .../@nocobase/plugin-calendar/package.json | 8 +- .../client/__e2e__/schemaInitializer.test.ts | 2 +- .../src/client/__e2e__/templates.ts | 2 +- .../src/client/__tests__/calendar.test.tsx | 2 +- .../src/client/calendar/Calendar.Designer.tsx | 2 +- .../src/client/calendar/Calendar.tsx | 2 +- .../src/client/calendar/Calender.Settings.tsx | 2 +- .../src/client/calendar/DeleteEvent.tsx | 2 +- .../src/client/calendar/Nav.tsx | 2 +- .../src/client/calendar/Title.tsx | 2 +- .../src/client/calendar/Today.tsx | 2 +- .../src/client/calendar/ViewSelect.tsx | 2 +- .../src/client/calendar/demos/demo1.tsx | 2 +- .../src/client/calendar/demos/demo2.tsx | 2 +- .../src/client/calendar/index.ts | 2 +- .../src/client/calendar/style.ts | 2 +- .../client/collection-templates/calendar.tsx | 2 +- .../hooks/useCalendarBlockDecoratorProps.ts | 2 +- .../plugin-calendar/src/client/index.tsx | 2 +- .../CalendarBlockProvider.tsx | 2 +- .../CalendarActionInitializers.tsx | 2 +- .../CalendarFormActionInitializers.tsx | 2 +- .../items/CalendarBlockInitializer.tsx | 2 +- ...ordAssociationCalendarBlockInitializer.tsx | 2 +- .../plugin-calendar/src/locale/index.ts | 2 +- .../plugin-calendar/src/server/server.ts | 2 +- .../plugins/@nocobase/plugin-cas/package.json | 14 +- .../plugin-cas/src/client/Options.tsx | 2 +- .../plugin-cas/src/client/SigninPage.tsx | 4 +- .../@nocobase/plugin-cas/src/client/index.tsx | 2 +- .../plugin-cas/src/server/actions/login.ts | 2 +- .../plugin-cas/src/server/actions/service.ts | 4 +- .../@nocobase/plugin-cas/src/server/auth.ts | 4 +- .../@nocobase/plugin-cas/src/server/plugin.ts | 2 +- .../plugin-china-region/build.config.ts | 2 +- .../plugin-china-region/package.json | 8 +- .../src/client/ChinaRegionProvider.tsx | 2 +- .../plugin-china-region/src/client/index.tsx | 2 +- .../src/server/__tests__/action.test.ts | 4 +- .../src/server/collections/chinaRegions.ts | 2 +- .../plugin-china-region/src/server/index.ts | 2 +- .../@nocobase/plugin-client/build.config.ts | 4 +- .../@nocobase/plugin-client/package.json | 10 +- .../plugin-client/src/client/index.ts | 2 +- .../20231215215245-admin-menu-uid.test.ts | 2 +- .../plugin-client/src/server/antd.ts | 2 +- .../plugin-client/src/server/cron.ts | 4 +- .../20230620203216-admin-ui-schema-uid.ts | 4 +- .../20231215215247-admin-menu-uid.ts | 4 +- .../plugin-client/src/server/server.ts | 2 +- .../plugin-collection-manager/package.json | 12 +- .../collection-template/calendar.test.ts | 4 +- .../connectToDatabaseView.test.ts | 2 +- .../collection-template/expression.test.ts | 4 +- .../__e2e__/collection-template/file.test.ts | 4 +- .../collection-template/general.test.ts | 4 +- .../__e2e__/collection-template/sql.test.ts | 4 +- .../__e2e__/collection-template/tree.test.ts | 4 +- .../attachment/schemaInitializer.test.ts | 2 +- .../fields/attachment/schemaSettings.test.ts | 2 +- .../belongsTo/schemaInitializer.test.ts | 2 +- .../fields/belongsTo/schemaSettings.test.ts | 2 +- .../fields/checkbox/schemaInitializer.test.ts | 6 +- .../fields/checkbox/schemaSettings.test.ts | 2 +- .../checkboxGroup/schemaSettings.test.ts | 2 +- .../fields/chinaRegion/schemaSettings.test.ts | 2 +- .../collection/schemaInitializer.test.ts | 2 +- .../fields/collection/schemaSettings.test.ts | 2 +- .../fields/color/schemaInitializer.test.ts | 2 +- .../fields/color/schemaSettings.test.ts | 2 +- .../createdAt/schemaInitializer.test.ts | 2 +- .../fields/createdAt/schemaSettings.test.ts | 2 +- .../fields/createdBy/schemaSettings.test.ts | 2 +- .../fields/datetime/schemaInitializer.test.ts | 2 +- .../fields/datetime/schemaSettings.test.ts | 2 +- .../fields/email/schemaSettings.test.ts | 2 +- .../fields/formula/schemaSettings.test.ts | 2 +- .../fields/hasOne/schemaSettings.test.ts | 2 +- .../fields/icon/schemaSettings.test.ts | 2 +- .../__e2e__/fields/id/schemaSettings.test.ts | 2 +- .../fields/integer/schemaSettings.test.ts | 2 +- .../fields/json/schemaSettings.test.ts | 2 +- .../lastUpdatedAt/schemaSettings.test.ts | 6 +- .../lastUpdatedBy/schemaSettings.test.ts | 2 +- .../fields/longText/schemaSettings.test.ts | 2 +- .../fields/manyToMany/schemaSettings.test.ts | 2 +- .../fields/manyToOne/schemaSettings.test.ts | 2 +- .../fields/manyToOne/templatesOfBug.ts | 2 +- .../fields/markdown/schemaSettings.test.ts | 2 +- .../mutipleSelect/schemaSettings.test.ts | 2 +- .../fields/number/schemaSettings.test.ts | 2 +- .../fields/oneToMany/schemaSettings.test.ts | 2 +- .../fields/password/schemaSettings.test.ts | 2 +- .../fields/percent/schemaSettings.test.ts | 2 +- .../fields/phone/schemaSettings.test.ts | 2 +- .../fields/radioGroup/schemaSettings.test.ts | 2 +- .../fields/richText/schemaSettings.test.ts | 2 +- .../fields/sequence/schemaSettings.test.ts | 2 +- .../singleLineText/schemaSettings.test.ts | 2 +- .../singleSelect/schemaSettings.test.ts | 2 +- .../fields/tableOID/schemaSettings.test.ts | 2 +- .../fields/time/schemaInitializer.test.ts | 2 +- .../fields/time/schemaSettings.test.ts | 2 +- .../__e2e__/fields/url/schemaSettings.test.ts | 2 +- .../src/client/__e2e__/utils.ts | 2 +- .../src/client/index.ts | 2 +- .../src/server/__tests__/action.test.ts | 4 +- .../reference-integerity-check.test.ts | 4 +- .../__tests__/beforeInitOptions.test.ts | 4 +- .../__tests__/collection-categories.test.ts | 4 +- ...ollection-without-id-primary-field.test.ts | 4 +- .../__tests__/collections.repository.test.ts | 4 +- .../field-options/default-value.test.ts | 4 +- .../__tests__/field-options/indexes.test.ts | 2 +- .../__tests__/fields.repository.test.ts | 4 +- .../__tests__/fields/belongs-to-many.test.ts | 4 +- .../server/__tests__/fields/belongsTo.test.ts | 4 +- .../server/__tests__/fields/destroy.test.ts | 4 +- .../server/__tests__/fields/hasMany.test.ts | 4 +- .../server/__tests__/fields/hasOne.test.ts | 4 +- .../__tests__/fields/reverseField.test.ts | 4 +- .../src/server/__tests__/fields/uuid.test.ts | 4 +- .../http-api/belongs-to-many.test.ts | 2 +- .../__tests__/http-api/collections.test.ts | 2 +- .../server/__tests__/http-api/find.test.ts | 4 +- .../__tests__/http-api/has-many.test.ts | 2 +- .../http-api/inherited-collection.test.ts | 2 +- .../__tests__/http-api/recreate.test.ts | 2 +- .../server/__tests__/http-api/tree.test.ts | 4 +- .../http-api/view-collection.test.ts | 6 +- .../src/server/__tests__/index.ts | 2 +- .../inherits/inherited-collection.test.ts | 6 +- .../inhertied-collection-with-schema.test.ts | 6 +- ...04151410-update-collections-hidden.test.ts | 4 +- .../drop-ui-schema-relation.test.ts | 6 +- .../migrations/set-collection-schema.test.ts | 4 +- .../migrations/update-id-to-bigint.test.ts | 4 +- .../src/server/__tests__/primary-key.test.ts | 4 +- .../__tests__/reference-integerity.test.ts | 4 +- .../__tests__/remove-collection.test.ts | 4 +- .../resources/collections.fields.test.ts | 2 +- .../__tests__/resources/collections.test.ts | 4 +- .../src/server/__tests__/sync.test.ts | 4 +- .../src/server/__tests__/through.test.ts | 2 +- .../__tests__/view/view-collection.test.ts | 6 +- .../collections/collectionCategories.ts | 2 +- .../src/server/collections/collections.ts | 2 +- .../src/server/collections/fields.ts | 2 +- .../hooks/afterCreateForForeignKeyField.ts | 6 +- .../hooks/afterCreateForReverseField.ts | 2 +- .../hooks/afterDestroyForForeignKeyField.ts | 2 +- .../beforeCreateForChildrenCollection.ts | 2 +- .../hooks/beforeCreateForReverseField.ts | 2 +- .../hooks/beforeCreateForValidateField.ts | 2 +- .../hooks/beforeCreateForViewCollection.ts | 2 +- .../server/hooks/beforeDestroyForeignKey.ts | 2 +- .../src/server/hooks/beforeInitOptions.ts | 4 +- .../20220613103214-alert-sub-table.ts | 2 +- .../20220704225714-drop-foreign-keys.ts | 2 +- .../20221101111110-update-foreign-fields.ts | 2 +- ...0221104151410-update-collections-hidden.ts | 2 +- .../20221121111110-update-fk-type.ts | 4 +- .../20221121111113-update-id-to-bigint.ts | 4 +- .../migrations/20221221103220-timestamps.ts | 2 +- .../20230225111112-drop-ui-schema-relation.ts | 4 +- .../20230509111114-alert-ui-schema.ts | 4 +- .../migrations/20230623145414-number-step.ts | 4 +- .../migrations/20230704222935-tableoid.ts | 2 +- .../20230918024546-set-collection-schema.ts | 2 +- .../20240220153103-install-main-datasource.ts | 2 +- .../src/server/models/collection.ts | 2 +- .../src/server/models/field.ts | 2 +- .../repositories/collection-repository.ts | 6 +- .../src/server/resourcers/collections.ts | 2 +- .../src/server/resourcers/sql.ts | 4 +- .../src/server/resourcers/views.ts | 2 +- .../src/server/server.ts | 4 +- .../plugin-custom-request/package.json | 18 +- .../src/client/__e2e__/schemaSettings.test.ts | 2 +- .../client/components/CustomRequestAction.tsx | 2 +- .../CustomRequestActionDesigner.tsx | 2 +- .../hooks/useCustomRequestVariableOptions.ts | 2 +- .../client/hooks/useCustomRequestsResource.ts | 4 +- .../hooks/useCustomizeRequestActionProps.ts | 4 +- .../src/client/hooks/useGetCustomRequest.ts | 2 +- .../src/client/index.tsx | 2 +- .../initializer/CustomRequestInitializer.tsx | 2 +- .../src/client/locale.ts | 2 +- .../src/client/schemaSettings.ts | 2 +- .../src/server/__tests__/actions.test.ts | 6 +- .../src/server/actions/listByCurrentRole.ts | 2 +- .../src/server/actions/send.ts | 6 +- .../src/server/collections/customRequest.ts | 2 +- .../server/collections/customRequestsRoles.ts | 2 +- .../src/server/plugin.ts | 4 +- .../plugin-data-source-manager/package.json | 12 +- .../src/client/DatabaseConnectionProvider.tsx | 2 +- .../src/client/ThridDataSource.ts | 2 +- .../src/client/component/BreadcumbTitle.tsx | 2 +- .../CollectionsManager/AddFieldAction.tsx | 2 +- .../CollectionsManager/CollectionFields.tsx | 2 +- .../CollectionsManager/ConfigurationTable.tsx | 2 +- .../CollectionsManager/ConfigurationTabs.tsx | 2 +- .../EditCollectionAction.tsx | 2 +- .../CollectionsManager/EditFieldAction.tsx | 2 +- .../CollectionFieldInterfaceSelect.tsx | 2 +- .../components/CollectionName.tsx | 2 +- .../components/FieldTitleInput.tsx | 2 +- .../components/FieldType.tsx | 2 +- .../components/TitleField.tsx | 2 +- .../components/UnSupportFields.tsx | 2 +- .../CollectionsManager/components/index.tsx | 2 +- .../component/CollectionsManager/hooks.ts | 2 +- .../component/CollectionsManager/index.tsx | 2 +- .../schema/collectionFields.ts | 2 +- .../CollectionsManager/schema/collections.ts | 2 +- .../component/CreateDatabaseConnectAction.tsx | 2 +- .../component/DatabaseConnectionManager.tsx | 2 +- .../EditDatabaseConnectionAction.tsx | 2 +- .../Configuration/AddCategoryAction.tsx | 2 +- .../Configuration/CollectionFields.tsx | 2 +- .../Configuration/CollectionFieldsTable.tsx | 2 +- .../CollectionFieldsTableArray.tsx | 2 +- .../Configuration/ConfigurationTable.tsx | 2 +- .../Configuration/ConfigurationTabs.tsx | 2 +- .../Configuration/EditCategoryAction.tsx | 2 +- .../Configuration/interfaces.tsx | 2 +- .../Configuration/schemas/collectionFields.ts | 2 +- .../Configuration/schemas/collections.ts | 6 +- .../component/MainDataSourceManager/index.tsx | 2 +- .../PermissionManager/DataSourceTable.tsx | 2 +- .../PermissionManager/PermisionProvider.tsx | 2 +- .../PermissionManager/RoleConfigure.tsx | 2 +- .../RolesResourcesActions.tsx | 2 +- .../PermissionManager/ScopeSelect.tsx | 2 +- .../PermissionManager/StrategyActions.tsx | 2 +- .../component/PermissionManager/index.tsx | 2 +- .../PermissionManager/schemas/scopes.ts | 2 +- .../schemas/useRoleResourceValues.ts | 2 +- .../schemas/useSaveRoleResourceAction.ts | 2 +- .../ViewDatabaseConnectionAction.tsx | 2 +- .../src/client/hooks/index.ts | 2 +- .../src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../__tests__/data-source-with-acl.test.ts | 6 +- .../src/server/__tests__/data-sources.test.ts | 4 +- .../collections/data-sources-collections.ts | 2 +- .../server/collections/data-sources-fields.ts | 2 +- .../data-sources-roles-resources-actions.ts | 2 +- .../data-sources-roles-resources-scopes.ts | 2 +- .../data-sources-roles-resources.ts | 2 +- .../server/collections/data-sources-roles.ts | 2 +- .../src/server/collections/data-sources.ts | 2 +- .../20240301164024-migrate-acl-resources.ts | 4 +- .../src/server/models/data-source.ts | 6 +- .../models/data-sources-collection-model.ts | 4 +- .../server/models/data-sources-field-model.ts | 4 +- .../server/models/data-sources-roles-model.ts | 4 +- .../src/server/plugin.ts | 2 +- .../src/server/services/collection-manager.ts | 2 +- .../server/services/database-introspector.ts | 2 +- .../server/services/full-data-repository.ts | 2 +- .../plugin-data-visualization/package.json | 14 +- .../src/client/__tests__/hooks.test.ts | 2 +- .../src/client/block/ChartBlock.tsx | 2 +- .../src/client/block/ChartBlockDesigner.tsx | 2 +- .../client/block/ChartBlockInitializer.tsx | 2 +- .../src/client/chart/antd/GroupedTable.ts | 2 +- .../src/client/chart/group.ts | 2 +- .../client/configure/ChartConfigProvider.tsx | 2 +- .../src/client/configure/ChartConfigure.tsx | 2 +- .../configure/FilterDynamicComponent.tsx | 2 +- .../filter/CollectionFieldInitializer.tsx | 2 +- .../filter/FilterActionInitializers.tsx | 2 +- .../src/client/filter/FilterBlockDesigner.tsx | 2 +- .../client/filter/FilterBlockInitializer.tsx | 2 +- .../src/client/filter/FilterBlockProvider.tsx | 2 +- .../src/client/filter/FilterForm.tsx | 2 +- .../src/client/filter/FilterItemDesigner.tsx | 2 +- .../client/filter/FilterItemInitializers.tsx | 2 +- .../src/client/filter/FilterVariableInput.tsx | 2 +- .../src/client/filter/utils.ts | 4 +- .../src/client/hooks/filter.ts | 4 +- .../src/client/hooks/query.ts | 2 +- .../src/client/hooks/useUserVariable.ts | 2 +- .../src/client/hooks/useVariableOptions.ts | 2 +- .../src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/client/renderer/ChartRenderer.tsx | 2 +- .../client/renderer/ChartRendererProvider.tsx | 2 +- .../src/server/__tests__/api.test.ts | 4 +- .../src/server/__tests__/query.test.ts | 2 +- .../src/server/actions/query.ts | 8 +- .../20230926211750-rename-charttype.ts | 4 +- .../src/server/plugin.ts | 4 +- .../plugin-error-handler/package.json | 10 +- .../plugin-error-handler/src/client/index.ts | 2 +- .../src/server/__tests__/render-error.test.ts | 4 +- .../plugin-error-handler/src/server/server.ts | 4 +- .../@nocobase/plugin-export/package.json | 12 +- .../src/client/ExportActionInitializer.tsx | 2 +- .../src/client/ExportDesigner.tsx | 2 +- .../src/client/ExportPluginProvider.tsx | 2 +- .../plugin-export/src/client/index.ts | 2 +- .../src/client/schemaSettings.ts | 2 +- .../src/client/useExportAction.ts | 2 +- .../plugin-export/src/client/useFields.ts | 2 +- .../plugin-export/src/client/useShared.ts | 2 +- .../src/server/__tests__/utils/utils.test.ts | 4 +- .../src/server/actions/export-xlsx.ts | 4 +- .../plugin-export/src/server/index.ts | 2 +- .../src/server/renders/renders.ts | 4 +- .../plugin-file-manager/package.json | 12 +- .../src/client/FileManagerProvider.tsx | 2 +- .../src/client/FileStorage.tsx | 2 +- .../client/__e2e__/createLocalStorage.test.ts | 4 +- .../client/__e2e__/editLocalStorage.test.ts | 4 +- .../client/__e2e__/pageobject/localStorage.ts | 2 +- .../src/client/hooks/useUploadFiles.ts | 2 +- .../plugin-file-manager/src/client/index.tsx | 2 +- .../initializers/UploadActionInitializer.tsx | 2 +- .../src/client/interfaces/attachment.ts | 2 +- .../src/client/templates/file.ts | 2 +- .../src/server/FileModel.ts | 2 +- .../src/server/__tests__/index.ts | 2 +- .../server/__tests__/storages/ali-oss.test.ts | 4 +- .../src/server/__tests__/storages/s3.test.ts | 4 +- .../server/__tests__/storages/tx-cos.test.ts | 4 +- .../src/server/__tests__/tables/users.ts | 2 +- .../src/server/actions/attachments.ts | 4 +- .../src/server/actions/index.ts | 2 +- .../src/server/collections/attachments.ts | 2 +- .../src/server/collections/storages.ts | 2 +- .../20230831160742-fix-attachment-field.ts | 4 +- .../migrations/20231120142523-fix-storage.ts | 4 +- .../20240306223006-update-target.ts | 4 +- .../plugin-file-manager/src/server/server.ts | 2 +- .../src/server/storages/index.ts | 4 +- .../plugin-formula-field/package.json | 12 +- .../client/components/Formula/Expression.tsx | 2 +- .../src/client/components/Formula/Result.tsx | 8 +- .../client/components/Formula/demos/demo2.tsx | 2 +- .../plugin-formula-field/src/client/index.tsx | 2 +- .../src/client/interfaces/formula.tsx | 6 +- .../src/client/locale/index.ts | 2 +- .../src/client/scopes.tsx | 6 +- .../server/__tests__/formula-field.test.ts | 2 +- .../src/server/formula-field.ts | 4 +- .../migrations/20230213161904-alter-field.ts | 2 +- .../plugin-formula-field/src/server/plugin.ts | 2 +- .../@nocobase/plugin-gantt/package.json | 8 +- .../src/client/Gantt.Designer.tsx | 2 +- .../src/client/Gantt.Settings.tsx | 2 +- .../src/client/GanttActionInitializers.tsx | 2 +- .../src/client/GanttBlockInitializer.tsx | 2 +- .../src/client/GanttBlockProvider.tsx | 2 +- .../src/client/__e2e__/drag.test.ts | 2 +- .../client/__e2e__/schemaInitailizer.test.ts | 2 +- .../src/client/__e2e__/schemaSettings.test.ts | 2 +- .../plugin-gantt/src/client/__e2e__/utils.ts | 2 +- .../src/client/components/gantt/gantt.tsx | 2 +- .../src/client/components/gantt/style.tsx | 2 +- .../src/client/components/grid/grid-body.tsx | 2 +- .../plugin-gantt/src/client/demos/demo1.tsx | 2 +- .../plugin-gantt/src/client/index.tsx | 2 +- .../plugin-gantt/src/client/utils.tsx | 2 +- .../plugin-gantt/src/server/plugin.ts | 2 +- .../package.json | 10 +- .../src/client/GraphCollectionShortcut.tsx | 2 +- .../src/client/GraphDrawPage.tsx | 2 +- .../src/client/action-hooks.tsx | 4 +- .../client/components/AddCollectionAction.tsx | 2 +- .../src/client/components/AddFieldAction.tsx | 2 +- .../client/components/ConnectChildAction.tsx | 2 +- .../client/components/ConnectParentAction.tsx | 2 +- .../components/DeleteCollectionAction.tsx | 2 +- .../components/EditCollectionAction.tsx | 2 +- .../src/client/components/EditFieldAction.tsx | 2 +- .../src/client/components/Entity.tsx | 2 +- .../src/client/components/FieldSummary.tsx | 2 +- .../components/LocateCollectionAction.tsx | 2 +- .../client/components/OverrideFieldAction.tsx | 2 +- .../components/SelectCollectionsAction.tsx | 2 +- .../src/client/components/ViewFieldAction.tsx | 2 +- .../src/client/index.tsx | 2 +- .../src/client/style.tsx | 2 +- .../src/client/utils.tsx | 2 +- .../src/server/collections/graphPositions.ts | 2 +- .../src/server/index.ts | 2 +- .../plugin-iframe-block/package.json | 10 +- .../src/client/Iframe.Designer.tsx | 2 +- .../plugin-iframe-block/src/client/Iframe.tsx | 2 +- .../src/client/IframeBlockInitializer.tsx | 2 +- .../src/client/IframeBlockProvider.tsx | 2 +- .../plugin-iframe-block/src/client/index.ts | 2 +- .../src/client/schemaSettings.ts | 2 +- .../src/server/actions/index.ts | 4 +- .../src/server/collections/iframe-html.ts | 2 +- .../plugin-iframe-block/src/server/plugin.ts | 2 +- .../plugins/@nocobase/plugin-import/README.md | 2 +- .../@nocobase/plugin-import/README.zh-CN.md | 2 +- .../@nocobase/plugin-import/package.json | 12 +- .../src/client/ImportActionInitializer.tsx | 2 +- .../src/client/ImportDesigner.tsx | 2 +- .../plugin-import/src/client/ImportModal.tsx | 2 +- .../src/client/ImportPluginProvider.tsx | 2 +- .../plugin-import/src/client/index.ts | 2 +- .../src/client/schemaSettings.ts | 2 +- .../plugin-import/src/client/useFields.ts | 2 +- .../src/client/useImportAction.ts | 2 +- .../plugin-import/src/client/useShared.ts | 2 +- .../server/actions/downloadXlsxTemplate.ts | 2 +- .../src/server/actions/importXlsx.ts | 6 +- .../plugin-import/src/server/index.ts | 2 +- .../src/server/middleware/index.ts | 4 +- .../src/server/utils/transform.ts | 2 +- .../@nocobase/plugin-kanban/package.json | 6 +- .../src/client/CreateAndSelectSort/index.tsx | 2 +- .../src/client/Kanban.Card.Designer.tsx | 2 +- .../plugin-kanban/src/client/Kanban.Card.tsx | 2 +- .../src/client/Kanban.Designer.tsx | 2 +- .../src/client/Kanban.Settings.tsx | 2 +- .../plugin-kanban/src/client/Kanban.tsx | 2 +- .../src/client/KanbanActionInitializers.tsx | 2 +- .../src/client/KanbanBlockInitializer.tsx | 2 +- .../src/client/KanbanBlockProvider.tsx | 2 +- .../client/__e2e__/schemaInitailizer.test.ts | 2 +- .../src/client/__e2e__/schemaSettings.test.ts | 2 +- .../plugin-kanban/src/client/__e2e__/utils.ts | 2 +- .../src/client/board/demos/demo2.tsx | 2 +- .../plugin-kanban/src/client/index.tsx | 2 +- .../plugin-kanban/src/client/locale/index.ts | 2 +- .../plugin-kanban/src/client/style.tsx | 2 +- .../plugin-kanban/src/server/plugin.ts | 2 +- .../package.json | 12 +- .../src/client/Localization.tsx | 2 +- .../src/client/index.tsx | 2 +- .../src/server/__tests__/actions.test.ts | 4 +- .../src/server/__tests__/resources.test.ts | 2 +- .../src/server/actions/localization.ts | 4 +- .../src/server/actions/localizationTexts.ts | 8 +- .../server/collections/localization-texts.ts | 2 +- .../collections/localization-translations.ts | 2 +- .../20230706200900-roles-add-translation.ts | 2 +- .../migrations/20231206161851-fix-module.ts | 4 +- .../src/server/plugin.ts | 4 +- .../src/server/resources.ts | 4 +- .../@nocobase/plugin-logger/package.json | 10 +- .../src/client/LogsDownloader.tsx | 2 +- .../plugin-logger/src/client/index.tsx | 2 +- .../plugin-logger/src/client/locale/index.ts | 2 +- .../plugin-logger/src/server/plugin.ts | 2 +- .../src/server/resourcer/logger.ts | 4 +- .../plugins/@nocobase/plugin-map/package.json | 12 +- .../client/block/MapActionInitializers.tsx | 2 +- .../src/client/block/MapBlock.Settings.tsx | 2 +- .../plugin-map/src/client/block/MapBlock.tsx | 2 +- .../src/client/block/MapBlockDesigner.tsx | 2 +- .../src/client/block/MapBlockInitializer.tsx | 2 +- .../src/client/block/MapBlockProvider.tsx | 2 +- .../plugin-map/src/client/block/index.tsx | 2 +- .../src/client/components/AMap/Block.tsx | 2 +- .../src/client/components/AMap/Map.tsx | 2 +- .../src/client/components/AMap/Search.tsx | 2 +- .../src/client/components/Configuration.tsx | 2 +- .../src/client/components/Designer.tsx | 2 +- .../client/components/GoogleMaps/Block.tsx | 2 +- .../src/client/components/GoogleMaps/Map.tsx | 2 +- .../client/components/GoogleMaps/Search.tsx | 2 +- .../plugin-map/src/client/components/Map.tsx | 2 +- .../src/client/components/ReadPretty.tsx | 2 +- .../plugin-map/src/client/fields/schema.ts | 2 +- .../src/client/hooks/useMapConfiguration.ts | 2 +- .../@nocobase/plugin-map/src/client/index.tsx | 2 +- .../plugin-map/src/client/locale/index.ts | 2 +- .../src/server/__tests__/fields.test.ts | 4 +- .../plugin-map/src/server/actions/index.ts | 2 +- .../server/collections/mapConfiguration.ts | 2 +- .../plugin-map/src/server/fields/circle.ts | 2 +- .../src/server/fields/lineString.ts | 2 +- .../plugin-map/src/server/fields/point.ts | 2 +- .../plugin-map/src/server/fields/polygon.ts | 2 +- .../@nocobase/plugin-map/src/server/plugin.ts | 2 +- .../src/server/value-parsers/index.ts | 2 +- .../plugin-mock-collections/package.json | 10 +- .../src/client/index.ts | 2 +- .../server/field-interfaces/association.ts | 2 +- .../src/server/field-interfaces/attachment.ts | 2 +- .../server/field-interfaces/chinaRegion.ts | 2 +- .../src/server/field-interfaces/email.ts | 2 +- .../src/server/field-interfaces/time.ts | 2 +- .../src/server/index.ts | 6 +- .../plugin-multi-app-manager/package.json | 10 +- .../src/client/AppManager.tsx | 2 +- .../src/client/AppNameInput.tsx | 2 +- .../src/client/MultiAppManagerProvider.tsx | 2 +- .../src/client/Settings.tsx | 2 +- .../src/client/index.ts | 2 +- .../client/settings/schemas/applications.ts | 2 +- .../src/server/__tests__/gateway.test.ts | 6 +- .../server/__tests__/mock-get-schema.test.ts | 6 +- .../server/__tests__/multiple-apps.test.ts | 8 +- .../src/server/collections/applications.ts | 2 +- .../src/server/models/application.ts | 6 +- .../src/server/server.ts | 4 +- .../package.json | 10 +- .../MultiAppShareCollectionProvider.tsx | 2 +- .../src/client/TableTransfer.tsx | 4 +- .../src/client/index.tsx | 2 +- .../server/__tests__/collection-sync.test.ts | 6 +- .../src/server/__tests__/index.ts | 2 +- .../src/server/collections/applications.ts | 2 +- .../src/server/collections/collections.ts | 2 +- .../20230319111111-update-apps-collections.ts | 4 +- .../src/server/plugin.ts | 4 +- .../plugin-notifications/package.json | 10 +- .../plugin-notifications/src/client/index.ts | 2 +- .../server/__tests__/notifications.test.ts | 4 +- .../server/collections/notification_logs.ts | 2 +- .../collections/notification_services.ts | 2 +- .../src/server/collections/notifications.ts | 2 +- .../src/server/models/Notification.ts | 2 +- .../src/server/models/NotificationLog.ts | 2 +- .../src/server/models/NotificationService.ts | 2 +- .../plugin-notifications/src/server/server.ts | 2 +- .../@nocobase/plugin-oidc/package.json | 12 +- .../plugin-oidc/src/client/OIDCButton.tsx | 2 +- .../plugin-oidc/src/client/Options.tsx | 2 +- .../plugin-oidc/src/client/index.tsx | 2 +- .../plugin-oidc/src/client/locale/index.ts | 2 +- .../src/server/__tests__/oidc.test.ts | 4 +- .../src/server/actions/getAuthUrl.ts | 2 +- .../src/server/actions/redirect.ts | 4 +- .../20231007124508-update-autosignup.ts | 2 +- .../plugin-oidc/src/server/oidc-auth.ts | 4 +- .../plugin-oidc/src/server/plugin.ts | 2 +- .../@nocobase/plugin-saml/README.zh-CN.md | 4 +- .../@nocobase/plugin-saml/package.json | 14 +- .../plugin-saml/src/client/Options.tsx | 4 +- .../plugin-saml/src/client/SAMLButton.tsx | 2 +- .../plugin-saml/src/client/index.tsx | 2 +- .../plugin-saml/src/client/locale/index.ts | 2 +- .../plugin-saml/src/client/schemas/saml.ts | 2 +- .../src/server/__tests__/saml.test.ts | 4 +- .../src/server/actions/getAuthUrl.ts | 2 +- .../src/server/actions/metadata.ts | 2 +- .../src/server/actions/redirect.ts | 4 +- .../20231008112900-update-autosignup.ts | 2 +- .../plugin-saml/src/server/plugin.ts | 2 +- .../plugin-saml/src/server/saml-auth.ts | 4 +- .../plugin-sample-hello/package.json | 6 +- .../plugin-sample-hello/src/client/index.tsx | 2 +- .../plugin-sample-hello/src/server/index.ts | 2 +- .../plugin-sequence-field/package.json | 12 +- .../src/client/SequenceFieldProvider.tsx | 2 +- .../src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/client/sequence.tsx | 4 +- .../src/server/Plugin.ts | 4 +- .../server/__tests__/sequence-field.test.ts | 4 +- .../src/server/collections/sequences.ts | 2 +- .../src/server/fields/sequence-field.ts | 4 +- .../20221207022250-sequence-field-key.ts | 2 +- .../@nocobase/plugin-sms-auth/README.md | 2 +- .../@nocobase/plugin-sms-auth/package.json | 12 +- .../plugin-sms-auth/src/client/Options.tsx | 2 +- .../plugin-sms-auth/src/client/SigninPage.tsx | 2 +- .../src/client/VerificationCode.tsx | 2 +- .../plugin-sms-auth/src/client/index.tsx | 2 +- .../src/server/__tests__/signin.test.ts | 4 +- .../20230607180000-sms-authenticator.ts | 2 +- .../plugin-sms-auth/src/server/plugin.ts | 2 +- .../plugin-sms-auth/src/server/sms-auth.ts | 4 +- .../plugin-snapshot-field/package.json | 10 +- .../src/__tests__/fieldsHistory.test.ts | 2 +- .../src/__tests__/snapshots.test.ts | 2 +- .../SnapshotBlockInitializers.tsx | 2 +- .../SnapshotBlockInitializersDetailItem.tsx | 2 +- .../SnapshotBlock/SnapshotBlockProvider.tsx | 2 +- .../src/client/SnapshotFieldProvider.tsx | 2 +- .../SnapshotHistoryCollectionProvider.tsx | 2 +- .../src/client/SnapshotRecordPicker.tsx | 2 +- .../SnapshotOwnerCollectionFieldsSelect.tsx | 2 +- .../src/client/index.tsx | 2 +- .../src/client/interface.ts | 2 +- .../src/client/locale/index.ts | 2 +- .../server/collections/collectionsHistory.ts | 2 +- .../src/server/collections/fieldsHistory.ts | 2 +- .../src/server/fields/snapshot-field.ts | 2 +- .../src/server/plugin.ts | 4 +- .../plugin-system-settings/package.json | 8 +- .../src/client/index.ts | 2 +- .../src/server/collections/systemSettings.ts | 2 +- ...20220714204714-update-enabled-languages.ts | 2 +- .../src/server/server.ts | 2 +- .../plugin-theme-editor/package.json | 12 +- .../client/antd-token-previewer/interface.ts | 2 +- .../token-panel-pro/TokenContent.tsx | 4 +- .../src/client/components/InitializeTheme.tsx | 4 +- .../src/client/components/ThemeCard.tsx | 4 +- .../src/client/components/ThemeList.tsx | 4 +- .../client/components/ThemeListProvider.tsx | 4 +- .../src/client/components/ToEditTheme.tsx | 2 +- .../client/components/theme-editor/index.tsx | 4 +- .../src/client/hooks/useThemeSettings.tsx | 4 +- .../client/hooks/useUpdateThemeSettings.tsx | 4 +- .../plugin-theme-editor/src/client/index.tsx | 2 +- .../src/server/collections/theme-config.ts | 2 +- .../migrations/202307250853-theme-editor.ts | 6 +- .../20231210132610-add-default-field.ts | 2 +- .../plugin-theme-editor/src/server/plugin.ts | 2 +- .../plugin-theme-editor/src/types.ts | 2 +- .../plugin-ui-schema-storage/package.json | 16 +- .../src/client/index.ts | 4 +- .../src/server/__tests__/action.test.ts | 4 +- .../20230330214649-filter-form-block.test.ts | 4 +- .../server/__tests__/server-hook-impl.test.ts | 4 +- .../src/server/__tests__/server-hook.test.ts | 4 +- .../server/__tests__/ui-schema-model.test.ts | 4 +- .../ui-schema-repository-with-cache.test.ts | 6 +- .../__tests__/ui-schema-repository.test.ts | 4 +- .../src/server/__tests__/ui-schema.test.ts | 4 +- .../src/server/actions/ui-schema-action.ts | 4 +- .../server/collections/uiSchemaServerHooks.ts | 2 +- .../server/collections/uiSchemaTemplates.ts | 2 +- .../server/collections/uiSchemaTreePath.ts | 2 +- .../src/server/collections/uiSchemas.ts | 2 +- .../20230330214649-filter-form-block.ts | 2 +- .../20230509221649-association-select.ts | 2 +- .../20230509235247-record-picker.ts | 2 +- .../migrations/20230510235247-form-field.ts | 4 +- .../20230522231231-association-field.ts | 2 +- ...t-filter-blocks-in-select-record-drawer.ts | 2 +- .../src/server/model.ts | 2 +- .../src/server/repository.ts | 6 +- .../src/server/server-hooks/index.ts | 2 +- .../src/server/server-hooks/model.ts | 2 +- .../src/server/server.ts | 6 +- .../@nocobase/plugin-users/package.json | 16 +- .../plugin-users/src/client/PasswordField.tsx | 2 +- .../src/client/RoleUsersManager.tsx | 2 +- .../src/client/UsersManagement.tsx | 2 +- .../plugin-users/src/client/hooks.ts | 2 +- .../plugin-users/src/client/index.ts | 2 +- .../plugin-users/src/client/schemas/users.ts | 2 +- .../src/server/__tests__/actions.test.ts | 4 +- .../src/server/__tests__/fields.test.ts | 4 +- .../src/server/__tests__/model.test.ts | 4 +- .../src/server/__tests__/role-users.test.ts | 4 +- .../plugin-users/src/server/actions/users.ts | 2 +- .../src/server/collections/users.ts | 2 +- ...220818072639-add-users-phone-constraint.ts | 4 +- .../20220818072639-add-users-phone.ts | 2 +- .../20230802170800-add-username-constraint.ts | 4 +- .../migrations/20230802170800-add-username.ts | 2 +- .../20230802183100-update-username.ts | 2 +- ...0230908164036-update-username-interface.ts | 2 +- .../src/server/models/UserModel.ts | 2 +- .../plugin-users/src/server/server.ts | 8 +- .../plugin-verification/package.json | 14 +- .../src/client/VerificationProviders.tsx | 2 +- .../plugin-verification/src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/client/providerTypes/index.ts | 2 +- .../src/client/schemas/providers.ts | 2 +- .../plugin-verification/src/server/Plugin.ts | 10 +- .../src/server/__tests__/Plugin.test.ts | 4 +- .../server/__tests__/collections/authors.ts | 2 +- .../src/server/__tests__/index.ts | 4 +- .../src/server/actions/verifications.ts | 4 +- .../src/server/collections/verifications.ts | 2 +- .../collections/verifications_providers.ts | 2 +- .../build.config.ts | 2 +- .../plugin-field-markdown-vditor/package.json | 7 +- .../src/client/components/Display.tsx | 2 +- .../src/client/components/Edit.tsx | 2 +- .../src/client/components/const.ts | 2 +- .../src/client/components/index.tsx | 2 +- .../src/client/components/style.ts | 2 +- .../src/client/index.tsx | 2 +- .../src/client/interfaces/markdown-vditor.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/server/markdown-vditor-field.ts | 2 +- .../src/server/plugin.ts | 2 +- .../plugin-mobile-client/package.json | 10 +- .../src/client/configuration/App.tsx | 2 +- .../src/client/core/assets/svg/index.tsx | 2 +- .../src/client/core/index.tsx | 2 +- .../container/Container.Designer.tsx | 2 +- .../schema/components/container/Container.tsx | 2 +- .../core/schema/components/container/style.ts | 2 +- .../components/header/Header.Designer.tsx | 2 +- .../core/schema/components/header/Header.tsx | 2 +- .../image-search/ImageSearch.configure.ts | 2 +- .../image-search/ImageSearch.initializer.tsx | 2 +- .../image-search/ImageSearch.provider.tsx | 2 +- .../image-search/ImageSearch.schema.ts | 2 +- .../image-search/ImageSearch.view.tsx | 2 +- .../hooks/useAction.ImageSearchItemView.ts | 2 +- .../image-search/hooks/useSelect.ts | 2 +- .../ImageSearchItem.intializer.tsx | 2 +- .../search-item/ImageSearchItem.schema.ts | 2 +- .../search-item/ImageSearchItem.setting.tsx | 2 +- .../search-item/ImageSearchItem.toolbar.tsx | 2 +- .../search-item/ImageSearchItem.view.tsx | 2 +- .../search-item/useProps.Optional.ts | 2 +- .../search-item/useProps.Related.tsx | 2 +- .../schema/components/menu/Menu.Designer.tsx | 2 +- .../core/schema/components/menu/Menu.Item.tsx | 2 +- .../core/schema/components/menu/Menu.tsx | 2 +- .../components/menu/MenuBlockInitializer.tsx | 2 +- .../core/schema/components/menu/style.ts | 2 +- .../schema-create/createGridCardBlockSchma.ts | 2 +- .../NoticeBlockInitializer.tsx | 2 +- .../schema/components/page/Page.Designer.tsx | 2 +- .../core/schema/components/page/Page.tsx | 2 +- .../core/schema/components/page/style.ts | 2 +- .../components/settings/Settings.Designer.tsx | 2 +- .../schema/components/settings/Settings.tsx | 2 +- .../settings/SettingsBlockInitializer.tsx | 2 +- .../schema/components/swiper/SwiperBlock.tsx | 2 +- .../swiper/SwiperBlockInitializer.tsx | 2 +- .../components/swiper/SwiperFieldSettings.tsx | 2 +- .../schema/components/swiper/SwiperPage.tsx | 2 +- .../components/swiper/useSwiperBlockProps.ts | 2 +- .../schema/components/tab-bar/TabBar.Item.tsx | 2 +- .../core/schema/components/tab-bar/TabBar.tsx | 2 +- .../tab-search/components/TabSearchAction.ts | 2 +- .../TabSearchCollapsibleInputItem.tsx | 2 +- .../TabSearchCollapsibleInputItemAction.ts | 4 +- .../TabSearchCollapsibleInputMItem.tsx | 2 +- .../TabSearchCollapsibleInputMItemChild.tsx | 2 +- .../field-item/TabSearchFieldItem.tsx | 2 +- .../field-item/TabSearchFieldItemAction.ts | 2 +- .../field-item/TabSearchFieldItemProps.ts | 2 +- .../field-item/TabSearchFieldMItem.tsx | 2 +- .../TabSerachFieldItemRelatedProps.tsx | 2 +- .../components/field-item/hooks.tsx | 2 +- .../create/createTabSearchBlockSchema.ts | 2 +- .../initializer/TabSearchBlockInitializer.tsx | 2 +- .../TabSearchFieldSchemaInitializer.tsx | 2 +- .../TabSearchFieldSchemaInitializerGadget.tsx | 2 +- .../tab-search/provider/TabSearchProvider.tsx | 2 +- .../settings/TabSearchItemFieldSettings.tsx | 2 +- .../schema/components/tab-search/utils.ts | 2 +- .../core/schema/hooks/useSchemaPatch.ts | 2 +- .../schema/initializers/BlockInitializers.ts | 2 +- .../client/core/schema/scopes/grid-card.ts | 2 +- .../src/client/devices/iOS6.tsx | 2 +- .../src/client/devices/index.tsx | 2 +- .../plugin-mobile-client/src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/client/router/Application.tsx | 2 +- .../src/client/router/InterfaceRouter.tsx | 2 +- .../src/client/router/OpenInNewTab.tsx | 2 +- .../20230620203218-mobile-ui-schema-uid.ts | 4 +- .../20231215215233-mobile-container-uid.ts | 4 +- .../plugin-mobile-client/src/server/plugin.ts | 2 +- .../plugin-workflow-test/package.json | 14 +- .../plugin-workflow-test/src/client/index.ts | 2 +- .../src/e2e/e2eCollectionModel.ts | 2 +- .../src/e2e/e2ePageObjectModel.ts | 2 +- .../plugin-workflow-test/src/e2e/e2eUtils.ts | 2 +- .../src/server/collections/categories.ts | 2 +- .../src/server/collections/comments.ts | 2 +- .../src/server/collections/posts.ts | 2 +- .../src/server/collections/tags.ts | 2 +- .../plugin-workflow-test/src/server/index.ts | 10 +- .../src/server/instructions.ts | 2 +- .../@tachybase/plugin-workflow/package.json | 22 +- .../plugin-workflow/src/client/AddButton.tsx | 2 +- .../plugin-workflow/src/client/Branch.tsx | 2 +- .../src/client/CanvasContent.tsx | 2 +- .../src/client/ExecutionCanvas.tsx | 4 +- .../src/client/ExecutionContextProvider.tsx | 2 +- .../src/client/ExecutionLink.tsx | 2 +- .../src/client/ExecutionPage.tsx | 2 +- .../src/client/ExecutionResourceProvider.tsx | 2 +- .../src/client/WorkflowCanvas.tsx | 4 +- .../src/client/WorkflowLink.tsx | 2 +- .../src/client/WorkflowPage.tsx | 2 +- .../src/client/WorkflowPane.tsx | 2 +- .../configuration.test.ts | 4 +- .../ScheduleEventTrigger/workflowCRUD.test.ts | 2 +- .../calculationNode/formulaEngine.test.ts | 4 +- .../calculationNode/mathEngine.test.ts | 4 +- .../configuration.test.ts | 2 +- .../workflowCRUD.test.ts | 2 +- .../BranchIntoYesAndNoBasicType.test.ts | 4 +- .../BranchIntoYesAndNoFormulaEngine.test.ts | 4 +- .../BranchIntoYesAndNoMathEngine.test.ts | 4 +- .../continueWhenYesBasicType.test.ts | 4 +- .../continueWhenYesFormulaEngine.test.ts | 4 +- .../continueWhenYesMathEngine.test.ts | 4 +- .../createRecordNode/CreateRecord.test.ts | 4 +- .../deleteRecordNode/DeleteRecord.test.ts | 4 +- .../queryRecordNode/QueryRecord.test.ts | 4 +- .../updateRecordNode/updateInABatch.test.ts | 4 +- .../updateRecordNode/updateOneByOne.test.ts | 4 +- .../components/CheckboxGroupWithTooltip.tsx | 2 +- .../components/CollectionBlockInitializer.tsx | 2 +- .../client/components/CollectionFieldset.tsx | 2 +- .../components/DetailsBlockProvider.tsx | 2 +- .../client/components/DrawerDescription.tsx | 2 +- .../src/client/components/DrawerForm.tsx | 2 +- .../src/client/components/ExecutionStatus.tsx | 2 +- .../src/client/components/FieldsSelect.tsx | 2 +- .../components/FilterDynamicComponent.tsx | 2 +- .../src/client/components/OpenDrawer.tsx | 2 +- .../client/components/RadioWithTooltip.tsx | 2 +- .../src/client/components/SimpleDesigner.tsx | 2 +- .../src/client/components/StatusButton.tsx | 2 +- .../src/client/components/ValueBlock.tsx | 4 +- .../components/renderEngineReference.tsx | 4 +- .../features/action-trigger/ActionTrigger.tsx | 2 +- .../__e2e__/configuration.test.ts | 4 +- .../__e2e__/workflowCRUD.test.ts | 4 +- .../client/features/action-trigger/index.ts | 2 +- .../aggregate/AggregateInstruction.tsx | 2 +- .../__e2e__/DataOfCollection.test.ts | 4 +- .../src/client/features/aggregate/index.ts | 2 +- .../features/delay/DelayInstruction.tsx | 2 +- .../src/client/features/delay/index.ts | 2 +- .../DynamicCalculation.tsx | 2 +- .../dynamic-calculation/DynamicExpression.tsx | 2 +- .../dynamic-calculation/expression.tsx | 2 +- .../features/dynamic-calculation/index.ts | 2 +- .../client/features/loop/LoopInstruction.tsx | 2 +- .../src/client/features/loop/index.ts | 2 +- .../client/features/manual/WorkflowTodo.tsx | 6 +- .../manual/WorkflowTodoBlockInitializer.tsx | 2 +- .../manual/__e2e__/createRecordForm.test.ts | 4 +- .../manual/__e2e__/customFormBlocks.test.ts | 4 +- .../manual/__e2e__/datablocks.test.ts | 4 +- .../manual/__e2e__/updateRecordForm.test.ts | 4 +- .../manual/__e2e__/workflowTodo.test.ts | 4 +- .../src/client/features/manual/index.ts | 2 +- .../manual/instruction/AssigneesSelect.tsx | 2 +- .../instruction/FormBlockInitializer.tsx | 2 +- .../manual/instruction/FormBlockProvider.tsx | 2 +- .../manual/instruction/ModeConfig.tsx | 2 +- .../manual/instruction/SchemaConfig.tsx | 4 +- .../createManualFormBlockUISchema.ts | 2 +- .../manual/instruction/forms/create.tsx | 2 +- .../manual/instruction/forms/custom.tsx | 4 +- .../manual/instruction/forms/update.tsx | 2 +- .../features/manual/instruction/index.tsx | 2 +- .../features/parallel/ParallelInstruction.tsx | 2 +- .../parallel/__e2e__/parallelBranch.test.ts | 4 +- .../src/client/features/parallel/index.ts | 2 +- .../src/client/features/request/index.ts | 2 +- .../client/features/sql/SQLInstruction.tsx | 2 +- .../features/sql/__e2e__/dataCURD.test.ts | 4 +- .../src/client/features/sql/index.ts | 2 +- .../hooks/useTriggerWorkflowActionProps.ts | 4 +- .../plugin-workflow/src/client/index.tsx | 4 +- .../src/client/locale/index.ts | 2 +- .../src/client/nodes/calculation.tsx | 4 +- .../src/client/nodes/condition.tsx | 6 +- .../src/client/nodes/create.tsx | 2 +- .../src/client/nodes/destroy.tsx | 2 +- .../src/client/nodes/index.tsx | 4 +- .../src/client/nodes/query.tsx | 2 +- .../src/client/nodes/update.tsx | 2 +- .../src/client/schemas/collection.ts | 2 +- .../src/client/schemas/executions.tsx | 2 +- .../src/client/schemas/workflows.ts | 2 +- ...ustomizeSubmitToWorkflowActionSettings.tsx | 2 +- .../plugin-workflow/src/client/style.tsx | 2 +- .../src/client/triggers/collection.tsx | 2 +- .../src/client/triggers/index.tsx | 2 +- .../client/triggers/schedule/EndsByField.tsx | 4 +- .../src/client/triggers/schedule/OnField.tsx | 2 +- .../client/triggers/schedule/RepeatField.tsx | 2 +- .../triggers/schedule/ScheduleConfig.tsx | 2 +- .../src/client/triggers/schedule/index.tsx | 2 +- .../plugin-workflow/src/client/variable.tsx | 2 +- .../plugin-workflow/src/server/Plugin.ts | 8 +- .../plugin-workflow/src/server/Processor.ts | 8 +- .../src/server/__tests__/Plugin.test.ts | 4 +- .../src/server/__tests__/Processor.test.ts | 4 +- .../__tests__/actions/executions.test.ts | 4 +- .../server/__tests__/actions/nodes.test.ts | 4 +- .../__tests__/actions/workflows.test.ts | 4 +- .../instructions/calculation.test.ts | 4 +- .../__tests__/instructions/condition.test.ts | 4 +- .../__tests__/instructions/create.test.ts | 4 +- .../__tests__/instructions/destroy.test.ts | 4 +- .../server/__tests__/instructions/end.test.ts | 4 +- .../__tests__/instructions/query.test.ts | 4 +- .../__tests__/instructions/update.test.ts | 4 +- .../__tests__/triggers/collection.test.ts | 4 +- .../triggers/schedule/mode-date-field.test.ts | 4 +- .../triggers/schedule/mode-static.test.ts | 4 +- .../src/server/actions/executions.ts | 4 +- .../src/server/actions/nodes.ts | 4 +- .../src/server/actions/workflows.ts | 4 +- .../src/server/collections/1-users_jobs.ts | 2 +- .../src/server/collections/2-jobs.ts | 2 +- .../src/server/collections/3-users.ts | 2 +- .../src/server/collections/executions.ts | 2 +- .../src/server/collections/flow_nodes.ts | 2 +- .../src/server/collections/jobs.ts | 2 +- .../src/server/collections/workflows.ts | 2 +- .../features/action-trigger/ActionTrigger.ts | 8 +- .../server/features/action-trigger/Plugin.ts | 2 +- .../action-trigger/__tests__/trigger.test.ts | 4 +- .../aggregate/AggregateInstruction.ts | 4 +- .../src/server/features/aggregate/Plugin.ts | 2 +- .../aggregate/__tests__/instruction.test.ts | 4 +- .../src/server/features/delay/Plugin.ts | 2 +- .../delay/__tests__/instruction.test.ts | 4 +- .../dynamic-calculation/DynamicCalculation.ts | 4 +- .../features/dynamic-calculation/Plugin.ts | 2 +- .../__tests__/collections/categories.ts | 2 +- .../__tests__/instruction.test.ts | 4 +- .../dynamic-calculation/expression-field.ts | 2 +- .../src/server/features/loop/Plugin.ts | 2 +- .../loop/__tests__/instruction.test.ts | 4 +- .../features/manual/ManualInstruction.ts | 2 +- .../src/server/features/manual/Plugin.ts | 6 +- .../__tests__/collections/categories.ts | 2 +- .../manual/__tests__/collections/comments.ts | 2 +- .../manual/__tests__/collections/posts.ts | 2 +- .../manual/__tests__/collections/tags.ts | 2 +- .../manual/__tests__/data-source.test.ts | 4 +- .../features/manual/__tests__/form.test.ts | 4 +- .../features/manual/__tests__/mode.test.ts | 4 +- .../src/server/features/manual/actions.ts | 2 +- .../src/server/features/parallel/Plugin.ts | 2 +- .../parallel/__tests__/instruction.test.ts | 4 +- .../src/server/features/request/Plugin.ts | 2 +- .../request/__tests__/instruction.test.ts | 4 +- .../src/server/features/sql/Plugin.ts | 2 +- .../sql/__tests__/instruction.test.ts | 4 +- .../instructions/CalculationInstruction.ts | 4 +- .../instructions/ConditionInstruction.ts | 4 +- .../server/instructions/CreateInstruction.ts | 2 +- .../server/instructions/DestroyInstruction.ts | 2 +- .../server/instructions/QueryInstruction.ts | 4 +- .../server/instructions/UpdateInstruction.ts | 2 +- .../src/server/instructions/index.ts | 2 +- .../src/server/triggers/CollectionTrigger.ts | 4 +- .../DateFieldScheduleTrigger.ts | 4 +- .../src/server/triggers/index.ts | 2 +- .../src/server/types/Execution.ts | 2 +- .../src/server/types/FlowNode.ts | 2 +- .../plugin-workflow/src/server/types/Job.ts | 2 +- .../src/server/types/Workflow.ts | 2 +- .../plugin-workflow/src/server/utils.ts | 2 +- .../presets/{tachybase => base}/.npmignore | 0 .../presets/{tachybase => base}/client.d.ts | 0 .../presets/{tachybase => base}/client.js | 0 .../presets/{tachybase => base}/package.json | 4 +- .../presets/{tachybase => base}/server.d.ts | 0 .../presets/{tachybase => base}/server.js | 0 .../{tachybase => base}/src/client/index.ts | 4 +- .../presets/{tachybase => base}/src/index.ts | 0 .../{tachybase => base}/src/server/index.ts | 14 +- .../src/server/migrations/.gitkeep | 0 .../20240414160015-remove-audit-local.ts | 2 +- packages/presets/hera-rental/.npmignore | 2 + packages/presets/hera-rental/client.d.ts | 3 + packages/presets/hera-rental/client.js | 1 + packages/presets/hera-rental/package.json | 65 + packages/presets/hera-rental/server.d.ts | 3 + packages/presets/hera-rental/server.js | 1 + .../presets/hera-rental/src/client/index.ts | 3 + packages/presets/hera-rental/src/index.ts | 1 + .../presets/hera-rental/src/server/index.ts | 12 + packages/presets/sancongtou/.npmignore | 2 + packages/presets/sancongtou/client.d.ts | 3 + packages/presets/sancongtou/client.js | 1 + packages/presets/sancongtou/package.json | 67 + packages/presets/sancongtou/server.d.ts | 3 + packages/presets/sancongtou/server.js | 1 + .../presets/sancongtou/src/client/index.ts | 3 + packages/presets/sancongtou/src/index.ts | 1 + .../presets/sancongtou/src/server/index.ts | 12 + packages/presets/tachybase/LICENSE | 661 -------- pnpm-lock.yaml | 1424 +++++++++++------ 2049 files changed, 7701 insertions(+), 12698 deletions(-) create mode 100644 .changeset/chatty-shrimps-boil.md create mode 100644 .changeset/clean-grapes-serve.md create mode 100644 .changeset/cold-cougars-watch.md create mode 100644 .changeset/cool-elephants-vanish.md create mode 100644 .changeset/fuzzy-snails-arrive.md create mode 100644 .changeset/good-garlics-sparkle.md create mode 100644 .changeset/happy-ducks-dance.md create mode 100644 .changeset/mighty-queens-draw.md create mode 100644 .changeset/polite-dots-smash.md create mode 100644 .changeset/poor-panthers-begin.md create mode 100644 .changeset/proud-ants-destroy.md create mode 100644 .changeset/seven-jeans-end.md create mode 100644 .changeset/silver-fans-refuse.md create mode 100644 .changeset/tidy-scissors-obey.md create mode 100644 .changeset/tricky-garlics-pay.md create mode 100644 .changeset/warm-flowers-turn.md create mode 100644 .gitea/workflows/build-docker-base.yaml create mode 100644 .gitea/workflows/build-docker-beta.yaml rename packages/core/acl/LICENSE => LICENSE (100%) delete mode 100644 LICENSE-APACHE-2.0 delete mode 100644 benchmark/README.md delete mode 100644 benchmark/koa-database/index.js delete mode 100644 benchmark/koa-resourcer/index.js delete mode 100644 benchmark/koa-sequelize/index.js delete mode 100644 benchmark/nocobase-server/index.js create mode 100644 docker/tachybase/Dockerfile create mode 100644 docker/tachybase/Dockerfile.base create mode 100755 docker/tachybase/docker-entrypoint.sh create mode 100644 docker/tachybase/tachybase.conf delete mode 100644 examples/api-client/api.request.ts delete mode 100644 examples/api-client/api.resource.ts delete mode 100644 examples/api-client/server.ts delete mode 100644 examples/app/__tests__/app.test.ts delete mode 100644 examples/app/acl.ts delete mode 100644 examples/app/association2resource.ts delete mode 100644 examples/app/collection2resource.ts delete mode 100644 examples/app/context/ctx.action.mergeParams.ts delete mode 100644 examples/app/context/ctx.action.ts delete mode 100644 examples/app/context/ctx.db.ts delete mode 100644 examples/app/context/ctx.i18n.ts delete mode 100644 examples/app/custom-command.ts delete mode 100644 examples/app/custom-plugin.ts delete mode 100644 examples/app/i18n.ts delete mode 100644 examples/app/middleware/acl.ts delete mode 100644 examples/app/middleware/app.ts delete mode 100644 examples/app/middleware/resourcer.ts delete mode 100644 examples/app/migrations/add-migration.ts delete mode 100644 examples/app/multi-app.ts delete mode 100644 examples/app/resource-actions/action-merge-params.ts delete mode 100644 examples/app/resource-actions/action-with-default-options.ts delete mode 100644 examples/app/resource-actions/global-action.ts delete mode 100644 examples/app/resource-actions/simple.ts delete mode 100644 examples/app/single-app.ts delete mode 100644 examples/database/collections/tree/adjacency-list.ts delete mode 100644 examples/database/collections/tree/closure-table.ts delete mode 100644 examples/database/collections/tree/materialized-path.ts delete mode 100644 examples/database/collections/tree/nested-set.ts delete mode 100644 examples/index.md delete mode 100644 examples/index.ts delete mode 100644 packages/core/actions/LICENSE delete mode 100644 packages/core/app/LICENSE delete mode 100644 packages/core/auth/LICENSE delete mode 100644 packages/core/build/LICENSE delete mode 100644 packages/core/cache/LICENSE create mode 100644 packages/core/client/src/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.tsx delete mode 100644 packages/core/components/LICENSE delete mode 100644 packages/core/create-tachybase-app/LICENSE delete mode 100644 packages/core/data-source-manager/LICENSE delete mode 100644 packages/core/database/LICENSE delete mode 100644 packages/core/devtools/LICENSE delete mode 100644 packages/core/logger/LICENSE delete mode 100644 packages/core/resourcer/LICENSE delete mode 100644 packages/core/sdk/LICENSE delete mode 100644 packages/core/telemetry/LICENSE create mode 100644 packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/ModeHighlight.provider.tsx create mode 100644 packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/index.tsx create mode 100644 packages/plugins/@hera/plugin-rental/src/client/custom-components/MovementStatus.tsx create mode 100644 packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintAnnotateActionInitializer.tsx create mode 100644 packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintFontSizeInitializer.tsx create mode 100644 packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/paperSwitching.tsx create mode 100644 packages/plugins/@hera/plugin-rental/src/server/services/settlement-products-service.ts delete mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record.sql delete mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_fee.sql delete mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_lease.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_no_porduct_fees.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_fee_item.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_item.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/products_search_rule_special.sql delete mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_no_products.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_products.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_products.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_record_fee_products.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql create mode 100644 packages/plugins/@hera/plugin-rental/src/server/sqls/waybills_products.sql rename packages/presets/{tachybase => base}/.npmignore (100%) rename packages/presets/{tachybase => base}/client.d.ts (100%) rename packages/presets/{tachybase => base}/client.js (100%) rename packages/presets/{tachybase => base}/package.json (97%) rename packages/presets/{tachybase => base}/server.d.ts (100%) rename packages/presets/{tachybase => base}/server.js (100%) rename packages/presets/{tachybase => base}/src/client/index.ts (87%) rename packages/presets/{tachybase => base}/src/index.ts (100%) rename packages/presets/{tachybase => base}/src/server/index.ts (95%) rename packages/presets/{tachybase => base}/src/server/migrations/.gitkeep (100%) rename packages/presets/{tachybase => base}/src/server/migrations/20240414160015-remove-audit-local.ts (84%) create mode 100644 packages/presets/hera-rental/.npmignore create mode 100644 packages/presets/hera-rental/client.d.ts create mode 100644 packages/presets/hera-rental/client.js create mode 100644 packages/presets/hera-rental/package.json create mode 100644 packages/presets/hera-rental/server.d.ts create mode 100644 packages/presets/hera-rental/server.js create mode 100644 packages/presets/hera-rental/src/client/index.ts create mode 100644 packages/presets/hera-rental/src/index.ts create mode 100644 packages/presets/hera-rental/src/server/index.ts create mode 100644 packages/presets/sancongtou/.npmignore create mode 100644 packages/presets/sancongtou/client.d.ts create mode 100644 packages/presets/sancongtou/client.js create mode 100644 packages/presets/sancongtou/package.json create mode 100644 packages/presets/sancongtou/server.d.ts create mode 100644 packages/presets/sancongtou/server.js create mode 100644 packages/presets/sancongtou/src/client/index.ts create mode 100644 packages/presets/sancongtou/src/index.ts create mode 100644 packages/presets/sancongtou/src/server/index.ts delete mode 100644 packages/presets/tachybase/LICENSE diff --git a/.changeset/chatty-shrimps-boil.md b/.changeset/chatty-shrimps-boil.md new file mode 100644 index 000000000..4e34fdcbf --- /dev/null +++ b/.changeset/chatty-shrimps-boil.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +根据费用录单位置的改变,调整订单pdf diff --git a/.changeset/clean-grapes-serve.md b/.changeset/clean-grapes-serve.md new file mode 100644 index 000000000..33a610cf5 --- /dev/null +++ b/.changeset/clean-grapes-serve.md @@ -0,0 +1,7 @@ +--- +"@hera/plugin-rental": patch +"@nocobase/client": patch +"@nocobase/utils": patch +--- + +support fuzzy search in cascader diff --git a/.changeset/cold-cougars-watch.md b/.changeset/cold-cougars-watch.md new file mode 100644 index 000000000..92a8e4e29 --- /dev/null +++ b/.changeset/cold-cougars-watch.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +合同结算单名称承租单位修改,sql返回合同的甲乙方 diff --git a/.changeset/cool-elephants-vanish.md b/.changeset/cool-elephants-vanish.md new file mode 100644 index 000000000..12f64d443 --- /dev/null +++ b/.changeset/cool-elephants-vanish.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +pdf订单备注调整 diff --git a/.changeset/fuzzy-snails-arrive.md b/.changeset/fuzzy-snails-arrive.md new file mode 100644 index 000000000..5eca1997e --- /dev/null +++ b/.changeset/fuzzy-snails-arrive.md @@ -0,0 +1,6 @@ +--- +"@hera/plugin-core": patch +"@nocobase/client": patch +--- + +修复自定义组件没有格式化名称 diff --git a/.changeset/good-garlics-sparkle.md b/.changeset/good-garlics-sparkle.md new file mode 100644 index 000000000..465713186 --- /dev/null +++ b/.changeset/good-garlics-sparkle.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +整理费用部分 diff --git a/.changeset/happy-ducks-dance.md b/.changeset/happy-ducks-dance.md new file mode 100644 index 000000000..40503e89b --- /dev/null +++ b/.changeset/happy-ducks-dance.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +出入库改视图 diff --git a/.changeset/mighty-queens-draw.md b/.changeset/mighty-queens-draw.md new file mode 100644 index 000000000..779f80485 --- /dev/null +++ b/.changeset/mighty-queens-draw.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +pdf订单添加基础纸张选择功能 diff --git a/.changeset/polite-dots-smash.md b/.changeset/polite-dots-smash.md new file mode 100644 index 000000000..20ce44685 --- /dev/null +++ b/.changeset/polite-dots-smash.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +合同改版直接关联报价(短期合同/报价) diff --git a/.changeset/poor-panthers-begin.md b/.changeset/poor-panthers-begin.md new file mode 100644 index 000000000..16420aecb --- /dev/null +++ b/.changeset/poor-panthers-begin.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +订单hooks调整 diff --git a/.changeset/proud-ants-destroy.md b/.changeset/proud-ants-destroy.md new file mode 100644 index 000000000..8177b32cc --- /dev/null +++ b/.changeset/proud-ants-destroy.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +pdf订单纸张字体调整 diff --git a/.changeset/seven-jeans-end.md b/.changeset/seven-jeans-end.md new file mode 100644 index 000000000..d7d31f174 --- /dev/null +++ b/.changeset/seven-jeans-end.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +图表时区加加上当前时区 diff --git a/.changeset/silver-fans-refuse.md b/.changeset/silver-fans-refuse.md new file mode 100644 index 000000000..d11694711 --- /dev/null +++ b/.changeset/silver-fans-refuse.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +盘点单hooks diff --git a/.changeset/tidy-scissors-obey.md b/.changeset/tidy-scissors-obey.md new file mode 100644 index 000000000..9ea68a640 --- /dev/null +++ b/.changeset/tidy-scissors-obey.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +树形结构拼树 diff --git a/.changeset/tricky-garlics-pay.md b/.changeset/tricky-garlics-pay.md new file mode 100644 index 000000000..c4326aa8c --- /dev/null +++ b/.changeset/tricky-garlics-pay.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +修改结算单的合并规格产品数量不对 diff --git a/.changeset/warm-flowers-turn.md b/.changeset/warm-flowers-turn.md new file mode 100644 index 000000000..822c9ed7f --- /dev/null +++ b/.changeset/warm-flowers-turn.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +录单二期订单视图,合同视角 diff --git a/.gitea/workflows/build-docker-base.yaml b/.gitea/workflows/build-docker-base.yaml new file mode 100644 index 000000000..6dd83a796 --- /dev/null +++ b/.gitea/workflows/build-docker-base.yaml @@ -0,0 +1,39 @@ +name: Build docker image base + +on: + push: + tags: + - 'base-*' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ${{ vars.DOCKERHUB_URL }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Extract and format tag name + id: extract_tag + run: echo version=`echo "${{ gitea.ref }}" | cut -d'/' -f3` >> "$GITHUB_OUTPUT" + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: docker/tachybase/Dockerfile.base + push: true + # not work now https://github.com/go-gitea/gitea/pull/29584 wait for gitea 1.23.0 + # cache-from: type=gha + # cache-to: type=gha,mode=max + build-args: | + TACHYBASE_VERSION=${{ steps.extract_tag.outputs.version }} + NPM_REGISTRY=${{ vars.REGISTRY_URL }} + tags: | + ${{ vars.DOCKERHUB_URL }}/tachybase/base:${{ steps.extract_tag.outputs.version }} + ${{ vars.DOCKERHUB_URL }}/tachybase/base:latest diff --git a/.gitea/workflows/build-docker-beta.yaml b/.gitea/workflows/build-docker-beta.yaml new file mode 100644 index 000000000..c6d3d35d8 --- /dev/null +++ b/.gitea/workflows/build-docker-beta.yaml @@ -0,0 +1,45 @@ +name: Build docker image beta + +on: + push: + tags: + - 'beta-*' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: ${{ vars.REGISTRY_URL }} + cache: 'pnpm' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ${{ vars.DOCKERHUB_URL }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Extract and format tag name + id: extract_tag + run: echo version=`echo "${{ gitea.ref }}" | cut -d'/' -f3` >> "$GITHUB_OUTPUT" + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: docker/tachybase/Dockerfile + push: true + # not work now https://github.com/go-gitea/gitea/pull/29584 wait for gitea 1.23.0 + # cache-from: type=gha + # cache-to: type=gha,mode=max + build-args: | + TACHYBASE_VERSION=${{ steps.extract_tag.outputs.version }} + NPM_REGISTRY=${{ vars.REGISTRY_URL }} + tags: | + ${{ vars.DOCKERHUB_URL }}/tachybase/tachybase:${{ steps.extract_tag.outputs.version }} + ${{ vars.DOCKERHUB_URL }}/tachybase/tachybase:beta-latest diff --git a/packages/core/acl/LICENSE b/LICENSE similarity index 100% rename from packages/core/acl/LICENSE rename to LICENSE diff --git a/LICENSE-APACHE-2.0 b/LICENSE-APACHE-2.0 deleted file mode 100644 index f49a4e16e..000000000 --- a/LICENSE-APACHE-2.0 +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index bf407b991..92e1bfe6c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,10 +1,10 @@ # Reporting security issues -If you believe you have found a security issue in the CKEditor software, please contact us immediately. +If you believe you have found a security issue in the TachyBase, please contact us immediately. When reporting a suspected security problem, please bear this in mind: * Make sure to provide as many details as possible about the vulnerability. * Please do not disclose publicly any security issues until we fix them and publish security releases. -Contact us at hello+security@nocobase.com. As soon as we receive the security report, we'll work promptly to confirm the issue and then to provide a security fix. You will receive a response from us within 7 working days. +Contact us at hello+security@tachybase.com. As soon as we receive the security report, we'll work promptly to confirm the issue and then to provide a security fix. You will receive a response from us within 7 working days. diff --git a/benchmark/README.md b/benchmark/README.md deleted file mode 100644 index 274189cf7..000000000 --- a/benchmark/README.md +++ /dev/null @@ -1,37 +0,0 @@ -## koa-database - -```bash -yarn pm2 start benchmark/koa-database/index.js --name koa-database -wrk -t20 -c20 -d20s http://localhost:13010/ -``` - -## koa-sequelize - -```bash -yarn pm2 start benchmark/koa-sequelize/index.js --name koa-sequelize -wrk -t20 -c20 -d20s http://localhost:13020/ -``` - -## nocobase-server - -```bash -yarn pm2 start benchmark/nocobase-server/index.js --name nocobase-server -wrk -t20 -c20 -d20s http://localhost:13030/api/users -``` - -## koa-resourcer - -```bash -yarn pm2 start benchmark/koa-resourcer/index.js --name koa-resourcer -wrk -t20 -c20 -d20s http://localhost:13040/api/users -``` - -## nocobase-app - -```bash -yarn install -yarn build -yarn nocobase install -yarn start -wrk -t20 -c20 -d20s http://localhost:13000/api/users?token= -``` diff --git a/benchmark/koa-database/index.js b/benchmark/koa-database/index.js deleted file mode 100644 index 0261c0826..000000000 --- a/benchmark/koa-database/index.js +++ /dev/null @@ -1,88 +0,0 @@ -const Koa = require('koa'); -const { Database } = require('@nocobase/database'); - -const dotenv = require('dotenv'); -dotenv.config(); - -const db = new Database({ - logging: false, - dialect: process.env.DB_DIALECT, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - schema: process.env.DB_SCHEMA, - underscored: process.env.DB_UNDERSCORED === 'true', -}); - -db.collection({ - name: 'users', - sortable: 'sort', - fields: [ - { - name: 'id', - type: 'bigInt', - autoIncrement: true, - primaryKey: true, - allowNull: false, - }, - { - type: 'string', - name: 'nickname', - }, - { - type: 'string', - name: 'username', - unique: true, - }, - { - type: 'string', - name: 'email', - unique: true, - }, - { - type: 'string', - name: 'phone', - unique: true, - }, - { - type: 'password', - name: 'password', - hidden: true, - }, - { - type: 'string', - name: 'appLang', - }, - { - type: 'string', - name: 'resetToken', - unique: true, - hidden: true, - }, - { - type: 'json', - name: 'systemSettings', - defaultValue: {}, - }, - ], -}); - -const app = new Koa(); - -app.use(async (ctx, next) => { - const repository = db.getRepository('users'); - ctx.body = await repository.findAndCount({ - limit: 20, - offset: 0, - }); - await next(); -}); - -app.listen(13010, () => { - console.log('koa-database: http://localhost:13010/'); -}); diff --git a/benchmark/koa-resourcer/index.js b/benchmark/koa-resourcer/index.js deleted file mode 100644 index 5bc473690..000000000 --- a/benchmark/koa-resourcer/index.js +++ /dev/null @@ -1,106 +0,0 @@ -const Koa = require('koa'); -const { Database } = require('@nocobase/database'); -const { middlewares } = require('@nocobase/server'); -const { Resourcer } = require('@nocobase/resourcer'); - -const dotenv = require('dotenv'); -const { list, get } = require('@nocobase/actions/lib/actions'); -dotenv.config(); - -const db = new Database({ - logging: false, - dialect: process.env.DB_DIALECT, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - schema: process.env.DB_SCHEMA, - underscored: process.env.DB_UNDERSCORED === 'true', -}); - -db.collection({ - name: 'users', - sortable: 'sort', - fields: [ - { - name: 'id', - type: 'bigInt', - autoIncrement: true, - primaryKey: true, - allowNull: false, - }, - { - type: 'string', - name: 'nickname', - }, - { - type: 'string', - name: 'username', - unique: true, - }, - { - type: 'string', - name: 'email', - unique: true, - }, - { - type: 'string', - name: 'phone', - unique: true, - }, - { - type: 'password', - name: 'password', - hidden: true, - }, - { - type: 'string', - name: 'appLang', - }, - { - type: 'string', - name: 'resetToken', - unique: true, - hidden: true, - }, - { - type: 'json', - name: 'systemSettings', - defaultValue: {}, - }, - ], -}); - -const app = new Koa(); -const resourcer = new Resourcer({ - prefix: '/api', -}); - -resourcer.define({ - name: 'users', - actions: { - list, - get, - // async list(ctx, next) { - // const repository = db.getRepository('users'); - // ctx.body = await repository.find(); - // await next(); - // }, - }, -}); - -// resourcer.registerActionHandlers({ list }); - -app.use(async (ctx, next) => { - ctx.db = db; - await next(); -}); -app.use(resourcer.restApiMiddleware()); -// app.use(middlewares.db2resource); -app.listen(13040, () => { - console.log('koa-resourcer: http://localhost:13040/api/users'); -}); diff --git a/benchmark/koa-sequelize/index.js b/benchmark/koa-sequelize/index.js deleted file mode 100644 index 56ccb28a6..000000000 --- a/benchmark/koa-sequelize/index.js +++ /dev/null @@ -1,47 +0,0 @@ -const Koa = require('koa'); -const { Sequelize, DataTypes } = require('sequelize'); -const dotenv = require('dotenv'); - -dotenv.config(); - -const sequelize = new Sequelize({ - dialect: process.env.DB_DIALECT, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT, - logging: false, -}); - -const User = sequelize.define( - 'users', - { - nickname: DataTypes.STRING, - username: { - type: DataTypes.STRING, - unique: true, - }, - email: { - type: DataTypes.STRING, - unique: true, - }, - }, - { - underscored: true, - }, -); - -const app = new Koa(); - -app.use(async (ctx, next) => { - ctx.body = await User.findAndCountAll({ - offset: 0, - limit: 20, - }); - await next(); -}); - -app.listen(13020, () => { - console.log('koa-sequelize: http://localhost:13020/'); -}); diff --git a/benchmark/nocobase-server/index.js b/benchmark/nocobase-server/index.js deleted file mode 100644 index d5b5acade..000000000 --- a/benchmark/nocobase-server/index.js +++ /dev/null @@ -1,97 +0,0 @@ -const { Application } = require('@nocobase/server'); -const dotenv = require('dotenv'); -const { PerformanceObserver, createHistogram } = require('perf_hooks'); - -dotenv.config(); - -const app = new Application({ - database: { - logging: false, - dialect: process.env.DB_DIALECT, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - schema: process.env.DB_SCHEMA, - underscored: process.env.DB_UNDERSCORED === 'true', - }, - resourcer: { - prefix: '/api', - }, - logger: { - // skip: () => true, - // transports: ['console'], - // level: 'error', - }, - acl: false, - plugins: [], - perfHooks: true, -}); - -app.db.collection({ - name: 'users', - sortable: 'sort', - fields: [ - { - name: 'id', - type: 'bigInt', - autoIncrement: true, - primaryKey: true, - allowNull: false, - }, - { - type: 'string', - name: 'nickname', - }, - { - type: 'string', - name: 'username', - unique: true, - }, - { - type: 'string', - name: 'email', - unique: true, - }, - { - type: 'string', - name: 'phone', - unique: true, - }, - { - type: 'password', - name: 'password', - hidden: true, - }, - { - type: 'string', - name: 'appLang', - }, - { - type: 'string', - name: 'resetToken', - unique: true, - hidden: true, - }, - { - type: 'json', - name: 'systemSettings', - defaultValue: {}, - }, - ], -}); - -// const obs = new PerformanceObserver((items) => { -// items.getEntries().forEach((item) => { -// console.log(item); -// }); -// }); -// obs.observe({ entryTypes: ['measure'] }); - -app.listen(13030, (err) => { - console.log('nocobase-server: http://localhost:13030/api/users'); -}); diff --git a/docker/tachybase/Dockerfile b/docker/tachybase/Dockerfile new file mode 100644 index 000000000..ef6e3524e --- /dev/null +++ b/docker/tachybase/Dockerfile @@ -0,0 +1,17 @@ +FROM git.daoyoucloud.com/tachybase/base:latest as base + +ARG NPM_REGISTRY=https://registry.npmjs.org/ +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" + +# make cache +COPY .pnpm-store /pnpm/store +COPY . /app +WORKDIR /app +RUN corepack enable +RUN pnpm config set registry $NPM_REGISTRY +RUN pnpm install --shamefully-hoist +RUN pnpm build:p + +COPY ./docker/tachybase/docker-entrypoint.sh /app/ +CMD ["/app/docker-entrypoint.sh"] diff --git a/docker/tachybase/Dockerfile.base b/docker/tachybase/Dockerfile.base new file mode 100644 index 000000000..6122d7418 --- /dev/null +++ b/docker/tachybase/Dockerfile.base @@ -0,0 +1,5 @@ +FROM node:20 as base + +ARG NPM_REGISTRY=https://registry.npmjs.org/ +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" diff --git a/docker/tachybase/docker-entrypoint.sh b/docker/tachybase/docker-entrypoint.sh new file mode 100755 index 000000000..5cfe6ff9c --- /dev/null +++ b/docker/tachybase/docker-entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -e + +cp -r /app/packages/core/app/dist/client/* /app/public/ +pnpm start --quickstart diff --git a/docker/tachybase/tachybase.conf b/docker/tachybase/tachybase.conf new file mode 100644 index 000000000..c57d7eac1 --- /dev/null +++ b/docker/tachybase/tachybase.conf @@ -0,0 +1,89 @@ +log_format apm '"$time_local" client=$remote_addr ' + 'method=$request_method request="$request" ' + 'request_length=$request_length ' + 'status=$status bytes_sent=$bytes_sent ' + 'body_bytes_sent=$body_bytes_sent ' + 'referer=$http_referer ' + 'user_agent="$http_user_agent" ' + 'upstream_addr=$upstream_addr ' + 'upstream_status=$upstream_status ' + 'request_time=$request_time ' + 'upstream_response_time=$upstream_response_time ' + 'upstream_connect_time=$upstream_connect_time ' + 'upstream_header_time=$upstream_header_time'; + +server { + listen 80; + server_name _; + root /app/packages/core/app/dist/client; + index index.html; + client_max_body_size 1000M; + access_log /var/log/nginx/tachybase.log apm; + + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + # 不缓存 HTML 文件 + location ~ \.html$ { + if_modified_since off; + expires off; + etag off; + } + + # 缓存 JavaScript 和 CSS 文件 + location ~* \.(js|css)$ { + expires 365d; + add_header Cache-Control "public"; + } + + location /storage/uploads/ { + alias /app/storage/uploads/; + add_header Cache-Control "public"; + access_log off; + autoindex off; + } + + location / { + root /app/packages/core/app/dist/client; + try_files $uri $uri/ /index.html; + add_header Last-Modified $date_gmt; + add_header Cache-Control 'no-store, no-cache'; + if_modified_since off; + expires off; + etag off; + } + + location ^~ /api/ { + proxy_pass http://127.0.0.1:13000/api/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + send_timeout 600; + } + + location ^~ /static/plugins/ { + proxy_pass http://127.0.0.1:13000/static/plugins/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + send_timeout 600; + } + + location /ws { + proxy_pass http://127.0.0.1:13000/ws; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } +} diff --git a/examples/api-client/api.request.ts b/examples/api-client/api.request.ts deleted file mode 100644 index 6f529f758..000000000 --- a/examples/api-client/api.request.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -# 客户端常规请求 - -# 步骤 - -Step 1: 启动服务器 -yarn run:example api-client/server start - -Step 2: 客户端常规请求 —— api.request() -yarn run:example api-client/api.request -*/ -import { APIClient } from '@nocobase/sdk'; - -const api = new APIClient({ - baseURL: 'http://localhost:13000/api', -}); - -(async () => { - const response = await api.request({ - url: 'test:list', - }); - // 等价于 - // const response = await api.resource('test').list(); - console.log(response.data); -})(); diff --git a/examples/api-client/api.resource.ts b/examples/api-client/api.resource.ts deleted file mode 100644 index f19c1e6e2..000000000 --- a/examples/api-client/api.resource.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -# 客户端资源请求 - -# 步骤 - -Step 1: 启动服务器 -yarn run:example api-client/server start - -Step 2: 客户端资源请求 —— api.resource(name).action(params) -yarn run:example api-client/api.resource -*/ -import { APIClient } from '@nocobase/sdk'; - -const api = new APIClient({ - baseURL: 'http://localhost:13000/api', -}); - -(async () => { - const response = await api.resource('test').list(); - // 等价于 - // const response = await api.request({ - // url: 'test:list', - // }); - console.log(response.data); -})(); diff --git a/examples/api-client/server.ts b/examples/api-client/server.ts deleted file mode 100644 index 1116e3b8f..000000000 --- a/examples/api-client/server.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* -# 客户端请求 - -# 步骤 - -Step 1: 启动服务器 -yarn run:example api-client/server start - -Step 2: 客户端常规请求 —— api.request() -yarn run:example api-client/api.request - -Step 3: 客户端资源请求 —— api.resource(name).action(params) -yarn run:example api-client/api.resource -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -// 定义了一个 test 资源,并提供了相对应的 list 方法 -app.resource({ - name: 'test', - actions: { - async list(ctx, next) { - ctx.body = 'test list'; - await next(); - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/__tests__/app.test.ts b/examples/app/__tests__/app.test.ts deleted file mode 100644 index 7b3309764..000000000 --- a/examples/app/__tests__/app.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* -# 编写 Application 测试用例 - -# 执行测试 -yarn jest examples/app/__tests__/app.test.ts -*/ -import { MockServer, mockServer } from '@nocobase/test'; - -describe('app test', () => { - let app: MockServer; - - beforeEach(async () => { - app = mockServer(); - await app.start(); - }); - - test('test1', async () => { - app.resource({ - name: 'test', - actions: { - async list(ctx, next) { - ctx.body = 'test list'; - await next(); - }, - }, - }); - const response = await app.agent().resource('test').list(); - expect(response.body).toEqual({ data: 'test list' }); - }); - - afterEach(async () => { - await app.destroy(); - }); -}); diff --git a/examples/app/acl.ts b/examples/app/acl.ts deleted file mode 100644 index e1d2361b7..000000000 --- a/examples/app/acl.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* -Step 1: -yarn run:example app/acl start - -Step 2: -curl http://localhost:13000/api/test:export -curl --location --request GET 'http://localhost:13000/api/test:export' --header 'X-Role: admin' -curl --location --request GET 'http://localhost:13000/api/test:import' --header 'X-Role: admin' -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.acl.define({ - role: 'admin', - actions: { - 'test:export': { - fields: ['a1', 'b1'], - }, - }, -}); - -app.resourcer.use(async (ctx, next) => { - ctx.state.currentRole = ctx.get('X-Role'); - await next(); -}); - -app.resourcer.use(app.acl.middleware()); - -app.resource({ - name: 'test', - actions: { - async export(ctx, next) { - ctx.body = { - 'ctx.action.params': ctx.action.params, - }; - await next(); - }, - async import(ctx, next) { - ctx.body = { - 'ctx.action.params': ctx.action.params, - }; - await next(); - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/association2resource.ts b/examples/app/association2resource.ts deleted file mode 100644 index 9eb42caaa..000000000 --- a/examples/app/association2resource.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* -Step 1: 将 collections 同步给数据库(建表和字段) -yarn run:example app/association2resource db:sync - -Step 2: -yarn run:example app/association2resource start - -Step 3: Create article -curl --location --request POST 'http://localhost:13000/api/articles:create' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "title": "My first article", - "content": "Hello NocoBase!", - "user": { - "name": "user 1" - } -}' - -Step 4: View article user -curl http://localhost:13000/api/articles/1/user -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: 'a2r_', - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -// 已定义的 collection 会自动转为同名 resource -app.collection({ - name: 'articles', - fields: [ - { - type: 'string', - name: 'title', - }, - { - type: 'text', - name: 'content', - }, - // 自动转为 articles.user 资源 - { - type: 'belongsTo', - name: 'user', - // 以下参数缺失时,自动处理 - // target: 'users', - // foreignKey: 'userId', - // targetKey: 'id', - }, - ], -}); - -// 已定义的 collection 会自动转为同名 resource -app.collection({ - name: 'users', - fields: [ - { - type: 'string', - name: 'name', - }, - // 自动转为 users.articles 资源 - { - type: 'hasMany', - name: 'articles', - // 以下参数缺失时,自动处理 - // target: 'articles', - // foreignKey: 'userId', - // sourceKey: 'id', - }, - ], -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/collection2resource.ts b/examples/app/collection2resource.ts deleted file mode 100644 index 73aee6031..000000000 --- a/examples/app/collection2resource.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* -Step 1: 将 collections 同步给数据库(建表和字段) -yarn run:example app/collection2resource db:sync - -Step 2: 启动应用 -yarn run:example app/collection2resource start - -Step 3: Create article -curl --location --request POST 'http://localhost:13000/api/articles:create' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "title": "My first article", - "content": "Hello NocoBase!" -}' - -Step 4: View article list -curl http://localhost:13000/api/articles:list -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: 'c2r_', - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -// 已定义的 collection 会自动转为同名 resource -app.collection({ - name: 'articles', - fields: [ - { - type: 'string', - name: 'title', - }, - { - type: 'text', - name: 'content', - }, - ], -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/context/ctx.action.mergeParams.ts b/examples/app/context/ctx.action.mergeParams.ts deleted file mode 100644 index bbc67efe1..000000000 --- a/examples/app/context/ctx.action.mergeParams.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* -# ctx.action.mergeParams 的用法 - -一般是在中间件里通过 ctx.action.mergeParams() 方法合并参数 - -# 步骤: - -Step 1: -yarn run:example app/context/ctx.action.mergeParams start - -Step 2: -curl http://localhost:13000/api/test:list?filter%5Ba%5D=a2&fields=col1 -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, -}); - -async function list(ctx, next) { - ctx.body = { - 'action.resourceName': ctx.action.resourceName, - 'action.resourceOf': ctx.action.resourceOf, - 'action.actionName': ctx.action.actionName, - 'action.params': ctx.action.params, - }; - await next(); -} - -async function get(ctx, next) { - ctx.body = { - 'action.resourceName': ctx.action.resourceName, - 'action.resourceOf': ctx.action.resourceOf, - 'action.actionName': ctx.action.actionName, - 'action.params': ctx.action.params, - }; - await next(); -} - -app.resourcer.use(async (ctx, next) => { - // 在 middleware 里修改 action.params - ctx.action.mergeParams({ - filter: { - a: 'a1', - }, - fields: ['col1', 'col2'], - }); - await next(); -}); - -app.resource({ - name: 'test', - actions: { - list, - get, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/context/ctx.action.ts b/examples/app/context/ctx.action.ts deleted file mode 100644 index 41d6c51db..000000000 --- a/examples/app/context/ctx.action.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* -# ctx.action 的重要参数说明 - -# 步骤 - -Step 1: -yarn run:example app/context/ctx.action start - -Step 2: -curl http://localhost:13000/api/test:list -curl http://localhost:13000/api/test/1/nest:get -curl http://localhost:13000/api/test:list?filter%5Ba%5D=a&fields=a,b&sort=a,b -*/ - -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, -}); - -async function list(ctx, next) { - ctx.body = { - 'action.resourceName': ctx.action.resourceName, - 'action.resourceOf': ctx.action.resourceOf, - 'action.actionName': ctx.action.actionName, - 'action.params': ctx.action.params, - }; - await next(); -} - -async function get(ctx, next) { - ctx.body = { - 'action.resourceName': ctx.action.resourceName, - 'action.resourceOf': ctx.action.resourceOf, - 'action.actionName': ctx.action.actionName, - 'action.params': ctx.action.params, - }; - await next(); -} - -app.resource({ - name: 'test', - actions: { - list, - get, - }, -}); - -app.resource({ - name: 'test.nest', - actions: { - list, - get, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/context/ctx.db.ts b/examples/app/context/ctx.db.ts deleted file mode 100644 index 705317490..000000000 --- a/examples/app/context/ctx.db.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* -# ctx.db 用法 - -# 步骤 - -Step 1: -yarn run:example app/context/ctx.db start - -Step 2: -curl http://localhost:13000/ -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.collection({ - name: 'articles', - fields: [ - { - type: 'string', - name: 'title', - }, - { - type: 'text', - name: 'content', - }, - ], -}); - -app.use(async (ctx, next) => { - ctx.body = ctx.db.getCollection('articles').options; - await next(); -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/context/ctx.i18n.ts b/examples/app/context/ctx.i18n.ts deleted file mode 100644 index c3ad80a3b..000000000 --- a/examples/app/context/ctx.i18n.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* -# 国际化多语言设置 - -主要介绍 app.i18n 和 ctx.i18n 的区别 - -# 步骤: - -Step 1: -yarn run:example app/context/ctx.i18n start - -Step 2: -curl http://localhost:13000/?locale=en-US -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - i18n: { - defaultNS: 'test', - resources: { - 'en-US': { - test: { - hello: 'Hello', - }, - }, - 'zh-CN': { - test: { - hello: '你好', - }, - }, - }, - }, -}); - -app.i18n.addResources('zh-CN', 'test', { - world: '世界', -}); - -app.i18n.addResources('en-US', 'test', { - world: 'World', -}); - -// 改变全局 app.i18n 的多语言,一般用于 cli 环境的多语言切换 -app.i18n.changeLanguage('zh-CN'); - -app.use(async (ctx, next) => { - // ctx.i18n 是 app.i18n 的 clone instance - ctx.body = { - 'ctx.i18n': ctx.i18n.language, - 'app.i18n': app.i18n.language, - 'ctx.t': ctx.t('hello') + ' ' + ctx.t('world'), - 'app.i18n.t': app.i18n.t('hello') + ' ' + app.i18n.t('world'), - }; - await next(); -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/custom-command.ts b/examples/app/custom-command.ts deleted file mode 100644 index 9a41f391f..000000000 --- a/examples/app/custom-command.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* -# 自定义命令行 - -# 步骤 - -Step 1: -yarn run:example app/custom-command hello -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.command('hello').action(() => { - console.log('hello cli'); -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/custom-plugin.ts b/examples/app/custom-plugin.ts deleted file mode 100644 index d57aef0d9..000000000 --- a/examples/app/custom-plugin.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* -# 编写一个最简单的插件 - -# 步骤 - -Step 1: Start app -yarn run:example app/custom-plugin start - -Step 2: View test list -http://localhost:13000/api/test:list -*/ -import { Application, Plugin } from '@nocobase/server'; -import { uid } from '@nocobase/utils'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: `t_${uid()}_`, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -// Encapsulate modules into a plugin -class MyPlugin extends Plugin { - getName() { - return 'MyPlugin'; - } - async load() { - this.app.resource({ - name: 'test', - actions: { - async list(ctx) { - ctx.body = 'test list'; - }, - }, - }); - } -} - -// Register plugin -app.plugin(MyPlugin); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/i18n.ts b/examples/app/i18n.ts deleted file mode 100644 index 7942c9490..000000000 --- a/examples/app/i18n.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* -# 国际化多语言 - -Step 1: -yarn run:example app/i18n start - -Step 2: -curl http://localhost:13000/api/test:get -curl http://localhost:13000/api/test:get?locale=en-US -curl --location --request GET 'http://localhost:13000/api/test:get' --header 'X-Locale: en-US' -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - i18n: { - defaultNS: 'test', - resources: { - 'en-US': { - test: { - hello: 'Hello', - }, - }, - 'zh-CN': { - test: { - hello: '你好', - }, - }, - }, - }, -}); - -app.i18n.addResources('zh-CN', 'test', { - world: '世界', -}); - -app.i18n.addResources('en-US', 'test', { - world: 'World', -}); - -// 改变全局 app.i18n 的多语言,一般用于 cli 环境的多语言 -app.i18n.changeLanguage('zh-CN'); - -app.resource({ - name: 'test', - actions: { - async get(ctx, next) { - ctx.body = ctx.t('hello') + ' ' + ctx.t('world'); - await next(); - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/middleware/acl.ts b/examples/app/middleware/acl.ts deleted file mode 100644 index 914d29f59..000000000 --- a/examples/app/middleware/acl.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* -# app.acl.use 用法 - -# 步骤 - -Step 1: -yarn run:example app/middleware/acl start - -Step 2: -curl http://localhost:13000/api/test:export -curl http://localhost:13000/api/test:export?skip=1 -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.acl.define({ - role: 'admin', - actions: { - 'test:export': { - fields: ['a1', 'b1'], - }, - }, -}); - -app.acl.use(async (ctx, next) => { - ctx.permission = { - // 是否跳过 acl 判断 - skip: !!ctx.request.query.skip, - // 如果 skip=true 不处理 - // 如果 skip=false,can.params 会通过 ctx.action.mergeParams() 合并到 ctx.action.params - can: { - params: { - fields: ['a1', 'b1', 'b3'], - }, - }, - }; - // acl 中间件里也可以直接给 body 赋值 - ctx.body = { - test: 'test', - }; - await next(); -}); - -app.resourcer.use(async (ctx, next) => { - // 当前角色 - ctx.state.currentRole = ctx.get('X-Role'); - await next(); -}); - -app.resourcer.use(app.acl.middleware()); - -app.resource({ - name: 'test', - actions: { - async export(ctx, next) { - ctx.body = { - ...ctx.body, - 'ctx.action.params': ctx.action.params, - }; - await next(); - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/middleware/app.ts b/examples/app/middleware/app.ts deleted file mode 100644 index 05f36df21..000000000 --- a/examples/app/middleware/app.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* -# app.use 用法,与 Koa 相同 - -# 步骤 - -Step 1: -yarn run:example app/middleware/app start - -Step 2: -curl http://localhost:13000/ -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -// Same as Koa -app.use(async (ctx, next) => { - ctx.body = 'Hello NocoBase'; - await next(); -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/middleware/resourcer.ts b/examples/app/middleware/resourcer.ts deleted file mode 100644 index 6d3c96968..000000000 --- a/examples/app/middleware/resourcer.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* -# app.resourcer.use 用法 - -# 步骤 - -Step 1: -yarn run:example app/middleware/resourcer start - -Step 2: -curl http://localhost:13000/api/test:list -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.resource({ - name: 'test', - actions: { - async list(ctx, next) { - ctx.body = ctx.body || []; - ctx.body.push('test list'); - await next(); - }, - }, -}); - -app.resourcer.use(async (ctx, next) => { - ctx.body = ctx.body || []; - ctx.body.push('resourcer middleware'); - await next(); -}); - -app.use(async (ctx, next) => { - ctx.body = ctx.body || []; - ctx.body.push('app middleware'); - await next(); -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/migrations/add-migration.ts b/examples/app/migrations/add-migration.ts deleted file mode 100644 index bc0ca91dc..000000000 --- a/examples/app/migrations/add-migration.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* -# Application Migration - -# 步骤 - -Step 1: -yarn run:example app/migrations/add-migration migrator up - -Step 2: -yarn run:example app/migrations/add-migration migrator down -*/ -import { DataTypes } from '@nocobase/database'; -import { Application, Migration } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -class MyMigration extends Migration { - async up() { - /* - 可用的属性 - this.app; - this.db; - this.queryInterface; - this.sequelize; - */ - await this.queryInterface.createTable('test', { - name: DataTypes.STRING, - }); - } - - async down() { - await this.queryInterface.dropTable('test'); - } -} - -app.db.addMigration({ - name: 'my-migration', - migration: MyMigration, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/multi-app.ts b/examples/app/multi-app.ts deleted file mode 100644 index cb387e625..000000000 --- a/examples/app/multi-app.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* -# 支持多应用(子应用) - -yarn run:example app/multi-app start - -curl http://localhost:13000/api/test:list -curl http://localhost:13000/sub1/api/test:list -*/ -import { Application } from '@nocobase/server'; -import { uid } from '@nocobase/utils'; -import { IncomingMessage } from 'http'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: `t_${uid()}_`, - }, - resourcer: { - prefix: '/api', - }, - acl: false, - plugins: [], -}); - -const subApp1 = app.appManager.createApplication('sub1', { - database: app.db, - acl: false, - resourcer: { - prefix: '/sub1/api/', - }, -}); - -app.resourcer.define({ - name: 'test', - actions: { - async list(ctx) { - ctx.body = 'test list'; - }, - }, -}); - -subApp1.resourcer.define({ - name: 'test', - actions: { - async list(ctx) { - ctx.body = 'sub1 test list'; - }, - }, -}); - -app.appManager.setAppSelector((req: IncomingMessage) => { - if (req.url.startsWith('/sub1/api')) { - return subApp1; - } - return null; -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/resource-actions/action-merge-params.ts b/examples/app/resource-actions/action-merge-params.ts deleted file mode 100644 index 2c0fc445e..000000000 --- a/examples/app/resource-actions/action-merge-params.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* -# Action 参数的多来源合并 - -# 步骤: - -Step 1: -yarn run:example app/resource-actions/action-merge-params start - -Step 2: 客户端请求时提供参数也是一种来源 -curl http://localhost:13000/api/test:list?filter%5Ba%5D=a2&fields=col1 -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, -}); - -// 来源1:resourcer.use 中间件里直接 action.mergeParams -app.resourcer.use(async (ctx, next) => { - // 在 middleware 里修改 action.params - ctx.action.mergeParams({ - filter: { - col1: 'val1', - }, - fields: ['col1', 'col2', 'col4'], - }); - await next(); -}); - -// 来源2:app.acl.use 中间件里的 ctx.permission.can.params -app.acl.use(async (ctx, next) => { - ctx.permission = { - // 是否跳过 acl 判断 - skip: !!ctx.request.query.skip, - // 如果 skip=true 不处理 - // 如果 skip=false,can.params 会通过 ctx.action.mergeParams() 合并到 ctx.action.params - can: { - params: { - filter: { - col1: 'val2', - }, - fields: ['col1', 'col2', 'col3'], - }, - }, - }; - await next(); -}); - -app.resourcer.use(app.acl.middleware()); - -app.resource({ - name: 'test', - actions: { - // 来源 3:直接配置在 resource 的 action 里 - list: { - filter: { - col1: 'val3', - }, - fields: ['col1', 'col2', 'col3', 'col4', 'col5'], - handler: async (ctx, next) => { - ctx.body = { - 'action.resourceName': ctx.action.resourceName, - 'action.resourceOf': ctx.action.resourceOf, - 'action.actionName': ctx.action.actionName, - 'action.params': ctx.action.params, - }; - await next(); - }, - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/resource-actions/action-with-default-options.ts b/examples/app/resource-actions/action-with-default-options.ts deleted file mode 100644 index 6acd36a46..000000000 --- a/examples/app/resource-actions/action-with-default-options.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* -# 带默认参数的 Action - -# 步骤 - -Step 1: -yarn run:example app/resource-actions/action-with-default-options start - -Step 2: -curl http://localhost:13000/api/test:list -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.resource({ - name: 'test', - actions: { - find: { - filter: { - field1: 'value1', - }, - handler: async (ctx, next) => { - ctx.body = { - 'ctx.action.params': ctx.action.params, - }; - await next(); - }, - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/resource-actions/global-action.ts b/examples/app/resource-actions/global-action.ts deleted file mode 100644 index f00e96e80..000000000 --- a/examples/app/resource-actions/global-action.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* -# 使用全局 Action - -全局 action 可用于任意 resource 中 - -# 步骤 - -Step 1: -yarn run:example app/resource-actions/global-action start - -Step 2: test:export 的 action.params 带 fields -curl http://localhost:13000/api/test:export - -Step 3: test:import 有效 -curl http://localhost:13000/api/test:import -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.resourcer.registerActionHandlers({ - async import(ctx, next) { - ctx.body = { - 'ctx.action.params': ctx.action.params, - }; - await next(); - }, - async export(ctx, next) { - ctx.body = { - 'ctx.action.params': ctx.action.params, - }; - await next(); - }, -}); - -app.resource({ - name: 'test', - // 全局的 actions 如果有默认参数可以在 actions 里配置 - actions: { - export: { - fields: ['field1', 'field2'], - }, - // 如果没有默认参数,可以不配置,如 import action - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/resource-actions/simple.ts b/examples/app/resource-actions/simple.ts deleted file mode 100644 index 8408c1f6f..000000000 --- a/examples/app/resource-actions/simple.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* -# 最简单的 resource actions - -# 步骤 - -Step 1: -yarn run:example app/resource-actions/simple start - -Step 2: -curl http://localhost:13000/api/test:list -*/ -import { Application } from '@nocobase/server'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: process.env.DB_TABLE_PREFIX, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -app.resource({ - name: 'test', - actions: { - async list(ctx, next) { - ctx.body = 'test list'; - await next(); - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/app/single-app.ts b/examples/app/single-app.ts deleted file mode 100644 index 93354d5dc..000000000 --- a/examples/app/single-app.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* -# 最简单的单应用 - -# 步骤 - -Step 1: -yarn run:example app/single-app start - -Step 2: -curl http://localhost:13000/api/test:list -*/ -import { Application } from '@nocobase/server'; -import { uid } from '@nocobase/utils'; - -const app = new Application({ - database: { - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: `t_${uid()}_`, - }, - resourcer: { - prefix: '/api', - }, - plugins: [], -}); - -// 定义了一个 test 资源,并提供了相对应的 list 方法 -app.resource({ - name: 'test', - actions: { - async list(ctx, next) { - ctx.body = 'test list'; - await next(); - process.stdout.write('rs'); - }, - }, -}); - -if (require.main === module) { - app.runAsCLI(); -} - -export default app; diff --git a/examples/database/collections/tree/adjacency-list.ts b/examples/database/collections/tree/adjacency-list.ts deleted file mode 100644 index 152462202..000000000 --- a/examples/database/collections/tree/adjacency-list.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* -# 树结构设计 —— 邻接表 - -yarn run:example database/collections/tree/adjacency-list -*/ -import { Database } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; - -const db = new Database({ - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: `t_${uid()}_`, -}); - -db.collection({ - name: 'categories', - tree: 'adjacency-list', - fields: [ - { - type: 'string', - name: 'name', - }, - { - type: 'string', - name: 'description', - }, - { - type: 'belongsTo', - name: 'parent', - target: 'categories', - foreignKey: 'parentId', - }, - { - type: 'hasMany', - name: 'children', - target: 'categories', - foreignKey: 'parentId', - }, - ], -}); - -(async () => { - await db.sync(); - await db.close(); -})(); - -export default db; diff --git a/examples/database/collections/tree/closure-table.ts b/examples/database/collections/tree/closure-table.ts deleted file mode 100644 index f9956c7fa..000000000 --- a/examples/database/collections/tree/closure-table.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* -# 树结构设计 —— 闭包表 - -yarn run:example database/collections/tree/closure-table -*/ -import { Database } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; - -const db = new Database({ - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: `t_${uid()}_`, -}); - -db.collection({ - name: 'categories', - tree: 'closure-table', - fields: [ - { - type: 'string', - name: 'name', - }, - { - type: 'string', - name: 'description', - }, - { - type: 'treeParent', - name: 'parent', - }, - { - type: 'treeChildren', - name: 'children', - }, - ], -}); - -(async () => { - await db.sync(); - await db.close(); -})(); - -export default db; diff --git a/examples/database/collections/tree/materialized-path.ts b/examples/database/collections/tree/materialized-path.ts deleted file mode 100644 index 00c889359..000000000 --- a/examples/database/collections/tree/materialized-path.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* -# 树结构设计 —— 路径枚举 - -yarn run:example database/collections/tree/materialized-path -*/ -import { Database } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; - -const db = new Database({ - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: `t_${uid()}_`, -}); - -db.collection({ - name: 'categories', - tree: 'materialized-path', - fields: [ - { - type: 'string', - name: 'name', - }, - { - type: 'string', - name: 'description', - }, - { - type: 'treeParent', - name: 'parent', - }, - { - type: 'treeChildren', - name: 'children', - }, - ], -}); - -(async () => { - await db.sync(); - await db.close(); -})(); - -export default db; diff --git a/examples/database/collections/tree/nested-set.ts b/examples/database/collections/tree/nested-set.ts deleted file mode 100644 index 0289fc39d..000000000 --- a/examples/database/collections/tree/nested-set.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* -# 树结构设计 —— 嵌套集 - -yarn run:example database/collections/tree/nested-set -*/ -import { Database } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; - -const db = new Database({ - logging: process.env.DB_LOGGING === 'on' ? console.log : false, - dialect: process.env.DB_DIALECT as any, - storage: process.env.DB_STORAGE, - username: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_DATABASE, - host: process.env.DB_HOST, - port: process.env.DB_PORT as any, - timezone: process.env.DB_TIMEZONE, - tablePrefix: `t_${uid()}_`, -}); - -db.collection({ - name: 'categories', - tree: 'nested-set', - fields: [ - { - type: 'string', - name: 'name', - }, - { - type: 'string', - name: 'description', - }, - { - type: 'treeParent', - name: 'parent', - }, - { - type: 'treeChildren', - name: 'children', - }, - ], -}); - -(async () => { - await db.sync(); - await db.close(); -})(); - -export default db; diff --git a/examples/index.md b/examples/index.md deleted file mode 100644 index 71de952f2..000000000 --- a/examples/index.md +++ /dev/null @@ -1,47 +0,0 @@ -# 示例 - -## Application - -- [最简单的单应用](./app/single-app.ts) -- [支持多应用(子应用)](./app/multi-app.ts) -- 配置 Resources 和 Actions - - [最简单的 resource actions](./app/resource-actions/simple.ts) - - [带默认参数的 Action](./app/resource-actions/action-with-default-options.ts) - - [使用全局 Action](./app/resource-actions/global-action.ts) - - [Action 参数的多来源合并](./app/resource-actions/action-merge-params.ts) - - 内置 Actions 的用法 -- [Collection 自动转 Resource](./app/collection2resource.ts) -- [Association 自动转 Resource](./app/association2resource.ts) -- Context - - [ctx.db 示例](./app/context/ctx.db.ts) - - [ctx.action 的重要参数示例](./app/context/ctx.action.ts) - - [ctx.action.mergeParams() 示例](./app/context/ctx.action.mergeParams.ts) - - [ctx.i18n & ctx.t() 示例](./app/context/ctx.i18n.ts) -- 中间件 - - [app.use 用法](./app/middleware/app.ts) - - [app.resourcer.use 用法](./app/middleware/resourcer.ts) - - [app.acl.use 用法](./app/middleware/acl.ts) -- [ACL](./app/acl.ts) -- [国际化多语言](./app/i18n.ts) -- [自定义命令行](./app/custom-command.ts) -- [编写一个最简单的插件](./app/custom-plugin.ts) -- Application Migration - - [编写一个新的 Migration 文件](./app/migrations/add-migration.ts) -- 编写 Application 测试用例 - - [最简单的测试用例](./app/__tests__/app.test.ts) -- 客户端 SDK(APIClient)示例 - - [客户端常规请求 —— api.request()](./api-client/api.request.ts) - - [客户端资源请求 —— api.resource().action()](./api-client/api.resource.ts) - -## Database - -- 配置 Collections & Fields -- 通过 Repository 增删改查数据 -- 通过 Model 增删改查数据 -- 关系数据的增删改查 -- 关系数据的关联操作 -- 扩展字段 -- 数据库事件 -- 数据库迁移 - -## Client diff --git a/examples/index.ts b/examples/index.ts deleted file mode 100644 index 395e1c03e..000000000 --- a/examples/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import Database from '@nocobase/database'; -import Application from '@nocobase/server'; - -const argv = process.argv; -const path = argv.splice(2, 1).shift(); -const app = require(`./${path}`).default; - -if (app instanceof Application) { - app.runAsCLI(argv); -} - -if (app instanceof Database) { - console.log('Table prefix: ', app.getTablePrefix()); -} diff --git a/package.json b/package.json index e8d3a8ed5..e94400573 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,11 @@ "@commitlint/cli": "^16.3.0", "@commitlint/config-conventional": "^16.2.4", "@commitlint/prompt-cli": "^16.3.0", - "@nocobase/build": "workspace:*", - "@nocobase/test": "workspace:*", + "@tachybase/build": "workspace:*", "@tachybase/cli": "workspace:*", + "@tachybase/preset-hera-rental": "workspace:*", "@tachybase/preset-tachybase": "workspace:*", + "@tachybase/test": "workspace:*", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "auto-changelog": "^2.4.0", diff --git a/packages/core/acl/package.json b/packages/core/acl/package.json index d5489d952..de786e79d 100644 --- a/packages/core/acl/package.json +++ b/packages/core/acl/package.json @@ -1,18 +1,13 @@ { - "name": "@nocobase/acl", + "name": "@tachybase/acl", "version": "0.21.24", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/acl" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/resourcer": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/utils": "workspace:*", "koa-compose": "^4.1.0", "lodash": "4.17.21", "minimatch": "^5.1.1" diff --git a/packages/core/acl/src/__tests__/acl.test.ts b/packages/core/acl/src/__tests__/acl.test.ts index 3da736135..16c305961 100644 --- a/packages/core/acl/src/__tests__/acl.test.ts +++ b/packages/core/acl/src/__tests__/acl.test.ts @@ -1,5 +1,5 @@ import { vi } from 'vitest'; -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; import { ACL } from '..'; describe('acl', () => { diff --git a/packages/core/acl/src/acl.ts b/packages/core/acl/src/acl.ts index db52b9a72..46c4775e6 100644 --- a/packages/core/acl/src/acl.ts +++ b/packages/core/acl/src/acl.ts @@ -1,5 +1,5 @@ -import { Action } from '@nocobase/resourcer'; -import { assign, parseFilter, Toposort, ToposortOptions } from '@nocobase/utils'; +import { Action } from '@tachybase/resourcer'; +import { assign, parseFilter, Toposort, ToposortOptions } from '@tachybase/utils'; import EventEmitter from 'events'; import compose from 'koa-compose'; import lodash from 'lodash'; diff --git a/packages/core/acl/src/fixed-params-manager.ts b/packages/core/acl/src/fixed-params-manager.ts index 169363e3b..70cbec79b 100644 --- a/packages/core/acl/src/fixed-params-manager.ts +++ b/packages/core/acl/src/fixed-params-manager.ts @@ -1,4 +1,4 @@ -import { assign } from '@nocobase/utils'; +import { assign } from '@tachybase/utils'; type Context = any; export type Merger = () => object; diff --git a/packages/core/actions/LICENSE b/packages/core/actions/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/actions/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index 683d89843..c4b9dcbe6 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/actions", + "name": "@tachybase/actions", "version": "0.21.24", "description": "", "repository": { @@ -11,10 +11,10 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/cache": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/utils": "workspace:*", "koa": "^2.13.4", "lodash": "4.17.21", "sequelize": "^6.26.0" diff --git a/packages/core/actions/src/__tests__/add-action.test.ts b/packages/core/actions/src/__tests__/add-action.test.ts index 868941789..3845dffc4 100644 --- a/packages/core/actions/src/__tests__/add-action.test.ts +++ b/packages/core/actions/src/__tests__/add-action.test.ts @@ -1,5 +1,5 @@ import { mockServer, MockServer } from './index'; -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; describe('add action', () => { let app: MockServer; diff --git a/packages/core/actions/src/__tests__/create-action.test.ts b/packages/core/actions/src/__tests__/create-action.test.ts index 6b50bf696..74563a317 100644 --- a/packages/core/actions/src/__tests__/create-action.test.ts +++ b/packages/core/actions/src/__tests__/create-action.test.ts @@ -1,5 +1,5 @@ import { mockServer } from './index'; -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; describe('create action', () => { let app; diff --git a/packages/core/actions/src/__tests__/destroy-action.test.ts b/packages/core/actions/src/__tests__/destroy-action.test.ts index 1928628f6..f581c4644 100644 --- a/packages/core/actions/src/__tests__/destroy-action.test.ts +++ b/packages/core/actions/src/__tests__/destroy-action.test.ts @@ -1,4 +1,4 @@ -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; import { mockServer } from './index'; describe('destroy action', () => { diff --git a/packages/core/actions/src/__tests__/first-or-create.test.ts b/packages/core/actions/src/__tests__/first-or-create.test.ts index 1f21407ca..c83638037 100644 --- a/packages/core/actions/src/__tests__/first-or-create.test.ts +++ b/packages/core/actions/src/__tests__/first-or-create.test.ts @@ -1,6 +1,6 @@ import { mockServer } from './index'; -import { registerActions } from '@nocobase/actions'; -import { Collection } from '@nocobase/database'; +import { registerActions } from '@tachybase/actions'; +import { Collection } from '@tachybase/database'; describe('first or create', () => { let app; diff --git a/packages/core/actions/src/__tests__/get-action.test.ts b/packages/core/actions/src/__tests__/get-action.test.ts index 658e5b47f..7064032b5 100644 --- a/packages/core/actions/src/__tests__/get-action.test.ts +++ b/packages/core/actions/src/__tests__/get-action.test.ts @@ -1,4 +1,4 @@ -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; import { MockServer, mockServer } from './'; describe('get action', () => { diff --git a/packages/core/actions/src/__tests__/index.ts b/packages/core/actions/src/__tests__/index.ts index fcf54308c..cb775325d 100644 --- a/packages/core/actions/src/__tests__/index.ts +++ b/packages/core/actions/src/__tests__/index.ts @@ -1,5 +1,5 @@ -import Database, { CollectionOptions, mockDatabase } from '@nocobase/database'; -import { Handlers, ResourceOptions, Resourcer } from '@nocobase/resourcer'; +import Database, { CollectionOptions, mockDatabase } from '@tachybase/database'; +import { Handlers, ResourceOptions, Resourcer } from '@tachybase/resourcer'; import Koa from 'koa'; import bodyParser from 'koa-bodyparser'; import qs from 'qs'; diff --git a/packages/core/actions/src/__tests__/list-action.test.ts b/packages/core/actions/src/__tests__/list-action.test.ts index 12b49533a..14af102d4 100644 --- a/packages/core/actions/src/__tests__/list-action.test.ts +++ b/packages/core/actions/src/__tests__/list-action.test.ts @@ -1,4 +1,4 @@ -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; import { MockServer, mockServer as actionMockServer } from './index'; describe('list action', () => { diff --git a/packages/core/actions/src/__tests__/move-action.test.ts b/packages/core/actions/src/__tests__/move-action.test.ts index ae5023de7..beceea6c3 100644 --- a/packages/core/actions/src/__tests__/move-action.test.ts +++ b/packages/core/actions/src/__tests__/move-action.test.ts @@ -1,7 +1,7 @@ import { mockServer, MockServer } from './index'; -import { registerActions } from '@nocobase/actions'; -import { Collection, Database } from '@nocobase/database'; -import { waitSecond } from '@nocobase/test'; +import { registerActions } from '@tachybase/actions'; +import { Collection, Database } from '@tachybase/database'; +import { waitSecond } from '@tachybase/test'; describe('sort action', () => { describe('associations', () => { diff --git a/packages/core/actions/src/__tests__/remove-action.test.ts b/packages/core/actions/src/__tests__/remove-action.test.ts index 080e7d3e8..86cd4f0a5 100644 --- a/packages/core/actions/src/__tests__/remove-action.test.ts +++ b/packages/core/actions/src/__tests__/remove-action.test.ts @@ -1,5 +1,5 @@ import { mockServer } from './index'; -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; describe('remove action', () => { let app; diff --git a/packages/core/actions/src/__tests__/set-action.test.ts b/packages/core/actions/src/__tests__/set-action.test.ts index 117a085aa..57fdb3efd 100644 --- a/packages/core/actions/src/__tests__/set-action.test.ts +++ b/packages/core/actions/src/__tests__/set-action.test.ts @@ -1,5 +1,5 @@ import { mockServer } from './index'; -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; describe('set action', () => { let app; diff --git a/packages/core/actions/src/__tests__/toggle-action.test.ts b/packages/core/actions/src/__tests__/toggle-action.test.ts index dcfea48e9..7d3e2a772 100644 --- a/packages/core/actions/src/__tests__/toggle-action.test.ts +++ b/packages/core/actions/src/__tests__/toggle-action.test.ts @@ -1,5 +1,5 @@ import { mockServer } from './index'; -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; describe('toggle action', () => { let app; diff --git a/packages/core/actions/src/__tests__/update-action.test.ts b/packages/core/actions/src/__tests__/update-action.test.ts index f8bf74637..1b638fad9 100644 --- a/packages/core/actions/src/__tests__/update-action.test.ts +++ b/packages/core/actions/src/__tests__/update-action.test.ts @@ -1,5 +1,5 @@ import { MockServer, mockServer } from './index'; -import { registerActions } from '@nocobase/actions'; +import { registerActions } from '@tachybase/actions'; describe('update action', () => { let app: MockServer; diff --git a/packages/core/actions/src/__tests__/update-or-create.test.ts b/packages/core/actions/src/__tests__/update-or-create.test.ts index ed50b9e55..f99f31708 100644 --- a/packages/core/actions/src/__tests__/update-or-create.test.ts +++ b/packages/core/actions/src/__tests__/update-or-create.test.ts @@ -1,6 +1,6 @@ import { mockServer } from './index'; -import { registerActions } from '@nocobase/actions'; -import { Collection } from '@nocobase/database'; +import { registerActions } from '@tachybase/actions'; +import { Collection } from '@tachybase/database'; describe('update or create', () => { let app; diff --git a/packages/core/actions/src/actions/add.ts b/packages/core/actions/src/actions/add.ts index 122495c36..cd2aa8d7b 100644 --- a/packages/core/actions/src/actions/add.ts +++ b/packages/core/actions/src/actions/add.ts @@ -3,7 +3,7 @@ import { BelongsToManyRepository, HasManyRepository, MultipleRelationRepository, -} from '@nocobase/database'; +} from '@tachybase/database'; import { Context } from '..'; import { getRepositoryFromParams } from '../utils'; diff --git a/packages/core/actions/src/actions/list.ts b/packages/core/actions/src/actions/list.ts index b83175d4b..e9d8c52e8 100644 --- a/packages/core/actions/src/actions/list.ts +++ b/packages/core/actions/src/actions/list.ts @@ -1,4 +1,4 @@ -import { assign } from '@nocobase/utils'; +import { assign } from '@tachybase/utils'; import { Context } from '..'; import { getRepositoryFromParams, pageArgsToLimitArgs } from '../utils'; import { DEFAULT_PAGE, DEFAULT_PER_PAGE } from '../constants'; @@ -74,33 +74,35 @@ async function listWithPagination(ctx: Context) { if (ctx.action.params.tree) { const foreignKey = collection.treeParentField?.foreignKey || 'parentId'; const params = Object.values(options.filter).flat()[0] || {}; - let dataId: any; + let dataIds = []; if (Object.entries(params).length) { const getParent = async (filter = {}) => { - const data = await repository.findOne({ + const data = await repository.find({ filter: filter, }); - dataId = data.id; + dataIds = data.map((item) => item.id); }; await getParent(params); - const query = ` + const allDataIds = []; + for (const dataId of dataIds) { + const query = ` WITH RECURSIVE tree1 AS ( SELECT id, "${foreignKey}" FROM ${collection.name} WHERE id = :dataId - UNION ALL + UNION ALL - SELECT p.id, p."${foreignKey}" - FROM tree1 up - JOIN ${collection.name} p ON up."${foreignKey}" = p.id - ), - tree2 AS ( - SELECT id, "${foreignKey}" - FROM ${collection.name} - WHERE id = :dataId + SELECT p.id, p."${foreignKey}" + FROM tree1 up + JOIN ${collection.name} p ON up."${foreignKey}" = p.id + ), + tree2 AS ( + SELECT id, "${foreignKey}" + FROM ${collection.name} + WHERE id = :dataId - UNION ALL + UNION ALL SELECT p.id, p."${foreignKey}" FROM tree2 down @@ -113,19 +115,21 @@ async function listWithPagination(ctx: Context) { UNION ALL SELECT * FROM tree2 - );`; - const filterTreeDatas = await ctx.db.sequelize.query(query, { - replacements: { - dataId, - }, - type: QueryTypes.SELECT, - // logging: console.log - }); - const newRows: any[] = filterTreeDatas; - const filterIds = newRows.map((item) => item.id); + ) AS formData;`; + const filterTreeDatas = await ctx.db.sequelize.query(query, { + replacements: { + dataId, + }, + type: QueryTypes.SELECT, + }); + const newRows: any[] = filterTreeDatas; + const filterIds = newRows.map((item) => item.id); + allDataIds.push(...filterIds); + } + const ids = [...new Set(allDataIds)]; const where = { id: { - [Op.in]: filterIds, + [Op.in]: ids, }, }; const [rows, count] = await repository.findAndCount({ @@ -134,7 +138,6 @@ async function listWithPagination(ctx: Context) { }); const _data = rows.map((item) => item.dataValues); const father = _data.filter((parent) => parent.parentId === null); - const transTreeData = (father, allRows) => { father.forEach((parent, index) => { const children = allRows.filter((child) => child.parentId === parent.id); @@ -156,7 +159,7 @@ async function listWithPagination(ctx: Context) { }; transTreeData(father, _data); filterTreeData = father; - filterTreeCount = count; + filterTreeCount = father.length; } } const [rows, count] = await repository.findAndCount(options); diff --git a/packages/core/actions/src/actions/move.ts b/packages/core/actions/src/actions/move.ts index 994a92d66..52b028c4b 100644 --- a/packages/core/actions/src/actions/move.ts +++ b/packages/core/actions/src/actions/move.ts @@ -8,7 +8,7 @@ import { Repository, SortField, TargetKey, -} from '@nocobase/database'; +} from '@tachybase/database'; import { getRepositoryFromParams } from '../utils'; export async function move(ctx: Context, next) { diff --git a/packages/core/actions/src/actions/toggle.ts b/packages/core/actions/src/actions/toggle.ts index d0edef170..8399341a9 100644 --- a/packages/core/actions/src/actions/toggle.ts +++ b/packages/core/actions/src/actions/toggle.ts @@ -1,4 +1,4 @@ -import { BelongsToManyRepository } from '@nocobase/database'; +import { BelongsToManyRepository } from '@tachybase/database'; import { Context } from '..'; import { getRepositoryFromParams } from '../utils'; diff --git a/packages/core/actions/src/index.ts b/packages/core/actions/src/index.ts index af6f8fe6e..024eadd1e 100644 --- a/packages/core/actions/src/index.ts +++ b/packages/core/actions/src/index.ts @@ -1,6 +1,6 @@ -import { Cache } from '@nocobase/cache'; -import { Database } from '@nocobase/database'; -import { Action } from '@nocobase/resourcer'; +import { Cache } from '@tachybase/cache'; +import { Database } from '@tachybase/database'; +import { Action } from '@tachybase/resourcer'; import Koa from 'koa'; import lodash from 'lodash'; import * as actions from './actions'; diff --git a/packages/core/actions/src/utils.ts b/packages/core/actions/src/utils.ts index c1c1e093e..06f464bc9 100644 --- a/packages/core/actions/src/utils.ts +++ b/packages/core/actions/src/utils.ts @@ -1,4 +1,4 @@ -import { MultipleRelationRepository, Repository } from '@nocobase/database'; +import { MultipleRelationRepository, Repository } from '@tachybase/database'; import { Context } from '.'; export function pageArgsToLimitArgs( diff --git a/packages/core/app/LICENSE b/packages/core/app/LICENSE deleted file mode 100644 index 0ad25db4b..000000000 --- a/packages/core/app/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/packages/core/app/client/.umirc.ts b/packages/core/app/client/.umirc.ts index 6e11d7175..b42a2e3f7 100644 --- a/packages/core/app/client/.umirc.ts +++ b/packages/core/app/client/.umirc.ts @@ -1,4 +1,4 @@ -import { getUmiConfig, IndexGenerator } from '@nocobase/devtools/umiConfig'; +import { getUmiConfig, IndexGenerator } from '@tachybase/devtools/umiConfig'; import path from 'path'; import { defineConfig } from 'umi'; diff --git a/packages/core/app/client/src/pages/index.tsx b/packages/core/app/client/src/pages/index.tsx index df8b398ec..04d54e036 100644 --- a/packages/core/app/client/src/pages/index.tsx +++ b/packages/core/app/client/src/pages/index.tsx @@ -1,4 +1,4 @@ -import { Application } from '@nocobase/client'; +import { Application } from '@tachybase/client'; import { TachyBaseClientPresetPlugin } from '@tachybase/preset-tachybase/client'; import devDynamicImport from '../.plugins/index'; diff --git a/packages/core/app/client/tsconfig.json b/packages/core/app/client/tsconfig.json index 597402a2c..bd46799e2 100644 --- a/packages/core/app/client/tsconfig.json +++ b/packages/core/app/client/tsconfig.json @@ -13,7 +13,7 @@ "paths": { "@/*": ["src/*"], "@@/*": ["src/.umi/*"], - "@nocobase/client": ["../../client/src"], + "@tachybase/client": ["../../client/src"] }, "allowSyntheticDefaultImports": true }, diff --git a/packages/core/app/package.json b/packages/core/app/package.json index 7bce131b8..fdea46bc4 100644 --- a/packages/core/app/package.json +++ b/packages/core/app/package.json @@ -1,24 +1,21 @@ { - "name": "@nocobase/app", + "name": "@tachybase/app", "version": "0.21.24", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/core/app" - }, - "license": "AGPL-3.0", + "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@tachybase/preset-tachybase": "workspace:*" + "@tachybase/database": "workspace:*", + "@tachybase/preset-hera-rental": "workspace:*", + "@tachybase/preset-sancongtou": "workspace:*", + "@tachybase/preset-tachybase": "workspace:*", + "@tachybase/server": "workspace:*" }, "devDependencies": { - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/logger": "workspace:*" + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/logger": "workspace:*" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/core/app/src/__tests__/commands.test.ts b/packages/core/app/src/__tests__/commands.test.ts index 6504709d7..d4e1248d6 100644 --- a/packages/core/app/src/__tests__/commands.test.ts +++ b/packages/core/app/src/__tests__/commands.test.ts @@ -1,5 +1,5 @@ -import { mockDatabase } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; +import { mockDatabase } from '@tachybase/database'; +import { uid } from '@tachybase/utils'; import axios from 'axios'; import execa from 'execa'; import { resolve } from 'path'; diff --git a/packages/core/app/src/config/cache.ts b/packages/core/app/src/config/cache.ts index 99503ed03..fce02c4e9 100644 --- a/packages/core/app/src/config/cache.ts +++ b/packages/core/app/src/config/cache.ts @@ -1,4 +1,4 @@ -import { CacheManagerOptions } from '@nocobase/cache'; +import { CacheManagerOptions } from '@tachybase/cache'; export const cacheManager: CacheManagerOptions = { defaultStore: process.env.CACHE_DEFAULT_STORE || 'memory', diff --git a/packages/core/app/src/config/database.ts b/packages/core/app/src/config/database.ts index 4f80bf22a..b1a1fe8e4 100644 --- a/packages/core/app/src/config/database.ts +++ b/packages/core/app/src/config/database.ts @@ -1,4 +1,4 @@ -import { parseDatabaseOptionsFromEnv } from '@nocobase/database'; +import { parseDatabaseOptionsFromEnv } from '@tachybase/database'; export async function parseDatabaseOptions() { return await parseDatabaseOptionsFromEnv(); diff --git a/packages/core/app/src/config/logger.ts b/packages/core/app/src/config/logger.ts index 3ee8cbb86..ff12030a1 100644 --- a/packages/core/app/src/config/logger.ts +++ b/packages/core/app/src/config/logger.ts @@ -1,5 +1,5 @@ -import { getLoggerLevel, getLoggerTransport } from '@nocobase/logger'; -import { AppLoggerOptions } from '@nocobase/server'; +import { getLoggerLevel, getLoggerTransport } from '@tachybase/logger'; +import { AppLoggerOptions } from '@tachybase/server'; export default { request: { diff --git a/packages/core/app/src/config/plugins.ts b/packages/core/app/src/config/plugins.ts index e4ba361b9..01a78c63a 100644 --- a/packages/core/app/src/config/plugins.ts +++ b/packages/core/app/src/config/plugins.ts @@ -1,3 +1,4 @@ -import { PluginConfiguration } from '@nocobase/server'; +import { PluginConfiguration } from '@tachybase/server'; +import process from 'process'; -export default ['tachybase'] as PluginConfiguration[]; +export default [process.env.PRESET_NAME ?? 'tachybase'] as PluginConfiguration[]; diff --git a/packages/core/app/src/config/telemetry.ts b/packages/core/app/src/config/telemetry.ts index 3c946f26f..6394c9164 100644 --- a/packages/core/app/src/config/telemetry.ts +++ b/packages/core/app/src/config/telemetry.ts @@ -1,4 +1,4 @@ -import { AppTelemetryOptions } from '@nocobase/server'; +import { AppTelemetryOptions } from '@tachybase/server'; export const telemetry: AppTelemetryOptions = { enabled: process.env.TELEMETRY_ENABLED === 'on', diff --git a/packages/core/app/src/index.ts b/packages/core/app/src/index.ts index 372e2d56e..24ccd1dda 100644 --- a/packages/core/app/src/index.ts +++ b/packages/core/app/src/index.ts @@ -1,4 +1,4 @@ -import { Gateway } from '@nocobase/server'; +import { Gateway } from '@tachybase/server'; import { getConfig } from './config'; getConfig() diff --git a/packages/core/auth/LICENSE b/packages/core/auth/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/auth/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/auth/package.json b/packages/core/auth/package.json index f5d3ddff1..d81b69c0a 100644 --- a/packages/core/auth/package.json +++ b/packages/core/auth/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/auth", + "name": "@tachybase/auth", "version": "0.21.24", "description": "", "repository": { @@ -11,11 +11,11 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/utils": "workspace:*", "@types/jsonwebtoken": "^8.5.8", "jsonwebtoken": "^8.5.1" }, diff --git a/packages/core/auth/src/__tests__/auth-manager.test.ts b/packages/core/auth/src/__tests__/auth-manager.test.ts index d84db75fa..c3b8054b0 100644 --- a/packages/core/auth/src/__tests__/auth-manager.test.ts +++ b/packages/core/auth/src/__tests__/auth-manager.test.ts @@ -1,8 +1,8 @@ import { vi } from 'vitest'; -import { Context } from '@nocobase/actions'; -import { Auth, AuthManager } from '@nocobase/auth'; -import Database, { Model } from '@nocobase/database'; -import { MockServer, mockServer } from '@nocobase/test'; +import { Context } from '@tachybase/actions'; +import { Auth, AuthManager } from '@tachybase/auth'; +import Database, { Model } from '@tachybase/database'; +import { MockServer, mockServer } from '@tachybase/test'; class MockStorer { elements: Map = new Map(); diff --git a/packages/core/auth/src/actions.ts b/packages/core/auth/src/actions.ts index 3d3fc9889..2ad5bda29 100644 --- a/packages/core/auth/src/actions.ts +++ b/packages/core/auth/src/actions.ts @@ -1,4 +1,4 @@ -import { Handlers } from '@nocobase/resourcer'; +import { Handlers } from '@tachybase/resourcer'; export const actions = { signIn: async (ctx, next) => { diff --git a/packages/core/auth/src/auth-manager.ts b/packages/core/auth/src/auth-manager.ts index a75b0e13c..71ff9bac7 100644 --- a/packages/core/auth/src/auth-manager.ts +++ b/packages/core/auth/src/auth-manager.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { Registry } from '@nocobase/utils'; +import { Context, Next } from '@tachybase/actions'; +import { Registry } from '@tachybase/utils'; import { Auth, AuthExtend } from './auth'; import { JwtOptions, JwtService } from './base/jwt-service'; import { ITokenBlacklistService } from './base/token-blacklist-service'; diff --git a/packages/core/auth/src/auth.ts b/packages/core/auth/src/auth.ts index face37fd4..59dad9a94 100644 --- a/packages/core/auth/src/auth.ts +++ b/packages/core/auth/src/auth.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { Model } from '@nocobase/database'; +import { Context } from '@tachybase/actions'; +import { Model } from '@tachybase/database'; import { Authenticator } from './auth-manager'; export type AuthConfig = { diff --git a/packages/core/auth/src/base/auth.ts b/packages/core/auth/src/base/auth.ts index b0cb75794..12561033f 100644 --- a/packages/core/auth/src/base/auth.ts +++ b/packages/core/auth/src/base/auth.ts @@ -1,7 +1,7 @@ -import { Collection, Model } from '@nocobase/database'; +import { Collection, Model } from '@tachybase/database'; import { Auth, AuthConfig } from '../auth'; import { JwtService } from './jwt-service'; -import { Cache } from '@nocobase/cache'; +import { Cache } from '@tachybase/cache'; /** * BaseAuth diff --git a/packages/core/build/LICENSE b/packages/core/build/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/build/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/build/package.json b/packages/core/build/package.json index c0879c674..11e1eb94f 100755 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/build", + "name": "@tachybase/build", "version": "0.21.24", "description": "Library build tool based on rollup.", "license": "Apache-2.0", diff --git a/packages/core/build/src/build.ts b/packages/core/build/src/build.ts index de38bade4..e55890df0 100755 --- a/packages/core/build/src/build.ts +++ b/packages/core/build/src/build.ts @@ -39,7 +39,7 @@ export async function build(pkgs: string[]) { } else { msg = 'No package matched' } - console.warn(chalk.yellow(`[@nocobase/build]: ${msg}`)); + console.warn(chalk.yellow(`[@tachybase/build]: ${msg}`)); return; } diff --git a/packages/core/build/src/buildEsm.ts b/packages/core/build/src/buildEsm.ts index 851555549..738d5b3ac 100644 --- a/packages/core/build/src/buildEsm.ts +++ b/packages/core/build/src/buildEsm.ts @@ -19,7 +19,7 @@ export async function buildEsm(cwd: string, userConfig: UserConfig, sourcemap: b } const pkg = require(path.join(cwd, 'package.json')); - if (pkg.name === '@nocobase/test') { + if (pkg.name === '@tachybase/test') { const e2eEntry = path.join(cwd, 'src/e2e/index.ts').replaceAll(/\\/g, '/'); const e2eOutDir = path.resolve(cwd, 'es/e2e'); await build(cwd, e2eEntry, e2eOutDir, userConfig, sourcemap, log); diff --git a/packages/core/build/src/buildPlugin.ts b/packages/core/build/src/buildPlugin.ts index 5301122d2..6d8db8457 100644 --- a/packages/core/build/src/buildPlugin.ts +++ b/packages/core/build/src/buildPlugin.ts @@ -28,39 +28,39 @@ const sourceGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx,mjs}', '!src/**/__ const external = [ // nocobase - '@nocobase/acl', - '@nocobase/actions', - '@nocobase/auth', - '@nocobase/cache', - '@nocobase/client', - '@nocobase/database', - '@nocobase/data-source-manager', - '@nocobase/evaluators', - '@nocobase/logger', - '@nocobase/resourcer', - '@nocobase/sdk', + '@tachybase/acl', + '@tachybase/actions', + '@tachybase/auth', + '@tachybase/cache', + '@tachybase/client', + '@tachybase/database', + '@tachybase/data-source-manager', + '@tachybase/evaluators', + '@tachybase/logger', + '@tachybase/resourcer', + '@tachybase/sdk', '@tachybase/schema', '@tachybase/components', - '@nocobase/server', - '@nocobase/test', - '@nocobase/utils', + '@tachybase/server', + '@tachybase/test', + '@tachybase/utils', - // @nocobase/auth + // @tachybase/auth 'jsonwebtoken', - // @nocobase/cache + // @tachybase/cache 'cache-manager', - // @nocobase/database + // @tachybase/database 'sequelize', 'umzug', 'async-mutex', - // @nocobase/evaluators + // @tachybase/evaluators '@formulajs/formulajs', 'mathjs', - // @nocobase/logger + // @tachybase/logger 'winston', 'winston-daily-rotate-file', diff --git a/packages/core/build/src/constant.ts b/packages/core/build/src/constant.ts index 54447a95b..2bee2f60b 100644 --- a/packages/core/build/src/constant.ts +++ b/packages/core/build/src/constant.ts @@ -38,7 +38,7 @@ export const getPluginPackages = (packages: Project[]) => export const getPresetsPackages = (packages: Project[]) => packages.filter((item) => item.dir.startsWith(PRESETS_DIR)); export const CORE_APP = path.join(PACKAGES_PATH, 'core/app'); export const CORE_CLIENT = path.join(PACKAGES_PATH, 'core/client'); -export const ESM_PACKAGES = ['@nocobase/test']; +export const ESM_PACKAGES = ['@tachybase/test']; export const CJS_EXCLUDE_PACKAGES = [ path.join(PACKAGES_PATH, 'core/build'), path.join(PACKAGES_PATH, 'core/cli'), diff --git a/packages/core/build/src/utils/getPackages.ts b/packages/core/build/src/utils/getPackages.ts index 362adda2f..b5c3c5240 100644 --- a/packages/core/build/src/utils/getPackages.ts +++ b/packages/core/build/src/utils/getPackages.ts @@ -9,7 +9,7 @@ import type { Project } from '@pnpm/workspace.find-packages'; /** * 获取构建包的绝对路径,支持项目路径和 npm 两种形式 * @example - * pnpm build packages/core/client @nocobase/acl => ['/home/xx/packages/core/client', '/home/xx/packages/core/acl'] + * pnpm build packages/core/client @tachybase/acl => ['/home/xx/packages/core/client', '/home/xx/packages/core/acl'] * pnpm build packages/plugins/* => ['/home/xx/packages/plugins/a', '/home/xx/packages/plugins/b'] * pnpm build => all packages */ diff --git a/packages/core/cache/LICENSE b/packages/core/cache/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/cache/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/cache/package.json b/packages/core/cache/package.json index 8e6677373..3b30635df 100644 --- a/packages/core/cache/package.json +++ b/packages/core/cache/package.json @@ -1,12 +1,7 @@ { - "name": "@nocobase/cache", + "name": "@tachybase/cache", "version": "0.21.24", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/cache" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/core/cli/nocobase.conf.tpl b/packages/core/cli/nocobase.conf.tpl index b1a7dcdfd..954e52656 100644 --- a/packages/core/cli/nocobase.conf.tpl +++ b/packages/core/cli/nocobase.conf.tpl @@ -15,7 +15,7 @@ log_format apm '"$time_local" client=$remote_addr ' server { listen 80; server_name _; - root {{cwd}}/node_modules/@nocobase/app/dist/client; + root {{cwd}}/node_modules/@tachybase/app/dist/client; index index.html; client_max_body_size 1000M; access_log /var/log/nginx/nocobase.log apm; @@ -44,7 +44,7 @@ server { } location {{publicPath}} { - alias {{cwd}}/node_modules/@nocobase/app/dist/client/; + alias {{cwd}}/node_modules/@tachybase/app/dist/client/; try_files $uri $uri/ /index.html; add_header Last-Modified $date_gmt; add_header Cache-Control 'no-store, no-cache'; diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index 5b3e680bb..35f063cf6 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -23,8 +23,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@nocobase/app": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/app": "workspace:*", + "@tachybase/utils": "workspace:*", "@types/fs-extra": "^11.0.1", "@umijs/utils": "3.5.20", "axios": "^1.6.8", @@ -44,10 +44,10 @@ "tsx": "^4.7.2" }, "devDependencies": { - "@nocobase/devtools": "workspace:*", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", + "@tachybase/devtools": "workspace:*", "@types/fs-extra": "^11.0.4", "@types/lodash": "^4.17.0", "@types/node": "^20.12.7", diff --git a/packages/core/cli/src/commands/build.ts b/packages/core/cli/src/commands/build.ts index 1a1e55adf..af7e4b1ad 100644 --- a/packages/core/cli/src/commands/build.ts +++ b/packages/core/cli/src/commands/build.ts @@ -12,14 +12,14 @@ export default (cli: Command) => { .allowUnknownOption() .argument('[packages...]') .option('-v, --version', 'print version') - .option('-c, --compile', 'compile the @nocobase/build package') + .option('-c, --compile', 'compile the @tachybase/build package') .option('-r, --retry', 'retry the last failed package') - .option('-w, --watch', 'watch compile the @nocobase/build package') + .option('-w, --watch', 'watch compile the @tachybase/build package') .option('-s, --sourcemap', 'generate sourcemap') .option('--no-dts', 'not generate dts') .action(async (pkgs, options) => { nodeCheck(); - if (options.compile || options.watch || isPackageValid('@nocobase/build/src/index.ts')) { + if (options.compile || options.watch || isPackageValid('@tachybase/build/src/index.ts')) { await run('pnpm', ['build', options.watch ? '--watch' : ''], { cwd: resolve(process.cwd(), 'packages/core/build'), }); diff --git a/packages/core/cli/src/commands/postinstall.ts b/packages/core/cli/src/commands/postinstall.ts index 81d3a328b..772ad3b08 100644 --- a/packages/core/cli/src/commands/postinstall.ts +++ b/packages/core/cli/src/commands/postinstall.ts @@ -3,7 +3,7 @@ import { run, isDev, isPackageValid, generatePlaywrightPath } from '../util'; import { resolve } from 'path'; import { existsSync } from 'fs'; import { readFile, writeFile } from 'fs/promises'; -import { createStoragePluginsSymlink, createDevPluginsSymlink } from '@nocobase/utils/plugin-symlink'; +import { createStoragePluginsSymlink, createDevPluginsSymlink } from '@tachybase/utils/plugin-symlink'; export default (cli: Command) => { const { APP_PACKAGE_ROOT } = process.env; diff --git a/packages/core/cli/src/commands/tar.ts b/packages/core/cli/src/commands/tar.ts index 5a72e21f3..c2684fa5c 100644 --- a/packages/core/cli/src/commands/tar.ts +++ b/packages/core/cli/src/commands/tar.ts @@ -8,11 +8,11 @@ export default (cli: Command) => { .allowUnknownOption() .argument('[packages...]') .option('-v, --version', 'print version') - .option('-c, --compile', 'compile the @nocobase/build package') - .option('-w, --watch', 'watch compile the @nocobase/build package') + .option('-c, --compile', 'compile the @tachybase/build package') + .option('-w, --watch', 'watch compile the @tachybase/build package') .action(async (pkgs, options) => { nodeCheck(); - if (options.compile || options.watch || isPackageValid('@nocobase/build/src/index.ts')) { + if (options.compile || options.watch || isPackageValid('@tachybase/build/src/index.ts')) { await run('pnpm', ['build', options.watch ? '--watch' : ''], { cwd: resolve(process.cwd(), 'packages/core/build'), }); diff --git a/packages/core/cli/src/commands/upgrade.ts b/packages/core/cli/src/commands/upgrade.ts index 8e5321c6e..47e39d730 100644 --- a/packages/core/cli/src/commands/upgrade.ts +++ b/packages/core/cli/src/commands/upgrade.ts @@ -30,7 +30,7 @@ export default (cli: Command) => { if (existsSync(appDevDir)) { rmSync(appDevDir, { recursive: true, force: true }); } - await run('pnpm', ['add', '@tachybase/cli', '@nocobase/devtools', '-w']); + await run('pnpm', ['add', '@tachybase/cli', '@tachybase/devtools', '-w']); await run('pnpm', ['install']); await runAppCommand('upgrade'); }); diff --git a/packages/core/cli/src/util.ts b/packages/core/cli/src/util.ts index 419b817c9..04c1d1543 100644 --- a/packages/core/cli/src/util.ts +++ b/packages/core/cli/src/util.ts @@ -184,13 +184,13 @@ export async function updateJsonFile(target: string, fn: any) { } export async function getVersion() { - const { stdout } = await execa('npm', ['v', '@nocobase/app-server', 'versions']); + const { stdout } = await execa('npm', ['v', '@tachybase/app-server', 'versions']); const versions = new Function(`return (${stdout})`)(); return versions[versions.length - 1]; } export function generateAppDir() { - const appPkgPath = dirname(dirname(new URL(import.meta.resolve('@nocobase/app/src/index.ts')).pathname)); + const appPkgPath = dirname(dirname(new URL(import.meta.resolve('@tachybase/app/src/index.ts')).pathname)); const appDevDir = resolve(process.cwd(), './storage/.app-dev'); if (isDev() && !hasCorePackages() && appPkgPath.includes('node_modules')) { if (!existsSync(appDevDir)) { @@ -239,7 +239,7 @@ export async function genTsConfigPaths() { paths[`${packageJsonName}/client`] = [`${relativePath}/src/client`]; paths[`${packageJsonName}/package.json`] = [`${relativePath}/package.json`]; paths[packageJsonName] = [`${relativePath}/src`]; - if (packageJsonName === '@nocobase/test') { + if (packageJsonName === '@tachybase/test') { paths[`${packageJsonName}/server`] = [`${relativePath}/src/server`]; paths[`${packageJsonName}/e2e`] = [`${relativePath}/src/e2e`]; } @@ -262,7 +262,7 @@ export function generatePlaywrightPath(clean = false) { rmSync(dirname(playwright), { force: true, recursive: true }); } if (!_existsSync(playwright)) { - const testPkg = require.resolve('@nocobase/test/package.json'); + const testPkg = require.resolve('@tachybase/test/package.json'); _cpSync(resolve(dirname(testPkg), 'playwright/tests'), playwright, { recursive: true }); } } catch (error) { diff --git a/packages/core/cli/templates/plugin/package.json.tpl b/packages/core/cli/templates/plugin/package.json.tpl index b0bcdc786..de658e47a 100644 --- a/packages/core/cli/templates/plugin/package.json.tpl +++ b/packages/core/cli/templates/plugin/package.json.tpl @@ -4,8 +4,8 @@ "main": "dist/server/index.js", "dependencies": {}, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@tachybase/client": "0.x", + "@tachybase/server": "0.x", + "@tachybase/test": "0.x" } } diff --git a/packages/core/cli/templates/plugin/src/client/index.tsx.tpl b/packages/core/cli/templates/plugin/src/client/index.tsx.tpl index 70314c292..6e8a59172 100644 --- a/packages/core/cli/templates/plugin/src/client/index.tsx.tpl +++ b/packages/core/cli/templates/plugin/src/client/index.tsx.tpl @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; export class {{{pascalCaseName}}}Client extends Plugin { async afterAdd() { diff --git a/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl b/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl index 25af55c01..d88332216 100644 --- a/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl +++ b/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; export class {{{pascalCaseName}}}Server extends Plugin { async afterAdd() {} diff --git a/packages/core/client/package.json b/packages/core/client/package.json index 8984f4c8d..063b4d21d 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/client", + "name": "@tachybase/client", "version": "0.21.24", "license": "Apache-2.0", "main": "lib/index.js", @@ -18,11 +18,11 @@ "@dnd-kit/sortable": "^6.0.0", "@dnd-kit/utilities": "^3.2.2", "@emotion/css": "^11.7.1", - "@nocobase/evaluators": "workspace:*", - "@nocobase/sdk": "workspace:*", - "@nocobase/utils": "workspace:*", "@tachybase/components": "workspace:*", + "@tachybase/evaluators": "workspace:*", "@tachybase/schema": "workspace:*", + "@tachybase/sdk": "workspace:*", + "@tachybase/utils": "workspace:*", "ahooks": "^3.7.2", "antd": "5.16.1", "antd-style": "3.4.5", @@ -70,7 +70,7 @@ "axios-mock-adapter": "^1.20.0" }, "peerDependencies": { - "@nocobase/database": "workspace:*", + "@tachybase/database": "workspace:*", "react": ">=18.0.0", "react-dom": ">=18.0.0", "react-is": ">=18.0.0" diff --git a/packages/core/client/src/antd-config-provider/index.tsx b/packages/core/client/src/antd-config-provider/index.tsx index c6bf4bdc5..29d8e7139 100644 --- a/packages/core/client/src/antd-config-provider/index.tsx +++ b/packages/core/client/src/antd-config-provider/index.tsx @@ -1,4 +1,4 @@ -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; import { ConfigProvider, Spin } from 'antd'; import React, { createContext, useContext } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/core/client/src/api-client/APIClient.ts b/packages/core/client/src/api-client/APIClient.ts index 8a1e80062..6a2a42168 100644 --- a/packages/core/client/src/api-client/APIClient.ts +++ b/packages/core/client/src/api-client/APIClient.ts @@ -1,4 +1,4 @@ -import { APIClient as APIClientSDK, getSubAppName } from '@nocobase/sdk'; +import { APIClient as APIClientSDK, getSubAppName } from '@tachybase/sdk'; import { Result } from 'ahooks/es/useRequest/src/types'; import { notification } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/api-client/demos/demo1.tsx b/packages/core/client/src/api-client/demos/demo1.tsx index dbc18123d..8d39ef282 100644 --- a/packages/core/client/src/api-client/demos/demo1.tsx +++ b/packages/core/client/src/api-client/demos/demo1.tsx @@ -1,4 +1,4 @@ -import { APIClient, APIClientProvider, compose, useRequest } from '@nocobase/client'; +import { APIClient, APIClientProvider, compose, useRequest } from '@tachybase/client'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; diff --git a/packages/core/client/src/api-client/demos/demo2.tsx b/packages/core/client/src/api-client/demos/demo2.tsx index 823a5dbb4..f337e0b6c 100644 --- a/packages/core/client/src/api-client/demos/demo2.tsx +++ b/packages/core/client/src/api-client/demos/demo2.tsx @@ -1,4 +1,4 @@ -import { APIClient, APIClientProvider, compose, useRequest } from '@nocobase/client'; +import { APIClient, APIClientProvider, compose, useRequest } from '@tachybase/client'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; diff --git a/packages/core/client/src/api-client/demos/demo3.tsx b/packages/core/client/src/api-client/demos/demo3.tsx index d385d3fda..2d1043f87 100644 --- a/packages/core/client/src/api-client/demos/demo3.tsx +++ b/packages/core/client/src/api-client/demos/demo3.tsx @@ -1,5 +1,5 @@ import { uid } from '@tachybase/schema'; -import { APIClient, APIClientProvider, useAPIClient, useRequest } from '@nocobase/client'; +import { APIClient, APIClientProvider, useAPIClient, useRequest } from '@tachybase/client'; import { Button, Input, Space, Table } from 'antd'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; diff --git a/packages/core/client/src/api-client/hooks/assign.ts b/packages/core/client/src/api-client/hooks/assign.ts index 6dd279c6a..591d9b958 100644 --- a/packages/core/client/src/api-client/hooks/assign.ts +++ b/packages/core/client/src/api-client/hooks/assign.ts @@ -1,4 +1,4 @@ -import { isPlainObject } from '@nocobase/utils/client'; +import { isPlainObject } from '@tachybase/utils/client'; import deepmerge from 'deepmerge'; import uniq from 'lodash/uniq'; @@ -13,7 +13,8 @@ export interface MergeStrategies { function getEnumerableOwnPropertySymbols(target: any): any[] { return Object.getOwnPropertySymbols - ? Object.getOwnPropertySymbols(target).filter((symbol) => target.propertyIsEnumerable(symbol)) + ? // eslint-disable-next-line no-prototype-builtins + Object.getOwnPropertySymbols(target).filter((symbol) => target.propertyIsEnumerable(symbol)) : []; } diff --git a/packages/core/client/src/application/Application.tsx b/packages/core/client/src/application/Application.tsx index dfc74ded2..abca069b6 100644 --- a/packages/core/client/src/application/Application.tsx +++ b/packages/core/client/src/application/Application.tsx @@ -1,5 +1,5 @@ import { define, observable } from '@tachybase/schema'; -import { APIClientOptions, getSubAppName } from '@nocobase/sdk'; +import { APIClientOptions, getSubAppName } from '@tachybase/sdk'; import { i18n as i18next } from 'i18next'; import get from 'lodash/get'; import merge from 'lodash/merge'; diff --git a/packages/core/client/src/application/WebSocketClient.ts b/packages/core/client/src/application/WebSocketClient.ts index b4fd7afe0..422a3677c 100644 --- a/packages/core/client/src/application/WebSocketClient.ts +++ b/packages/core/client/src/application/WebSocketClient.ts @@ -1,5 +1,5 @@ import { define, observable } from '@tachybase/schema'; -import { getSubAppName } from '@nocobase/sdk'; +import { getSubAppName } from '@tachybase/sdk'; import { Application } from './Application'; export type WebSocketClientOptions = { diff --git a/packages/core/client/src/application/__tests__/Application.test.tsx b/packages/core/client/src/application/__tests__/Application.test.tsx index 2d39cb004..de44e140d 100644 --- a/packages/core/client/src/application/__tests__/Application.test.tsx +++ b/packages/core/client/src/application/__tests__/Application.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, sleep, userEvent, waitFor } from '@nocobase/test/client'; +import { render, screen, sleep, userEvent, waitFor } from '@tachybase/test/client'; import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import React, { Component } from 'react'; diff --git a/packages/core/client/src/application/__tests__/RouterManager.test.tsx b/packages/core/client/src/application/__tests__/RouterManager.test.tsx index b711fa4b2..57cd4e3cf 100644 --- a/packages/core/client/src/application/__tests__/RouterManager.test.tsx +++ b/packages/core/client/src/application/__tests__/RouterManager.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent, sleep, waitFor } from '@nocobase/test/client'; +import { render, screen, userEvent, sleep, waitFor } from '@tachybase/test/client'; import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import React, { FC } from 'react'; diff --git a/packages/core/client/src/application/__tests__/SchemaToolbar.test.tsx b/packages/core/client/src/application/__tests__/SchemaToolbar.test.tsx index a467fa21d..04124e342 100644 --- a/packages/core/client/src/application/__tests__/SchemaToolbar.test.tsx +++ b/packages/core/client/src/application/__tests__/SchemaToolbar.test.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { fireEvent, render, screen, waitFor } from '@nocobase/test/client'; +import { fireEvent, render, screen, waitFor } from '@tachybase/test/client'; import { SchemaToolbarProvider, useSchemaToolbar, useSchemaToolbarRender } from '../schema-toolbar'; import { SchemaComponent, SchemaComponentProvider, SortableContext, SortableProvider } from '../../schema-component'; import { useFieldSchema } from '@tachybase/schema'; -import { Application, ApplicationContext } from '@nocobase/client'; +import { Application, ApplicationContext } from '@tachybase/client'; describe('SchemaToolbar', () => { test('SchemaToolbarProvider & useSchemaToolbar', () => { diff --git a/packages/core/client/src/application/__tests__/hoc/withDynamicSchemaProps.test.tsx b/packages/core/client/src/application/__tests__/hoc/withDynamicSchemaProps.test.tsx index 374beae63..35b74270b 100644 --- a/packages/core/client/src/application/__tests__/hoc/withDynamicSchemaProps.test.tsx +++ b/packages/core/client/src/application/__tests__/hoc/withDynamicSchemaProps.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { SchemaComponent, SchemaComponentProvider } from '../../../schema-component'; -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import { withDynamicSchemaProps } from '../../hoc'; const HelloComponent = withDynamicSchemaProps((props: any) => ( diff --git a/packages/core/client/src/application/__tests__/hooks.test.tsx b/packages/core/client/src/application/__tests__/hooks.test.tsx index 64e749a68..70ecf2d61 100644 --- a/packages/core/client/src/application/__tests__/hooks.test.tsx +++ b/packages/core/client/src/application/__tests__/hooks.test.tsx @@ -1,4 +1,4 @@ -import { render, sleep, screen, waitFor } from '@nocobase/test/client'; +import { render, sleep, screen, waitFor } from '@tachybase/test/client'; import React from 'react'; import { describe } from 'vitest'; import { Application } from '../Application'; diff --git a/packages/core/client/src/application/__tests__/utils.test.tsx b/packages/core/client/src/application/__tests__/utils.test.tsx index e636cb846..50e40402b 100644 --- a/packages/core/client/src/application/__tests__/utils.test.tsx +++ b/packages/core/client/src/application/__tests__/utils.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import React from 'react'; import { describe } from 'vitest'; import { compose, normalizeContainer } from '../utils'; diff --git a/packages/core/client/src/application/demos/demo1.tsx b/packages/core/client/src/application/demos/demo1.tsx index e724d1201..9d8902b32 100644 --- a/packages/core/client/src/application/demos/demo1.tsx +++ b/packages/core/client/src/application/demos/demo1.tsx @@ -1,4 +1,4 @@ -import { Application, Plugin } from '@nocobase/client'; +import { Application, Plugin } from '@tachybase/client'; import React, { FC } from 'react'; import { Link, Outlet, useLocation } from 'react-router-dom'; diff --git a/packages/core/client/src/application/demos/demo2.tsx b/packages/core/client/src/application/demos/demo2.tsx index 50f7a816b..1fbf0cbe9 100644 --- a/packages/core/client/src/application/demos/demo2.tsx +++ b/packages/core/client/src/application/demos/demo2.tsx @@ -1,4 +1,4 @@ -import { Application, Plugin, RouterManager, useApp } from '@nocobase/client'; +import { Application, Plugin, RouterManager, useApp } from '@tachybase/client'; import React, { useMemo } from 'react'; import { Link, Navigate, Outlet, useParams } from 'react-router-dom'; diff --git a/packages/core/client/src/application/demos/demo3.tsx b/packages/core/client/src/application/demos/demo3.tsx index 4368b963d..a614d96d7 100644 --- a/packages/core/client/src/application/demos/demo3.tsx +++ b/packages/core/client/src/application/demos/demo3.tsx @@ -1,4 +1,4 @@ -import { Application, NocoBaseBuildInPlugin } from '@nocobase/client'; +import { Application, NocoBaseBuildInPlugin } from '@tachybase/client'; export const app = new Application({ apiClient: { diff --git a/packages/core/client/src/application/index.md b/packages/core/client/src/application/index.md index 63d572660..c51ee3ce1 100644 --- a/packages/core/client/src/application/index.md +++ b/packages/core/client/src/application/index.md @@ -57,7 +57,7 @@ app.addComponents({ 在插件中添加组件。 ```tsx | pure -import { Application, Plugin } from '@nocobase/client'; +import { Application, Plugin } from '@tachybase/client'; const Hello = () =>
Hello
; class MyPlugin extends Plugin { @@ -222,7 +222,7 @@ app.router.add('hello', { 在插件中添加路由。 ```tsx | pure -import { Application, Plugin } from '@nocobase/client'; +import { Application, Plugin } from '@tachybase/client'; const Hello = () =>
Hello
; class MyPlugin extends Plugin { @@ -299,7 +299,7 @@ app.addProvider(World, { name: 'ccc' }); add provider in plugin. ```tsx | pure -import { Application, Plugin } from '@nocobase/client'; +import { Application, Plugin } from '@tachybase/client'; const Hello = (props) =>
Hello {props.children}
; class MyPlugin extends Plugin { @@ -316,7 +316,7 @@ const app = new Application({ ### 插件管理 ```tsx | pure -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; class MyPlugin extends Plugin { async afterAdd() { @@ -373,7 +373,7 @@ class MyPlugin extends Plugin { #### 基础用法 ```tsx | pure -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import React from 'react'; const HelloSettingPage = () =>
Hello Setting page
; @@ -422,7 +422,7 @@ class HelloPlugin extends Plugin { 如果想获取设置页面的跳转链接,可以通过 `getRoutePath` 方法获取。 ```tsx | pure -import { useApp } from '@nocobase/client' +import { useApp } from '@tachybase/client' const app = useApp(); app.pluginSettingsManager.getRoutePath('hello'); // /admin/settings/hello diff --git a/packages/core/client/src/application/utils/globalDeps.ts b/packages/core/client/src/application/utils/globalDeps.ts index f9d39bd9a..d7e61eaf9 100644 --- a/packages/core/client/src/application/utils/globalDeps.ts +++ b/packages/core/client/src/application/utils/globalDeps.ts @@ -14,12 +14,12 @@ import * as formilyJsonReactive from '@tachybase/schema'; import * as formilyReactiveReact from '@tachybase/schema'; import * as formilyShared from '@tachybase/schema'; import * as formilyValidator from '@tachybase/schema'; -import * as nocobaseEvaluators from '@nocobase/evaluators/client'; -import * as nocobaseClientUtils from '@nocobase/utils/client'; -import * as nocobaseSDK from '@nocobase/sdk'; +import * as nocobaseEvaluators from '@tachybase/evaluators/client'; +import * as nocobaseClientUtils from '@tachybase/utils/client'; +import * as nocobaseSDK from '@tachybase/sdk'; import * as nocobaseSchema from '@tachybase/schema'; import * as nocobaseComponents from '@tachybase/components'; -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; import * as ahooks from 'ahooks'; import * as antd from 'antd'; import * as antdStyle from 'antd-style'; @@ -70,13 +70,13 @@ export function defineGlobalDeps(requirejs: RequireJS) { requirejs.define('@formily/reactive-react', () => formilyReactiveReact); // nocobase - requirejs.define('@nocobase/utils', () => nocobaseClientUtils); - requirejs.define('@nocobase/utils/client', () => nocobaseClientUtils); - requirejs.define('@nocobase/client', () => nocobaseClient); - requirejs.define('@nocobase/client/client', () => nocobaseClient); - requirejs.define('@nocobase/evaluators', () => nocobaseEvaluators); - requirejs.define('@nocobase/evaluators/client', () => nocobaseEvaluators); - requirejs.define('@nocobase/sdk', () => nocobaseSDK); + requirejs.define('@tachybase/utils', () => nocobaseClientUtils); + requirejs.define('@tachybase/utils/client', () => nocobaseClientUtils); + requirejs.define('@tachybase/client', () => nocobaseClient); + requirejs.define('@tachybase/client/client', () => nocobaseClient); + requirejs.define('@tachybase/evaluators', () => nocobaseEvaluators); + requirejs.define('@tachybase/evaluators/client', () => nocobaseEvaluators); + requirejs.define('@tachybase/sdk', () => nocobaseSDK); requirejs.define('@tachybase/schema', () => nocobaseSchema); requirejs.define('@tachybase/components', () => nocobaseComponents); diff --git a/packages/core/client/src/block-provider/FormFieldProvider.tsx b/packages/core/client/src/block-provider/FormFieldProvider.tsx index 4e226a230..b7b789633 100644 --- a/packages/core/client/src/block-provider/FormFieldProvider.tsx +++ b/packages/core/client/src/block-provider/FormFieldProvider.tsx @@ -1,7 +1,7 @@ import { createForm, onFormValuesChange } from '@tachybase/schema'; import { useField } from '@tachybase/schema'; import { autorun } from '@tachybase/schema'; -import { forEach } from '@nocobase/utils/client'; +import { forEach } from '@tachybase/utils/client'; import { Spin } from 'antd'; import React, { createContext, useContext, useEffect, useMemo } from 'react'; import { useCollectionParentRecordData } from '../data-source/collection-record/CollectionRecordProvider'; diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index 2ee19743b..a1a2db902 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1,7 +1,7 @@ import { Field, Form } from '@tachybase/schema'; import { SchemaExpressionScopeContext, useField, useFieldSchema, useForm } from '@tachybase/schema'; import { untracked } from '@tachybase/schema'; -import { isURL, parse } from '@nocobase/utils/client'; +import { isURL, parse } from '@tachybase/utils/client'; import { App, message } from 'antd'; import _ from 'lodash'; import get from 'lodash/get'; diff --git a/packages/core/client/src/block-provider/hooks/useParsedFilter.ts b/packages/core/client/src/block-provider/hooks/useParsedFilter.ts index 5e309c8c8..586ef788a 100644 --- a/packages/core/client/src/block-provider/hooks/useParsedFilter.ts +++ b/packages/core/client/src/block-provider/hooks/useParsedFilter.ts @@ -1,5 +1,5 @@ import { reaction } from '@tachybase/schema'; -import { flatten, getValuesByPath } from '@nocobase/utils/client'; +import { flatten, getValuesByPath } from '@tachybase/utils/client'; import _ from 'lodash'; import { useEffect, useState } from 'react'; import { useParseDataScopeFilter } from '../../schema-settings'; diff --git a/packages/core/client/src/china-region/index.tsx b/packages/core/client/src/china-region/index.tsx index f0335794c..e9b6b65be 100644 --- a/packages/core/client/src/china-region/index.tsx +++ b/packages/core/client/src/china-region/index.tsx @@ -1,6 +1,6 @@ import { ArrayField } from '@tachybase/schema'; import { useField } from '@tachybase/schema'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import React from 'react'; import { SchemaComponentOptions } from '..'; import { useAPIClient, useRequest } from '../api-client'; diff --git a/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx b/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx index 0a6eb9cb7..d93523f7a 100644 --- a/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx @@ -274,7 +274,7 @@ export const AddFieldAction = (props) => { title: compile(option.label), key: option.label, children: option.children - .filter((child) => ['m2o'].includes(child.name)) + .filter((child) => ['m2o', 'custom', 'm2m'].includes(child.name)) .map((child) => { return { label: compile(child.title), diff --git a/packages/core/client/src/collection-manager/demos/demo2.tsx b/packages/core/client/src/collection-manager/demos/demo2.tsx index aa9194888..a51619e1b 100644 --- a/packages/core/client/src/collection-manager/demos/demo2.tsx +++ b/packages/core/client/src/collection-manager/demos/demo2.tsx @@ -7,7 +7,7 @@ import { Form, SchemaComponent, SchemaComponentProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; export default observer(() => { diff --git a/packages/core/client/src/collection-manager/demos/demo3.tsx b/packages/core/client/src/collection-manager/demos/demo3.tsx index c17b1b2a6..f198f0743 100644 --- a/packages/core/client/src/collection-manager/demos/demo3.tsx +++ b/packages/core/client/src/collection-manager/demos/demo3.tsx @@ -7,7 +7,7 @@ import { compose, RecordProvider, useCollectionField_deprecated, -} from '@nocobase/client'; +} from '@tachybase/client'; import MockAdapter from 'axios-mock-adapter'; const apiClient = new APIClient(); diff --git a/packages/core/client/src/collection-manager/demos/demo4.tsx b/packages/core/client/src/collection-manager/demos/demo4.tsx index 9f6d13a2a..f69f5ef58 100644 --- a/packages/core/client/src/collection-manager/demos/demo4.tsx +++ b/packages/core/client/src/collection-manager/demos/demo4.tsx @@ -4,7 +4,7 @@ import { ExtendCollectionsProvider, SchemaComponent, SchemaComponentProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/collection-manager/demos/demo5.tsx b/packages/core/client/src/collection-manager/demos/demo5.tsx index 2266568f7..695f1eede 100644 --- a/packages/core/client/src/collection-manager/demos/demo5.tsx +++ b/packages/core/client/src/collection-manager/demos/demo5.tsx @@ -24,7 +24,7 @@ import { useCollectionManager, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { cloneDeep } from 'lodash'; import React, { useContext } from 'react'; diff --git a/packages/core/client/src/collection-manager/interfaces/__tests__/json.tsx b/packages/core/client/src/collection-manager/interfaces/__tests__/json.tsx index 9b140eaf1..96ed9882d 100644 --- a/packages/core/client/src/collection-manager/interfaces/__tests__/json.tsx +++ b/packages/core/client/src/collection-manager/interfaces/__tests__/json.tsx @@ -1,4 +1,4 @@ -import { render, screen, waitFor } from '@nocobase/test/client'; +import { render, screen, waitFor } from '@tachybase/test/client'; import React from 'react'; import { CurrentAppInfoContext } from '../../../appInfo'; import { Checkbox } from '../../../schema-component/antd/checkbox'; diff --git a/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx b/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx index 71002ed9e..9007f8b37 100644 --- a/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx +++ b/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx @@ -8,7 +8,7 @@ import { useFieldInterfaceOptions } from '../../../Configuration/interfaces'; import { useCompile } from '../../../../schema-component'; import { useCollectionManager_deprecated } from '../../../hooks'; import dayjs from 'dayjs'; -import { FieldOptions } from '@nocobase/database'; +import { FieldOptions } from '@tachybase/database'; import { ResourceActionContext } from '../../../ResourceActionProvider'; const inferInterface = (field: string, value: any) => { diff --git a/packages/core/client/src/collection-manager/templates/expression.tsx b/packages/core/client/src/collection-manager/templates/expression.tsx index e309f964f..1d3206a39 100644 --- a/packages/core/client/src/collection-manager/templates/expression.tsx +++ b/packages/core/client/src/collection-manager/templates/expression.tsx @@ -1,4 +1,4 @@ -import { getOptions } from '@nocobase/evaluators/client'; +import { getOptions } from '@tachybase/evaluators/client'; import { getConfigurableProperties } from './properties'; import { CollectionTemplate } from '../../data-source/collection-template/CollectionTemplate'; diff --git a/packages/core/client/src/data-source/__tests__/collection-field-interface/CollectionFieldInterfaceManager.test.ts b/packages/core/client/src/data-source/__tests__/collection-field-interface/CollectionFieldInterfaceManager.test.ts index 75af02496..3505d0443 100644 --- a/packages/core/client/src/data-source/__tests__/collection-field-interface/CollectionFieldInterfaceManager.test.ts +++ b/packages/core/client/src/data-source/__tests__/collection-field-interface/CollectionFieldInterfaceManager.test.ts @@ -1,4 +1,4 @@ -import { Application, CollectionFieldInterface, CollectionFieldInterfaceManager } from '@nocobase/client'; +import { Application, CollectionFieldInterface, CollectionFieldInterfaceManager } from '@tachybase/client'; describe('CollectionFieldInterfaceManager', () => { let collectionFieldInterfaceManager: CollectionFieldInterfaceManager; diff --git a/packages/core/client/src/data-source/__tests__/collection-field/CollectionField.test.tsx b/packages/core/client/src/data-source/__tests__/collection-field/CollectionField.test.tsx index cc90cd1dc..70cda2508 100644 --- a/packages/core/client/src/data-source/__tests__/collection-field/CollectionField.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection-field/CollectionField.test.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import { CollectionField, CollectionProvider, @@ -9,7 +9,7 @@ import { SchemaComponent, SchemaComponentProvider, DataSourceApplicationProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import collections from '../collections.json'; function renderApp(fieldName: string) { diff --git a/packages/core/client/src/data-source/__tests__/collection-field/CollectionFieldProvider.test.tsx b/packages/core/client/src/data-source/__tests__/collection-field/CollectionFieldProvider.test.tsx index e0a6c7765..371351e54 100644 --- a/packages/core/client/src/data-source/__tests__/collection-field/CollectionFieldProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection-field/CollectionFieldProvider.test.tsx @@ -1,5 +1,5 @@ import React, { ComponentType } from 'react'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import { CollectionFieldProvider, CollectionProvider, @@ -7,7 +7,7 @@ import { Application, SchemaComponentProvider, DataSourceApplicationProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import collections from '../collections.json'; function renderApp(Demo: ComponentType, name?: string) { diff --git a/packages/core/client/src/data-source/__tests__/collection-record/CollectionRecordProvider.test.tsx b/packages/core/client/src/data-source/__tests__/collection-record/CollectionRecordProvider.test.tsx index 67e00a944..5f9fe6e17 100644 --- a/packages/core/client/src/data-source/__tests__/collection-record/CollectionRecordProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection-record/CollectionRecordProvider.test.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import { CollectionRecordProvider, CollectionRecord, diff --git a/packages/core/client/src/data-source/__tests__/collection-template/CollectionTemplateManager.test.ts b/packages/core/client/src/data-source/__tests__/collection-template/CollectionTemplateManager.test.ts index fa6875f95..a29ec905b 100644 --- a/packages/core/client/src/data-source/__tests__/collection-template/CollectionTemplateManager.test.ts +++ b/packages/core/client/src/data-source/__tests__/collection-template/CollectionTemplateManager.test.ts @@ -1,4 +1,4 @@ -import { Application, CollectionTemplate, CollectionTemplateManager, Collection } from '@nocobase/client'; +import { Application, CollectionTemplate, CollectionTemplateManager, Collection } from '@tachybase/client'; describe('CollectionTemplateManager', () => { let collectionTemplateManager: CollectionTemplateManager; diff --git a/packages/core/client/src/data-source/__tests__/collection/AssociationProvider.test.tsx b/packages/core/client/src/data-source/__tests__/collection/AssociationProvider.test.tsx index afe2f1b18..86662fc8d 100644 --- a/packages/core/client/src/data-source/__tests__/collection/AssociationProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection/AssociationProvider.test.tsx @@ -1,5 +1,5 @@ import React, { ComponentType } from 'react'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import { AssociationProvider, useCollectionField, @@ -9,7 +9,7 @@ import { SchemaComponentProvider, DataSourceApplicationProvider, useParentCollection, -} from '@nocobase/client'; +} from '@tachybase/client'; import collections from '../collections.json'; function renderApp(Demo: ComponentType, props: any = {}) { diff --git a/packages/core/client/src/data-source/__tests__/collection/Collection.test.tsx b/packages/core/client/src/data-source/__tests__/collection/Collection.test.tsx index b82eb8baf..b70da560c 100644 --- a/packages/core/client/src/data-source/__tests__/collection/Collection.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection/Collection.test.tsx @@ -1,4 +1,4 @@ -import { Application, CollectionOptions, DEFAULT_DATA_SOURCE_KEY } from '@nocobase/client'; +import { Application, CollectionOptions, DEFAULT_DATA_SOURCE_KEY } from '@tachybase/client'; import collections from '../collections.json'; function getCollection(collection: CollectionOptions) { diff --git a/packages/core/client/src/data-source/__tests__/collection/CollectionManager.test.tsx b/packages/core/client/src/data-source/__tests__/collection/CollectionManager.test.tsx index ddfaf80c2..0d289ce5f 100644 --- a/packages/core/client/src/data-source/__tests__/collection/CollectionManager.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection/CollectionManager.test.tsx @@ -1,4 +1,4 @@ -import { Application, CollectionManager, CollectionTemplate, Collection } from '@nocobase/client'; +import { Application, CollectionManager, CollectionTemplate, Collection } from '@tachybase/client'; import collections from '../collections.json'; import { app } from '../../../application/demos/demo3'; diff --git a/packages/core/client/src/data-source/__tests__/collection/CollectionManagerProvider.test.tsx b/packages/core/client/src/data-source/__tests__/collection/CollectionManagerProvider.test.tsx index abe01efb8..d4a18259d 100644 --- a/packages/core/client/src/data-source/__tests__/collection/CollectionManagerProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection/CollectionManagerProvider.test.tsx @@ -1,5 +1,5 @@ import React, { ComponentType, useEffect } from 'react'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import { CollectionManager, useCollectionManager, @@ -8,7 +8,7 @@ import { DataSourceApplicationProvider, CollectionManagerProvider, ExtendCollectionsProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import collections from '../collections.json'; function renderApp(Demo: ComponentType, dataSource?: string) { diff --git a/packages/core/client/src/data-source/__tests__/collection/CollectionProvider.test.tsx b/packages/core/client/src/data-source/__tests__/collection/CollectionProvider.test.tsx index 639e336bb..39ab375bd 100644 --- a/packages/core/client/src/data-source/__tests__/collection/CollectionProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection/CollectionProvider.test.tsx @@ -1,5 +1,5 @@ import React, { ComponentType } from 'react'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import { CollectionProvider, useCollectionFields, @@ -8,7 +8,7 @@ import { SchemaComponent, SchemaComponentProvider, DataSourceApplicationProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import collections from '../collections.json'; function renderApp(Demo: ComponentType, props: any = {}) { diff --git a/packages/core/client/src/data-source/__tests__/collection/ExtendCollectionsProvider.test.tsx b/packages/core/client/src/data-source/__tests__/collection/ExtendCollectionsProvider.test.tsx index 21531f1de..33d251989 100644 --- a/packages/core/client/src/data-source/__tests__/collection/ExtendCollectionsProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/collection/ExtendCollectionsProvider.test.tsx @@ -6,7 +6,7 @@ import { DataSourceManagerProvider, CollectionManagerProvider, useCollectionManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useDataSourceKey } from '../../data-source/DataSourceProvider'; describe('ExtendCollectionsProvider', () => { diff --git a/packages/core/client/src/data-source/__tests__/components/CollectionDeletedPlaceholder.test.tsx b/packages/core/client/src/data-source/__tests__/components/CollectionDeletedPlaceholder.test.tsx index d716197d0..e2cafc25c 100644 --- a/packages/core/client/src/data-source/__tests__/components/CollectionDeletedPlaceholder.test.tsx +++ b/packages/core/client/src/data-source/__tests__/components/CollectionDeletedPlaceholder.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { render, screen } from '@nocobase/test/client'; -import { CollectionDeletedPlaceholder, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { render, screen } from '@tachybase/test/client'; +import { CollectionDeletedPlaceholder, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; function renderApp(name?: any, designable?: boolean) { const schema = { diff --git a/packages/core/client/src/data-source/__tests__/data-block/DataBlockProvider.test.tsx b/packages/core/client/src/data-source/__tests__/data-block/DataBlockProvider.test.tsx index fcf93e7c8..345084df9 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/DataBlockProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/DataBlockProvider.test.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { fireEvent, render, screen, waitFor } from '@nocobase/test/client'; +import { fireEvent, render, screen, waitFor } from '@tachybase/test/client'; import CollectionTableListDemo from './data-block-demos/collection-table-list'; import CollectionFormGetAndUpdateDemo from './data-block-demos/collection-form-get-and-update'; import CollectionFormCreateDemo from './data-block-demos/collection-form-create'; diff --git a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-parent-record.tsx b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-parent-record.tsx index ece70aa14..fc81dfed1 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-parent-record.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-parent-record.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Table, TableProps } from 'antd'; -import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; +import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import { createApp } from './createApp'; diff --git a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-source-id.tsx b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-source-id.tsx index 8f40d5b96..55e9e3004 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-source-id.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/association-table-list-and-source-id.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Select, Table, TableProps } from 'antd'; -import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; +import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import useUrlState from '@ahooksjs/use-url-state'; diff --git a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-create.tsx b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-create.tsx index 7cac8fe89..19776b594 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-create.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-create.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import { Button, Form, FormProps, Input, InputNumber, notification } from 'antd'; -import { SchemaComponent, useDataBlockResource, withDynamicSchemaProps } from '@nocobase/client'; +import { SchemaComponent, useDataBlockResource, withDynamicSchemaProps } from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import { createApp } from './createApp'; diff --git a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-get-and-update.tsx b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-get-and-update.tsx index c211b7ec9..00a2eded3 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-get-and-update.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-get-and-update.tsx @@ -6,7 +6,7 @@ import { useDataBlockResource, useCollectionRecordData, withDynamicSchemaProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import useUrlState from '@ahooksjs/use-url-state'; diff --git a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-record-and-update.tsx b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-record-and-update.tsx index 1e112f0f5..192fe2c7f 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-record-and-update.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-form-record-and-update.tsx @@ -7,7 +7,7 @@ import { useDataBlockResource, useCollectionRecordData, withDynamicSchemaProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import { createApp } from './createApp'; diff --git a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-table-list.tsx b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-table-list.tsx index 49587fbab..1acacca42 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-table-list.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/collection-table-list.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { SchemaComponent, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; +import { SchemaComponent, useDataBlockRequest, withDynamicSchemaProps } from '@tachybase/client'; import { Table, TableProps } from 'antd'; import { ISchema } from '@tachybase/schema'; import { createApp } from './createApp'; diff --git a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/createApp.tsx b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/createApp.tsx index 5d5cb91c9..8db05b6b5 100644 --- a/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/createApp.tsx +++ b/packages/core/client/src/data-source/__tests__/data-block/data-block-demos/createApp.tsx @@ -8,7 +8,7 @@ import { LocalDataSource, DEFAULT_DATA_SOURCE_KEY, DEFAULT_DATA_SOURCE_TITLE, -} from '@nocobase/client'; +} from '@tachybase/client'; import MockAdapter from 'axios-mock-adapter'; import { ComponentType } from 'react'; import collections from '../../collections.json'; diff --git a/packages/core/client/src/data-source/__tests__/data-source/CollectionDataSourceProvider.test.tsx b/packages/core/client/src/data-source/__tests__/data-source/CollectionDataSourceProvider.test.tsx index dc35b9769..4f3c59507 100644 --- a/packages/core/client/src/data-source/__tests__/data-source/CollectionDataSourceProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/data-source/CollectionDataSourceProvider.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; -import { Application } from '@nocobase/client'; +import { Application } from '@tachybase/client'; import { DataSourceApplicationProvider } from '../../components/DataSourceApplicationProvider'; import { DataSourceProvider, useDataSourceKey } from '../../data-source/DataSourceProvider'; diff --git a/packages/core/client/src/data-source/__tests__/data-source/DataSource.test.ts b/packages/core/client/src/data-source/__tests__/data-source/DataSource.test.ts index 8770dce2c..843ade5d6 100644 --- a/packages/core/client/src/data-source/__tests__/data-source/DataSource.test.ts +++ b/packages/core/client/src/data-source/__tests__/data-source/DataSource.test.ts @@ -1,4 +1,4 @@ -import { Application, DataSourceOptions, DataSource } from '@nocobase/client'; +import { Application, DataSourceOptions, DataSource } from '@tachybase/client'; describe('DataSource', () => { let dataSource: DataSource; diff --git a/packages/core/client/src/data-source/__tests__/data-source/DataSourceManager.test.ts b/packages/core/client/src/data-source/__tests__/data-source/DataSourceManager.test.ts index 72aaeace1..494af201e 100644 --- a/packages/core/client/src/data-source/__tests__/data-source/DataSourceManager.test.ts +++ b/packages/core/client/src/data-source/__tests__/data-source/DataSourceManager.test.ts @@ -1,4 +1,4 @@ -import { Application, Collection, DEFAULT_DATA_SOURCE_KEY, LocalDataSource, Plugin } from '@nocobase/client'; +import { Application, Collection, DEFAULT_DATA_SOURCE_KEY, LocalDataSource, Plugin } from '@tachybase/client'; import collections from '../collections.json'; describe('DataSourceManager', () => { diff --git a/packages/core/client/src/data-source/__tests__/data-source/DataSourceManagerProvider.test.tsx b/packages/core/client/src/data-source/__tests__/data-source/DataSourceManagerProvider.test.tsx index 2f5649add..c3f2a6ee4 100644 --- a/packages/core/client/src/data-source/__tests__/data-source/DataSourceManagerProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/data-source/DataSourceManagerProvider.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { DataSourceManagerProvider, useDataSourceManager } from '@nocobase/client'; +import { DataSourceManagerProvider, useDataSourceManager } from '@tachybase/client'; describe('DataSourceManagerProvider', () => { test('should render children', () => { diff --git a/packages/core/client/src/data-source/__tests__/data-source/DataSourceProvider.test.tsx b/packages/core/client/src/data-source/__tests__/data-source/DataSourceProvider.test.tsx index 8088514c3..fbaecb50a 100644 --- a/packages/core/client/src/data-source/__tests__/data-source/DataSourceProvider.test.tsx +++ b/packages/core/client/src/data-source/__tests__/data-source/DataSourceProvider.test.tsx @@ -6,9 +6,9 @@ import { DataSource, SchemaComponent, SchemaComponentProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import { DataSourceProvider, useDataSourceKey } from '../../data-source/DataSourceProvider'; -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import React from 'react'; import { AppSchemaComponentProvider } from '../../../application/AppSchemaComponentProvider'; diff --git a/packages/core/client/src/data-source/__tests__/utils.test.ts b/packages/core/client/src/data-source/__tests__/utils.test.ts index d097966c2..4c9fe643d 100644 --- a/packages/core/client/src/data-source/__tests__/utils.test.ts +++ b/packages/core/client/src/data-source/__tests__/utils.test.ts @@ -1,4 +1,4 @@ -import { CollectionFieldInterface, isTitleField, Application } from '@nocobase/client'; +import { CollectionFieldInterface, isTitleField, Application } from '@tachybase/client'; import collections from './collections.json'; describe('utils', () => { diff --git a/packages/core/client/src/data-source/collection/CollectionManager.ts b/packages/core/client/src/data-source/collection/CollectionManager.ts index 367f59abd..c9959dbf4 100644 --- a/packages/core/client/src/data-source/collection/CollectionManager.ts +++ b/packages/core/client/src/data-source/collection/CollectionManager.ts @@ -115,7 +115,7 @@ export class CollectionManager { } if (String(path).split('.').length < 2) { - console.error(`[@nocobase/client]: CollectionManager.getField() path "${path}" is invalid`); + console.error(`[@tachybase/client]: CollectionManager.getField() path "${path}" is invalid`); return; } diff --git a/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx b/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx index 0c20f5cea..0de39cd0d 100644 --- a/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx +++ b/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx @@ -1,4 +1,4 @@ -import { IResource } from '@nocobase/sdk'; +import { IResource } from '@tachybase/sdk'; import React, { FC, ReactNode, createContext, useContext, useMemo } from 'react'; import { useCollectionManager } from '../collection'; diff --git a/packages/core/client/src/filter-provider/utils.ts b/packages/core/client/src/filter-provider/utils.ts index 98c60646f..b4aaf1d8f 100644 --- a/packages/core/client/src/filter-provider/utils.ts +++ b/packages/core/client/src/filter-provider/utils.ts @@ -1,5 +1,5 @@ import { Schema, useFieldSchema } from '@tachybase/schema'; -import { flatten, getValuesByPath } from '@nocobase/utils/client'; +import { flatten, getValuesByPath } from '@tachybase/utils/client'; import _ from 'lodash'; import { useCallback, useEffect, useState } from 'react'; import { FilterTarget, findFilterTargets } from '../block-provider/hooks'; diff --git a/packages/core/client/src/flag-provider/__tests__/flag-provider.test.tsx b/packages/core/client/src/flag-provider/__tests__/flag-provider.test.tsx index ff5aceb2c..462bf3b80 100644 --- a/packages/core/client/src/flag-provider/__tests__/flag-provider.test.tsx +++ b/packages/core/client/src/flag-provider/__tests__/flag-provider.test.tsx @@ -1,4 +1,4 @@ -import { renderHook } from '@nocobase/test/client'; +import { renderHook } from '@tachybase/test/client'; import React from 'react'; import { FlagProvider } from '../FlagProvider'; import { useFlag } from '../hooks/useFlag'; diff --git a/packages/core/client/src/icon/__tests__/icon.test.tsx b/packages/core/client/src/icon/__tests__/icon.test.tsx index 8adedd5b9..1bc7a9782 100644 --- a/packages/core/client/src/icon/__tests__/icon.test.tsx +++ b/packages/core/client/src/icon/__tests__/icon.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/antd-icon'; import App3 from '../demos/custom-icon'; diff --git a/packages/core/client/src/icon/demos/antd-icon.tsx b/packages/core/client/src/icon/demos/antd-icon.tsx index 73bbf1400..ec979a7a8 100644 --- a/packages/core/client/src/icon/demos/antd-icon.tsx +++ b/packages/core/client/src/icon/demos/antd-icon.tsx @@ -1,4 +1,4 @@ -import { Icon } from '@nocobase/client'; +import { Icon } from '@tachybase/client'; import React from 'react'; export default () => ; diff --git a/packages/core/client/src/icon/demos/custom-icon.tsx b/packages/core/client/src/icon/demos/custom-icon.tsx index c9ea30156..8aef2da28 100644 --- a/packages/core/client/src/icon/demos/custom-icon.tsx +++ b/packages/core/client/src/icon/demos/custom-icon.tsx @@ -1,4 +1,4 @@ -import { Icon } from '@nocobase/client'; +import { Icon } from '@tachybase/client'; import React from 'react'; const HeartSvg = () => ( diff --git a/packages/core/client/src/icon/demos/iconfont.tsx b/packages/core/client/src/icon/demos/iconfont.tsx index 0c323873e..801c0fbd5 100644 --- a/packages/core/client/src/icon/demos/iconfont.tsx +++ b/packages/core/client/src/icon/demos/iconfont.tsx @@ -1,4 +1,4 @@ -import { Icon } from '@nocobase/client'; +import { Icon } from '@tachybase/client'; import React from 'react'; Icon.createFromIconfontCN({ diff --git a/packages/core/client/src/icon/demos/register-icon.tsx b/packages/core/client/src/icon/demos/register-icon.tsx index 0209b3352..dcd592c88 100644 --- a/packages/core/client/src/icon/demos/register-icon.tsx +++ b/packages/core/client/src/icon/demos/register-icon.tsx @@ -1,4 +1,4 @@ -import { Icon } from '@nocobase/client'; +import { Icon } from '@tachybase/client'; import React from 'react'; const HeartSvg = () => ( diff --git a/packages/core/client/src/icon/index.md b/packages/core/client/src/icon/index.md index 482dffd44..d85cbcfaa 100644 --- a/packages/core/client/src/icon/index.md +++ b/packages/core/client/src/icon/index.md @@ -7,7 +7,7 @@ group: # Icon ```tsx | pure -import { Icon } from '@nocobase/client'; +import { Icon } from '@tachybase/client'; Icon.createFromIconfontCN({ scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js', diff --git a/packages/core/client/src/locale/en_US.json b/packages/core/client/src/locale/en_US.json index c0fdf1bf8..cce66dcef 100644 --- a/packages/core/client/src/locale/en_US.json +++ b/packages/core/client/src/locale/en_US.json @@ -820,5 +820,6 @@ "Plugin settings": "Plugin settings", "Menu": "Menu", "Drag and drop sorting field": "Drag and drop sorting field", - "Quick Update": "Quick Update" + "Quick Update": "Quick Update", + "Chang on Parent":"Chang on Parent" } diff --git a/packages/core/client/src/locale/zh-CN.json b/packages/core/client/src/locale/zh-CN.json index 5b3538bb4..440242701 100644 --- a/packages/core/client/src/locale/zh-CN.json +++ b/packages/core/client/src/locale/zh-CN.json @@ -921,5 +921,6 @@ "Divide by":"除以", "Scientifix notation":"科学计数法", "Normal":"常规", - "Quick Update": "快速更新" + "Quick Update": "快速更新", + "Chang on Parent": "选择父级" } diff --git a/packages/core/client/src/modules/actions/disassociate/__e2e__/disassociate.test.ts b/packages/core/client/src/modules/actions/disassociate/__e2e__/disassociate.test.ts index 582f0c92a..72fd08105 100644 --- a/packages/core/client/src/modules/actions/disassociate/__e2e__/disassociate.test.ts +++ b/packages/core/client/src/modules/actions/disassociate/__e2e__/disassociate.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from '@nocobase/test/e2e'; +import { test, expect } from '@tachybase/test/e2e'; import { disassociatePage } from './templatesOfPage'; test('basic', async ({ page, mockPage, mockRecord }) => { diff --git a/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts b/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts index 0ce1ffdd8..12d30113e 100644 --- a/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts +++ b/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts @@ -1,4 +1,4 @@ -import { PageConfig } from '@nocobase/test/e2e'; +import { PageConfig } from '@tachybase/test/e2e'; export const disassociatePage: PageConfig = { collections: [ diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaInitializer.test.ts index 3e1243559..6125df948 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, oneEmptyDetailsBlock, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, oneEmptyDetailsBlock, test } from '@tachybase/test/e2e'; test.describe('where multi data details block can be added', () => { test('page', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaSettings.test.ts index d2acc5228..23d693db6 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/schemaSettings.test.ts @@ -3,7 +3,7 @@ import { oneDetailBlockWithM2oFieldToGeneral, oneEmptyDetailsBlock, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('multi data details block schema settings', () => { test('supported options', async ({ page, mockPage, mockRecord }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaInitializer.test.ts index 27d294aaa..f3e425526 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { Page, expect, expectSettingsMenu, oneEmptyTableBlockWithActions, test } from '@nocobase/test/e2e'; +import { Page, expect, expectSettingsMenu, oneEmptyTableBlockWithActions, test } from '@tachybase/test/e2e'; test.describe('where single data details block can be added', () => { test('popup', async ({ page, mockPage, mockRecord }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaSettings.test.ts index 8372adaea..a6e8b8d00 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/details-single/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test } from '@nocobase/test/e2e'; +import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test } from '@tachybase/test/e2e'; test.describe('single details block schema settings', () => { test('supported options', async ({ page, mockPage, mockRecord }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts index f7ce94f73..d2c282e88 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from '@nocobase/test/e2e'; +import { test, expect } from '@tachybase/test/e2e'; import { T3529 } from './templatesOfBug'; test.describe('association form block', () => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/dragAndDrop.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/dragAndDrop.test.ts index f78366e74..eebb09c4b 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/dragAndDrop.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/dragAndDrop.test.ts @@ -1,4 +1,4 @@ -import { expect, oneFormBlockBasedOnUsers, test } from '@nocobase/test/e2e'; +import { expect, oneFormBlockBasedOnUsers, test } from '@tachybase/test/e2e'; test('fields', async ({ page, mockPage }) => { await mockPage(oneFormBlockBasedOnUsers).goto(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts index c21837c22..9d6a6553a 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts @@ -5,7 +5,7 @@ import { oneTableSubformWithMultiLevelAssociationFields, oneTableSubtableWithMultiLevelAssociationFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { T2200, T2614, T2615, T2845, T2993 } from './templatesOfBug'; test.describe('display association fields', () => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts index c8f3bb8b5..cb8e7521e 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts @@ -1,4 +1,4 @@ -import { expect, formBlockDefaultValueTemplate, test } from '@nocobase/test/e2e'; +import { expect, formBlockDefaultValueTemplate, test } from '@tachybase/test/e2e'; test.describe('variables with default value', () => { test('current form', async ({ page, mockPage, mockRecord }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts index eccfa36b0..e8ff78501 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, oneEmptyForm, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, oneEmptyForm, test } from '@tachybase/test/e2e'; import { T3106, T3469 } from './templatesOfBug'; import { uid } from '@tachybase/schema'; diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts index 836d3847a..984970edc 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts @@ -8,7 +8,7 @@ import { oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { T2165, T2174, T3251, T3806 } from './templatesOfBug'; const clickOption = async (page: Page, optionName: string) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts index 2f6ed4d94..12d97ed91 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts @@ -1,4 +1,4 @@ -import { PageConfig, generalWithM2oSingleSelect, generalWithMultiLevelM2mFields } from '@nocobase/test/e2e'; +import { PageConfig, generalWithM2oSingleSelect, generalWithMultiLevelM2mFields } from '@tachybase/test/e2e'; export const T2165 = { pageSchema: { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaInitializer.test.ts index e24468c88..1ad08d962 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { expect, oneEmptyTableBlockWithActions, test } from '@nocobase/test/e2e'; +import { expect, oneEmptyTableBlockWithActions, test } from '@tachybase/test/e2e'; test.describe('where edit form block can be added', () => { test('popup', async ({ page, mockPage, mockRecord }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaSettings.test.ts index c0b0c6dd7..9ffc891d4 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-edit/schemaSettings.test.ts @@ -5,7 +5,7 @@ import { oneEmptyFormWithActions, oneTableBlockWithActionsAndFormBlocks, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; const clickOption = async (page: Page, optionName: string) => { await page.getByLabel('block-item-CardItem-general-form').hover(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/fieldSettingsFormItem.tsx b/packages/core/client/src/modules/blocks/data-blocks/form/fieldSettingsFormItem.tsx index d951d0a31..9e469c4ef 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/fieldSettingsFormItem.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/form/fieldSettingsFormItem.tsx @@ -15,7 +15,7 @@ import { isPatternDisabled } from '../../../../schema-settings'; import { ActionType } from '../../../../schema-settings/LinkageRules/type'; import { SchemaSettingsDefaultValue } from '../../../../schema-settings/SchemaSettingsDefaultValue'; import { useIsAllowToSetDefaultValue } from '../../../../schema-settings/hooks/useIsAllowToSetDefaultValue'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; export const fieldSettingsFormItem = new SchemaSettings({ name: 'fieldSettings:FormItem', diff --git a/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaInitializer.test.ts index 8357c3a51..8118fc66f 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, oneEmptyGridCardBlock, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, oneEmptyGridCardBlock, test } from '@tachybase/test/e2e'; test.describe('where grid card block can be added', () => { test('page', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaSettings.test.ts index f1be51a4f..979795912 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/grid-card/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, expectSettingsMenu, oneEmptyGridCardBlock, test } from '@nocobase/test/e2e'; +import { expect, expectSettingsMenu, oneEmptyGridCardBlock, test } from '@tachybase/test/e2e'; test.describe('grid card block schema settings', () => { test('supported options', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaInitializer.test.ts index e1c6e7293..3f0b76876 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, oneEmptyListBlock, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, oneEmptyListBlock, test } from '@tachybase/test/e2e'; test.describe('where list block can be added', () => { test('page', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaSettings.test.ts index 6186724a7..f9467e2e3 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expectSettingsMenu, oneEmptyListBlock, test } from '@nocobase/test/e2e'; +import { expectSettingsMenu, oneEmptyListBlock, test } from '@tachybase/test/e2e'; test.describe('list block schema settings', () => { test('supported options', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaInitializer.test.ts index a4d333bed..4f46545b6 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { Page, expect, test } from '@nocobase/test/e2e'; +import { Page, expect, test } from '@tachybase/test/e2e'; import { createTable } from './utils'; test.describe('where table data selector can be added', () => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaSettings.test.ts index b43b71dcb..0cacab0e0 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expectSettingsMenu, test, expect } from '@nocobase/test/e2e'; +import { expectSettingsMenu, test, expect } from '@tachybase/test/e2e'; import { createTable } from './utils'; import { tableSelectorDataScopeVariable } from './templatesOfBug'; diff --git a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts index c649e89e5..23356307f 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts @@ -1,4 +1,4 @@ -import { PageConfig } from '@nocobase/test/e2e'; +import { PageConfig } from '@tachybase/test/e2e'; const commonCollections = [ { diff --git a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/utils.ts b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/utils.ts index 574ee0121..933df8e4a 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/utils.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { NocoPage, Page, PageConfig, oneFormBlockWithAllAssociationFieldsAndSelectorMode } from '@nocobase/test/e2e'; +import { NocoPage, Page, PageConfig, oneFormBlockWithAllAssociationFieldsAndSelectorMode } from '@tachybase/test/e2e'; export async function createTable({ page, diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts index b74e33433..71b6a0f67 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { T2187 } from '../templatesOfBug'; // fix https://nocobase.height.app/T-2187 diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts index 48cbc840d..ee218ad68 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { T2183, T2186 } from '../templatesOfBug'; // fix https://nocobase.height.app/T-2183 diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/checkboxForTableRow.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/checkboxForTableRow.test.ts index f458cfabb..bcc553123 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/checkboxForTableRow.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/checkboxForTableRow.test.ts @@ -1,4 +1,4 @@ -import { checkboxForTableRow, expect, test } from '@nocobase/test/e2e'; +import { checkboxForTableRow, expect, test } from '@tachybase/test/e2e'; test('selects the checkbox of a table row and deletes the selected row', async ({ page, mockPage, mockRecords }) => { const nocoPage = await mockPage(checkboxForTableRow).waitForInit(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/dragAndDrop.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/dragAndDrop.test.ts index 8ee143670..e2d691154 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/dragAndDrop.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/dragAndDrop.test.ts @@ -1,4 +1,4 @@ -import { expect, oneEmptyTableBlockBasedOnUsers, test } from '@nocobase/test/e2e'; +import { expect, oneEmptyTableBlockBasedOnUsers, test } from '@tachybase/test/e2e'; test('actions', async ({ page, mockPage }) => { await mockPage(oneEmptyTableBlockBasedOnUsers).goto(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaInitializer.test.ts index fdb325f89..58d1108a9 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, oneEmptyTable, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, oneEmptyTable, test } from '@tachybase/test/e2e'; import { T3686 } from './templatesOfBug'; test.describe('where table block can be added', () => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts index 6a5072a21..fe4952921 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts @@ -9,7 +9,7 @@ import { test, twoTableWithAssociationFields, twoTableWithSameCollection, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('table block schema settings', () => { test('supported options', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts index e13a50b0f..9d9bfc692 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts @@ -1,4 +1,4 @@ -import { PageConfig } from '@nocobase/test/e2e'; +import { PageConfig } from '@tachybase/test/e2e'; export const T2183 = { pageSchema: { diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/tree/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/tree/schemaSettings.test.ts index afadd771c..de4251550 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/tree/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/tree/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { Page, expect, expectSettingsMenu, oneEmptyTableWithTreeCollection, test } from '@nocobase/test/e2e'; +import { Page, expect, expectSettingsMenu, oneEmptyTableWithTreeCollection, test } from '@tachybase/test/e2e'; test.describe('tree table block schema settings', () => { test('supported options', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaInitializer.test.ts index 41a8022e0..ceddaf88a 100644 --- a/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, oneEmptyFilterCollapseBlock, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, oneEmptyFilterCollapseBlock, test } from '@tachybase/test/e2e'; test.describe('where collapse block can be added', () => { test('page', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaSettings.test.ts index 366908a5b..71cb23a34 100644 --- a/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/filter-blocks/collapse/__e2e__/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { oneCollapseAndOneTableWithSameCollection, oneEmptyFilterCollapseBlock, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('collapse schema settings', () => { test('supported options', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaInitializer.test.ts index 3870fa5c2..d22cf15b2 100644 --- a/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, oneEmptyFilterFormBlock, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, oneEmptyFilterFormBlock, test } from '@tachybase/test/e2e'; test.describe('where filter form block can be added', () => { test('page', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaSettings.test.ts index e022eae3c..b8b0a6d15 100644 --- a/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/filter-blocks/form/__e2e__/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { oneEmptyFilterFormBlock, oneFormAndOneTableWithSameCollection, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('filter block schema settings', () => { test('supported options', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaInitializer.test.ts index 50365c718..443c731c5 100644 --- a/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { createBlockInPage, expect, test } from '@nocobase/test/e2e'; +import { createBlockInPage, expect, test } from '@tachybase/test/e2e'; test.describe('where markdown block can be added', () => { test('page', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaSettings.test.ts index 7d8142d99..03e2b79b4 100644 --- a/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/other-blocks/markdown/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, expectSettingsMenu, oneEmptyMarkdown, test } from '@nocobase/test/e2e'; +import { expect, expectSettingsMenu, oneEmptyMarkdown, test } from '@tachybase/test/e2e'; test.describe('markdown block schema settings', () => { test('supported options', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/dialog/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/dialog/__e2e__/schemaInitializer.test.ts index 7cf686c5a..dfd79b9d3 100644 --- a/packages/core/client/src/modules/dialog/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/dialog/__e2e__/schemaInitializer.test.ts @@ -5,7 +5,7 @@ import { oneEmptyTableBlockWithCustomizeActions, oneFormBlockWithRolesFieldBasedUsers, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { tableWithRoles, tableWithUsers, tableWithInherit, tableWithInheritWithoutAssociation } from './templatesOfBug'; test.describe('where to open a popup and what can be added to it', () => { diff --git a/packages/core/client/src/modules/dialog/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/dialog/__e2e__/schemaSettings.test.ts index 5c3499226..3c1660b44 100644 --- a/packages/core/client/src/modules/dialog/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/dialog/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { NocoPage, Page, expect, oneEmptyTableBlockWithActions, test } from '@nocobase/test/e2e'; +import { NocoPage, Page, expect, oneEmptyTableBlockWithActions, test } from '@tachybase/test/e2e'; test.describe('tabs schema settings', () => { let commonPage: NocoPage; diff --git a/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts index 22c9718a0..78463d75b 100644 --- a/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts @@ -1,4 +1,4 @@ -import { PageConfig, generalWithMultiLevelM2oFields } from '@nocobase/test/e2e'; +import { PageConfig, generalWithMultiLevelM2oFields } from '@tachybase/test/e2e'; export const T2797: PageConfig = { pageSchema: { diff --git a/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts b/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts index 61512c6b2..331c7eae6 100644 --- a/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts +++ b/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { T2797, T2838 } from './templatesOfBug'; test.describe('z-index of dialog', () => { diff --git a/packages/core/client/src/modules/fields/component/Cascader/cascaderComponentFieldSettings.tsx b/packages/core/client/src/modules/fields/component/Cascader/cascaderComponentFieldSettings.tsx index 862205410..cccd3154e 100644 --- a/packages/core/client/src/modules/fields/component/Cascader/cascaderComponentFieldSettings.tsx +++ b/packages/core/client/src/modules/fields/component/Cascader/cascaderComponentFieldSettings.tsx @@ -22,7 +22,12 @@ import { useTitleFieldOptions, } from '../../../../schema-component/antd/form-item/FormItem.Settings'; import { useColumnSchema } from '../../../../schema-component/antd/table-v2/Table.Column.Decorator'; -import { SchemaSettingsModalItem, VariableInput, getShouldChange } from '../../../../schema-settings'; +import { + SchemaSettingsModalItem, + SchemaSettingsSwitchItem, + VariableInput, + getShouldChange, +} from '../../../../schema-settings'; import { SchemaSettingsDataScope } from '../../../../schema-settings/SchemaSettingsDataScope'; import { useLocalVariables, useVariables } from '../../../../variables'; // import { useCollectionField } from '../utils'; @@ -159,6 +164,33 @@ export const SchemaSettingsSortingRule = function SortRuleConfigure(props) { ); }; +export const setIsChangOnSelect = function ChangOnSelectConfigure(props) { + const { dn } = useDesignable(); + const { t } = useTranslation(); + const { fieldSchema: tableColumnSchema, collectionField } = useColumnSchema(); + const field = useField(); + const schema = useFieldSchema(); + const fieldSchema = tableColumnSchema || schema; + return ( + { + fieldSchema['x-component-props']['changOnSelect'] = value; + dn.emit('patch', { + schema: { + ['x-uid']: fieldSchema['x-uid'], + 'x-component-props': { + ...fieldSchema['x-component-props'], + }, + }, + }); + dn.refresh(); + }} + /> + ); +}; + const titleField: any = { name: 'titleField', type: 'select', @@ -337,6 +369,11 @@ const fieldComponent: any = { }, }; +const ChangOnSelect = { + name: 'changOnSelect', + Component: setIsChangOnSelect, +}; + export const cascaderComponentFieldSettings = new SchemaSettings({ name: 'fieldSettings:component:Cascader', items: [ @@ -368,5 +405,9 @@ export const cascaderComponentFieldSettings = new SchemaSettings({ ...titleField, useVisible: useIsAssociationField, }, + { + ...ChangOnSelect, + useVisible: useIsAssociationField, + }, ], }); diff --git a/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/schemaSettings.test.ts index a3b1c2822..27f12cd47 100644 --- a/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, expectSettingsMenu, test } from '@nocobase/test/e2e'; +import { expect, expectSettingsMenu, test } from '@tachybase/test/e2e'; import dayjs from 'dayjs'; import { oneTableBlockWithDatetimeFields, oneFormBlockWithDatetimeFields } from './utils'; diff --git a/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts b/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts index 2b89970b4..6d4737f51 100644 --- a/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts +++ b/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { generalWithDatetime, PageConfig } from '@nocobase/test/e2e'; +import { generalWithDatetime, PageConfig } from '@tachybase/test/e2e'; /** * 1. 一个 Table 区块 * 5. 所有字段都是 datetime 字段 diff --git a/packages/core/client/src/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.tsx b/packages/core/client/src/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.tsx new file mode 100644 index 000000000..a32025a57 --- /dev/null +++ b/packages/core/client/src/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.tsx @@ -0,0 +1,140 @@ +import { Field } from '@tachybase/schema'; +import { useField, useFieldSchema } from '@tachybase/schema'; +import { useTranslation } from 'react-i18next'; +import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings'; +import { useFieldComponentName } from '../../../../common/useFieldComponentName'; +import { useDesignable, useFieldModeOptions, useIsAddNewForm } from '../../../../schema-component'; +import { isSubMode } from '../../../../schema-component/antd/association-field/util'; +import { useIsFieldReadPretty } from '../../../../schema-component/antd/form-item/FormItem.Settings'; +import { useCollectionField } from '../../../../data-source'; +import { useColumnSchema } from '../../../../schema-component/antd/table-v2/Table.Column.Decorator'; +import { titleField } from '../Picker/recordPickerComponentFieldSettings'; + +const allowMultiple: any = { + name: 'allowMultiple', + type: 'switch', + useVisible() { + const isFieldReadPretty = useIsFieldReadPretty(); + const collectionField = useCollectionField(); + return !isFieldReadPretty && ['hasMany', 'belongsToMany'].includes(collectionField?.type); + }, + useComponentProps() { + const { t } = useTranslation(); + const field = useField(); + const fieldSchema = useFieldSchema(); + const { dn, refresh } = useDesignable(); + return { + title: t('Allow multiple'), + checked: + fieldSchema['x-component-props']?.multiple === undefined ? true : fieldSchema['x-component-props'].multiple, + onChange(value) { + const schema = { + ['x-uid']: fieldSchema['x-uid'], + }; + fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {}; + field.componentProps = field.componentProps || {}; + + fieldSchema['x-component-props'].multiple = value; + field.componentProps.multiple = value; + + schema['x-component-props'] = fieldSchema['x-component-props']; + dn.emit('patch', { + schema, + }); + refresh(); + }, + }; + }, +}; + +const fieldComponent: any = { + name: 'fieldComponent', + type: 'select', + useComponentProps() { + const { t } = useTranslation(); + const field = useField(); + const { fieldSchema: tableColumnSchema, collectionField } = useColumnSchema(); + const schema = useFieldSchema(); + const fieldSchema = tableColumnSchema || schema; + const fieldModeOptions = useFieldModeOptions({ fieldSchema: tableColumnSchema, collectionField }); + const { dn } = useDesignable(); + const isAddNewForm = useIsAddNewForm(); + const fieldMode = useFieldComponentName(); + return { + title: t('Field component'), + options: fieldModeOptions, + value: fieldMode, + onChange(mode) { + const schema = { + ['x-uid']: fieldSchema['x-uid'], + }; + fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {}; + fieldSchema['x-component-props']['mode'] = mode; + schema['x-component-props'] = fieldSchema['x-component-props']; + field.componentProps = field.componentProps || {}; + field.componentProps.mode = mode; + + // 子表单状态不允许设置默认值 + if (isSubMode(fieldSchema) && isAddNewForm) { + // @ts-ignore + schema.default = null; + fieldSchema.default = null; + field.setInitialValue(null); + field.setValue(null); + } + + void dn.emit('patch', { + schema, + }); + dn.refresh(); + }, + }; + }, +}; + +export const drawerSubTableComponentFieldSettings = new SchemaSettings({ + name: 'fieldSettings:component:DrawerSubTable', + items: [ + fieldComponent, + allowMultiple, + titleField, + { + name: 'popupSize', + type: 'select', + useVisible() { + const isFieldReadPretty = useIsFieldReadPretty(); + return !isFieldReadPretty; + }, + useComponentProps() { + const { t } = useTranslation(); + const field = useField(); + const { fieldSchema: tableColumnSchema } = useColumnSchema(); + const schema = useFieldSchema(); + const fieldSchema = tableColumnSchema || schema; + const { dn } = useDesignable(); + return { + title: t('Popup size'), + options: [ + { label: t('Small'), value: 'small' }, + { label: t('Middle'), value: 'middle' }, + { label: t('Large'), value: 'large' }, + ], + value: + fieldSchema?.['x-component-props']?.['openSize'] ?? + (fieldSchema?.['x-component-props']?.['openMode'] == 'modal' ? 'large' : 'middle'), + onChange: (value) => { + field.componentProps.openSize = value; + fieldSchema['x-component-props'] = { ...fieldSchema['x-component-props'], openSize: value }; + dn.emit('patch', { + schema: { + 'x-uid': fieldSchema['x-uid'], + 'x-component-props': fieldSchema['x-component-props'], + }, + }); + dn.refresh(); + }, + }; + }, + }, + ], +}); diff --git a/packages/core/client/src/modules/menu/__e2e__/dragAndDrop.test.ts b/packages/core/client/src/modules/menu/__e2e__/dragAndDrop.test.ts index 53bb7013b..48e5c2a6e 100644 --- a/packages/core/client/src/modules/menu/__e2e__/dragAndDrop.test.ts +++ b/packages/core/client/src/modules/menu/__e2e__/dragAndDrop.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; test('single page', async ({ page, mockPage }) => { const pageTitle1 = 'page1'; diff --git a/packages/core/client/src/modules/menu/__e2e__/schemaInitializer.test.ts b/packages/core/client/src/modules/menu/__e2e__/schemaInitializer.test.ts index 2698f14af..16272817e 100644 --- a/packages/core/client/src/modules/menu/__e2e__/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/menu/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { expect, groupPageEmpty, test } from '@nocobase/test/e2e'; +import { expect, groupPageEmpty, test } from '@tachybase/test/e2e'; test.describe('add menu item', () => { test('header', async ({ page, deletePage }) => { diff --git a/packages/core/client/src/modules/menu/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/menu/__e2e__/schemaSettings.test.ts index 00275615a..ded6f5001 100644 --- a/packages/core/client/src/modules/menu/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/menu/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { Page, PageConfig, expect, expectSettingsMenu, test } from '@nocobase/test/e2e'; +import { Page, PageConfig, expect, expectSettingsMenu, test } from '@tachybase/test/e2e'; test.describe('group page menus schema settings', () => { test('edit', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/page/__e2e__/blockInitializers.test.ts b/packages/core/client/src/modules/page/__e2e__/blockInitializers.test.ts index 40e17d3cb..1552373cb 100644 --- a/packages/core/client/src/modules/page/__e2e__/blockInitializers.test.ts +++ b/packages/core/client/src/modules/page/__e2e__/blockInitializers.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from '@nocobase/test/e2e'; +import { test, expect } from '@tachybase/test/e2e'; test.describe('page:addBlock', () => { test('当搜索不到数据时显示空状态', async ({ page, mockPage }) => { diff --git a/packages/core/client/src/modules/page/__e2e__/dragAndDrop.test.ts b/packages/core/client/src/modules/page/__e2e__/dragAndDrop.test.ts index 5437e23e9..28625d441 100644 --- a/packages/core/client/src/modules/page/__e2e__/dragAndDrop.test.ts +++ b/packages/core/client/src/modules/page/__e2e__/dragAndDrop.test.ts @@ -1,4 +1,4 @@ -import { expect, test, twoTabsPage } from '@nocobase/test/e2e'; +import { expect, test, twoTabsPage } from '@tachybase/test/e2e'; test('tabs', async ({ page, mockPage }) => { await mockPage(twoTabsPage).goto(); diff --git a/packages/core/client/src/modules/page/__e2e__/schemaInitailizer.test.ts b/packages/core/client/src/modules/page/__e2e__/schemaInitailizer.test.ts index 3405fc734..91f73e2b9 100644 --- a/packages/core/client/src/modules/page/__e2e__/schemaInitailizer.test.ts +++ b/packages/core/client/src/modules/page/__e2e__/schemaInitailizer.test.ts @@ -1,4 +1,4 @@ -import { expect, tabPageEmpty, test } from '@nocobase/test/e2e'; +import { expect, tabPageEmpty, test } from '@tachybase/test/e2e'; test('add tab', async ({ page, mockPage }) => { await mockPage(tabPageEmpty).goto(); diff --git a/packages/core/client/src/modules/page/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/page/__e2e__/schemaSettings.test.ts index cba11d367..71543e800 100644 --- a/packages/core/client/src/modules/page/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/page/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { Page, expect, test } from '@nocobase/test/e2e'; +import { Page, expect, test } from '@tachybase/test/e2e'; test.describe('page schema settings', () => { const showMenu = async (page: Page) => { diff --git a/packages/core/client/src/modules/plugin-manager/__e2e__/pluginManager.test.ts b/packages/core/client/src/modules/plugin-manager/__e2e__/pluginManager.test.ts index ce8c1be74..30728a832 100644 --- a/packages/core/client/src/modules/plugin-manager/__e2e__/pluginManager.test.ts +++ b/packages/core/client/src/modules/plugin-manager/__e2e__/pluginManager.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; async function waitForModalToBeHidden(page) { await page.waitForFunction(() => { diff --git a/packages/core/client/src/modules/user-center/__e2e__/settings.test.ts b/packages/core/client/src/modules/user-center/__e2e__/settings.test.ts index d0a604a44..901f4dfa3 100644 --- a/packages/core/client/src/modules/user-center/__e2e__/settings.test.ts +++ b/packages/core/client/src/modules/user-center/__e2e__/settings.test.ts @@ -1,4 +1,4 @@ -import { test } from '@nocobase/test/e2e'; +import { test } from '@tachybase/test/e2e'; test('switch role', async ({ page, mockPage }) => { await mockPage().goto(); diff --git a/packages/core/client/src/nocobase-buildin-plugin/index.tsx b/packages/core/client/src/nocobase-buildin-plugin/index.tsx index 013e2ebbb..7d77034e8 100644 --- a/packages/core/client/src/nocobase-buildin-plugin/index.tsx +++ b/packages/core/client/src/nocobase-buildin-plugin/index.tsx @@ -1,7 +1,7 @@ import { DisconnectOutlined, LoadingOutlined } from '@ant-design/icons'; import { css } from '@emotion/css'; import { observer } from '@tachybase/schema'; -import { getSubAppName } from '@nocobase/sdk'; +import { getSubAppName } from '@tachybase/sdk'; import { Button, Modal, Result, Spin } from 'antd'; import React, { FC } from 'react'; import { Navigate, useNavigate } from 'react-router-dom'; diff --git a/packages/core/client/src/pm/PluginSetting.tsx b/packages/core/client/src/pm/PluginSetting.tsx index 4c4bd3e36..702600050 100644 --- a/packages/core/client/src/pm/PluginSetting.tsx +++ b/packages/core/client/src/pm/PluginSetting.tsx @@ -115,22 +115,7 @@ export const AdminSettingsLayout = () => { return (
- + { diff --git a/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx index 0e0d83b3c..122ac7cf5 100644 --- a/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/action/demos/demo2.tsx @@ -8,7 +8,7 @@ import { SchemaComponent, SchemaComponentProvider, useActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useState } from 'react'; const useCloseAction = () => { diff --git a/packages/core/client/src/schema-component/antd/action/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/action/demos/demo3.tsx index 4adf93184..3341f2524 100644 --- a/packages/core/client/src/schema-component/antd/action/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/action/demos/demo3.tsx @@ -1,6 +1,6 @@ import { Field } from '@tachybase/schema'; import { ISchema, observer, useField, useFieldSchema } from '@tachybase/schema'; -import { Action, SchemaComponent, SchemaComponentProvider, useActionContext } from '@nocobase/client'; +import { Action, SchemaComponent, SchemaComponentProvider, useActionContext } from '@tachybase/client'; import { Radio } from 'antd'; import React, { useRef } from 'react'; import _ from 'lodash'; diff --git a/packages/core/client/src/schema-component/antd/action/demos/demo4.tsx b/packages/core/client/src/schema-component/antd/action/demos/demo4.tsx index 285ce5143..a54c4097e 100644 --- a/packages/core/client/src/schema-component/antd/action/demos/demo4.tsx +++ b/packages/core/client/src/schema-component/antd/action/demos/demo4.tsx @@ -7,7 +7,7 @@ import { SchemaComponent, SchemaComponentProvider, useActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const useCloseAction = () => { diff --git a/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx b/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx index a42ded095..28366552e 100644 --- a/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx +++ b/packages/core/client/src/schema-component/antd/action/demos/demo6.tsx @@ -9,7 +9,7 @@ import { SchemaComponent, SchemaComponentProvider, SchemaInitializer, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const addActionButton = new SchemaInitializer({ diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx index e754a3434..4a6d0dfc0 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx @@ -10,7 +10,7 @@ import { useField, useFieldSchema, } from '@tachybase/schema'; -import { fuzzysearch } from '@nocobase/utils/client'; +import { fuzzysearch } from '@tachybase/utils/client'; import { Input, Space } from 'antd'; import React, { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -39,11 +39,13 @@ const Cascade = connect((props) => { const fieldNames = associationField?.componentProps?.fieldNames; const fieldFilter = fieldSchema['x-component-props']?.service?.params?.filter; const sort = fieldSchema['x-component-props']?.service?.params?.sort; + const changOnSelect = fieldSchema['x-component-props']?.changOnSelect || false; const field: any = useField(); const [selectedOptions, setSelectedOptions] = useState([]); + const [chang, setChang] = useState(false); useEffect(() => { const propsValue = props.value || fieldSchema['x-component-props'].value; - if (propsValue && !selectedOptions.length) { + if (!chang) { const values = Array.isArray(propsValue) ? extractLastNonNullValueObjects( propsValue?.filter((v) => v.value), @@ -54,8 +56,9 @@ const Cascade = connect((props) => { return v.id; }); setSelectedOptions(defaultData); + onDropdownVisibleChange(true); } - }, [fieldSchema['x-component-props'].value]); + }, [fieldSchema['x-component-props'].value, fieldSchema['x-component-props']?.changOnSelect]); const handleGetOptions = async () => { const response = await resource.list({ pageSize: 9999, @@ -67,6 +70,7 @@ const Cascade = connect((props) => { }; const handleSelect = async (option) => { + setChang(true); if (option) { if (['o2m', 'm2m'].includes(collectionField.interface)) { const fieldValue = Array.isArray(associationField.fieldValue) ? associationField.fieldValue : []; @@ -97,7 +101,7 @@ const Cascade = connect((props) => { }); onChange?.(options); } else { - onChange?.([]); + onChange?.({}); } }; const cascadeOption = (option) => { @@ -144,7 +148,7 @@ const Cascade = connect((props) => { onDropdownVisibleChange={(visible) => { onDropdownVisibleChange(visible); }} - changeOnSelect + changeOnSelect={changOnSelect} placeholder="Please select" /> diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx index 05a60fddf..0d94e222f 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx @@ -9,7 +9,6 @@ import { useAssociationFieldContext } from './hooks'; import { ActionContext, ActionContextProvider } from '../action/context'; import { useGetAriaLabelOfPopover } from '../action'; import { ReadPrettyInternalViewer } from './InternalViewer'; -import { useSetAriaLabelForPopover } from '../action/hooks/useSetAriaLabelForPopover'; export const InternaDrawerSubTable = observer( (props) => { @@ -29,10 +28,6 @@ export const InternaDrawerSubTable = observer( const ctx = useContext(ActionContext); const { getAriaLabel } = useGetAriaLabelOfPopover(); - - if (process.env.__E2E__) { - useSetAriaLabelForPopover(visible); - } return ( <> - {visible && ( -
setVisible(false)} - className={css` - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: transparent; - z-index: 9999; - `} - /> - )} - -
+ extra={ + } > -
- -
+ diff --git a/packages/core/client/src/schema-component/antd/association-field/hooks.ts b/packages/core/client/src/schema-component/antd/association-field/hooks.ts index fc8211c8f..ad3d74aad 100644 --- a/packages/core/client/src/schema-component/antd/association-field/hooks.ts +++ b/packages/core/client/src/schema-component/antd/association-field/hooks.ts @@ -1,7 +1,7 @@ import { GeneralField } from '@tachybase/schema'; import { useField, useFieldSchema } from '@tachybase/schema'; import { reaction } from '@tachybase/schema'; -import { flatten, getValuesByPath } from '@nocobase/utils/client'; +import { flatten, getValuesByPath } from '@tachybase/utils/client'; import _, { isString } from 'lodash'; import cloneDeep from 'lodash/cloneDeep'; import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/association-field/util.ts b/packages/core/client/src/schema-component/antd/association-field/util.ts index 411ccca69..6badafc74 100644 --- a/packages/core/client/src/schema-component/antd/association-field/util.ts +++ b/packages/core/client/src/schema-component/antd/association-field/util.ts @@ -1,6 +1,6 @@ import { ISchema, Schema } from '@tachybase/schema'; import { isArr } from '@tachybase/schema'; -import { getDefaultFormat, str2moment } from '@nocobase/utils/client'; +import { getDefaultFormat, str2moment } from '@tachybase/utils/client'; import { Tag } from 'antd'; import dayjs from 'dayjs'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/association-select/__tests__/association-select.test.tsx b/packages/core/client/src/schema-component/antd/association-select/__tests__/association-select.test.tsx index d9d83fb3e..63ce3bb09 100644 --- a/packages/core/client/src/schema-component/antd/association-select/__tests__/association-select.test.tsx +++ b/packages/core/client/src/schema-component/antd/association-select/__tests__/association-select.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, sleep, userEvent } from '@nocobase/test/client'; +import { render, screen, sleep, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/association-select/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/association-select/demos/demo1.tsx index 0c21e5c8c..defa3e11d 100644 --- a/packages/core/client/src/schema-component/antd/association-select/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/association-select/demos/demo1.tsx @@ -1,4 +1,4 @@ -import { APIClientProvider, AssociationSelect, FormProvider, SchemaComponent } from '@nocobase/client'; +import { APIClientProvider, AssociationSelect, FormProvider, SchemaComponent } from '@tachybase/client'; import React from 'react'; import { mockAPIClient } from '../../../../testUtils'; diff --git a/packages/core/client/src/schema-component/antd/block-item/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/block-item/demos/demo1.tsx index 228137f4d..e3588e510 100644 --- a/packages/core/client/src/schema-component/antd/block-item/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/block-item/demos/demo1.tsx @@ -1,6 +1,6 @@ import { observer, useFieldSchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { BlockItem, DndContext, DragHandler, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { BlockItem, DndContext, DragHandler, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const Block = observer( diff --git a/packages/core/client/src/schema-component/antd/card-item/__tests__/card-item.test.tsx b/packages/core/client/src/schema-component/antd/card-item/__tests__/card-item.test.tsx index 042c52f8d..bf857cd0b 100644 --- a/packages/core/client/src/schema-component/antd/card-item/__tests__/card-item.test.tsx +++ b/packages/core/client/src/schema-component/antd/card-item/__tests__/card-item.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/card-item/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/card-item/demos/demo1.tsx index 3f16b4e9e..888312d0b 100644 --- a/packages/core/client/src/schema-component/antd/card-item/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/card-item/demos/demo1.tsx @@ -1,4 +1,4 @@ -import { CardItem, FormProvider, SchemaComponent } from '@nocobase/client'; +import { CardItem, FormProvider, SchemaComponent } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/cascader/__tests__/cascader.test.tsx b/packages/core/client/src/schema-component/antd/cascader/__tests__/cascader.test.tsx index 141f7c38c..2d95a410c 100644 --- a/packages/core/client/src/schema-component/antd/cascader/__tests__/cascader.test.tsx +++ b/packages/core/client/src/schema-component/antd/cascader/__tests__/cascader.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen, userEvent, waitFor } from '@nocobase/test/client'; +import { fireEvent, render, screen, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/cascader/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/cascader/demos/demo1.tsx index 428157301..3222f89d9 100644 --- a/packages/core/client/src/schema-component/antd/cascader/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/cascader/demos/demo1.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Cascader, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Cascader, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const options = [ diff --git a/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx index 31bb18d30..faf5bd859 100644 --- a/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/cascader/demos/demo2.tsx @@ -9,7 +9,7 @@ import { SchemaComponent, SchemaComponentProvider, useAPIClient, -} from '@nocobase/client'; +} from '@tachybase/client'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/checkbox/__tests__/checkbox.test.tsx b/packages/core/client/src/schema-component/antd/checkbox/__tests__/checkbox.test.tsx index 4be0abc9c..53d43a04a 100644 --- a/packages/core/client/src/schema-component/antd/checkbox/__tests__/checkbox.test.tsx +++ b/packages/core/client/src/schema-component/antd/checkbox/__tests__/checkbox.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent } from '@nocobase/test/client'; +import { render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/checkbox'; import App2 from '../demos/checkbox.group'; diff --git a/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.group.tsx b/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.group.tsx index be673fc4b..e1f3c3606 100644 --- a/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.group.tsx +++ b/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.group.tsx @@ -2,7 +2,7 @@ * title: 组 */ import { FormItem } from '@tachybase/components'; -import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const options = [ diff --git a/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.tsx b/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.tsx index 1ea959b20..a856a10d4 100644 --- a/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.tsx +++ b/packages/core/client/src/schema-component/antd/checkbox/demos/checkbox.tsx @@ -2,7 +2,7 @@ * title: 勾选 */ import { FormItem } from '@tachybase/components'; -import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx b/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx index 29652ca80..56ba707bc 100644 --- a/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx +++ b/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent } from '@nocobase/test/client'; +import { render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/collection-select/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/collection-select/demos/demo1.tsx index 6ec245241..6f2b21ebc 100644 --- a/packages/core/client/src/schema-component/antd/collection-select/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/collection-select/demos/demo1.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { ExtendCollectionsProvider, CollectionSelect, FormProvider, SchemaComponent } from '@nocobase/client'; +import { ExtendCollectionsProvider, CollectionSelect, FormProvider, SchemaComponent } from '@tachybase/client'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/core/client/src/schema-component/antd/color-picker/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/color-picker/demos/demo1.tsx index e7e95cea9..16fc07065 100644 --- a/packages/core/client/src/schema-component/antd/color-picker/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/color-picker/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: ColorPicker */ import { FormItem } from '@tachybase/components'; -import { ColorPicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { ColorPicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/color-picker/util.ts b/packages/core/client/src/schema-component/antd/color-picker/util.ts index f091fd5fa..ba1a85c73 100644 --- a/packages/core/client/src/schema-component/antd/color-picker/util.ts +++ b/packages/core/client/src/schema-component/antd/color-picker/util.ts @@ -1,4 +1,4 @@ -import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from '@nocobase/utils/client'; +import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from '@tachybase/utils/client'; import type { Dayjs } from 'dayjs'; const toStringByPicker = (value, picker, timezone: 'gmt' | 'local') => { diff --git a/packages/core/client/src/schema-component/antd/color-select/__tests__/color-select.test.tsx b/packages/core/client/src/schema-component/antd/color-select/__tests__/color-select.test.tsx index 172c677a8..ee9e46e48 100644 --- a/packages/core/client/src/schema-component/antd/color-select/__tests__/color-select.test.tsx +++ b/packages/core/client/src/schema-component/antd/color-select/__tests__/color-select.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen } from '@nocobase/test/client'; +import { fireEvent, render, screen } from '@tachybase/test/client'; import React from 'react'; import App from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/color-select/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/color-select/demos/demo1.tsx index a01e4c58c..1fd687d7b 100644 --- a/packages/core/client/src/schema-component/antd/color-select/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/color-select/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: 勾选 */ import { FormItem } from '@tachybase/components'; -import { ColorSelect, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { ColorSelect, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/cron/Cron.tsx b/packages/core/client/src/schema-component/antd/cron/Cron.tsx index c85717d13..896a446fe 100644 --- a/packages/core/client/src/schema-component/antd/cron/Cron.tsx +++ b/packages/core/client/src/schema-component/antd/cron/Cron.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; import { connect, mapReadPretty } from '@tachybase/schema'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import cronstrue from 'cronstrue'; import React, { useMemo } from 'react'; import { CronProps, Cron as ReactCron } from 'react-js-cron'; diff --git a/packages/core/client/src/schema-component/antd/cron/__tests__/cron-set.test.tsx b/packages/core/client/src/schema-component/antd/cron/__tests__/cron-set.test.tsx index 1bc7f7f66..7a6d3b714 100644 --- a/packages/core/client/src/schema-component/antd/cron/__tests__/cron-set.test.tsx +++ b/packages/core/client/src/schema-component/antd/cron/__tests__/cron-set.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent } from '@nocobase/test/client'; +import { render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import Cron from '../demos/demo1'; import CronSet from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/cron/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/cron/demos/demo1.tsx index f67d57a31..e1036b16d 100644 --- a/packages/core/client/src/schema-component/antd/cron/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/cron/demos/demo1.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Cron, FormProvider, SchemaComponent } from '@nocobase/client'; +import { Cron, FormProvider, SchemaComponent } from '@tachybase/client'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/core/client/src/schema-component/antd/cron/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/cron/demos/demo2.tsx index ed0d3a339..72643e330 100644 --- a/packages/core/client/src/schema-component/antd/cron/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/cron/demos/demo2.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { CronSet, FormProvider, SchemaComponent } from '@nocobase/client'; +import { CronSet, FormProvider, SchemaComponent } from '@tachybase/client'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx b/packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx index 167ef76f3..fc37e6f7c 100644 --- a/packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx +++ b/packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx @@ -28,7 +28,6 @@ export const CustomCascader = connect( // fieldNames = defaultFieldNames, useDataSource = useDefDataSource, useLoadData = useDefLoadData, - changeOnSelectLast, changeOnSelect, maxLevel, defaultValue, @@ -39,8 +38,8 @@ export const CustomCascader = connect( {...others} onChange={onChange} style={{ width: '100%' }} - changeOnSelect defaultValue={defaultValue} + changeOnSelect={changeOnSelect} /> ); }, diff --git a/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx index 797a9a9b3..cca59b7f4 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/ReadPretty.tsx @@ -1,5 +1,5 @@ import { isArr } from '@tachybase/schema'; -import { getDefaultFormat, str2moment } from '@nocobase/utils/client'; +import { getDefaultFormat, str2moment } from '@tachybase/utils/client'; import type { DatePickerProps as AntdDatePickerProps, RangePickerProps as AntdRangePickerProps, diff --git a/packages/core/client/src/schema-component/antd/date-picker/__tests__/date-picker.test.tsx b/packages/core/client/src/schema-component/antd/date-picker/__tests__/date-picker.test.tsx index acd971f87..481a6b5cb 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/__tests__/date-picker.test.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/__tests__/date-picker.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, sleep, userEvent, waitFor } from '@nocobase/test/client'; +import { render, screen, sleep, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App11 from '../demos/demo11'; diff --git a/packages/core/client/src/schema-component/antd/date-picker/__tests__/util.test.ts b/packages/core/client/src/schema-component/antd/date-picker/__tests__/util.test.ts index c48241b02..1bc3ee262 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/__tests__/util.test.ts +++ b/packages/core/client/src/schema-component/antd/date-picker/__tests__/util.test.ts @@ -1,4 +1,4 @@ -import { str2moment } from '@nocobase/utils/client'; +import { str2moment } from '@tachybase/utils/client'; import dayjs from 'dayjs'; import { moment2str } from '../util'; diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo1.tsx index 468b24b64..cd2e407ad 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: DatePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo10.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo10.tsx index 0ea3041d3..feeabc8aa 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo10.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo10.tsx @@ -2,7 +2,7 @@ * title: DatePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo11.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo11.tsx index 37dfb71dd..1f2018521 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo11.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo11.tsx @@ -2,7 +2,7 @@ * title: DatePicker.RangePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo2.tsx index f3e7e3389..338d8ed5f 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: DatePicker (GMT) */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo3.tsx index bac5a97e6..ee57a96db 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo3.tsx @@ -2,7 +2,7 @@ * title: DatePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo4.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo4.tsx index 3c0edc77e..9a9c46591 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo4.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo4.tsx @@ -2,7 +2,7 @@ * title: DatePicker.RangePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import dayjs from 'dayjs'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo5.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo5.tsx index 1d3573dba..00711b389 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo5.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo5.tsx @@ -2,7 +2,7 @@ * title: DatePicker.RangePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import dayjs from 'dayjs'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo6.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo6.tsx index 77f316437..be778380a 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo6.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo6.tsx @@ -2,7 +2,7 @@ * title: DatePicker.RangePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import dayjs from 'dayjs'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo7.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo7.tsx index 575b69d8f..61851d458 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo7.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo7.tsx @@ -2,7 +2,7 @@ * title: DatePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo8.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo8.tsx index 0ea3041d3..feeabc8aa 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo8.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo8.tsx @@ -2,7 +2,7 @@ * title: DatePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/demos/demo9.tsx b/packages/core/client/src/schema-component/antd/date-picker/demos/demo9.tsx index 575b69d8f..61851d458 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/demos/demo9.tsx +++ b/packages/core/client/src/schema-component/antd/date-picker/demos/demo9.tsx @@ -2,7 +2,7 @@ * title: DatePicker */ import { FormItem } from '@tachybase/components'; -import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/date-picker/util.ts b/packages/core/client/src/schema-component/antd/date-picker/util.ts index a5fbbfe07..c919b60b4 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/util.ts +++ b/packages/core/client/src/schema-component/antd/date-picker/util.ts @@ -1,4 +1,4 @@ -import { getDefaultFormat, str2moment, toGmt, toLocal } from '@nocobase/utils/client'; +import { getDefaultFormat, str2moment, toGmt, toLocal } from '@tachybase/utils/client'; import type { Dayjs } from 'dayjs'; import dayjs from 'dayjs'; diff --git a/packages/core/client/src/schema-component/antd/details/__tests__/details.test.tsx b/packages/core/client/src/schema-component/antd/details/__tests__/details.test.tsx index 5c38bb711..c5a7c270c 100644 --- a/packages/core/client/src/schema-component/antd/details/__tests__/details.test.tsx +++ b/packages/core/client/src/schema-component/antd/details/__tests__/details.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/details/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/details/demos/demo1.tsx index 27ab6d3be..a642d0e08 100644 --- a/packages/core/client/src/schema-component/antd/details/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/details/demos/demo1.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Details, FormProvider, Input, SchemaComponent } from '@nocobase/client'; +import { Details, FormProvider, Input, SchemaComponent } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx b/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx index 87dd74559..aa3b7f1a7 100644 --- a/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx +++ b/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@nocobase/test/client'; +import { render, screen } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/filter/FilterAction.tsx b/packages/core/client/src/schema-component/antd/filter/FilterAction.tsx index 3cce7f9c6..6b860fa61 100644 --- a/packages/core/client/src/schema-component/antd/filter/FilterAction.tsx +++ b/packages/core/client/src/schema-component/antd/filter/FilterAction.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { createForm, Field, Form } from '@tachybase/schema'; import { observer, useField, useFieldSchema, useForm } from '@tachybase/schema'; -import { flatten, unflatten } from '@nocobase/utils/client'; +import { flatten, unflatten } from '@tachybase/utils/client'; import { Button, Space } from 'antd'; import React, { createContext, useCallback, useContext, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx b/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx index cd79f7fb4..e2baebc5c 100644 --- a/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx +++ b/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent, waitFor, within } from '@nocobase/test/client'; +import { render, screen, userEvent, waitFor, within } from '@tachybase/test/client'; import React from 'react'; import App2 from '../demos/demo2'; import App3 from '../demos/demo3'; diff --git a/packages/core/client/src/schema-component/antd/filter/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/filter/demos/demo2.tsx index 616d0d3e2..26198bb2b 100644 --- a/packages/core/client/src/schema-component/antd/filter/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/filter/demos/demo2.tsx @@ -1,4 +1,10 @@ -import { AntdSchemaComponentProvider, Filter, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { + AntdSchemaComponentProvider, + Filter, + Input, + SchemaComponent, + SchemaComponentProvider, +} from '@tachybase/client'; import React from 'react'; const options = [ diff --git a/packages/core/client/src/schema-component/antd/filter/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/filter/demos/demo3.tsx index c9a4d5fc7..f935b41a9 100644 --- a/packages/core/client/src/schema-component/antd/filter/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/filter/demos/demo3.tsx @@ -7,7 +7,7 @@ import { SchemaComponent, SchemaComponentProvider, useActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const dataSource = [ diff --git a/packages/core/client/src/schema-component/antd/filter/demos/demo4.tsx b/packages/core/client/src/schema-component/antd/filter/demos/demo4.tsx index 2a261c3ba..e69972783 100644 --- a/packages/core/client/src/schema-component/antd/filter/demos/demo4.tsx +++ b/packages/core/client/src/schema-component/antd/filter/demos/demo4.tsx @@ -6,7 +6,7 @@ import { SchemaComponent, SchemaComponentProvider, Select, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Space } from 'antd'; import React, { useState } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx b/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx index bd81cb55c..9740b260a 100644 --- a/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx +++ b/packages/core/client/src/schema-component/antd/filter/demos/demo5.tsx @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { Filter, FilterAction, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Filter, FilterAction, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const options = [ diff --git a/packages/core/client/src/schema-component/antd/filter/demos/demo6.tsx b/packages/core/client/src/schema-component/antd/filter/demos/demo6.tsx index c15df1092..66b531d02 100644 --- a/packages/core/client/src/schema-component/antd/filter/demos/demo6.tsx +++ b/packages/core/client/src/schema-component/antd/filter/demos/demo6.tsx @@ -11,7 +11,7 @@ import { Plugin, DEFAULT_DATA_SOURCE_KEY, DEFAULT_DATA_SOURCE_TITLE, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Select } from 'antd'; import React, { useState } from 'react'; import { useFilterOptions } from '../useFilterActionProps'; diff --git a/packages/core/client/src/schema-component/antd/form-item/__tests__/form-item.test.tsx b/packages/core/client/src/schema-component/antd/form-item/__tests__/form-item.test.tsx index 16b17a79e..d467219a7 100644 --- a/packages/core/client/src/schema-component/antd/form-item/__tests__/form-item.test.tsx +++ b/packages/core/client/src/schema-component/antd/form-item/__tests__/form-item.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, waitFor } from '@nocobase/test/client'; +import { render, screen, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/form-item/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/form-item/demos/demo1.tsx index 4b04b74ed..82b0158bf 100644 --- a/packages/core/client/src/schema-component/antd/form-item/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/form-item/demos/demo1.tsx @@ -5,7 +5,7 @@ import { FormProvider, Input, SchemaComponent, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { mockAPIClient } from '../../../../testUtils'; diff --git a/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts b/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts index 2395bf988..a8e7f0c60 100644 --- a/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts +++ b/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts @@ -1,6 +1,6 @@ import { Field } from '@tachybase/schema'; import { useField, useFieldSchema, useForm } from '@tachybase/schema'; -import { nextTick } from '@nocobase/utils/client'; +import { nextTick } from '@tachybase/utils/client'; import _ from 'lodash'; import { useEffect, useMemo, useRef } from 'react'; import { useAssociationNames } from '../../../../block-provider/hooks'; diff --git a/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts b/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts index 23bc76121..3d62168bd 100644 --- a/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts +++ b/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts @@ -1,7 +1,7 @@ import { Field } from '@tachybase/schema'; import { useField, useFieldSchema } from '@tachybase/schema'; import { reaction } from '@tachybase/schema'; -import { getValuesByPath } from '@nocobase/utils/client'; +import { getValuesByPath } from '@tachybase/utils/client'; import _ from 'lodash'; import { useCallback, useEffect } from 'react'; import { useRecordIndex } from '../../../../../src/record-provider'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/Form.tsx b/packages/core/client/src/schema-component/antd/form-v2/Form.tsx index de221bd3f..777a87bcb 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/Form.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/Form.tsx @@ -4,7 +4,7 @@ import { createForm, Field, Form as FormilyForm, onFieldInit, onFormInputChange import { FieldContext, FormContext, observer, RecursionField, useField, useFieldSchema } from '@tachybase/schema'; import { reaction } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { getValuesByPath } from '@nocobase/utils/client'; +import { getValuesByPath } from '@tachybase/utils/client'; import { ConfigProvider, Spin } from 'antd'; import React, { useEffect, useMemo } from 'react'; import { useActionContext } from '..'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx b/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx index b4566ac61..38fd20df7 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx @@ -1,5 +1,5 @@ import { useFieldSchema } from '@tachybase/schema'; -import { error, forEach } from '@nocobase/utils/client'; +import { error, forEach } from '@tachybase/utils/client'; import { Select, Space } from 'antd'; import _ from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/__tests__/form-v2.test.tsx b/packages/core/client/src/schema-component/antd/form-v2/__tests__/form-v2.test.tsx index 8fe64e03d..9fcc8004e 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/__tests__/form-v2.test.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/__tests__/form-v2.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent, waitFor } from '@nocobase/test/client'; +import { render, screen, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx index 7cadffeb8..4bca3e19e 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/demos/demo1.tsx @@ -15,7 +15,7 @@ import { LocalDataSource, SchemaComponent, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { notification } from 'antd'; import React from 'react'; import { useFilterByTk } from '../../../../block-provider/BlockProvider'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx index 25196f9a0..50029ac21 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/demos/demo2.tsx @@ -17,7 +17,7 @@ import { Plugin, SchemaComponent, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { notification } from 'antd'; import React from 'react'; import { useFilterByTk } from '../../../../block-provider/BlockProvider'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx index d01e037a1..7194094c7 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/demos/demo3.tsx @@ -17,7 +17,7 @@ import { Password, Plugin, SchemaComponent, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { mockAPIClient } from '../../../../testUtils'; import collections from './collections'; diff --git a/packages/core/client/src/schema-component/antd/form-v2/utils.tsx b/packages/core/client/src/schema-component/antd/form-v2/utils.tsx index 1f9e49623..3943f7bb9 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/utils.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/utils.tsx @@ -1,6 +1,6 @@ import { Field } from '@tachybase/schema'; -import { evaluators } from '@nocobase/evaluators/client'; -import { uid } from '@nocobase/utils/client'; +import { evaluators } from '@tachybase/evaluators/client'; +import { uid } from '@tachybase/utils/client'; import _ from 'lodash'; import { ActionType } from '../../../schema-settings/LinkageRules/type'; import { VariableOption, VariablesContextType } from '../../../variables/types'; diff --git a/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx b/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx index 614c219c3..81eddb28f 100644 --- a/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx +++ b/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, sleep, userEvent, waitFor } from '@nocobase/test/client'; +import { render, screen, sleep, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/form/demos/apiClient.ts b/packages/core/client/src/schema-component/antd/form/demos/apiClient.ts index 6581aab98..f8c52b238 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/apiClient.ts +++ b/packages/core/client/src/schema-component/antd/form/demos/apiClient.ts @@ -1,4 +1,4 @@ -import { APIClient } from '@nocobase/client'; +import { APIClient } from '@tachybase/client'; import MockAdapter from 'axios-mock-adapter'; export const apiClient = new APIClient(); diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo1.tsx index abc9a9c1c..98503541f 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo1.tsx @@ -1,6 +1,6 @@ import { FormItem, Input } from '@tachybase/components'; import { ISchema, observer, useForm } from '@tachybase/schema'; -import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@nocobase/client'; +import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo2.tsx index 5a7d4cb37..5c2ef9a8d 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo2.tsx @@ -1,6 +1,6 @@ import { FormItem, Input } from '@tachybase/components'; import { ISchema, observer, useForm } from '@tachybase/schema'; -import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo3.tsx index 0753ff47e..31f0f24f1 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo3.tsx @@ -1,6 +1,6 @@ import { FormItem, Input } from '@tachybase/components'; import { ISchema, observer, useForm } from '@tachybase/schema'; -import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo4.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo4.tsx index 2f9f9e753..fcc15e4ea 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo4.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo4.tsx @@ -1,6 +1,6 @@ import { FormItem, Input } from '@tachybase/components'; import { ISchema, observer, useForm } from '@tachybase/schema'; -import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@nocobase/client'; +import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx index 801d6cc77..e0a3ffacb 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo5.tsx @@ -7,7 +7,7 @@ import { SchemaComponent, SchemaComponentProvider, useAPIClient, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Card, Space } from 'antd'; import React from 'react'; import { apiClient } from './apiClient'; diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo6.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo6.tsx index 9d0ca331f..f4959cce8 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo6.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo6.tsx @@ -1,6 +1,6 @@ import { FormItem, Input } from '@tachybase/components'; import { ISchema, observer, useForm } from '@tachybase/schema'; -import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo7.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo7.tsx index 8e83652e8..0784280cd 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo7.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo7.tsx @@ -1,6 +1,6 @@ import { FormItem, Input } from '@tachybase/components'; import { ISchema, observer, useForm } from '@tachybase/schema'; -import { Action, Form, FormUseValues, SchemaComponent, SchemaComponentProvider, useRequest } from '@nocobase/client'; +import { Action, Form, FormUseValues, SchemaComponent, SchemaComponentProvider, useRequest } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx index a12dbeb68..e4cafa917 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx @@ -10,7 +10,7 @@ import { useActionContext, useCloseAction, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Button } from 'antd'; import React, { useEffect, useState } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/g2plot/__tests__/g2plot.test.tsx b/packages/core/client/src/schema-component/antd/g2plot/__tests__/g2plot.test.tsx index c0e26b4c7..fdc0f5a45 100644 --- a/packages/core/client/src/schema-component/antd/g2plot/__tests__/g2plot.test.tsx +++ b/packages/core/client/src/schema-component/antd/g2plot/__tests__/g2plot.test.tsx @@ -1,4 +1,4 @@ -import { render, waitFor } from '@nocobase/test/client'; +import { render, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/g2plot/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/g2plot/demos/demo1.tsx index ac36d013c..2ea6a2647 100644 --- a/packages/core/client/src/schema-component/antd/g2plot/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/g2plot/demos/demo1.tsx @@ -5,7 +5,7 @@ import { G2Plot, SchemaComponent, SchemaComponentProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { mockAPIClient } from '../../../../testUtils'; diff --git a/packages/core/client/src/schema-component/antd/grid-card/__tests__/grid-card.test.tsx b/packages/core/client/src/schema-component/antd/grid-card/__tests__/grid-card.test.tsx index 422280ae8..be60a29cf 100644 --- a/packages/core/client/src/schema-component/antd/grid-card/__tests__/grid-card.test.tsx +++ b/packages/core/client/src/schema-component/antd/grid-card/__tests__/grid-card.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/grid/__tests__/grid.test.tsx b/packages/core/client/src/schema-component/antd/grid/__tests__/grid.test.tsx index a9e93f420..ef0854266 100644 --- a/packages/core/client/src/schema-component/antd/grid/__tests__/grid.test.tsx +++ b/packages/core/client/src/schema-component/antd/grid/__tests__/grid.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, waitFor } from '@nocobase/test/client'; +import { render, screen, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/grid/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/grid/demos/demo1.tsx index 84a02de58..7543c9ac6 100644 --- a/packages/core/client/src/schema-component/antd/grid/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/grid/demos/demo1.tsx @@ -7,7 +7,7 @@ import { Grid, SchemaComponent, SchemaComponentProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const Block = observer( diff --git a/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx index aea7ae290..b29ef8e38 100644 --- a/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/grid/demos/demo2.tsx @@ -11,7 +11,7 @@ import { Plugin, SchemaComponent, SchemaComponentProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { mockAPIClient } from '../../../../testUtils'; diff --git a/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx index 8ae57996e..d0a29b745 100644 --- a/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/grid/demos/demo3.tsx @@ -10,7 +10,7 @@ import { SchemaComponent, SchemaComponentProvider, SchemaInitializer, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const gridRowColWrap = (schema) => { diff --git a/packages/core/client/src/schema-component/antd/icon-picker/IconPicker.tsx b/packages/core/client/src/schema-component/antd/icon-picker/IconPicker.tsx index 1b8e43b9b..e67913c52 100644 --- a/packages/core/client/src/schema-component/antd/icon-picker/IconPicker.tsx +++ b/packages/core/client/src/schema-component/antd/icon-picker/IconPicker.tsx @@ -3,7 +3,7 @@ import { useFormLayout } from '@tachybase/components'; import { connect, mapProps, mapReadPretty } from '@tachybase/schema'; import { isValid } from '@tachybase/schema'; import { Button, Space } from 'antd'; -import React, { useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Icon, hasIcon } from '../../../icon'; import { StablePopover } from '../popover'; diff --git a/packages/core/client/src/schema-component/antd/icon-picker/__tests__/icon-picker.test.tsx b/packages/core/client/src/schema-component/antd/icon-picker/__tests__/icon-picker.test.tsx index edd109229..af65f7e07 100644 --- a/packages/core/client/src/schema-component/antd/icon-picker/__tests__/icon-picker.test.tsx +++ b/packages/core/client/src/schema-component/antd/icon-picker/__tests__/icon-picker.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent } from '@nocobase/test/client'; +import { render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import App from '../demos/icon-picker'; diff --git a/packages/core/client/src/schema-component/antd/icon-picker/demos/icon-picker.tsx b/packages/core/client/src/schema-component/antd/icon-picker/demos/icon-picker.tsx index 2a5990db2..878789591 100644 --- a/packages/core/client/src/schema-component/antd/icon-picker/demos/icon-picker.tsx +++ b/packages/core/client/src/schema-component/antd/icon-picker/demos/icon-picker.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { IconPicker, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { IconPicker, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/input-number/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/input-number/ReadPretty.tsx index 99490c2ce..17269d4b1 100644 --- a/packages/core/client/src/schema-component/antd/input-number/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/input-number/ReadPretty.tsx @@ -1,5 +1,5 @@ import { isValid } from '@tachybase/schema'; -import { toFixedByStep } from '@nocobase/utils/client'; +import { toFixedByStep } from '@tachybase/utils/client'; import type { InputProps } from 'antd/es/input'; import type { InputNumberProps } from 'antd/es/input-number'; import { format } from 'd3-format'; diff --git a/packages/core/client/src/schema-component/antd/input-number/__tests__/input-number.test.tsx b/packages/core/client/src/schema-component/antd/input-number/__tests__/input-number.test.tsx index 8793b2232..d6a42935e 100644 --- a/packages/core/client/src/schema-component/antd/input-number/__tests__/input-number.test.tsx +++ b/packages/core/client/src/schema-component/antd/input-number/__tests__/input-number.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen } from '@nocobase/test/client'; +import { fireEvent, render, screen } from '@tachybase/test/client'; import React from 'react'; import { formatNumberWithSeparator, formatUnitConversion, scientificNotation } from '../ReadPretty'; import App2 from '../demos/addonBefore&addonAfter'; diff --git a/packages/core/client/src/schema-component/antd/input-number/demos/addonBefore&addonAfter.tsx b/packages/core/client/src/schema-component/antd/input-number/demos/addonBefore&addonAfter.tsx index 96203f96a..25949bdc8 100644 --- a/packages/core/client/src/schema-component/antd/input-number/demos/addonBefore&addonAfter.tsx +++ b/packages/core/client/src/schema-component/antd/input-number/demos/addonBefore&addonAfter.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/input-number/demos/highPrecisionDecimals.tsx b/packages/core/client/src/schema-component/antd/input-number/demos/highPrecisionDecimals.tsx index 5b4ac8ecd..298ddb532 100644 --- a/packages/core/client/src/schema-component/antd/input-number/demos/highPrecisionDecimals.tsx +++ b/packages/core/client/src/schema-component/antd/input-number/demos/highPrecisionDecimals.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/input-number/demos/inputNumber.tsx b/packages/core/client/src/schema-component/antd/input-number/demos/inputNumber.tsx index 2050a18ea..d32d60e0c 100644 --- a/packages/core/client/src/schema-component/antd/input-number/demos/inputNumber.tsx +++ b/packages/core/client/src/schema-component/antd/input-number/demos/inputNumber.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx b/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx index 2dfcd2647..ba429118a 100644 --- a/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx +++ b/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen, userEvent, waitFor } from '@nocobase/test/client'; +import { fireEvent, render, screen, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/input'; import App4 from '../demos/json'; diff --git a/packages/core/client/src/schema-component/antd/input/demos/input.tsx b/packages/core/client/src/schema-component/antd/input/demos/input.tsx index 329dbd0fc..1ec6a3b50 100644 --- a/packages/core/client/src/schema-component/antd/input/demos/input.tsx +++ b/packages/core/client/src/schema-component/antd/input/demos/input.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/input/demos/json.tsx b/packages/core/client/src/schema-component/antd/input/demos/json.tsx index f12afbc22..c6dbee23c 100644 --- a/packages/core/client/src/schema-component/antd/input/demos/json.tsx +++ b/packages/core/client/src/schema-component/antd/input/demos/json.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/input/demos/textarea.tsx b/packages/core/client/src/schema-component/antd/input/demos/textarea.tsx index acd92acb1..944a28695 100644 --- a/packages/core/client/src/schema-component/antd/input/demos/textarea.tsx +++ b/packages/core/client/src/schema-component/antd/input/demos/textarea.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/input/demos/url.tsx b/packages/core/client/src/schema-component/antd/input/demos/url.tsx index b7a490ed5..7edb8f0a3 100644 --- a/packages/core/client/src/schema-component/antd/input/demos/url.tsx +++ b/packages/core/client/src/schema-component/antd/input/demos/url.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Input, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/list/__tests__/list.test.tsx b/packages/core/client/src/schema-component/antd/list/__tests__/list.test.tsx index 069bf4948..9271c29c7 100644 --- a/packages/core/client/src/schema-component/antd/list/__tests__/list.test.tsx +++ b/packages/core/client/src/schema-component/antd/list/__tests__/list.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/markdown/__tests__/markdown.test.tsx b/packages/core/client/src/schema-component/antd/markdown/__tests__/markdown.test.tsx index 091fe53e1..2d6351dd6 100644 --- a/packages/core/client/src/schema-component/antd/markdown/__tests__/markdown.test.tsx +++ b/packages/core/client/src/schema-component/antd/markdown/__tests__/markdown.test.tsx @@ -1,4 +1,4 @@ -import { act, fireEvent, render } from '@nocobase/test/client'; +import { act, fireEvent, render } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/markdown/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/markdown/demos/demo1.tsx index ec2333840..6d1eda0c4 100644 --- a/packages/core/client/src/schema-component/antd/markdown/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/markdown/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Markdown */ import { FormItem } from '@tachybase/components'; -import { Markdown, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Markdown, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/markdown/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/markdown/demos/demo2.tsx index 676000d36..3f5f44ed6 100644 --- a/packages/core/client/src/schema-component/antd/markdown/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/markdown/demos/demo2.tsx @@ -3,7 +3,7 @@ */ import { FormItem } from '@tachybase/components'; import { observer, useField } from '@tachybase/schema'; -import { Markdown, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Markdown, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/menu/Menu.tsx b/packages/core/client/src/schema-component/antd/menu/Menu.tsx index 9eebedd7d..1492038fb 100644 --- a/packages/core/client/src/schema-component/antd/menu/Menu.tsx +++ b/packages/core/client/src/schema-component/antd/menu/Menu.tsx @@ -9,7 +9,7 @@ import { useFieldSchema, } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import { Menu as AntdMenu, MenuProps } from 'antd'; import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; diff --git a/packages/core/client/src/schema-component/antd/menu/__tests__/menu.test.tsx b/packages/core/client/src/schema-component/antd/menu/__tests__/menu.test.tsx index c5028bf45..aeac30ebc 100644 --- a/packages/core/client/src/schema-component/antd/menu/__tests__/menu.test.tsx +++ b/packages/core/client/src/schema-component/antd/menu/__tests__/menu.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent, waitFor, within } from '@nocobase/test/client'; +import { render, screen, userEvent, waitFor, within } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/menu/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/menu/demos/demo1.tsx index 3773b25d4..514807dc4 100644 --- a/packages/core/client/src/schema-component/antd/menu/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/menu/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Menu */ import { ISchema } from '@tachybase/schema'; -import { Application, Menu, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Application, Menu, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/menu/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/menu/demos/demo2.tsx index da706ed05..1b37610ef 100644 --- a/packages/core/client/src/schema-component/antd/menu/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/menu/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: Menu */ import { ISchema } from '@tachybase/schema'; -import { Application, Menu, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Application, Menu, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/menu/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/menu/demos/demo3.tsx index ed07cc95f..285784d1f 100644 --- a/packages/core/client/src/schema-component/antd/menu/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/menu/demos/demo3.tsx @@ -2,7 +2,7 @@ * title: Menu */ import { ISchema } from '@tachybase/schema'; -import { Application, Menu, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Application, Menu, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import { Layout } from 'antd'; import React, { useRef } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx b/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx index f2518865e..ce902bfd9 100644 --- a/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx +++ b/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, waitFor } from '@nocobase/test/client'; +import { render, screen, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx index 3bf36c636..cb16b6e68 100644 --- a/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { DocumentTitleProvider, Page, SchemaComponent, SchemaComponentProvider, Application } from '@nocobase/client'; +import { DocumentTitleProvider, Page, SchemaComponent, SchemaComponentProvider, Application } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/password/__tests__/password.test.tsx b/packages/core/client/src/schema-component/antd/password/__tests__/password.test.tsx index 6d8ecdae4..2721d895e 100644 --- a/packages/core/client/src/schema-component/antd/password/__tests__/password.test.tsx +++ b/packages/core/client/src/schema-component/antd/password/__tests__/password.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen } from '@nocobase/test/client'; +import { fireEvent, render, screen } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/password/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/password/demos/demo1.tsx index 293835809..d110fb276 100644 --- a/packages/core/client/src/schema-component/antd/password/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/password/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Password */ import { FormItem } from '@tachybase/components'; -import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Password, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx index 543ea7aa6..7986d71e7 100644 --- a/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/password/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: Check strength */ import { FormItem } from '@tachybase/components'; -import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Password, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/percent/__tests__/percent.test.tsx b/packages/core/client/src/schema-component/antd/percent/__tests__/percent.test.tsx index 9459cb8c5..c91337c91 100644 --- a/packages/core/client/src/schema-component/antd/percent/__tests__/percent.test.tsx +++ b/packages/core/client/src/schema-component/antd/percent/__tests__/percent.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render } from '@nocobase/test/client'; +import { fireEvent, render } from '@tachybase/test/client'; import React from 'react'; import App from '../demos/percent'; diff --git a/packages/core/client/src/schema-component/antd/percent/demos/percent.tsx b/packages/core/client/src/schema-component/antd/percent/demos/percent.tsx index c8e036996..ac046e31b 100644 --- a/packages/core/client/src/schema-component/antd/percent/demos/percent.tsx +++ b/packages/core/client/src/schema-component/antd/percent/demos/percent.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { Percent, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Percent, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/preview/__tests__/preview.test.tsx b/packages/core/client/src/schema-component/antd/preview/__tests__/preview.test.tsx index 0e490a646..3b850e564 100644 --- a/packages/core/client/src/schema-component/antd/preview/__tests__/preview.test.tsx +++ b/packages/core/client/src/schema-component/antd/preview/__tests__/preview.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx index 3218b2baf..c56a2b73e 100644 --- a/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Preview */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; import Preview from '../Preview'; diff --git a/packages/core/client/src/schema-component/antd/radio/__tests__/radio.test.tsx b/packages/core/client/src/schema-component/antd/radio/__tests__/radio.test.tsx index 9342295aa..69448c743 100644 --- a/packages/core/client/src/schema-component/antd/radio/__tests__/radio.test.tsx +++ b/packages/core/client/src/schema-component/antd/radio/__tests__/radio.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen } from '@nocobase/test/client'; +import { fireEvent, render, screen } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/radio/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/radio/demos/demo1.tsx index 8c90a30cc..1d2d52f70 100644 --- a/packages/core/client/src/schema-component/antd/radio/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/radio/demos/demo1.tsx @@ -3,7 +3,7 @@ * desc: The simplest use. */ import { FormItem } from '@tachybase/components'; -import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Radio, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/radio/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/radio/demos/demo2.tsx index a6224cb7f..5d8ea7408 100644 --- a/packages/core/client/src/schema-component/antd/radio/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/radio/demos/demo2.tsx @@ -3,7 +3,7 @@ * desc: A group of radio components. */ import { FormItem } from '@tachybase/components'; -import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Radio, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const options = [ diff --git a/packages/core/client/src/schema-component/antd/radio/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/radio/demos/demo3.tsx index 357f1411e..154928e04 100644 --- a/packages/core/client/src/schema-component/antd/radio/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/radio/demos/demo3.tsx @@ -2,7 +2,7 @@ * title: Radio Group with color */ import { FormItem } from '@tachybase/components'; -import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Radio, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const options = [ diff --git a/packages/core/client/src/schema-component/antd/record-picker/__tests__/record-picker.test.tsx b/packages/core/client/src/schema-component/antd/record-picker/__tests__/record-picker.test.tsx index 990feab06..60544fae3 100644 --- a/packages/core/client/src/schema-component/antd/record-picker/__tests__/record-picker.test.tsx +++ b/packages/core/client/src/schema-component/antd/record-picker/__tests__/record-picker.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent, waitFor, within } from '@nocobase/test/client'; +import { render, screen, userEvent, waitFor, within } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/record-picker/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/record-picker/demos/demo1.tsx index 21b5ab967..435a02080 100644 --- a/packages/core/client/src/schema-component/antd/record-picker/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/record-picker/demos/demo1.tsx @@ -17,7 +17,7 @@ import { SchemaComponentProvider, TableSelectorProvider, TableV2, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { mockAPIClient } from '../../../../testUtils'; import data from './mockData'; diff --git a/packages/core/client/src/schema-component/antd/record-picker/util.ts b/packages/core/client/src/schema-component/antd/record-picker/util.ts index f0fc4218a..36650b191 100644 --- a/packages/core/client/src/schema-component/antd/record-picker/util.ts +++ b/packages/core/client/src/schema-component/antd/record-picker/util.ts @@ -1,6 +1,6 @@ import { ISchema } from '@tachybase/schema'; import { isArr } from '@tachybase/schema'; -import { dayjs, getDefaultFormat, str2moment } from '@nocobase/utils/client'; +import { dayjs, getDefaultFormat, str2moment } from '@tachybase/utils/client'; import { Tag } from 'antd'; import React from 'react'; import { CollectionFieldOptions_deprecated, useCollectionManager_deprecated } from '../../../collection-manager'; diff --git a/packages/core/client/src/schema-component/antd/remote-select/__tests__/remote-select.test.tsx b/packages/core/client/src/schema-component/antd/remote-select/__tests__/remote-select.test.tsx index 43c319a46..4dac36adf 100644 --- a/packages/core/client/src/schema-component/antd/remote-select/__tests__/remote-select.test.tsx +++ b/packages/core/client/src/schema-component/antd/remote-select/__tests__/remote-select.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, sleep, userEvent } from '@nocobase/test/client'; +import { render, screen, sleep, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/remote-select/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/remote-select/demos/demo1.tsx index 0fb1bebce..d4060da2b 100644 --- a/packages/core/client/src/schema-component/antd/remote-select/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/remote-select/demos/demo1.tsx @@ -1,4 +1,4 @@ -import { APIClientProvider, FormProvider, RemoteSelect, SchemaComponent } from '@nocobase/client'; +import { APIClientProvider, FormProvider, RemoteSelect, SchemaComponent } from '@tachybase/client'; import React from 'react'; import { mockAPIClient } from '../../../../testUtils'; diff --git a/packages/core/client/src/schema-component/antd/rich-text/__tests__/rich-text.test.tsx b/packages/core/client/src/schema-component/antd/rich-text/__tests__/rich-text.test.tsx index 69319bc2a..61c09eb34 100644 --- a/packages/core/client/src/schema-component/antd/rich-text/__tests__/rich-text.test.tsx +++ b/packages/core/client/src/schema-component/antd/rich-text/__tests__/rich-text.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent } from '@nocobase/test/client'; +import { render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/rich-text/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/rich-text/demos/demo1.tsx index 3a75b6dbe..334d8212d 100644 --- a/packages/core/client/src/schema-component/antd/rich-text/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/rich-text/demos/demo1.tsx @@ -1,5 +1,5 @@ import { FormItem } from '@tachybase/components'; -import { RichText, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { RichText, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; import 'react-quill/dist/quill.snow.css'; // ES6 diff --git a/packages/core/client/src/schema-component/antd/select/FormulaSelect.tsx b/packages/core/client/src/schema-component/antd/select/FormulaSelect.tsx index 89ff196f8..43458d716 100644 --- a/packages/core/client/src/schema-component/antd/select/FormulaSelect.tsx +++ b/packages/core/client/src/schema-component/antd/select/FormulaSelect.tsx @@ -1,7 +1,7 @@ import { CloseCircleFilled, CloseOutlined } from '@ant-design/icons'; import { useFieldSchema, useForm } from '@tachybase/schema'; import { isValid, toArr } from '@tachybase/schema'; -import { isPlainObject } from '@nocobase/utils/client'; +import { isPlainObject } from '@tachybase/utils/client'; import type { SelectProps } from 'antd'; import { Select as AntdSelect, Empty, Spin, Tag } from 'antd'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/core/client/src/schema-component/antd/select/Select.tsx b/packages/core/client/src/schema-component/antd/select/Select.tsx index 82398fd4c..3a7b3f7fd 100644 --- a/packages/core/client/src/schema-component/antd/select/Select.tsx +++ b/packages/core/client/src/schema-component/antd/select/Select.tsx @@ -1,7 +1,7 @@ import { CloseCircleFilled, CloseOutlined, LoadingOutlined } from '@ant-design/icons'; import { connect, mapProps, mapReadPretty } from '@tachybase/schema'; import { isValid, toArr } from '@tachybase/schema'; -import { isPlainObject } from '@nocobase/utils/client'; +import { isPlainObject } from '@tachybase/utils/client'; import type { SelectProps } from 'antd'; import { Select as AntdSelect, Empty, Spin, Tag } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/select/__tests__/select.test.tsx b/packages/core/client/src/schema-component/antd/select/__tests__/select.test.tsx index 4443d7f97..6e0efe2f9 100644 --- a/packages/core/client/src/schema-component/antd/select/__tests__/select.test.tsx +++ b/packages/core/client/src/schema-component/antd/select/__tests__/select.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen, userEvent } from '@nocobase/test/client'; +import { fireEvent, render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/select/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/select/demos/demo1.tsx index 149bf6a90..3189211d0 100644 --- a/packages/core/client/src/schema-component/antd/select/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/select/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Select */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, Select } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, Select } from '@tachybase/client'; import React from 'react'; const dataSource = [ diff --git a/packages/core/client/src/schema-component/antd/select/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/select/demos/demo2.tsx index 9538f5cf3..e9b9707cc 100644 --- a/packages/core/client/src/schema-component/antd/select/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/select/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: Select */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, Select } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, Select } from '@tachybase/client'; import React from 'react'; const dataSource = [ diff --git a/packages/core/client/src/schema-component/antd/select/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/select/demos/demo3.tsx index 4e7ad2b3b..d93e32aba 100644 --- a/packages/core/client/src/schema-component/antd/select/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/select/demos/demo3.tsx @@ -3,7 +3,7 @@ */ import { FormItem } from '@tachybase/components'; import { ISchema } from '@tachybase/schema'; -import { SchemaComponent, SchemaComponentProvider, Select } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, Select } from '@tachybase/client'; import React from 'react'; const options = [ diff --git a/packages/core/client/src/schema-component/antd/select/utils.ts b/packages/core/client/src/schema-component/antd/select/utils.ts index 3dc434969..5c29704ef 100644 --- a/packages/core/client/src/schema-component/antd/select/utils.ts +++ b/packages/core/client/src/schema-component/antd/select/utils.ts @@ -1,4 +1,4 @@ -import { isPlainObject } from '@nocobase/utils/client'; +import { isPlainObject } from '@tachybase/utils/client'; import { castArray } from 'lodash'; export interface FieldNames { diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx index 799c91655..35a085682 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx @@ -7,7 +7,7 @@ import { spliceArrayState } from '@tachybase/schema'; import { RecursionField, Schema, observer, useField, useFieldSchema } from '@tachybase/schema'; import { action } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { isPortalInBody } from '@nocobase/utils/client'; +import { isPortalInBody } from '@tachybase/utils/client'; import { useMemoizedFn } from 'ahooks'; import { Table as AntdTable, TableColumnProps } from 'antd'; import { default as classNames, default as cls } from 'classnames'; diff --git a/packages/core/client/src/schema-component/antd/table-v2/__tests__/table-v2.test.tsx b/packages/core/client/src/schema-component/antd/table-v2/__tests__/table-v2.test.tsx index 0074d70c2..8c714d48c 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/__tests__/table-v2.test.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/__tests__/table-v2.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx index ffd700a81..79e4434e8 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/demos/demo1.tsx @@ -9,7 +9,7 @@ import { SchemaComponentProvider, useFormBlockContext, useTableBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { notification } from 'antd'; import { range } from 'lodash'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx index efce442fb..5f493d3db 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/demos/demo2.tsx @@ -1,6 +1,6 @@ import { ArrayField } from '@tachybase/schema'; import { connect, ISchema, observer, RecursionField, useField, useFieldSchema } from '@tachybase/schema'; -import { SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import { Table, TableColumnType } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/antd/table/__tests__/table.test.tsx b/packages/core/client/src/schema-component/antd/table/__tests__/table.test.tsx index ab69f21d5..104c6e592 100644 --- a/packages/core/client/src/schema-component/antd/table/__tests__/table.test.tsx +++ b/packages/core/client/src/schema-component/antd/table/__tests__/table.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/table/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/table/demos/demo1.tsx index e08ff9698..14546aec4 100644 --- a/packages/core/client/src/schema-component/antd/table/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/table/demos/demo1.tsx @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { Application, Input, SchemaComponent, SchemaComponentProvider, Table } from '@nocobase/client'; +import { Application, Input, SchemaComponent, SchemaComponentProvider, Table } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/table/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/table/demos/demo2.tsx index 682ef682f..77f9cfdc9 100644 --- a/packages/core/client/src/schema-component/antd/table/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/table/demos/demo2.tsx @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { Application, Input, SchemaComponent, SchemaComponentProvider, Table } from '@nocobase/client'; +import { Application, Input, SchemaComponent, SchemaComponentProvider, Table } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/table/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/table/demos/demo3.tsx index 79d87c3b1..c780b4d55 100644 --- a/packages/core/client/src/schema-component/antd/table/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/table/demos/demo3.tsx @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { Application, Input, SchemaComponent, SchemaComponentProvider, Table } from '@nocobase/client'; +import { Application, Input, SchemaComponent, SchemaComponentProvider, Table } from '@tachybase/client'; import React from 'react'; const schema: ISchema = { diff --git a/packages/core/client/src/schema-component/antd/table/demos/demo4.tsx b/packages/core/client/src/schema-component/antd/table/demos/demo4.tsx index 5fc0c894a..2b646ca09 100644 --- a/packages/core/client/src/schema-component/antd/table/demos/demo4.tsx +++ b/packages/core/client/src/schema-component/antd/table/demos/demo4.tsx @@ -9,7 +9,7 @@ import { Table, useRecord, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { createContext, useContext, useState } from 'react'; const DataSourceContext = createContext(null); diff --git a/packages/core/client/src/schema-component/antd/tabs/__tests__/tabs.test.tsx b/packages/core/client/src/schema-component/antd/tabs/__tests__/tabs.test.tsx index e66746b5e..7b1e79d72 100644 --- a/packages/core/client/src/schema-component/antd/tabs/__tests__/tabs.test.tsx +++ b/packages/core/client/src/schema-component/antd/tabs/__tests__/tabs.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent, waitFor } from '@nocobase/test/client'; +import { render, screen, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/tabs/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/tabs/demos/demo1.tsx index 1664a1b8e..eac4fc844 100644 --- a/packages/core/client/src/schema-component/antd/tabs/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/tabs/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Tabs */ import { ISchema } from '@tachybase/schema'; -import { Action, Application, SchemaComponent, SchemaComponentProvider, Tabs } from '@nocobase/client'; +import { Action, Application, SchemaComponent, SchemaComponentProvider, Tabs } from '@tachybase/client'; import React from 'react'; import { AntdSchemaComponentProvider } from '../../AntdSchemaComponentProvider'; diff --git a/packages/core/client/src/schema-component/antd/time-picker/__tests__/time-picker.test.tsx b/packages/core/client/src/schema-component/antd/time-picker/__tests__/time-picker.test.tsx index 2b011ac10..6fdebfb5b 100644 --- a/packages/core/client/src/schema-component/antd/time-picker/__tests__/time-picker.test.tsx +++ b/packages/core/client/src/schema-component/antd/time-picker/__tests__/time-picker.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent, render, screen, userEvent } from '@nocobase/test/client'; +import { fireEvent, render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/time-picker/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/time-picker/demos/demo1.tsx index 00c33bf7f..9da28cb87 100644 --- a/packages/core/client/src/schema-component/antd/time-picker/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/time-picker/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: TimePicker */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, TimePicker } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, TimePicker } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/time-picker/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/time-picker/demos/demo2.tsx index 748a54e73..e5a4f4eaf 100644 --- a/packages/core/client/src/schema-component/antd/time-picker/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/time-picker/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: TimePicker.RangePicker */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, TimePicker } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, TimePicker } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/core/client/src/schema-component/antd/tree-select/__tests__/tree-select.test.tsx b/packages/core/client/src/schema-component/antd/tree-select/__tests__/tree-select.test.tsx index 952610af8..bc84edce4 100644 --- a/packages/core/client/src/schema-component/antd/tree-select/__tests__/tree-select.test.tsx +++ b/packages/core/client/src/schema-component/antd/tree-select/__tests__/tree-select.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent } from '@nocobase/test/client'; +import { render, screen, userEvent } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; diff --git a/packages/core/client/src/schema-component/antd/tree-select/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/tree-select/demos/demo1.tsx index cf2815b81..328e7459a 100644 --- a/packages/core/client/src/schema-component/antd/tree-select/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/tree-select/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: TreeSelect */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, TreeSelect } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, TreeSelect } from '@tachybase/client'; import React from 'react'; const dataSource = [ diff --git a/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx index 8f4f47b83..b43e281b5 100644 --- a/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx @@ -1,7 +1,7 @@ import { DownloadOutlined } from '@ant-design/icons'; import { Field } from '@tachybase/schema'; import { useField } from '@tachybase/schema'; -import { isString } from '@nocobase/utils/client'; +import { isString } from '@tachybase/utils/client'; import { Button, Modal, Space } from 'antd'; import useUploadStyle from 'antd/es/upload/style'; import cls from 'classnames'; diff --git a/packages/core/client/src/schema-component/antd/upload/__tests__/upload.test.tsx b/packages/core/client/src/schema-component/antd/upload/__tests__/upload.test.tsx index 385073667..29e509129 100644 --- a/packages/core/client/src/schema-component/antd/upload/__tests__/upload.test.tsx +++ b/packages/core/client/src/schema-component/antd/upload/__tests__/upload.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/upload/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/upload/demos/demo1.tsx index 192c467f9..cea100471 100644 --- a/packages/core/client/src/schema-component/antd/upload/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/upload/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Upload */ import { FormItem } from '@tachybase/components'; -import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@nocobase/client'; +import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@tachybase/client'; import React from 'react'; import apiClient from './apiClient'; diff --git a/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx index 00b3cd1f8..a491c1387 100644 --- a/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: Upload */ import { FormItem } from '@tachybase/components'; -import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@nocobase/client'; +import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@tachybase/client'; import React from 'react'; import apiClient from './apiClient'; diff --git a/packages/core/client/src/schema-component/antd/variable/Input.tsx b/packages/core/client/src/schema-component/antd/variable/Input.tsx index 0f5923819..aad6bbe8f 100644 --- a/packages/core/client/src/schema-component/antd/variable/Input.tsx +++ b/packages/core/client/src/schema-component/antd/variable/Input.tsx @@ -1,7 +1,7 @@ import { CloseCircleFilled } from '@ant-design/icons'; import { css, cx } from '@emotion/css'; import { useForm } from '@tachybase/schema'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import { Input as AntInput, Cascader, DatePicker, InputNumber, Select, Space, Tag } from 'antd'; import useAntdInputStyle from 'antd/es/input/style'; import type { DefaultOptionType } from 'antd/lib/cascader'; diff --git a/packages/core/client/src/schema-component/antd/variable/TextArea.tsx b/packages/core/client/src/schema-component/antd/variable/TextArea.tsx index fff3b92ac..4980ac2df 100644 --- a/packages/core/client/src/schema-component/antd/variable/TextArea.tsx +++ b/packages/core/client/src/schema-component/antd/variable/TextArea.tsx @@ -5,7 +5,7 @@ import { cloneDeep } from 'lodash'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import sanitizeHTML from 'sanitize-html'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import { EllipsisWithTooltip } from '../..'; import { VariableSelect } from './VariableSelect'; diff --git a/packages/core/client/src/schema-component/antd/variable/__tests__/variable.test.tsx b/packages/core/client/src/schema-component/antd/variable/__tests__/variable.test.tsx index 97b36c58d..1c188ee81 100644 --- a/packages/core/client/src/schema-component/antd/variable/__tests__/variable.test.tsx +++ b/packages/core/client/src/schema-component/antd/variable/__tests__/variable.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, userEvent, waitFor } from '@nocobase/test/client'; +import { render, screen, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; diff --git a/packages/core/client/src/schema-component/antd/variable/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/variable/demos/demo1.tsx index df5455ca3..0ae88bac8 100644 --- a/packages/core/client/src/schema-component/antd/variable/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/variable/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Variable.Input */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, Variable } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, Variable } from '@tachybase/client'; import React from 'react'; const scope = [ diff --git a/packages/core/client/src/schema-component/antd/variable/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/variable/demos/demo2.tsx index c32bd22da..e3f3c0c79 100644 --- a/packages/core/client/src/schema-component/antd/variable/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/variable/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: Variable.Input */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, Variable } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, Variable } from '@tachybase/client'; import React from 'react'; const scope = [ diff --git a/packages/core/client/src/schema-component/antd/variable/demos/demo3.tsx b/packages/core/client/src/schema-component/antd/variable/demos/demo3.tsx index 24279b372..c3bfdb909 100644 --- a/packages/core/client/src/schema-component/antd/variable/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/antd/variable/demos/demo3.tsx @@ -2,7 +2,7 @@ * title: Variable.Input */ import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider, Variable } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentProvider, Variable } from '@tachybase/client'; import React from 'react'; const scope = [ diff --git a/packages/core/client/src/schema-component/demos/demo1.tsx b/packages/core/client/src/schema-component/demos/demo1.tsx index a4dcc18eb..9ec3277fc 100644 --- a/packages/core/client/src/schema-component/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/demos/demo1.tsx @@ -2,7 +2,7 @@ * title: Insert Adjacent */ import React from 'react'; -import { SchemaComponentProvider, SchemaComponent, useDesignable } from '@nocobase/client'; +import { SchemaComponentProvider, SchemaComponent, useDesignable } from '@tachybase/client'; import { observer, Schema, useFieldSchema } from '@tachybase/schema'; import { Button, Space } from 'antd'; import { uid } from '@tachybase/schema'; diff --git a/packages/core/client/src/schema-component/demos/demo2.tsx b/packages/core/client/src/schema-component/demos/demo2.tsx index 5b64c4740..40fad4f51 100644 --- a/packages/core/client/src/schema-component/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/demos/demo2.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentProvider, useSchemaComponentContext } from '@nocobase/client'; +import { SchemaComponentProvider, useSchemaComponentContext } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/demos/demo3.tsx b/packages/core/client/src/schema-component/demos/demo3.tsx index 79bedc8ef..eebe9abdf 100644 --- a/packages/core/client/src/schema-component/demos/demo3.tsx +++ b/packages/core/client/src/schema-component/demos/demo3.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentProvider, useSchemaComponentContext } from '@nocobase/client'; +import { SchemaComponentProvider, useSchemaComponentContext } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-component/demos/demo4.tsx b/packages/core/client/src/schema-component/demos/demo4.tsx index 92b3f3697..3cecda8f2 100644 --- a/packages/core/client/src/schema-component/demos/demo4.tsx +++ b/packages/core/client/src/schema-component/demos/demo4.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentProvider, useSchemaComponentContext } from '@nocobase/client'; +import { SchemaComponentProvider, useSchemaComponentContext } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-initializer/demos/basic.tsx b/packages/core/client/src/schema-initializer/demos/basic.tsx index 0408a6f0b..8443c71b6 100644 --- a/packages/core/client/src/schema-initializer/demos/basic.tsx +++ b/packages/core/client/src/schema-initializer/demos/basic.tsx @@ -4,7 +4,7 @@ import { Plugin, SchemaInitializer, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const myInitializer = new SchemaInitializer({ diff --git a/packages/core/client/src/schema-initializer/demos/build-type.tsx b/packages/core/client/src/schema-initializer/demos/build-type.tsx index 2bf62f249..662c39503 100644 --- a/packages/core/client/src/schema-initializer/demos/build-type.tsx +++ b/packages/core/client/src/schema-initializer/demos/build-type.tsx @@ -4,7 +4,7 @@ import { SchemaComponentPlugin, SchemaInitializer, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const myInitializer = new SchemaInitializer({ diff --git a/packages/core/client/src/schema-initializer/demos/custom-button.tsx b/packages/core/client/src/schema-initializer/demos/custom-button.tsx index cf69043f7..0b8512680 100644 --- a/packages/core/client/src/schema-initializer/demos/custom-button.tsx +++ b/packages/core/client/src/schema-initializer/demos/custom-button.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Application, Plugin, SchemaInitializer, useSchemaInitializerRender } from '@nocobase/client'; +import { Application, Plugin, SchemaInitializer, useSchemaInitializerRender } from '@tachybase/client'; import { PlusOutlined } from '@ant-design/icons'; import { Divider, Avatar, AvatarProps } from 'antd'; diff --git a/packages/core/client/src/schema-initializer/demos/custom-items-component.tsx b/packages/core/client/src/schema-initializer/demos/custom-items-component.tsx index 00d5588c1..9f67070fc 100644 --- a/packages/core/client/src/schema-initializer/demos/custom-items-component.tsx +++ b/packages/core/client/src/schema-initializer/demos/custom-items-component.tsx @@ -5,7 +5,7 @@ import { SchemaInitializer, SchemaInitializerItemsProps, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ButtonProps, Card, Divider, List, ListProps, Menu, MenuProps } from 'antd'; // 自定义 Items 渲染为 Menu diff --git a/packages/core/client/src/schema-initializer/demos/dynamic-visible-children.tsx b/packages/core/client/src/schema-initializer/demos/dynamic-visible-children.tsx index eac229826..97e760e2f 100644 --- a/packages/core/client/src/schema-initializer/demos/dynamic-visible-children.tsx +++ b/packages/core/client/src/schema-initializer/demos/dynamic-visible-children.tsx @@ -4,7 +4,7 @@ import { SchemaComponentPlugin, SchemaInitializer, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const myInitializer = new SchemaInitializer({ diff --git a/packages/core/client/src/schema-initializer/demos/insert-schema-action.tsx b/packages/core/client/src/schema-initializer/demos/insert-schema-action.tsx index 0ee7db75d..9db4ab67c 100644 --- a/packages/core/client/src/schema-initializer/demos/insert-schema-action.tsx +++ b/packages/core/client/src/schema-initializer/demos/insert-schema-action.tsx @@ -8,7 +8,7 @@ import { SchemaComponentProvider, SchemaInitializer, useApp, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; const addActionInitializer = new SchemaInitializer({ diff --git a/packages/core/client/src/schema-initializer/demos/insert-schema-basic.tsx b/packages/core/client/src/schema-initializer/demos/insert-schema-basic.tsx index 76df583dd..4115d1498 100644 --- a/packages/core/client/src/schema-initializer/demos/insert-schema-basic.tsx +++ b/packages/core/client/src/schema-initializer/demos/insert-schema-basic.tsx @@ -8,7 +8,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import { observer, useField } from '@tachybase/schema'; import { Field } from '@tachybase/schema'; diff --git a/packages/core/client/src/schema-initializer/demos/insert-schema-form-item.tsx b/packages/core/client/src/schema-initializer/demos/insert-schema-form-item.tsx index a7c9c5b55..4fb055097 100644 --- a/packages/core/client/src/schema-initializer/demos/insert-schema-form-item.tsx +++ b/packages/core/client/src/schema-initializer/demos/insert-schema-form-item.tsx @@ -14,7 +14,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { FC } from 'react'; const useFormItemInitializerFields = () => { diff --git a/packages/core/client/src/schema-initializer/demos/nested-items.tsx b/packages/core/client/src/schema-initializer/demos/nested-items.tsx index 0ff86b6a7..0eb219fa6 100644 --- a/packages/core/client/src/schema-initializer/demos/nested-items.tsx +++ b/packages/core/client/src/schema-initializer/demos/nested-items.tsx @@ -8,7 +8,7 @@ import { useSchemaInitializerItem, SchemaInitializerChild, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Divider, Menu } from 'antd'; // TODO:这里要加上 Context diff --git a/packages/core/client/src/schema-settings/DataTemplates/components/Designer.tsx b/packages/core/client/src/schema-settings/DataTemplates/components/Designer.tsx index b21525727..06fdcf782 100644 --- a/packages/core/client/src/schema-settings/DataTemplates/components/Designer.tsx +++ b/packages/core/client/src/schema-settings/DataTemplates/components/Designer.tsx @@ -1,6 +1,6 @@ import { Field } from '@tachybase/schema'; import { ISchema, observer, useField, useFieldSchema } from '@tachybase/schema'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import { Select } from 'antd'; import _ from 'lodash'; import React from 'react'; diff --git a/packages/core/client/src/schema-settings/SchemaSettings.tsx b/packages/core/client/src/schema-settings/SchemaSettings.tsx index af491608b..1927c4b86 100644 --- a/packages/core/client/src/schema-settings/SchemaSettings.tsx +++ b/packages/core/client/src/schema-settings/SchemaSettings.tsx @@ -3,7 +3,7 @@ import { ArrayCollapse, ArrayItems, FormItem, FormLayout, Input } from '@tachyba import { Field, GeneralField, createForm } from '@tachybase/schema'; import { ISchema, Schema, SchemaOptionsContext, useField, useFieldSchema, useForm } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import type { DropdownProps } from 'antd'; import { Alert, diff --git a/packages/core/client/src/schema-settings/SchemaSettingsPlugin.ts b/packages/core/client/src/schema-settings/SchemaSettingsPlugin.ts index 146ae4c01..59f0de2bc 100644 --- a/packages/core/client/src/schema-settings/SchemaSettingsPlugin.ts +++ b/packages/core/client/src/schema-settings/SchemaSettingsPlugin.ts @@ -47,6 +47,7 @@ import { uploadAttachmentComponentFieldSettings } from '../modules/fields/compon import { subformComponentFieldSettings } from '../modules/fields/component/Nester/subformComponentFieldSettings'; import { recordPickerComponentFieldSettings } from '../modules/fields/component/Picker/recordPickerComponentFieldSettings'; import { subformPopoverComponentFieldSettings } from '../modules/fields/component/PopoverNester/subformPopoverComponentFieldSettings'; +import { drawerSubTableComponentFieldSettings } from '../modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings'; import { selectComponentFieldSettings } from '../modules/fields/component/Select/selectComponentFieldSettings'; import { subTablePopoverComponentFieldSettings } from '../modules/fields/component/SubTable/subTablePopoverComponentFieldSettings'; import { tagComponentFieldSettings } from '../modules/fields/component/Tag/tagComponentFieldSettings'; @@ -101,6 +102,7 @@ export class SchemaSettingsPlugin extends Plugin { this.schemaSettingsManager.add(recordPickerComponentFieldSettings); this.schemaSettingsManager.add(subformComponentFieldSettings); this.schemaSettingsManager.add(subformPopoverComponentFieldSettings); + this.schemaSettingsManager.add(drawerSubTableComponentFieldSettings); this.schemaSettingsManager.add(subTablePopoverComponentFieldSettings); this.schemaSettingsManager.add(datePickerComponentFieldSettings); this.schemaSettingsManager.add(unixTimestampComponentFieldSettings); diff --git a/packages/core/client/src/schema-settings/VariableInput/hooks/useContextAssociationFields.tsx b/packages/core/client/src/schema-settings/VariableInput/hooks/useContextAssociationFields.tsx index d16ac795e..4cbf216ff 100644 --- a/packages/core/client/src/schema-settings/VariableInput/hooks/useContextAssociationFields.tsx +++ b/packages/core/client/src/schema-settings/VariableInput/hooks/useContextAssociationFields.tsx @@ -1,4 +1,4 @@ -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { CollectionFieldOptions_deprecated, useCollectionManager_deprecated } from '../../../collection-manager'; diff --git a/packages/core/client/src/schema-settings/demos/basic.tsx b/packages/core/client/src/schema-settings/demos/basic.tsx index c6354cc55..7a46a3a98 100644 --- a/packages/core/client/src/schema-settings/demos/basic.tsx +++ b/packages/core/client/src/schema-settings/demos/basic.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import { Application, Plugin, SchemaSettings, SchemaSettingsItem, useSchemaSettingsRender } from '@nocobase/client'; +import { Application, Plugin, SchemaSettings, SchemaSettingsItem, useSchemaSettingsRender } from '@tachybase/client'; const mySchemaSetting = new SchemaSettings({ name: 'MySchemaSetting', diff --git a/packages/core/client/src/schema-settings/demos/built-type.tsx b/packages/core/client/src/schema-settings/demos/built-type.tsx index 28e006252..d91dca7db 100644 --- a/packages/core/client/src/schema-settings/demos/built-type.tsx +++ b/packages/core/client/src/schema-settings/demos/built-type.tsx @@ -7,7 +7,7 @@ import { SchemaComponentPlugin, SchemaSettings, useSchemaSettingsRender, -} from '@nocobase/client'; +} from '@tachybase/client'; const mySchemaSetting = new SchemaSettings({ name: 'MySchemaSetting', diff --git a/packages/core/client/src/schema-settings/demos/custom-component.tsx b/packages/core/client/src/schema-settings/demos/custom-component.tsx index c5ab148c0..17978ba32 100644 --- a/packages/core/client/src/schema-settings/demos/custom-component.tsx +++ b/packages/core/client/src/schema-settings/demos/custom-component.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Application, Plugin, SchemaSettings, useSchemaSettingsRender } from '@nocobase/client'; +import { Application, Plugin, SchemaSettings, useSchemaSettingsRender } from '@tachybase/client'; import { Button } from 'antd'; const mySchemaSetting = new SchemaSettings({ diff --git a/packages/core/client/src/schema-settings/demos/demo3.tsx b/packages/core/client/src/schema-settings/demos/demo3.tsx index 0161c525c..470374816 100644 --- a/packages/core/client/src/schema-settings/demos/demo3.tsx +++ b/packages/core/client/src/schema-settings/demos/demo3.tsx @@ -10,7 +10,7 @@ import { useSchemaComponentContext, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; diff --git a/packages/core/client/src/schema-settings/demos/schema-basic.tsx b/packages/core/client/src/schema-settings/demos/schema-basic.tsx index 17b836344..2404501e1 100644 --- a/packages/core/client/src/schema-settings/demos/schema-basic.tsx +++ b/packages/core/client/src/schema-settings/demos/schema-basic.tsx @@ -6,7 +6,7 @@ import { SchemaComponentProvider, SchemaSettings, useSchemaSettingsRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import { observer, useFieldSchema } from '@tachybase/schema'; const mySchemaSetting = new SchemaSettings({ diff --git a/packages/core/client/src/schema-settings/hooks/useParseDataScopeFilter.ts b/packages/core/client/src/schema-settings/hooks/useParseDataScopeFilter.ts index 5830c9f21..38985d251 100644 --- a/packages/core/client/src/schema-settings/hooks/useParseDataScopeFilter.ts +++ b/packages/core/client/src/schema-settings/hooks/useParseDataScopeFilter.ts @@ -1,4 +1,4 @@ -import { flatten, unflatten } from '@nocobase/utils/client'; +import { flatten, unflatten } from '@tachybase/utils/client'; import { useCallback } from 'react'; import { useLocalVariables, useVariables } from '../../variables'; import { getVariableName } from '../../variables/utils/getVariableName'; diff --git a/packages/core/client/src/user/CurrentUser.tsx b/packages/core/client/src/user/CurrentUser.tsx index 7ede1d265..73ffd8c25 100644 --- a/packages/core/client/src/user/CurrentUser.tsx +++ b/packages/core/client/src/user/CurrentUser.tsx @@ -1,6 +1,6 @@ import { UserOutlined } from '@ant-design/icons'; import { css } from '@emotion/css'; -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import { App, Dropdown, Menu, MenuProps } from 'antd'; import React, { createContext, useCallback, useMemo as useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/core/client/src/user/CurrentUserSettingsMenuProvider.tsx b/packages/core/client/src/user/CurrentUserSettingsMenuProvider.tsx index bb3e4f6ec..c66aaa907 100644 --- a/packages/core/client/src/user/CurrentUserSettingsMenuProvider.tsx +++ b/packages/core/client/src/user/CurrentUserSettingsMenuProvider.tsx @@ -1,4 +1,4 @@ -import { error } from '@nocobase/utils/client'; +import { error } from '@tachybase/utils/client'; import { ItemType } from 'antd/es/menu/hooks/useItems'; import React, { createContext, useCallback, useContext, useRef } from 'react'; diff --git a/packages/core/client/src/user/Help.tsx b/packages/core/client/src/user/Help.tsx index cda9a6214..3192f69b1 100644 --- a/packages/core/client/src/user/Help.tsx +++ b/packages/core/client/src/user/Help.tsx @@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'; import { DropdownVisibleContext, usePlugin, useToken } from '..'; import { useCurrentAppInfo } from '../appInfo/CurrentAppInfoProvider'; import { observer } from '@tachybase/schema'; -import { parseHTML } from '@nocobase/utils/client'; +import { parseHTML } from '@tachybase/utils/client'; /** * @note If you want to change here, Note the Setting block on the mobile side diff --git a/packages/core/client/src/user/__tests__/current-user-settings-menu-provider.test.tsx b/packages/core/client/src/user/__tests__/current-user-settings-menu-provider.test.tsx index 92fd3e51e..bc1a087c6 100644 --- a/packages/core/client/src/user/__tests__/current-user-settings-menu-provider.test.tsx +++ b/packages/core/client/src/user/__tests__/current-user-settings-menu-provider.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@nocobase/test/client'; +import { render } from '@tachybase/test/client'; import React from 'react'; import { SettingsMenu } from '../CurrentUser'; import { useCurrentUserSettingsMenu } from '../CurrentUserSettingsMenuProvider'; diff --git a/packages/core/client/src/variables/VariablesProvider.tsx b/packages/core/client/src/variables/VariablesProvider.tsx index 140041033..8aa80ed4a 100644 --- a/packages/core/client/src/variables/VariablesProvider.tsx +++ b/packages/core/client/src/variables/VariablesProvider.tsx @@ -1,5 +1,5 @@ import { raw, untracked } from '@tachybase/schema'; -import { getValuesByPath } from '@nocobase/utils/client'; +import { getValuesByPath } from '@tachybase/utils/client'; import _ from 'lodash'; import React, { createContext, useCallback, useEffect, useMemo, useRef } from 'react'; import { useAPIClient } from '../api-client'; diff --git a/packages/core/client/src/variables/__tests__/useVariables.test.tsx b/packages/core/client/src/variables/__tests__/useVariables.test.tsx index 00b45a2e9..cc60ccc3b 100644 --- a/packages/core/client/src/variables/__tests__/useVariables.test.tsx +++ b/packages/core/client/src/variables/__tests__/useVariables.test.tsx @@ -1,5 +1,5 @@ import { SchemaExpressionScopeContext, SchemaOptionsContext } from '@tachybase/schema'; -import { act, renderHook, waitFor } from '@nocobase/test/client'; +import { act, renderHook, waitFor } from '@tachybase/test/client'; import React from 'react'; import { APIClientProvider } from '../../api-client'; import { mockAPIClient } from '../../testUtils'; diff --git a/packages/core/client/src/variables/hooks/useBuiltinVariables.ts b/packages/core/client/src/variables/hooks/useBuiltinVariables.ts index 3b40c68b2..484929377 100644 --- a/packages/core/client/src/variables/hooks/useBuiltinVariables.ts +++ b/packages/core/client/src/variables/hooks/useBuiltinVariables.ts @@ -1,4 +1,4 @@ -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; import { useMemo } from 'react'; import { useCurrentUserVariable, useDatetimeVariable } from '../../schema-settings'; import { useCurrentRoleVariable } from '../../schema-settings/VariableInput/hooks/useRoleVariable'; diff --git a/packages/core/components/LICENSE b/packages/core/components/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/components/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/create-tachybase-app/LICENSE b/packages/core/create-tachybase-app/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/create-tachybase-app/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/create-tachybase-app/src/generator.js b/packages/core/create-tachybase-app/src/generator.js index e737f4d53..bc567957e 100644 --- a/packages/core/create-tachybase-app/src/generator.js +++ b/packages/core/create-tachybase-app/src/generator.js @@ -141,9 +141,9 @@ class AppGenerator extends Generator { async downloadServerPackage() { const { name } = this.context; - console.log('Download: @nocobase/app-server'); + console.log('Download: @tachybase/app-server'); const serverPackageDir = resolve(this.cwd, 'packages/app/server'); - await downloadPackageFromNpm('@nocobase/app-server', serverPackageDir); + await downloadPackageFromNpm('@tachybase/app-server', serverPackageDir); await updateJsonFile(resolve(serverPackageDir, 'package.json'), (data) => { data['name'] = `@${name}/app-server`; data['version'] = '0.1.0'; @@ -153,9 +153,9 @@ class AppGenerator extends Generator { async downloadClientPackage() { const { name } = this.context; - console.log('Download: @nocobase/app-client'); + console.log('Download: @tachybase/app-client'); const clientPackageDir = resolve(this.cwd, 'packages/app/client'); - await downloadPackageFromNpm('@nocobase/app-client', clientPackageDir); + await downloadPackageFromNpm('@tachybase/app-client', clientPackageDir); await updateJsonFile(resolve(clientPackageDir, 'package.json'), (data) => { data['name'] = `@${name}/app-client`; data['version'] = '0.1.0'; diff --git a/packages/core/create-tachybase-app/templates/app/package.json.tpl b/packages/core/create-tachybase-app/templates/app/package.json.tpl index 34a886f5d..dfc979aaa 100644 --- a/packages/core/create-tachybase-app/templates/app/package.json.tpl +++ b/packages/core/create-tachybase-app/templates/app/package.json.tpl @@ -25,11 +25,11 @@ "dependencies": { "pm2": "^5.2.0", "@tachybase/preset-tachybase": "{{{version}}}", - "@nocobase/build": "{{{version}}}", + "@tachybase/build": "{{{version}}}", "@tachybase/cli": "{{{version}}}", {{{dependencies}}} }, "devDependencies": { - "@nocobase/devtools": "{{{version}}}" + "@tachybase/devtools": "{{{version}}}" } } diff --git a/packages/core/create-tachybase-app/templates/app/playwright.config.ts b/packages/core/create-tachybase-app/templates/app/playwright.config.ts index a70bc9242..11ef6854d 100644 --- a/packages/core/create-tachybase-app/templates/app/playwright.config.ts +++ b/packages/core/create-tachybase-app/templates/app/playwright.config.ts @@ -1,3 +1,3 @@ -import { defineConfig } from '@nocobase/test/e2e'; +import { defineConfig } from '@tachybase/test/e2e'; export default defineConfig(); diff --git a/packages/core/create-tachybase-app/templates/app/vitest.config.mts b/packages/core/create-tachybase-app/templates/app/vitest.config.mts index 4e6455b4d..5e7d55b40 100644 --- a/packages/core/create-tachybase-app/templates/app/vitest.config.mts +++ b/packages/core/create-tachybase-app/templates/app/vitest.config.mts @@ -1,3 +1,3 @@ -import { defineConfig } from '@nocobase/test/vitest.mjs'; +import { defineConfig } from '@tachybase/test/vitest.mjs'; export default defineConfig(); diff --git a/packages/core/data-source-manager/LICENSE b/packages/core/data-source-manager/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/data-source-manager/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/data-source-manager/package.json b/packages/core/data-source-manager/package.json index 77faa0c0e..eadd0e650 100644 --- a/packages/core/data-source-manager/package.json +++ b/packages/core/data-source-manager/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/data-source-manager", + "name": "@tachybase/data-source-manager", "version": "0.21.24", "description": "", "repository": { @@ -11,12 +11,12 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/acl": "workspace:*", - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/acl": "workspace:*", + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/utils": "workspace:*", "@types/jsonwebtoken": "^8.5.8", "deepmerge": "^4.2.2", "jsonwebtoken": "^8.5.1", diff --git a/packages/core/data-source-manager/src/__tests__/data-source-factory.test.ts b/packages/core/data-source-manager/src/__tests__/data-source-factory.test.ts index 1f2f7e8c0..2038ca40c 100644 --- a/packages/core/data-source-manager/src/__tests__/data-source-factory.test.ts +++ b/packages/core/data-source-manager/src/__tests__/data-source-factory.test.ts @@ -1,4 +1,4 @@ -import { createMockServer } from '@nocobase/test'; +import { createMockServer } from '@tachybase/test'; import { DataSource } from '../data-source'; import { ICollectionManager } from '../types'; diff --git a/packages/core/data-source-manager/src/__tests__/data-source-manager.test.ts b/packages/core/data-source-manager/src/__tests__/data-source-manager.test.ts index 2b4002260..136799f66 100644 --- a/packages/core/data-source-manager/src/__tests__/data-source-manager.test.ts +++ b/packages/core/data-source-manager/src/__tests__/data-source-manager.test.ts @@ -1,4 +1,4 @@ -import { createMockServer, mockDatabase, supertest } from '@nocobase/test'; +import { createMockServer, mockDatabase, supertest } from '@tachybase/test'; import { SequelizeDataSource } from '../sequelize-data-source'; describe('example', () => { diff --git a/packages/core/data-source-manager/src/__tests__/koa.test.ts b/packages/core/data-source-manager/src/__tests__/koa.test.ts index 54193b29e..d972ba6ba 100644 --- a/packages/core/data-source-manager/src/__tests__/koa.test.ts +++ b/packages/core/data-source-manager/src/__tests__/koa.test.ts @@ -1,4 +1,4 @@ -import { mockDatabase } from '@nocobase/test'; +import { mockDatabase } from '@tachybase/test'; import Koa from 'koa'; import bodyParser from 'koa-bodyparser'; import supertest from 'supertest'; diff --git a/packages/core/data-source-manager/src/data-source-manager.ts b/packages/core/data-source-manager/src/data-source-manager.ts index 8f1fb77de..22e78daaa 100644 --- a/packages/core/data-source-manager/src/data-source-manager.ts +++ b/packages/core/data-source-manager/src/data-source-manager.ts @@ -1,4 +1,4 @@ -import { ToposortOptions } from '@nocobase/utils'; +import { ToposortOptions } from '@tachybase/utils'; import { DataSource } from './data-source'; import { DataSourceFactory } from './data-source-factory'; diff --git a/packages/core/data-source-manager/src/data-source-with-database.ts b/packages/core/data-source-manager/src/data-source-with-database.ts index d9220bddb..b28b06d46 100644 --- a/packages/core/data-source-manager/src/data-source-with-database.ts +++ b/packages/core/data-source-manager/src/data-source-with-database.ts @@ -1,4 +1,4 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; export interface DataSourceWithDatabase { db: Database; diff --git a/packages/core/data-source-manager/src/data-source.ts b/packages/core/data-source-manager/src/data-source.ts index f673f95d3..b2183e743 100644 --- a/packages/core/data-source-manager/src/data-source.ts +++ b/packages/core/data-source-manager/src/data-source.ts @@ -1,5 +1,5 @@ -import { ACL } from '@nocobase/acl'; -import { getNameByParams, parseRequest } from '@nocobase/resourcer'; +import { ACL } from '@tachybase/acl'; +import { getNameByParams, parseRequest } from '@tachybase/resourcer'; import EventEmitter from 'events'; import compose from 'koa-compose'; import { loadDefaultActions } from './load-default-actions'; diff --git a/packages/core/data-source-manager/src/default-actions/list.ts b/packages/core/data-source-manager/src/default-actions/list.ts index 399365f33..b69bc94bb 100644 --- a/packages/core/data-source-manager/src/default-actions/list.ts +++ b/packages/core/data-source-manager/src/default-actions/list.ts @@ -1,6 +1,6 @@ -import { assign } from '@nocobase/utils'; +import { assign } from '@tachybase/utils'; import { getRepositoryFromParams, pageArgsToLimitArgs } from './utils'; -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; function totalPage(total, pageSize): number { return Math.ceil(total / pageSize); diff --git a/packages/core/data-source-manager/src/default-actions/move.ts b/packages/core/data-source-manager/src/default-actions/move.ts index 120420f2f..77e00f09b 100644 --- a/packages/core/data-source-manager/src/default-actions/move.ts +++ b/packages/core/data-source-manager/src/default-actions/move.ts @@ -1,4 +1,4 @@ -import actions, { Context } from '@nocobase/actions'; +import actions, { Context } from '@tachybase/actions'; import { getRepositoryFromParams } from './utils'; diff --git a/packages/core/data-source-manager/src/default-actions/utils.ts b/packages/core/data-source-manager/src/default-actions/utils.ts index 84783065d..6d88e52de 100644 --- a/packages/core/data-source-manager/src/default-actions/utils.ts +++ b/packages/core/data-source-manager/src/default-actions/utils.ts @@ -1,4 +1,4 @@ -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; import { DataSource, IRepository } from '../'; export function pageArgsToLimitArgs( diff --git a/packages/core/data-source-manager/src/resource-manager.ts b/packages/core/data-source-manager/src/resource-manager.ts index 5aba4c26f..bff1ccf5b 100644 --- a/packages/core/data-source-manager/src/resource-manager.ts +++ b/packages/core/data-source-manager/src/resource-manager.ts @@ -1,3 +1,3 @@ -import { Resourcer } from '@nocobase/resourcer'; +import { Resourcer } from '@tachybase/resourcer'; export class ResourceManager extends Resourcer {} diff --git a/packages/core/data-source-manager/src/sequelize-collection-manager.ts b/packages/core/data-source-manager/src/sequelize-collection-manager.ts index 41a97f410..3f75bd0b6 100644 --- a/packages/core/data-source-manager/src/sequelize-collection-manager.ts +++ b/packages/core/data-source-manager/src/sequelize-collection-manager.ts @@ -1,4 +1,4 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import { CollectionOptions, ICollection, ICollectionManager, IRepository, MergeOptions } from './types'; export class SequelizeCollectionManager implements ICollectionManager { diff --git a/packages/core/database/LICENSE b/packages/core/database/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/database/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/database/package.json b/packages/core/database/package.json index 2ac9c9afd..e42123648 100644 --- a/packages/core/database/package.json +++ b/packages/core/database/package.json @@ -1,18 +1,13 @@ { - "name": "@nocobase/database", + "name": "@tachybase/database", "version": "0.21.24", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/database" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/logger": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/logger": "workspace:*", + "@tachybase/utils": "workspace:*", "async-mutex": "^0.3.2", "chalk": "^4.1.1", "cron-parser": "4.4.0", diff --git a/packages/core/database/src/__tests__/eager-loading/eager-loading-tree.test.ts b/packages/core/database/src/__tests__/eager-loading/eager-loading-tree.test.ts index 79267a54c..62ac14cc3 100644 --- a/packages/core/database/src/__tests__/eager-loading/eager-loading-tree.test.ts +++ b/packages/core/database/src/__tests__/eager-loading/eager-loading-tree.test.ts @@ -1,4 +1,4 @@ -import Database, { mockDatabase } from '@nocobase/database'; +import Database, { mockDatabase } from '@tachybase/database'; import { EagerLoadingTree } from '../../eager-loading/eager-loading-tree'; describe('Eager loading tree', () => { diff --git a/packages/core/database/src/__tests__/field-options/sort-by.test.ts b/packages/core/database/src/__tests__/field-options/sort-by.test.ts index 62ed4a724..7d31028d9 100644 --- a/packages/core/database/src/__tests__/field-options/sort-by.test.ts +++ b/packages/core/database/src/__tests__/field-options/sort-by.test.ts @@ -1,4 +1,4 @@ -import { mockDatabase } from '@nocobase/test'; +import { mockDatabase } from '@tachybase/test'; import { BelongsToManyRepository, Database } from '../../index'; describe('associated field order', () => { diff --git a/packages/core/database/src/__tests__/fixtures/migrations/m1.ts b/packages/core/database/src/__tests__/fixtures/migrations/m1.ts index 7f20dfeb8..2ea4509e6 100644 --- a/packages/core/database/src/__tests__/fixtures/migrations/m1.ts +++ b/packages/core/database/src/__tests__/fixtures/migrations/m1.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/database'; +import { Migration } from '@tachybase/database'; export default class extends Migration { async up() {} diff --git a/packages/core/database/src/__tests__/fixtures/migrations/m2.ts b/packages/core/database/src/__tests__/fixtures/migrations/m2.ts index 7f20dfeb8..2ea4509e6 100644 --- a/packages/core/database/src/__tests__/fixtures/migrations/m2.ts +++ b/packages/core/database/src/__tests__/fixtures/migrations/m2.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/database'; +import { Migration } from '@tachybase/database'; export default class extends Migration { async up() {} diff --git a/packages/core/database/src/__tests__/group.test.ts b/packages/core/database/src/__tests__/group.test.ts index 5d5f4d0ad..297612ef0 100644 --- a/packages/core/database/src/__tests__/group.test.ts +++ b/packages/core/database/src/__tests__/group.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; import sequelize from 'sequelize'; describe('migrator', () => { diff --git a/packages/core/database/src/__tests__/inhertits/collection-inherits.test.ts b/packages/core/database/src/__tests__/inhertits/collection-inherits.test.ts index d9e4c8ed0..6045dd35f 100644 --- a/packages/core/database/src/__tests__/inhertits/collection-inherits.test.ts +++ b/packages/core/database/src/__tests__/inhertits/collection-inherits.test.ts @@ -1,8 +1,8 @@ -import { BelongsToManyRepository } from '@nocobase/database'; +import { BelongsToManyRepository } from '@tachybase/database'; import Database from '../../database'; import { InheritedCollection } from '../../inherited-collection'; import { mockDatabase } from '../index'; -import { isPg } from '@nocobase/test'; +import { isPg } from '@tachybase/test'; describe.runIf(isPg())('collection inherits', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/migrator.test.ts b/packages/core/database/src/__tests__/migrator.test.ts index 8768804c2..9855a3834 100644 --- a/packages/core/database/src/__tests__/migrator.test.ts +++ b/packages/core/database/src/__tests__/migrator.test.ts @@ -1,5 +1,5 @@ import { vi } from 'vitest'; -import { Database, Migration, mockDatabase } from '@nocobase/database'; +import { Database, Migration, mockDatabase } from '@tachybase/database'; import { resolve } from 'path'; const names = (migrations: Array<{ name: string }>) => migrations.map((m) => m.name); diff --git a/packages/core/database/src/__tests__/model.test.ts b/packages/core/database/src/__tests__/model.test.ts index 83f0428c9..15a624614 100644 --- a/packages/core/database/src/__tests__/model.test.ts +++ b/packages/core/database/src/__tests__/model.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; describe('model', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/non-id-primary-key.test.ts b/packages/core/database/src/__tests__/non-id-primary-key.test.ts index 2cda6a508..e4cc9621e 100644 --- a/packages/core/database/src/__tests__/non-id-primary-key.test.ts +++ b/packages/core/database/src/__tests__/non-id-primary-key.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; describe('non-id primary key', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/operator/string-operator.test.ts b/packages/core/database/src/__tests__/operator/string-operator.test.ts index 696d1cba0..a3daf3cf2 100644 --- a/packages/core/database/src/__tests__/operator/string-operator.test.ts +++ b/packages/core/database/src/__tests__/operator/string-operator.test.ts @@ -1,4 +1,4 @@ -import Database, { Collection, mockDatabase } from '@nocobase/database'; +import Database, { Collection, mockDatabase } from '@tachybase/database'; describe('string operator', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/postgres/schema.test.ts b/packages/core/database/src/__tests__/postgres/schema.test.ts index 2164ee43d..b40f411b3 100644 --- a/packages/core/database/src/__tests__/postgres/schema.test.ts +++ b/packages/core/database/src/__tests__/postgres/schema.test.ts @@ -1,6 +1,6 @@ import { mockDatabase } from '../index'; import { Database } from '../../database'; -import { randomStr } from '@nocobase/test'; +import { randomStr } from '@tachybase/test'; describe('auth', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/relation-repository/appends.test.ts b/packages/core/database/src/__tests__/relation-repository/appends.test.ts index 2626b583b..ee277f989 100644 --- a/packages/core/database/src/__tests__/relation-repository/appends.test.ts +++ b/packages/core/database/src/__tests__/relation-repository/appends.test.ts @@ -1,4 +1,4 @@ -import Database, { BelongsToRepository, Collection, mockDatabase } from '@nocobase/database'; +import Database, { BelongsToRepository, Collection, mockDatabase } from '@tachybase/database'; describe('appends', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/relation-repository/belongs-to-many-repository.test.ts b/packages/core/database/src/__tests__/relation-repository/belongs-to-many-repository.test.ts index 3ce9a8c06..a3e300558 100644 --- a/packages/core/database/src/__tests__/relation-repository/belongs-to-many-repository.test.ts +++ b/packages/core/database/src/__tests__/relation-repository/belongs-to-many-repository.test.ts @@ -1,8 +1,8 @@ -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; import Database from '../../database'; import { BelongsToManyRepository } from '../../relation-repository/belongs-to-many-repository'; import { mockDatabase } from '../index'; -import { pgOnly } from '@nocobase/test'; +import { pgOnly } from '@tachybase/test'; pgOnly()('belongs to many with targetCollection', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/relation-repository/has-many-repository.test.ts b/packages/core/database/src/__tests__/relation-repository/has-many-repository.test.ts index eab3802d4..82eeafd34 100644 --- a/packages/core/database/src/__tests__/relation-repository/has-many-repository.test.ts +++ b/packages/core/database/src/__tests__/relation-repository/has-many-repository.test.ts @@ -1,7 +1,7 @@ import { mockDatabase } from '../index'; import { HasManyRepository } from '../../relation-repository/hasmany-repository'; import { BelongsToManyRepository } from '../../relation-repository/belongs-to-many-repository'; -import Database, { Collection } from '@nocobase/database'; +import Database, { Collection } from '@tachybase/database'; describe('has many with target key', function () { let db: Database; diff --git a/packages/core/database/src/__tests__/repository.test.ts b/packages/core/database/src/__tests__/repository.test.ts index 575350709..75ae2fcd8 100644 --- a/packages/core/database/src/__tests__/repository.test.ts +++ b/packages/core/database/src/__tests__/repository.test.ts @@ -1,4 +1,4 @@ -import { Repository } from '@nocobase/database'; +import { Repository } from '@tachybase/database'; import { vi } from 'vitest'; import { Collection } from '../collection'; import { Database } from '../database'; diff --git a/packages/core/database/src/__tests__/repository/destroy.test.ts b/packages/core/database/src/__tests__/repository/destroy.test.ts index bfe8aa4fe..d515e540d 100644 --- a/packages/core/database/src/__tests__/repository/destroy.test.ts +++ b/packages/core/database/src/__tests__/repository/destroy.test.ts @@ -1,6 +1,6 @@ import { mockDatabase } from '../index'; import { Collection } from '../../collection'; -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; describe('destroy with targetKey', function () { let db: Database; diff --git a/packages/core/database/src/__tests__/repository/find.test.ts b/packages/core/database/src/__tests__/repository/find.test.ts index 7588db56a..a56f8f9b1 100644 --- a/packages/core/database/src/__tests__/repository/find.test.ts +++ b/packages/core/database/src/__tests__/repository/find.test.ts @@ -1,5 +1,5 @@ import { mockDatabase } from '../index'; -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import { Collection } from '../../collection'; import qs from 'qs'; diff --git a/packages/core/database/src/__tests__/repository/update-many.test.ts b/packages/core/database/src/__tests__/repository/update-many.test.ts index aefa89f12..7b1891fd7 100644 --- a/packages/core/database/src/__tests__/repository/update-many.test.ts +++ b/packages/core/database/src/__tests__/repository/update-many.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; describe('update many', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/repository/update.test.ts b/packages/core/database/src/__tests__/repository/update.test.ts index 5241d8508..4e27246ee 100644 --- a/packages/core/database/src/__tests__/repository/update.test.ts +++ b/packages/core/database/src/__tests__/repository/update.test.ts @@ -1,4 +1,4 @@ -import { Collection, Database, mockDatabase } from '@nocobase/database'; +import { Collection, Database, mockDatabase } from '@tachybase/database'; describe('update', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/sync.test.ts b/packages/core/database/src/__tests__/sync.test.ts index 7936d3322..14d9439cc 100644 --- a/packages/core/database/src/__tests__/sync.test.ts +++ b/packages/core/database/src/__tests__/sync.test.ts @@ -1,5 +1,5 @@ import { vi } from 'vitest'; -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; describe('sync', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/sync/empty-table.test.ts b/packages/core/database/src/__tests__/sync/empty-table.test.ts index 6d0416fb4..e06554820 100644 --- a/packages/core/database/src/__tests__/sync/empty-table.test.ts +++ b/packages/core/database/src/__tests__/sync/empty-table.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; import * as process from 'process'; describe('empty table', () => { diff --git a/packages/core/database/src/__tests__/sync/unique-index.test.ts b/packages/core/database/src/__tests__/sync/unique-index.test.ts index 31194a5ad..318b027e2 100644 --- a/packages/core/database/src/__tests__/sync/unique-index.test.ts +++ b/packages/core/database/src/__tests__/sync/unique-index.test.ts @@ -1,5 +1,5 @@ import { Database, mockDatabase } from '../../index'; -import { waitSecond } from '@nocobase/test'; +import { waitSecond } from '@tachybase/test'; describe('unique index', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/underscored-options.test.ts b/packages/core/database/src/__tests__/underscored-options.test.ts index 4efa43708..8386f3154 100644 --- a/packages/core/database/src/__tests__/underscored-options.test.ts +++ b/packages/core/database/src/__tests__/underscored-options.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; describe('underscored options', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/view/list-view.test.ts b/packages/core/database/src/__tests__/view/list-view.test.ts index 3b218c0de..10ec65615 100644 --- a/packages/core/database/src/__tests__/view/list-view.test.ts +++ b/packages/core/database/src/__tests__/view/list-view.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; describe('list view', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/view/view-collection.test.ts b/packages/core/database/src/__tests__/view/view-collection.test.ts index a4ccaffa2..90ec68714 100644 --- a/packages/core/database/src/__tests__/view/view-collection.test.ts +++ b/packages/core/database/src/__tests__/view/view-collection.test.ts @@ -1,5 +1,5 @@ import { vi } from 'vitest'; -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; import { Database, mockDatabase } from '../../index'; import { ViewCollection } from '../../view-collection'; import pgOnly from '../inhertits/helper'; diff --git a/packages/core/database/src/__tests__/view/view-inference.test.ts b/packages/core/database/src/__tests__/view/view-inference.test.ts index 33b56de94..949511492 100644 --- a/packages/core/database/src/__tests__/view/view-inference.test.ts +++ b/packages/core/database/src/__tests__/view/view-inference.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; import { ViewFieldInference } from '../../view/view-inference'; describe('view inference', function () { diff --git a/packages/core/database/src/__tests__/view/view-repository.test.ts b/packages/core/database/src/__tests__/view/view-repository.test.ts index b74467202..b5511678e 100644 --- a/packages/core/database/src/__tests__/view/view-repository.test.ts +++ b/packages/core/database/src/__tests__/view/view-repository.test.ts @@ -1,5 +1,5 @@ -import { Database, mockDatabase } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; +import { Database, mockDatabase } from '@tachybase/database'; +import { uid } from '@tachybase/utils'; describe('view repository', () => { let db: Database; diff --git a/packages/core/database/src/__tests__/view/view-with-association.test.ts b/packages/core/database/src/__tests__/view/view-with-association.test.ts index fe0b010c9..9a6626d2b 100644 --- a/packages/core/database/src/__tests__/view/view-with-association.test.ts +++ b/packages/core/database/src/__tests__/view/view-with-association.test.ts @@ -1,6 +1,6 @@ -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; import { Database, mockDatabase, ViewFieldInference } from '../../index'; -import { pgOnly } from '@nocobase/test'; +import { pgOnly } from '@tachybase/test'; pgOnly()('view with association', () => { let db: Database; diff --git a/packages/core/database/src/collection-importer.ts b/packages/core/database/src/collection-importer.ts index 969312885..314d721df 100644 --- a/packages/core/database/src/collection-importer.ts +++ b/packages/core/database/src/collection-importer.ts @@ -1,4 +1,4 @@ -import { importModule } from '@nocobase/utils'; +import { importModule } from '@tachybase/utils'; import { existsSync } from 'fs'; import { readdir } from 'fs/promises'; import { cloneDeep, isPlainObject } from 'lodash'; diff --git a/packages/core/database/src/database.ts b/packages/core/database/src/database.ts index 53785daa7..0712a0763 100644 --- a/packages/core/database/src/database.ts +++ b/packages/core/database/src/database.ts @@ -1,5 +1,5 @@ -import { createConsoleLogger, createLogger, Logger, LoggerOptions } from '@nocobase/logger'; -import { applyMixins, AsyncEmitter } from '@nocobase/utils'; +import { createConsoleLogger, createLogger, Logger, LoggerOptions } from '@tachybase/logger'; +import { applyMixins, AsyncEmitter } from '@tachybase/utils'; import chalk from 'chalk'; import merge from 'deepmerge'; import { EventEmitter } from 'events'; @@ -311,7 +311,7 @@ export class Database extends EventEmitter implements AsyncEmitter { autoGenId: false, timestamps: false, dumpRules: 'required', - origin: '@nocobase/database', + origin: '@tachybase/database', fields: [{ type: 'string', name: 'name', primaryKey: true }], }); diff --git a/packages/core/database/src/fields/uid-field.ts b/packages/core/database/src/fields/uid-field.ts index cd80119d1..9a09af092 100644 --- a/packages/core/database/src/fields/uid-field.ts +++ b/packages/core/database/src/fields/uid-field.ts @@ -1,4 +1,4 @@ -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; import { DataTypes } from 'sequelize'; import { BaseColumnFieldOptions, Field } from './field'; diff --git a/packages/core/database/src/magic-attribute-model.ts b/packages/core/database/src/magic-attribute-model.ts index 0577e7adc..f6a49c656 100644 --- a/packages/core/database/src/magic-attribute-model.ts +++ b/packages/core/database/src/magic-attribute-model.ts @@ -1,4 +1,4 @@ -import { merge } from '@nocobase/utils'; +import { merge } from '@tachybase/utils'; import _ from 'lodash'; import { Utils } from 'sequelize'; import Database from './database'; diff --git a/packages/core/database/src/migration.ts b/packages/core/database/src/migration.ts index 5d789a645..01a752733 100644 --- a/packages/core/database/src/migration.ts +++ b/packages/core/database/src/migration.ts @@ -1,4 +1,4 @@ -import { importModule } from '@nocobase/utils'; +import { importModule } from '@tachybase/utils'; import _ from 'lodash'; import { QueryInterface, Sequelize } from 'sequelize'; import Database from './database'; diff --git a/packages/core/database/src/mock-database.ts b/packages/core/database/src/mock-database.ts index 52c7ade1f..5abf0e5b6 100644 --- a/packages/core/database/src/mock-database.ts +++ b/packages/core/database/src/mock-database.ts @@ -1,4 +1,4 @@ -import { merge } from '@nocobase/utils'; +import { merge } from '@tachybase/utils'; import { customAlphabet } from 'nanoid'; import fetch from 'node-fetch'; import path from 'path'; diff --git a/packages/core/database/src/operators/date.ts b/packages/core/database/src/operators/date.ts index 7d0db6219..892da665e 100644 --- a/packages/core/database/src/operators/date.ts +++ b/packages/core/database/src/operators/date.ts @@ -1,4 +1,4 @@ -import { parseDate } from '@nocobase/utils'; +import { parseDate } from '@tachybase/utils'; import { Op } from 'sequelize'; function isDate(input) { diff --git a/packages/core/database/src/sql-collection/query-generator.ts b/packages/core/database/src/sql-collection/query-generator.ts index c6639a7b8..a0abe0def 100644 --- a/packages/core/database/src/sql-collection/query-generator.ts +++ b/packages/core/database/src/sql-collection/query-generator.ts @@ -1,6 +1,6 @@ import { GroupOption, Order, ProjectionAlias, WhereOptions } from 'sequelize'; import { SQLModel } from './sql-model'; -import { lodash } from '@nocobase/utils'; +import { lodash } from '@tachybase/utils'; import { Collection } from '../collection'; export function selectQuery( diff --git a/packages/core/database/src/sync-runner.ts b/packages/core/database/src/sync-runner.ts index b681f8a96..f1fd02911 100644 --- a/packages/core/database/src/sync-runner.ts +++ b/packages/core/database/src/sync-runner.ts @@ -5,7 +5,7 @@ import { InheritedSyncRunner } from './inherited-sync-runner'; import { InheritedCollection } from './inherited-collection'; import { Model as SequelizeModel } from 'sequelize'; import { ZeroColumnTableError } from './errors/zero-column-table-error'; -import { isPlainObject } from '@nocobase/utils'; +import { isPlainObject } from '@tachybase/utils'; export class SyncRunner { private readonly collection: Collection; @@ -43,8 +43,9 @@ export class SyncRunner { } // @ts-ignore - const collectionSyncOptions = this.database.collectionFactory.collectionTypes.get(this.collection.constructor) - ?.onSync; + const collectionSyncOptions = this.database.collectionFactory.collectionTypes.get( + this.collection.constructor, + )?.onSync; if (collectionSyncOptions) { await collectionSyncOptions(this.model, options); diff --git a/packages/core/database/src/value-parsers/date-value-parser.ts b/packages/core/database/src/value-parsers/date-value-parser.ts index 085a912fc..faccaf416 100644 --- a/packages/core/database/src/value-parsers/date-value-parser.ts +++ b/packages/core/database/src/value-parsers/date-value-parser.ts @@ -1,4 +1,4 @@ -import { moment2str } from '@nocobase/utils'; +import { moment2str } from '@tachybase/utils'; import dayjs from 'dayjs'; import { getJsDateFromExcel } from 'excel-date-to-js'; import { BaseValueParser } from './base-value-parser'; diff --git a/packages/core/devtools/LICENSE b/packages/core/devtools/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/devtools/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index b69aa691f..9a8c31ed0 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/devtools", + "name": "@tachybase/devtools", "version": "0.21.24", "description": "", "repository": { @@ -10,9 +10,9 @@ "license": "Apache-2.0", "main": "./src/index.js", "dependencies": { - "@nocobase/build": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/test": "workspace:*", + "@tachybase/build": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/test": "workspace:*", "@types/koa": "^2.13.4", "@types/koa-bodyparser": "^4.3.4", "@types/lodash": "^4.17.0", diff --git a/packages/core/evaluators/package.json b/packages/core/evaluators/package.json index 59c59c19c..92efb4bd7 100644 --- a/packages/core/evaluators/package.json +++ b/packages/core/evaluators/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/evaluators", + "name": "@tachybase/evaluators", "version": "0.21.24", "description": "", "repository": { @@ -12,7 +12,7 @@ "types": "./lib/index.d.ts", "dependencies": { "@formulajs/formulajs": "4.2.0", - "@nocobase/utils": "workspace:*", + "@tachybase/utils": "workspace:*", "lodash": "4.17.21", "mathjs": "^10.6.0" }, diff --git a/packages/core/evaluators/src/client/index.tsx b/packages/core/evaluators/src/client/index.tsx index 882ae2440..e2e424c51 100644 --- a/packages/core/evaluators/src/client/index.tsx +++ b/packages/core/evaluators/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Registry } from '@nocobase/utils/client'; +import { Registry } from '@tachybase/utils/client'; import mathjs from './engines/mathjs'; import formulajs from './engines/formulajs'; diff --git a/packages/core/evaluators/src/server/index.ts b/packages/core/evaluators/src/server/index.ts index b89e089b0..e394b2190 100644 --- a/packages/core/evaluators/src/server/index.ts +++ b/packages/core/evaluators/src/server/index.ts @@ -1,4 +1,4 @@ -import { Registry } from '@nocobase/utils'; +import { Registry } from '@tachybase/utils'; import { Evaluator } from '../utils'; import mathjs from '../utils/mathjs'; diff --git a/packages/core/logger/LICENSE b/packages/core/logger/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/logger/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/logger/package.json b/packages/core/logger/package.json index ba69dccc3..78792f4e1 100644 --- a/packages/core/logger/package.json +++ b/packages/core/logger/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/logger", + "name": "@tachybase/logger", "version": "0.21.24", "description": "nocobase logging library", "repository": { diff --git a/packages/core/resourcer/LICENSE b/packages/core/resourcer/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/resourcer/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/resourcer/package.json b/packages/core/resourcer/package.json index 81e912bc4..366a703d3 100644 --- a/packages/core/resourcer/package.json +++ b/packages/core/resourcer/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/resourcer", + "name": "@tachybase/resourcer", "version": "0.21.24", "description": "", "repository": { @@ -11,7 +11,7 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/utils": "workspace:*", + "@tachybase/utils": "workspace:*", "deepmerge": "^4.2.2", "glob": "^7.1.6", "koa-compose": "^4.1.0", diff --git a/packages/core/resourcer/src/action.ts b/packages/core/resourcer/src/action.ts index 98594d1ce..0746e7261 100644 --- a/packages/core/resourcer/src/action.ts +++ b/packages/core/resourcer/src/action.ts @@ -1,4 +1,4 @@ -import { assign, MergeStrategies, requireModule } from '@nocobase/utils'; +import { assign, MergeStrategies, requireModule } from '@tachybase/utils'; import compose from 'koa-compose'; import _ from 'lodash'; import Middleware, { MiddlewareType } from './middleware'; diff --git a/packages/core/resourcer/src/middleware.ts b/packages/core/resourcer/src/middleware.ts index 146ea7a5b..491bca58a 100644 --- a/packages/core/resourcer/src/middleware.ts +++ b/packages/core/resourcer/src/middleware.ts @@ -1,5 +1,5 @@ import compose from 'koa-compose'; -import { requireModule } from '@nocobase/utils'; +import { requireModule } from '@tachybase/utils'; import { ActionName } from './action'; import { HandlerType } from './resourcer'; diff --git a/packages/core/resourcer/src/resourcer.ts b/packages/core/resourcer/src/resourcer.ts index 25eb37c04..7d71b6c13 100644 --- a/packages/core/resourcer/src/resourcer.ts +++ b/packages/core/resourcer/src/resourcer.ts @@ -1,4 +1,4 @@ -import { importModule, Toposort, ToposortOptions } from '@nocobase/utils'; +import { importModule, Toposort, ToposortOptions } from '@tachybase/utils'; import glob from 'glob'; import compose from 'koa-compose'; import _ from 'lodash'; diff --git a/packages/core/sdk/LICENSE b/packages/core/sdk/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/sdk/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index d4ea6f2e7..5b49c608a 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/sdk", + "name": "@tachybase/sdk", "version": "0.21.24", "license": "Apache-2.0", "main": "lib/index.js", diff --git a/packages/core/server/package.json b/packages/core/server/package.json index d43153d7e..46b7323d0 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/server", + "name": "@tachybase/server", "version": "0.21.24", "license": "Apache-2.0", "main": "lib/index.js", @@ -9,19 +9,19 @@ "@koa/cors": "^3.1.0", "@koa/multer": "^3.0.2", "@koa/router": "^9.4.0", - "@nocobase/acl": "workspace:*", - "@nocobase/actions": "workspace:*", - "@nocobase/auth": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/data-source-manager": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/evaluators": "workspace:*", - "@nocobase/logger": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/sdk": "workspace:*", - "@nocobase/telemetry": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/acl": "workspace:*", + "@tachybase/actions": "workspace:*", + "@tachybase/auth": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/data-source-manager": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/evaluators": "workspace:*", + "@tachybase/logger": "workspace:*", + "@tachybase/resourcer": "workspace:*", "@tachybase/schema": "workspace:*", + "@tachybase/sdk": "workspace:*", + "@tachybase/telemetry": "workspace:*", + "@tachybase/utils": "workspace:*", "@types/decompress": "4.2.4", "@types/ini": "^1.3.31", "@types/koa-send": "^4.1.3", diff --git a/packages/core/server/src/__tests__/app-command.test.ts b/packages/core/server/src/__tests__/app-command.test.ts index 8da63bcf8..53577b6eb 100644 --- a/packages/core/server/src/__tests__/app-command.test.ts +++ b/packages/core/server/src/__tests__/app-command.test.ts @@ -1,4 +1,4 @@ -import { mockDatabase } from '@nocobase/database'; +import { mockDatabase } from '@tachybase/database'; import { vi } from 'vitest'; import Application, { ApplicationOptions } from '../application'; diff --git a/packages/core/server/src/__tests__/app.test.ts b/packages/core/server/src/__tests__/app.test.ts index ac1dd6495..fa6c1903e 100644 --- a/packages/core/server/src/__tests__/app.test.ts +++ b/packages/core/server/src/__tests__/app.test.ts @@ -1,5 +1,5 @@ -import { DataTypes } from '@nocobase/database'; -import { MockServer, mockServer } from '@nocobase/test'; +import { DataTypes } from '@tachybase/database'; +import { MockServer, mockServer } from '@tachybase/test'; import { vi } from 'vitest'; import Plugin from '../plugin'; describe('app destroy', () => { diff --git a/packages/core/server/src/__tests__/command.test.ts b/packages/core/server/src/__tests__/command.test.ts index 613f67a8b..27c680a45 100644 --- a/packages/core/server/src/__tests__/command.test.ts +++ b/packages/core/server/src/__tests__/command.test.ts @@ -1,4 +1,4 @@ -import { mockDatabase } from '@nocobase/database'; +import { mockDatabase } from '@tachybase/database'; import Application, { ApplicationOptions } from '../application'; const mockServer = (options?: ApplicationOptions) => { diff --git a/packages/core/server/src/__tests__/cron.test.ts b/packages/core/server/src/__tests__/cron.test.ts index 68ad6e624..f8030ce6f 100644 --- a/packages/core/server/src/__tests__/cron.test.ts +++ b/packages/core/server/src/__tests__/cron.test.ts @@ -1,5 +1,5 @@ import { vi } from 'vitest'; -import { mockServer, MockServer, waitSecond } from '@nocobase/test'; +import { mockServer, MockServer, waitSecond } from '@tachybase/test'; import { CronJobManager } from '../cron/cron-job-manager'; describe('cron service', () => { diff --git a/packages/core/server/src/__tests__/gateway.test.ts b/packages/core/server/src/__tests__/gateway.test.ts index 5aabc0288..21b0d7ec3 100644 --- a/packages/core/server/src/__tests__/gateway.test.ts +++ b/packages/core/server/src/__tests__/gateway.test.ts @@ -1,4 +1,4 @@ -import { startServerWithRandomPort, supertest, waitSecond } from '@nocobase/test'; +import { startServerWithRandomPort, supertest, waitSecond } from '@tachybase/test'; import { vi } from 'vitest'; import ws from 'ws'; import { AppSupervisor } from '../app-supervisor'; diff --git a/packages/core/server/src/__tests__/main-data-source.test.ts b/packages/core/server/src/__tests__/main-data-source.test.ts index 84ccf72b0..f4662cc41 100644 --- a/packages/core/server/src/__tests__/main-data-source.test.ts +++ b/packages/core/server/src/__tests__/main-data-source.test.ts @@ -1,4 +1,4 @@ -import { Application } from '@nocobase/server'; +import { Application } from '@tachybase/server'; describe('MainDataSource', () => { let app: Application; diff --git a/packages/core/server/src/__tests__/multiple-application.test.ts b/packages/core/server/src/__tests__/multiple-application.test.ts index c2e683bb2..077f57a74 100644 --- a/packages/core/server/src/__tests__/multiple-application.test.ts +++ b/packages/core/server/src/__tests__/multiple-application.test.ts @@ -1,6 +1,6 @@ -import { AppSupervisor } from '@nocobase/server'; -import { mockServer, MockServer } from '@nocobase/test'; -import { uid } from '@nocobase/utils'; +import { AppSupervisor } from '@tachybase/server'; +import { mockServer, MockServer } from '@tachybase/test'; +import { uid } from '@tachybase/utils'; import Application from '../application'; describe('multiple application', () => { diff --git a/packages/core/server/src/__tests__/plugin.test.ts b/packages/core/server/src/__tests__/plugin.test.ts index 781c3f3a3..d199c33b5 100644 --- a/packages/core/server/src/__tests__/plugin.test.ts +++ b/packages/core/server/src/__tests__/plugin.test.ts @@ -1,5 +1,5 @@ import { vi } from 'vitest'; -import { mockServer, MockServer } from '@nocobase/test'; +import { mockServer, MockServer } from '@tachybase/test'; import { Plugin } from '../plugin'; import Plugin1 from './plugins/plugin1'; import Plugin2 from './plugins/plugin2'; diff --git a/packages/core/server/src/__tests__/pm.test.ts b/packages/core/server/src/__tests__/pm.test.ts index 6f9ca9fd5..0e5ae0f8e 100644 --- a/packages/core/server/src/__tests__/pm.test.ts +++ b/packages/core/server/src/__tests__/pm.test.ts @@ -1,7 +1,7 @@ import Plugin from '../plugin'; import { PluginManager } from '../plugin-manager'; import { vi } from 'vitest'; -import { MockServer, mockServer } from '@nocobase/test'; +import { MockServer, mockServer } from '@tachybase/test'; describe('pm', () => { let app: MockServer; diff --git a/packages/core/server/src/acl/available-action.ts b/packages/core/server/src/acl/available-action.ts index e0ad40c19..2b7dec358 100644 --- a/packages/core/server/src/acl/available-action.ts +++ b/packages/core/server/src/acl/available-action.ts @@ -1,4 +1,4 @@ -import { AvailableActionOptions } from '@nocobase/acl'; +import { AvailableActionOptions } from '@tachybase/acl'; const availableActions: { [key: string]: AvailableActionOptions; diff --git a/packages/core/server/src/acl/index.ts b/packages/core/server/src/acl/index.ts index a97cc2805..6babd177b 100644 --- a/packages/core/server/src/acl/index.ts +++ b/packages/core/server/src/acl/index.ts @@ -1,4 +1,4 @@ -import { ACL } from '@nocobase/acl'; +import { ACL } from '@tachybase/acl'; import { availableActions } from './available-action'; const configureResources = [ diff --git a/packages/core/server/src/app-supervisor.ts b/packages/core/server/src/app-supervisor.ts index aefab0684..2187b2473 100644 --- a/packages/core/server/src/app-supervisor.ts +++ b/packages/core/server/src/app-supervisor.ts @@ -1,4 +1,4 @@ -import { applyMixins, AsyncEmitter } from '@nocobase/utils'; +import { applyMixins, AsyncEmitter } from '@tachybase/utils'; import { Mutex } from 'async-mutex'; import { EventEmitter } from 'events'; import Application, { ApplicationOptions, MaintainingCommandStatus } from './application'; diff --git a/packages/core/server/src/application.ts b/packages/core/server/src/application.ts index 76322ff2c..317354010 100644 --- a/packages/core/server/src/application.ts +++ b/packages/core/server/src/application.ts @@ -1,7 +1,7 @@ -import { registerActions } from '@nocobase/actions'; -import { actions as authActions, AuthManager, AuthManagerOptions } from '@nocobase/auth'; -import { Cache, CacheManager, CacheManagerOptions } from '@nocobase/cache'; -import Database, { CollectionOptions, IDatabaseOptions } from '@nocobase/database'; +import { registerActions } from '@tachybase/actions'; +import { actions as authActions, AuthManager, AuthManagerOptions } from '@tachybase/auth'; +import { Cache, CacheManager, CacheManagerOptions } from '@tachybase/cache'; +import Database, { CollectionOptions, IDatabaseOptions } from '@tachybase/database'; import winston from 'winston'; import { createLogger, @@ -11,10 +11,10 @@ import { RequestLoggerOptions, SystemLogger, SystemLoggerOptions, -} from '@nocobase/logger'; -import { ResourceOptions, Resourcer } from '@nocobase/resourcer'; -import { Telemetry, TelemetryOptions } from '@nocobase/telemetry'; -import { applyMixins, AsyncEmitter, importModule, Toposort, ToposortOptions } from '@nocobase/utils'; +} from '@tachybase/logger'; +import { ResourceOptions, Resourcer } from '@tachybase/resourcer'; +import { Telemetry, TelemetryOptions } from '@tachybase/telemetry'; +import { applyMixins, AsyncEmitter, importModule, Toposort, ToposortOptions } from '@tachybase/utils'; import { Command, CommandOptions, ParseOptions } from 'commander'; import { randomUUID } from 'crypto'; import glob from 'glob'; @@ -48,7 +48,7 @@ import { InstallOptions, PluginManager } from './plugin-manager'; import { nanoid } from 'nanoid'; import _ from 'lodash'; -import { DataSourceManager, SequelizeDataSource } from '@nocobase/data-source-manager'; +import { DataSourceManager, SequelizeDataSource } from '@tachybase/data-source-manager'; import packageJson from '../package.json'; import { MainDataSource } from './main-data-source'; @@ -657,7 +657,7 @@ export class Application exten async loadCoreMigrations() { const migrations = await this.loadMigrations({ directory: resolve(__dirname, 'migrations'), - namespace: '@nocobase/server', + namespace: '@tachybase/server', }); return { beforeLoad: { diff --git a/packages/core/server/src/cache/index.ts b/packages/core/server/src/cache/index.ts index ddd032951..0ccc12dbd 100644 --- a/packages/core/server/src/cache/index.ts +++ b/packages/core/server/src/cache/index.ts @@ -1,4 +1,4 @@ -import { CacheManagerOptions, CacheManager } from '@nocobase/cache'; +import { CacheManagerOptions, CacheManager } from '@tachybase/cache'; import Application from '../application'; export const createCacheManager = async (app: Application, options: CacheManagerOptions) => { diff --git a/packages/core/server/src/commands/create-migration.ts b/packages/core/server/src/commands/create-migration.ts index c032857c4..214e7cf14 100644 --- a/packages/core/server/src/commands/create-migration.ts +++ b/packages/core/server/src/commands/create-migration.ts @@ -14,7 +14,7 @@ export default (app: Application) => { const dir = await fs.promises.realpath(resolve(process.env.NODE_MODULES_PATH, pkg)); const filename = resolve( dir, - pkg === '@nocobase/server' ? 'src' : 'src/server', + pkg === '@tachybase/server' ? 'src' : 'src/server', 'migrations', `${dayjs().format('YYYYMMDDHHmmss')}-${name}.ts`, ); @@ -22,7 +22,7 @@ export default (app: Application) => { const keys: any[] = version.split('.'); keys.push(1 * keys.pop() + 1); const nextVersion = keys.join('.'); - const from = pkg === '@nocobase/server' ? `../migration` : '@nocobase/server'; + const from = pkg === '@tachybase/server' ? `../migration` : '@tachybase/server'; const data = `import { Migration } from '${from}'; export default class extends Migration { diff --git a/packages/core/server/src/commands/start.ts b/packages/core/server/src/commands/start.ts index d3bd7caa2..137d732ce 100644 --- a/packages/core/server/src/commands/start.ts +++ b/packages/core/server/src/commands/start.ts @@ -1,4 +1,4 @@ -import { fsExists } from '@nocobase/utils'; +import { fsExists } from '@tachybase/utils'; import fs from 'fs'; import { resolve } from 'path'; import Application from '../application'; diff --git a/packages/core/server/src/gateway/index.ts b/packages/core/server/src/gateway/index.ts index ad76b81ec..714920d17 100644 --- a/packages/core/server/src/gateway/index.ts +++ b/packages/core/server/src/gateway/index.ts @@ -1,6 +1,6 @@ -import { SystemLogger, createSystemLogger, getLoggerFilePath } from '@nocobase/logger'; -import { Registry, Toposort, ToposortOptions, uid } from '@nocobase/utils'; -import { createStoragePluginsSymlink } from '@nocobase/utils/plugin-symlink'; +import { SystemLogger, createSystemLogger, getLoggerFilePath } from '@tachybase/logger'; +import { Registry, Toposort, ToposortOptions, uid } from '@tachybase/utils'; +import { createStoragePluginsSymlink } from '@tachybase/utils/plugin-symlink'; import { Command } from 'commander'; import compression from 'compression'; import { randomUUID } from 'crypto'; diff --git a/packages/core/server/src/gateway/ipc-socket-client.ts b/packages/core/server/src/gateway/ipc-socket-client.ts index df3cebe7d..26fb3c72f 100644 --- a/packages/core/server/src/gateway/ipc-socket-client.ts +++ b/packages/core/server/src/gateway/ipc-socket-client.ts @@ -1,4 +1,4 @@ -import { Logger, createConsoleLogger } from '@nocobase/logger'; +import { Logger, createConsoleLogger } from '@tachybase/logger'; import * as events from 'events'; import net from 'net'; import xpipe from 'xpipe'; diff --git a/packages/core/server/src/gateway/ws-server.ts b/packages/core/server/src/gateway/ws-server.ts index 68ef32617..68c4f5c5d 100644 --- a/packages/core/server/src/gateway/ws-server.ts +++ b/packages/core/server/src/gateway/ws-server.ts @@ -5,7 +5,7 @@ import { IncomingMessage } from 'http'; import { AppSupervisor } from '../app-supervisor'; import { applyErrorWithArgs, getErrorWithCode } from './errors'; import lodash from 'lodash'; -import { Logger } from '@nocobase/logger'; +import { Logger } from '@tachybase/logger'; declare class WebSocketWithId extends WebSocket { id: string; diff --git a/packages/core/server/src/helper.ts b/packages/core/server/src/helper.ts index cbc3f3993..299ab01c9 100644 --- a/packages/core/server/src/helper.ts +++ b/packages/core/server/src/helper.ts @@ -1,7 +1,7 @@ import cors from '@koa/cors'; -import { requestLogger } from '@nocobase/logger'; -import { Resourcer } from '@nocobase/resourcer'; -import { uid } from '@nocobase/utils'; +import { requestLogger } from '@tachybase/logger'; +import { Resourcer } from '@tachybase/resourcer'; +import { uid } from '@tachybase/utils'; import { Command } from 'commander'; import { randomUUID } from 'crypto'; import fs from 'fs'; diff --git a/packages/core/server/src/helpers/application-version.ts b/packages/core/server/src/helpers/application-version.ts index 2d2abf72c..8b1973f6c 100644 --- a/packages/core/server/src/helpers/application-version.ts +++ b/packages/core/server/src/helpers/application-version.ts @@ -1,4 +1,4 @@ -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; import semver from 'semver'; import Application from '../application'; @@ -9,7 +9,7 @@ export class ApplicationVersion { constructor(app: Application) { this.app = app; app.db.collection({ - origin: '@nocobase/server', + origin: '@tachybase/server', name: 'applicationVersion', dataType: 'meta', timestamps: false, diff --git a/packages/core/server/src/locale/locale.ts b/packages/core/server/src/locale/locale.ts index 0cf80f285..5ee846610 100644 --- a/packages/core/server/src/locale/locale.ts +++ b/packages/core/server/src/locale/locale.ts @@ -1,5 +1,5 @@ -import { Cache } from '@nocobase/cache'; -import { lodash } from '@nocobase/utils'; +import { Cache } from '@tachybase/cache'; +import { lodash } from '@tachybase/utils'; import Application from '../application'; import { getResource } from './resource'; diff --git a/packages/core/server/src/locale/resource.ts b/packages/core/server/src/locale/resource.ts index 43351be0a..d8a1e3310 100644 --- a/packages/core/server/src/locale/resource.ts +++ b/packages/core/server/src/locale/resource.ts @@ -1,4 +1,4 @@ -import { requireModule } from '@nocobase/utils'; +import { requireModule } from '@tachybase/utils'; const arr2obj = (items: any[]) => { const obj = {}; @@ -13,9 +13,9 @@ export const getResource = (packageName: string, lang: string, isPlugin = true) const prefixes = [isPlugin ? 'dist' : 'lib']; if (process.env.APP_ENV !== 'production') { try { - require.resolve('@nocobase/client/src'); + require.resolve('@tachybase/client/src'); if (packageName === '@nocobase/plugin-client') { - packageName = '@nocobase/client'; + packageName = '@tachybase/client'; } } catch (error) { // empty diff --git a/packages/core/server/src/main-data-source.ts b/packages/core/server/src/main-data-source.ts index 266b990aa..d9b57ad2c 100644 --- a/packages/core/server/src/main-data-source.ts +++ b/packages/core/server/src/main-data-source.ts @@ -1,4 +1,4 @@ -import { DataSourceOptions, SequelizeDataSource } from '@nocobase/data-source-manager'; +import { DataSourceOptions, SequelizeDataSource } from '@tachybase/data-source-manager'; export class MainDataSource extends SequelizeDataSource { init(options: DataSourceOptions = {}) { diff --git a/packages/core/server/src/middlewares/data-template.ts b/packages/core/server/src/middlewares/data-template.ts index a2a625f4c..80198d69b 100644 --- a/packages/core/server/src/middlewares/data-template.ts +++ b/packages/core/server/src/middlewares/data-template.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { Collection } from '@nocobase/database'; +import { Context } from '@tachybase/actions'; +import { Collection } from '@tachybase/database'; export const dateTemplate = async (ctx: Context, next) => { const { resourceName, actionName } = ctx.action; diff --git a/packages/core/server/src/middlewares/data-wrapping.ts b/packages/core/server/src/middlewares/data-wrapping.ts index 3ce1f95cf..4f0323a8e 100644 --- a/packages/core/server/src/middlewares/data-wrapping.ts +++ b/packages/core/server/src/middlewares/data-wrapping.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; import stream from 'stream'; export function dataWrapping() { diff --git a/packages/core/server/src/middlewares/db2resource.ts b/packages/core/server/src/middlewares/db2resource.ts index 2946b0249..a6debc270 100644 --- a/packages/core/server/src/middlewares/db2resource.ts +++ b/packages/core/server/src/middlewares/db2resource.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { getNameByParams, parseRequest, ResourcerContext, ResourceType } from '@nocobase/resourcer'; +import Database from '@tachybase/database'; +import { getNameByParams, parseRequest, ResourcerContext, ResourceType } from '@tachybase/resourcer'; export async function db2resource(ctx: ResourcerContext & { db: Database }, next: () => Promise) { const dataSource = ctx.get('x-data-source'); diff --git a/packages/core/server/src/middlewares/parse-variables.ts b/packages/core/server/src/middlewares/parse-variables.ts index b1dc14b0e..5430dec31 100644 --- a/packages/core/server/src/middlewares/parse-variables.ts +++ b/packages/core/server/src/middlewares/parse-variables.ts @@ -1,4 +1,4 @@ -import { getDateVars, parseFilter } from '@nocobase/utils'; +import { getDateVars, parseFilter } from '@tachybase/utils'; function getUser(ctx) { return async ({ fields }) => { diff --git a/packages/core/server/src/migration.ts b/packages/core/server/src/migration.ts index f476b1e85..8c780fe3d 100644 --- a/packages/core/server/src/migration.ts +++ b/packages/core/server/src/migration.ts @@ -1,4 +1,4 @@ -import { Migration as DbMigration } from '@nocobase/database'; +import { Migration as DbMigration } from '@tachybase/database'; import Application from './application'; import Plugin from './plugin'; import { PluginManager } from './plugin-manager'; diff --git a/packages/core/server/src/migrations/20230912193824-package-name-unique.ts b/packages/core/server/src/migrations/20230912193824-package-name-unique.ts index cb3c72f7c..9d05dffb0 100644 --- a/packages/core/server/src/migrations/20230912193824-package-name-unique.ts +++ b/packages/core/server/src/migrations/20230912193824-package-name-unique.ts @@ -1,4 +1,4 @@ -import { DataTypes } from '@nocobase/database'; +import { DataTypes } from '@tachybase/database'; import { Migration } from '../migration'; export default class extends Migration { diff --git a/packages/core/server/src/plugin-manager/constants.ts b/packages/core/server/src/plugin-manager/constants.ts index 428bb36e8..51a7764a7 100644 --- a/packages/core/server/src/plugin-manager/constants.ts +++ b/packages/core/server/src/plugin-manager/constants.ts @@ -8,36 +8,36 @@ export const requireRegex = /require\s*\(['"`](.*?)['"`]\)/g; export const importRegex = /^import(?:['"\s]*([\w*${}\s,]+)from\s*)?['"\s]['"\s](.*[@\w_-]+)['"\s].*/gm; export const EXTERNAL = [ // nocobase - '@nocobase/acl', - '@nocobase/actions', - '@nocobase/auth', - '@nocobase/cache', - '@nocobase/client', - '@nocobase/database', - '@nocobase/evaluators', - '@nocobase/logger', - '@nocobase/resourcer', - '@nocobase/sdk', - '@nocobase/server', - '@nocobase/test', - '@nocobase/utils', + '@tachybase/acl', + '@tachybase/actions', + '@tachybase/auth', + '@tachybase/cache', + '@tachybase/client', + '@tachybase/database', + '@tachybase/evaluators', + '@tachybase/logger', + '@tachybase/resourcer', + '@tachybase/sdk', + '@tachybase/server', + '@tachybase/test', + '@tachybase/utils', - // @nocobase/auth + // @tachybase/auth 'jsonwebtoken', - // @nocobase/cache + // @tachybase/cache 'cache-manager', - // @nocobase/database + // @tachybase/database 'sequelize', 'umzug', 'async-mutex', - // @nocobase/evaluators + // @tachybase/evaluators '@formulajs/formulajs', 'mathjs', - // @nocobase/logger + // @tachybase/logger 'winston', 'winston-daily-rotate-file', diff --git a/packages/core/server/src/plugin-manager/middleware.ts b/packages/core/server/src/plugin-manager/middleware.ts index 547d837da..fac102d29 100644 --- a/packages/core/server/src/plugin-manager/middleware.ts +++ b/packages/core/server/src/plugin-manager/middleware.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { koaMulter as multer } from '@nocobase/utils'; +import { Context, Next } from '@tachybase/actions'; +import { koaMulter as multer } from '@tachybase/utils'; export async function uploadMiddleware(ctx: Context, next: Next) { if (ctx.action.resourceName === 'pm' && ['add', 'update'].includes(ctx.action.actionName)) { diff --git a/packages/core/server/src/plugin-manager/options/collection.ts b/packages/core/server/src/plugin-manager/options/collection.ts index 61387145b..78149e031 100644 --- a/packages/core/server/src/plugin-manager/options/collection.ts +++ b/packages/core/server/src/plugin-manager/options/collection.ts @@ -1,10 +1,10 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'applicationPlugins', dumpRules: 'required', repository: 'PluginManagerRepository', - origin: '@nocobase/server', + origin: '@tachybase/server', fields: [ { type: 'string', name: 'name', unique: true }, { type: 'string', name: 'packageName', unique: true }, diff --git a/packages/core/server/src/plugin-manager/options/resource.ts b/packages/core/server/src/plugin-manager/options/resource.ts index 8bd130868..b46100e12 100644 --- a/packages/core/server/src/plugin-manager/options/resource.ts +++ b/packages/core/server/src/plugin-manager/options/resource.ts @@ -1,4 +1,4 @@ -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; import fs from 'fs'; import path from 'path'; import Application from '../../application'; diff --git a/packages/core/server/src/plugin-manager/plugin-manager-repository.ts b/packages/core/server/src/plugin-manager/plugin-manager-repository.ts index 8cb74b198..e0cea71e5 100644 --- a/packages/core/server/src/plugin-manager/plugin-manager-repository.ts +++ b/packages/core/server/src/plugin-manager/plugin-manager-repository.ts @@ -1,4 +1,4 @@ -import { Repository } from '@nocobase/database'; +import { Repository } from '@tachybase/database'; import lodash from 'lodash'; import { PluginManager } from './plugin-manager'; diff --git a/packages/core/server/src/plugin-manager/plugin-manager.ts b/packages/core/server/src/plugin-manager/plugin-manager.ts index 02f937b7c..2cdc898bb 100644 --- a/packages/core/server/src/plugin-manager/plugin-manager.ts +++ b/packages/core/server/src/plugin-manager/plugin-manager.ts @@ -1,6 +1,6 @@ -import { CleanOptions, Collection, SyncOptions } from '@nocobase/database'; -import { importModule, isURL } from '@nocobase/utils'; -import { fsExists } from '@nocobase/utils/plugin-symlink'; +import { CleanOptions, Collection, SyncOptions } from '@tachybase/database'; +import { importModule, isURL } from '@tachybase/utils'; +import { fsExists } from '@tachybase/utils/plugin-symlink'; import execa from 'execa'; import fg from 'fast-glob'; import fs from 'fs'; diff --git a/packages/core/server/src/plugin-manager/utils.ts b/packages/core/server/src/plugin-manager/utils.ts index f3ab4d0a6..d0511ef49 100644 --- a/packages/core/server/src/plugin-manager/utils.ts +++ b/packages/core/server/src/plugin-manager/utils.ts @@ -1,5 +1,5 @@ -import { importModule, isURL } from '@nocobase/utils'; -import { createStoragePluginSymLink } from '@nocobase/utils/plugin-symlink'; +import { importModule, isURL } from '@tachybase/utils'; +import { createStoragePluginSymLink } from '@tachybase/utils/plugin-symlink'; import axios, { AxiosRequestConfig } from 'axios'; import decompress from 'decompress'; import fg from 'fast-glob'; @@ -521,8 +521,8 @@ export async function getCompatible(packageName: string) { const globalPackageName = deps[packageName] ? packageName : deps[packageName.split('/')[0]] // @nocobase and @formily - ? packageName.split('/')[0] - : undefined; + ? packageName.split('/')[0] + : undefined; if (globalPackageName) { const versionRange = deps[globalPackageName]; diff --git a/packages/core/server/src/plugin.ts b/packages/core/server/src/plugin.ts index 5f99eb840..ec71d80c4 100644 --- a/packages/core/server/src/plugin.ts +++ b/packages/core/server/src/plugin.ts @@ -1,6 +1,6 @@ -import { Model } from '@nocobase/database'; -import { LoggerOptions } from '@nocobase/logger'; -import { fsExists, importModule } from '@nocobase/utils'; +import { Model } from '@tachybase/database'; +import { LoggerOptions } from '@tachybase/logger'; +import { fsExists, importModule } from '@tachybase/utils'; import fs from 'fs'; import glob from 'glob'; import type { TFuncKey, TOptions } from 'i18next'; diff --git a/packages/core/telemetry/LICENSE b/packages/core/telemetry/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/packages/core/telemetry/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/core/telemetry/package.json b/packages/core/telemetry/package.json index 3281c1b7b..8a2b67779 100644 --- a/packages/core/telemetry/package.json +++ b/packages/core/telemetry/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/telemetry", + "name": "@tachybase/telemetry", "version": "0.21.24", "description": "nocobase telemetry library", "repository": { @@ -11,14 +11,14 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/utils": "workspace:*", "@opentelemetry/api": "^1.7.0", "@opentelemetry/instrumentation": "^0.46.0", "@opentelemetry/resources": "^1.19.0", "@opentelemetry/sdk-metrics": "^1.19.0", "@opentelemetry/sdk-trace-base": "^1.19.0", "@opentelemetry/sdk-trace-node": "^1.19.0", - "@opentelemetry/semantic-conventions": "^1.19.0" + "@opentelemetry/semantic-conventions": "^1.19.0", + "@tachybase/utils": "workspace:*" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/core/telemetry/src/metric.ts b/packages/core/telemetry/src/metric.ts index e29cce23e..c951ab6c1 100644 --- a/packages/core/telemetry/src/metric.ts +++ b/packages/core/telemetry/src/metric.ts @@ -1,4 +1,4 @@ -import { Registry } from '@nocobase/utils'; +import { Registry } from '@tachybase/utils'; import { MetricReader, PeriodicExportingMetricReader, diff --git a/packages/core/telemetry/src/trace.ts b/packages/core/telemetry/src/trace.ts index 9e38e96e6..f372594d6 100644 --- a/packages/core/telemetry/src/trace.ts +++ b/packages/core/telemetry/src/trace.ts @@ -1,4 +1,4 @@ -import { Registry } from '@nocobase/utils'; +import { Registry } from '@tachybase/utils'; import { BatchSpanProcessor, ConsoleSpanExporter, SpanProcessor } from '@opentelemetry/sdk-trace-base'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { Resource } from '@opentelemetry/resources'; diff --git a/packages/core/test/package.json b/packages/core/test/package.json index 2f1269d88..f905f9106 100644 --- a/packages/core/test/package.json +++ b/packages/core/test/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/test", + "name": "@tachybase/test", "version": "0.21.24", "license": "Apache-2.0", "exports": { @@ -42,9 +42,9 @@ "dependencies": { "@faker-js/faker": "8.1.0", "@formily/shared": "2.2.27", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", "@playwright/test": "^1.42.1", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", "@testing-library/dom": "^9.3.3", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.0.0", diff --git a/packages/core/test/src/server/index.ts b/packages/core/test/src/server/index.ts index e0caf8822..6f818a843 100644 --- a/packages/core/test/src/server/index.ts +++ b/packages/core/test/src/server/index.ts @@ -1,7 +1,7 @@ import { describe } from 'vitest'; import ws from 'ws'; -export { mockDatabase } from '@nocobase/database'; +export { mockDatabase } from '@tachybase/database'; export { default as supertest } from 'supertest'; export * from './mockServer'; diff --git a/packages/core/test/src/server/mockServer.ts b/packages/core/test/src/server/mockServer.ts index b126d44ce..15ac52139 100644 --- a/packages/core/test/src/server/mockServer.ts +++ b/packages/core/test/src/server/mockServer.ts @@ -1,5 +1,5 @@ -import { mockDatabase } from '@nocobase/database'; -import { Application, ApplicationOptions, AppSupervisor, Gateway, PluginManager } from '@nocobase/server'; +import { mockDatabase } from '@tachybase/database'; +import { Application, ApplicationOptions, AppSupervisor, Gateway, PluginManager } from '@tachybase/server'; import jwt from 'jsonwebtoken'; import qs from 'qs'; import supertest, { SuperAgentTest } from 'supertest'; diff --git a/packages/core/test/vitest.mjs b/packages/core/test/vitest.mjs index 475969ebf..48abbf25a 100644 --- a/packages/core/test/vitest.mjs +++ b/packages/core/test/vitest.mjs @@ -25,8 +25,8 @@ function tsConfigPathsToAlias() { }, []); alias.unshift( { - find: '@nocobase/utils/plugin-symlink', - replacement: 'node_modules/@nocobase/utils/plugin-symlink.js', + find: '@tachybase/utils/plugin-symlink', + replacement: 'node_modules/@tachybase/utils/plugin-symlink.js', }, { find: '@opentelemetry/resources', diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index 324b65fb7..a77cb5969 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -1,5 +1,5 @@ { - "name": "@nocobase/utils", + "name": "@tachybase/utils", "version": "0.21.24", "license": "Apache-2.0", "main": "lib/index.js", diff --git a/packages/core/utils/plugin-symlink.js b/packages/core/utils/plugin-symlink.js index 94ea24c87..3e6e82bef 100644 --- a/packages/core/utils/plugin-symlink.js +++ b/packages/core/utils/plugin-symlink.js @@ -32,7 +32,7 @@ exports.fsExists = fsExists; async function createStoragePluginSymLink(pluginName) { const storagePluginsPath = resolve(process.cwd(), 'storage/plugins'); - const nodeModulesPath = process.env.NODE_MODULES_PATH; // resolve(dirname(require.resolve('@nocobase/server/package.json')), 'node_modules'); + const nodeModulesPath = process.env.NODE_MODULES_PATH; // resolve(dirname(require.resolve('@tachybase/server/package.json')), 'node_modules'); // const nodeModulesPath = resolve(process.cwd(), 'node_modules'); try { if (pluginName.startsWith('@')) { @@ -66,7 +66,7 @@ exports.createStoragePluginsSymlink = createStoragePluginsSymlink; async function createDevPluginSymLink(pluginName) { const packagePluginsPath = resolve(process.cwd(), 'packages/plugins'); - const nodeModulesPath = process.env.NODE_MODULES_PATH; // resolve(dirname(require.resolve('@nocobase/server/package.json')), 'node_modules'); + const nodeModulesPath = process.env.NODE_MODULES_PATH; // resolve(dirname(require.resolve('@tachybase/server/package.json')), 'node_modules'); try { if (pluginName.startsWith('@')) { const [orgName] = pluginName.split('/'); diff --git a/packages/core/utils/src/__tests__/toFixedByStep.test.ts b/packages/core/utils/src/__tests__/toFixedByStep.test.ts index b2525758e..07ce6d510 100644 --- a/packages/core/utils/src/__tests__/toFixedByStep.test.ts +++ b/packages/core/utils/src/__tests__/toFixedByStep.test.ts @@ -1,4 +1,4 @@ -import { toFixedByStep } from '@nocobase/utils/client'; +import { toFixedByStep } from '@tachybase/utils/client'; describe('toFixedByStep', () => { it('less than precision', () => { diff --git a/packages/plugins/@hera/plugin-approval-mobile/package.json b/packages/plugins/@hera/plugin-approval-mobile/package.json index 21c15b82c..d7ab7a4e3 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/package.json +++ b/packages/plugins/@hera/plugin-approval-mobile/package.json @@ -14,10 +14,10 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供定制化的移动端页面审批的功能。", "displayName.zh-CN": "移动端:审批" diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalBlockInitializer.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalBlockInitializer.tsx index ce7064c59..299339d4d 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalBlockInitializer.tsx @@ -3,7 +3,7 @@ import { SchemaInitializerMenu, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { ISchema } from '@tachybase/schema'; import { Toast } from 'antd-mobile'; diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalSettings.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalSettings.tsx index 9cf734309..61cb69406 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalSettings.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/ApprovalSettings.tsx @@ -1,4 +1,4 @@ -import { SchemaSettings } from '@nocobase/client'; +import { SchemaSettings } from '@tachybase/client'; import _ from 'lodash'; export const ApprovalSettings = new SchemaSettings({ diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/InitiationsBlock.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/InitiationsBlock.tsx index 7d7086009..4aedd73f8 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/InitiationsBlock.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/InitiationsBlock.tsx @@ -1,4 +1,4 @@ -import { BlockItem, css } from '@nocobase/client'; +import { BlockItem, css } from '@tachybase/client'; import React from 'react'; import { AutoCenter, Card, SearchBar, Selector, Space } from 'antd-mobile'; import { TeamFill } from 'antd-mobile-icons'; diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/TodosBlock.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/TodosBlock.tsx index 01ced803e..573a16bfb 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/TodosBlock.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/TodosBlock.tsx @@ -1,4 +1,4 @@ -import { BlockItem, SchemaComponent, css } from '@nocobase/client'; +import { BlockItem, SchemaComponent, css } from '@tachybase/client'; import { Divider, SearchBar, Space, Tabs } from 'antd-mobile'; import React, { useState } from 'react'; import { TabApplicantType } from './component/TabApplicantType'; diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/index.ts b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/index.ts index 7c5d5294e..38d0e06cb 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/index.ts +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { ApprovalBlockInitializer } from './ApprovalBlockInitializer'; import { ApprovalSettings } from './ApprovalSettings'; import { TodosBlock } from './TodosBlock'; diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/locale.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/locale.tsx index 6941f42af..231dcd5fe 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/locale.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/locale.tsx @@ -1,6 +1,6 @@ -import { useApp, tval as nTval, i18n } from '@nocobase/client'; +import { useApp, tval as nTval, i18n } from '@tachybase/client'; -const NAMESPACE = '@hera/plugin-mobile'; +const NAMESPACE = '@hera/plugin-approval-mobile'; export const useTranslation = (): any => { const { i18n } = useApp(); diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/index.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/index.tsx index ed99034de..262f1b764 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/index.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginApproval from './approval'; export class PluginApprovalMobileClient extends Plugin { diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/server/plugin.ts b/packages/plugins/@hera/plugin-approval-mobile/src/server/plugin.ts index 9f354c3a6..36ee45fe7 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/server/plugin.ts +++ b/packages/plugins/@hera/plugin-approval-mobile/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; export class PluginApprovalMobileServer extends Plugin { async afterAdd() {} diff --git a/packages/plugins/@hera/plugin-approval/package.json b/packages/plugins/@hera/plugin-approval/package.json index 07ab1393d..19083ff0f 100644 --- a/packages/plugins/@hera/plugin-approval/package.json +++ b/packages/plugins/@hera/plugin-approval/package.json @@ -9,13 +9,13 @@ "main": "dist/server/index.js", "devDependencies": { "@ant-design/icons": "5.x", - "@nocobase/actions": "workspace:*", - "@nocobase/data-source-manager": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-ui-schema-storage": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/actions": "workspace:*", "@tachybase/components": "workspace:*", + "@tachybase/data-source-manager": "workspace:*", + "@tachybase/database": "workspace:*", "@tachybase/schema": "workspace:*", + "@tachybase/utils": "workspace:*", "@types/lodash": "4.17.0", "antd": "5.16.1", "lodash": "^4.17.21", @@ -24,10 +24,10 @@ "sequelize": "^6.26.0" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@tachybase/plugin-workflow": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/plugin-workflow": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "可配置通用的审批流程,在审批中心完成审批的完整操作。", "displayName.zh-CN": "工作流:审批中心" diff --git a/packages/plugins/@hera/plugin-approval/src/client/common/Pd.FormBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/common/Pd.FormBlock.tsx index 4d16f66e4..842e5fd6d 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/common/Pd.FormBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/common/Pd.FormBlock.tsx @@ -10,7 +10,7 @@ import { useAPIClient, useAssociationNames, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import { RecursionField, createForm, useField, useFieldSchema } from '@tachybase/schema'; import { Fragment, useContext, useMemo, useRef } from 'react'; import { useContextApprovalExecution } from '../usage/approval-block/common/Pd.ApprovalExecution'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/index.ts b/packages/plugins/@hera/plugin-approval/src/client/configuration/index.ts index 9adbaf6f0..d93f21820 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginKitApprovalInstruction from './instruction'; import PluginKitApprovalTrigger from './trigger'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/VC.ApprovalInstructionNode.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/VC.ApprovalInstructionNode.tsx index 53f6de645..e79c7173f 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/VC.ApprovalInstructionNode.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/VC.ApprovalInstructionNode.tsx @@ -1,4 +1,4 @@ -import { css, useCompile } from '@nocobase/client'; +import { css, useCompile } from '@tachybase/client'; import { Branch, NodeDefaultView, useFlowContext, useStyles } from '@tachybase/plugin-workflow/client'; import { Tag } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.AssigneesSelect.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.AssigneesSelect.tsx index d9a71a1e2..0251c0e2a 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.AssigneesSelect.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.AssigneesSelect.tsx @@ -1,4 +1,4 @@ -import { RemoteSelect, SchemaComponent, Variable, useCollectionFilterOptions, useToken } from '@nocobase/client'; +import { RemoteSelect, SchemaComponent, Variable, useCollectionFilterOptions, useToken } from '@tachybase/client'; import { FilterDynamicComponent, useWorkflowVariableOptions } from '@tachybase/plugin-workflow/client'; import { useField } from '@tachybase/schema'; import { default as React } from 'react'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.ContentTooltip.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.ContentTooltip.tsx index 4c0a5dc64..7b34f9fea 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.ContentTooltip.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.ContentTooltip.tsx @@ -1,5 +1,5 @@ import { QuestionCircleOutlined } from '@ant-design/icons'; -import { css, useCompile } from '@nocobase/client'; +import { css, useCompile } from '@tachybase/client'; import { Tooltip } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.NegotiationConfig.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.NegotiationConfig.tsx index d35fded63..099c34655 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.NegotiationConfig.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.NegotiationConfig.tsx @@ -1,7 +1,7 @@ // @ts-nocheck import React from 'react'; import { QuestionCircleOutlined } from '@ant-design/icons'; -import { InputNumber, css } from '@nocobase/client'; +import { InputNumber, css } from '@tachybase/client'; import { Radio, Tooltip } from 'antd'; import { useCallback } from 'react'; import { useTranslation } from '../../../locale'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.SchemaConfigButtonApprover.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.SchemaConfigButtonApprover.tsx index 71bc9135f..00b55041e 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.SchemaConfigButtonApprover.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approval-config/VC.SchemaConfigButtonApprover.tsx @@ -1,4 +1,4 @@ -import { useActionContext } from '@nocobase/client'; +import { useActionContext } from '@tachybase/client'; import React from 'react'; import { SchemaConfigButton } from '../../trigger/VC.ConfigButton'; import { ContextApproverConfig } from '../Pd.ContextApproverConfig'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverActionConfig.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverActionConfig.tsx index 49d6535c9..d4aafeaef 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverActionConfig.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverActionConfig.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializer } from '@nocobase/client'; +import { SchemaInitializer } from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; import { APPROVAL_ACTION_STATUS } from '../../../constants'; import { ApprovalActionConfigComponent } from './VC.ApprovalActionConfig'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverAddBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverAddBlock.tsx index c60b6310d..9434b3a3b 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverAddBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/Iz.ApproverAddBlock.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializer, gridRowColWrap, usePlugin } from '@nocobase/client'; +import { SchemaInitializer, gridRowColWrap, usePlugin } from '@tachybase/client'; import PluginWorkflow, { useAvailableUpstreams, useFlowContext, diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalActionConfig.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalActionConfig.tsx index 85c1bbd05..2b08a1d75 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalActionConfig.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalActionConfig.tsx @@ -1,4 +1,4 @@ -import { ActionInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { ActionInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; export const ApprovalActionConfigComponent = () => { diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalFormBlockProvider.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalFormBlockProvider.tsx index 6e6b63d44..8963b9297 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalFormBlockProvider.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApprovalFormBlockProvider.tsx @@ -8,7 +8,7 @@ import { useAPIClient, useAssociationNames, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import { RecursionField, createForm, useField, useFieldSchema } from '@tachybase/schema'; import React, { Fragment, useContext, useMemo, useRef } from 'react'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlock.tsx index bd7ac4965..402fa0374 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlock.tsx @@ -7,7 +7,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaTemplateManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlockKit.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlockKit.tsx index 97d60cec0..4c0e1380c 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlockKit.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverAddBlockKit.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { InitializerWithSwitch, createFormBlockSchema, useSchemaInitializerItem } from '@nocobase/client'; +import { InitializerWithSwitch, createFormBlockSchema, useSchemaInitializerItem } from '@tachybase/client'; import _ from 'lodash'; import { NAMESPACE } from '../../../locale'; import { APPROVAL_ACTION_STATUS } from '../../../constants'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverBlock.tsx index c20c49d4d..850612f24 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverBlock.tsx @@ -1,5 +1,5 @@ -import { SchemaComponent, useAPIClient, useFormBlockContext, useRequest } from '@nocobase/client'; -import { uid } from '@nocobase/utils/client'; +import { SchemaComponent, useAPIClient, useFormBlockContext, useRequest } from '@tachybase/client'; +import { uid } from '@tachybase/utils/client'; import { default as React, useCallback, useContext } from 'react'; import { useForm } from '@tachybase/schema'; import { Spin } from 'antd'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx index 58e8d2776..5a2af02e6 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx @@ -4,9 +4,9 @@ import { SchemaComponent, SchemaComponentContext, css, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; import React, { useContext, useState } from 'react'; import { CollectionApprovalTodos } from '../../../common/Cn.ApprovalTodos'; import { NAMESPACE } from '../../../locale'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/useApprovalFormBlockProps.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/useApprovalFormBlockProps.tsx index f6124475e..64ebc57fb 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/useApprovalFormBlockProps.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/useApprovalFormBlockProps.tsx @@ -1,4 +1,4 @@ -import { useFormBlockContext } from '@nocobase/client'; +import { useFormBlockContext } from '@tachybase/client'; export function useApprovalFormBlockProps(e) { const { form } = useFormBlockContext(); diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/index.ts b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/index.ts index b4b399a93..4086a49d0 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginWorkflow from '@tachybase/plugin-workflow/client'; import { ApprovalInstruction } from './node.ApprovalInstruction'; import { ApproverActionConfigInitializer } from './approver-interface/Iz.ApproverActionConfig'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/node.ApprovalInstruction.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/node.ApprovalInstruction.tsx index 0230439ea..af1a208b3 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/node.ApprovalInstruction.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/node.ApprovalInstruction.tsx @@ -1,7 +1,7 @@ import { ArrayItems } from '@tachybase/components'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { Instruction, RadioWithTooltip } from '@tachybase/plugin-workflow/client'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; import React from 'react'; import { APPROVAL_ACTION_STATUS } from '../../constants'; import { NAMESPACE } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/VC.ConfigButton.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/VC.ConfigButton.tsx index 106e3e8fa..324c777c0 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/VC.ConfigButton.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/VC.ConfigButton.tsx @@ -1,4 +1,4 @@ -import { ActionContextProvider } from '@nocobase/client'; +import { ActionContextProvider } from '@tachybase/client'; import { Button } from 'antd'; import React, { useState } from 'react'; import { useTranslation } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/index.ts b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/index.ts index 3dd893e76..a6fdb833f 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginWorkflow from '@tachybase/plugin-workflow/client'; import { ApprovalTrigger } from './node.ApprovalTrigger'; import { LauncherActionConfigInitializer } from './launcher-interface/Iz.LauncherActionConfig'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherActionConfig.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherActionConfig.tsx index 3e1b824e4..10d14892f 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherActionConfig.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherActionConfig.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializer } from '@nocobase/client'; +import { SchemaInitializer } from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; import { APPROVAL_STATUS } from '../../../constants'; import { LauncherActionConfigComponent } from './VC.LauncherActionConfig'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherAddBlockButton.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherAddBlockButton.tsx index 9d33e1f18..f0f607fd1 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherAddBlockButton.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Iz.LauncherAddBlockButton.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializer, gridRowColWrap } from '@nocobase/client'; +import { SchemaInitializer, gridRowColWrap } from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; import { LauncherAddBlockButtonComponent } from './VC.LauncherBlockButton'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Sm.LauncherInterface.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Sm.LauncherInterface.tsx index 82d2e2ecb..90fe33378 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Sm.LauncherInterface.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/Sm.LauncherInterface.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; // 发起人操作界面 diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherActionConfig.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherActionConfig.tsx index 3a3d8e743..539ad063a 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherActionConfig.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherActionConfig.tsx @@ -1,4 +1,4 @@ -import { ActionInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { ActionInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; // 区块-配置操作 diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherBlockButton.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherBlockButton.tsx index 4ff0e6a4c..98f3caeb2 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherBlockButton.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherBlockButton.tsx @@ -7,7 +7,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaTemplateManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; import { flatSchemaArray } from '../../../constants'; import { APPROVAL_STATUS } from '../../../constants'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherInterface.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherInterface.tsx index 019aeecf1..f2f3b695d 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherInterface.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.LauncherInterface.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent, parseCollectionName } from '@nocobase/client'; +import { SchemaComponent, parseCollectionName } from '@tachybase/client'; import { useForm } from '@tachybase/schema'; import React from 'react'; import { SchemaAddBlock } from './VC.SchemaAddBlock'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.SchemaAddBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.SchemaAddBlock.tsx index 38c311888..f69c8fe24 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.SchemaAddBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/VC.SchemaAddBlock.tsx @@ -5,9 +5,9 @@ import { useAPIClient, useFormBlockProps, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; import { Spin } from 'antd'; import React, { useContext } from 'react'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/node.ApprovalTrigger.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/node.ApprovalTrigger.tsx index f1215e910..6b0c5a2f1 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/node.ApprovalTrigger.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/node.ApprovalTrigger.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializerItemType, useCollectionManager_deprecated, useCompile } from '@nocobase/client'; +import { SchemaInitializerItemType, useCollectionManager_deprecated, useCompile } from '@tachybase/client'; import { CollectionBlockInitializer, RadioWithTooltip, diff --git a/packages/plugins/@hera/plugin-approval/src/client/index.ts b/packages/plugins/@hera/plugin-approval/src/client/index.ts index 18b9bcaa8..64bad591d 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginKitApprovalConfiguration from './configuration'; import PluginKitApprovalUsage from './usage'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/locale.ts b/packages/plugins/@hera/plugin-approval/src/client/locale.ts index 2945c2501..36bc93625 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/locale.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/locale.ts @@ -1,4 +1,4 @@ -import { i18n, tval as nTval } from '@nocobase/client'; +import { i18n, tval as nTval } from '@tachybase/client'; export const NAMESPACE = '@hera/plugin-approval'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/Dt.ApprovalBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/Dt.ApprovalBlock.tsx index c7d8f9457..8977db335 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/Dt.ApprovalBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/Dt.ApprovalBlock.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ExtendCollectionsProvider, TableBlockProvider, useRecord } from '@nocobase/client'; +import { ExtendCollectionsProvider, TableBlockProvider, useRecord } from '@tachybase/client'; import { CollectionApprovalTodos } from '../../common/Cn.ApprovalTodos'; import { CollectionApprovals } from '../approval-common/Cn.Approvals'; import { CollectionFlowNodes } from '../approval-common/Cn.FlowNodes'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/VC.ApprovalBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/VC.ApprovalBlock.tsx index 6181d3d71..d05f4b685 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/VC.ApprovalBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/VC.ApprovalBlock.tsx @@ -1,6 +1,6 @@ import { TableOutlined } from '@ant-design/icons'; -import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; -import { uid } from '@nocobase/utils/client'; +import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; +import { uid } from '@tachybase/utils/client'; import React from 'react'; import { NAMESPACE } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/common/Pd.SchemaComponent.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/common/Pd.SchemaComponent.tsx index 8bd8dc0c7..19bf99c11 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/common/Pd.SchemaComponent.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/common/Pd.SchemaComponent.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentContext, useSchemaComponentContext } from '@nocobase/client'; +import { SchemaComponentContext, useSchemaComponentContext } from '@tachybase/client'; import React from 'react'; export function SchemaComponentContextProvider({ designable, children }) { diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/index.ts b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/index.ts index 8045449f2..a645608df 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginKitApprovalCommon from '../approval-common'; import { tval } from '../../locale'; import { ViewActionTodos } from './todos/VC.ViewActionTodos'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Dt.Record.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Dt.Record.tsx index ffb6b7e9e..c5e318f07 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Dt.Record.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Dt.Record.tsx @@ -1,4 +1,4 @@ -import { RecordProvider, useRecord } from '@nocobase/client'; +import { RecordProvider, useRecord } from '@tachybase/client'; import React from 'react'; export function RecordDecorator(props) { diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ActionBar.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ActionBar.tsx index bf8f4ac4f..89d73728f 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ActionBar.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ActionBar.tsx @@ -1,4 +1,4 @@ -import { useCurrentUserContext } from '@nocobase/client'; +import { useCurrentUserContext } from '@tachybase/client'; import { useContextApprovalExecution } from '../common/Pd.ApprovalExecution'; import { useApproval } from '../../approval-common/Pd.ApprovalData'; import { APPROVAL_STATUS } from '../../../constants'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ApplyActionStatus.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ApplyActionStatus.tsx index 7d0d3591d..c6cf2399c 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ApplyActionStatus.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.ApplyActionStatus.tsx @@ -1,5 +1,5 @@ import React, { useContext } from 'react'; -import { useCurrentUserContext } from '@nocobase/client'; +import { useCurrentUserContext } from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; import { createContext } from 'react'; import { useApproval } from '../../approval-common/Pd.ApprovalData'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.WithdrawAction.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.WithdrawAction.tsx index b2851effa..78f3f8fd2 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.WithdrawAction.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Pd.WithdrawAction.tsx @@ -1,4 +1,4 @@ -import { useCurrentUserContext } from '@nocobase/client'; +import { useCurrentUserContext } from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; import { APPROVAL_STATUS } from '../../../constants'; import { useApproval } from '../../approval-common/Pd.ApprovalData'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx index 2fff1d0b8..1fa77c7e9 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx @@ -1,5 +1,5 @@ import { NAMESPACE } from '../../../locale'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; export const SchemaApprovalBlockLaunch = { type: 'void', diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ApprovalBlockLaunch.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ApprovalBlockLaunch.tsx index b4d1f3cb3..30e9691cf 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ApprovalBlockLaunch.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ApprovalBlockLaunch.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import { UserColumn } from '../../approval-common/approval-columns/column.user'; import { WorkflowColumn } from '../../approval-common/approval-columns/column.workflow'; import { NodeColumn } from '../../approval-common/approval-columns/column.node'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunch.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunch.tsx index 7c81302e8..1bf434341 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunch.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunch.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent, useRecord } from '@nocobase/client'; +import { SchemaComponent, useRecord } from '@tachybase/client'; import React from 'react'; import { RecordDecorator } from './Dt.Record'; import { ViewActionLaunchContent } from './VC.ViewActionLaunchContent'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx index 3de5fe798..1a0ef2952 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx @@ -6,7 +6,7 @@ import { useFormBlockContext, useRecord, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import { DetailsBlockProvider, FlowContext } from '@tachybase/plugin-workflow/client'; import { useForm } from '@tachybase/schema'; import { Result, Spin } from 'antd'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx index 9ca672949..af203c959 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx @@ -8,7 +8,7 @@ import { css, parseCollectionName, useAPIClient, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Button, Dropdown } from 'antd'; import React, { useCallback, useContext, useEffect, useState } from 'react'; import { useTranslation } from '../../../../locale'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx index 988055643..1b2857e55 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx @@ -4,7 +4,7 @@ import { useActionContext, useBlockRequestContext, useCollection_deprecated, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; import { useField, useForm } from '@tachybase/schema'; import { useContextApprovalStatus } from '../Pd.ActionStatus'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useDestroyAction.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useDestroyAction.tsx index 60ae730dc..cf74413b2 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useDestroyAction.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useDestroyAction.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useActionContext } from '@nocobase/client'; +import { useAPIClient, useActionContext } from '@tachybase/client'; import { useField } from '@tachybase/schema'; import { useApproval } from '../../../approval-common/Pd.ApprovalData'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useFormBlockProps.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useFormBlockProps.tsx index ee53b8687..d1b92fb76 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useFormBlockProps.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useFormBlockProps.tsx @@ -1,4 +1,4 @@ -import { useCurrentUserContext } from '@nocobase/client'; +import { useCurrentUserContext } from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; import { useForm } from '@tachybase/schema'; import { useEffect } from 'react'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useSubmit.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useSubmit.tsx index e76b94310..c35223982 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useSubmit.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useSubmit.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useActionContext } from '@nocobase/client'; +import { useAPIClient, useActionContext } from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; import { useField, useForm } from '@tachybase/schema'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useWithdrawAction.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useWithdrawAction.tsx index f13660aef..611b94613 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useWithdrawAction.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/hooks/useWithdrawAction.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useActionContext } from '@nocobase/client'; +import { useAPIClient, useActionContext } from '@tachybase/client'; import { useField } from '@tachybase/schema'; import { useApproval } from '../../../approval-common/Pd.ApprovalData'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Dt.ApprovalFormBlock.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Dt.ApprovalFormBlock.tsx index 23877929f..2d67a5351 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Dt.ApprovalFormBlock.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Dt.ApprovalFormBlock.tsx @@ -9,7 +9,7 @@ import { useAssociationNames, useCurrentUserContext, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFlowContext } from '@tachybase/plugin-workflow/client'; import { RecursionField, createForm, useField, useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Pd.ActionBarProvider.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Pd.ActionBarProvider.tsx index f49b78dcc..0eb1a09bd 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Pd.ActionBarProvider.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Pd.ActionBarProvider.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { ActionBarProvider as ClientActionBarProvider, useCompile } from '@nocobase/client'; -import { str2moment } from '@nocobase/utils/client'; +import { ActionBarProvider as ClientActionBarProvider, useCompile } from '@tachybase/client'; +import { str2moment } from '@tachybase/utils/client'; import { Space, Tag } from 'antd'; import { approvalStatusConfigObj } from '../../../constants'; import { useContextApprovalExecutions } from './Pd.ApprovalExecutions'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx index b31298739..ff1313b22 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; export const SchemaApprovalBlockTodos = { diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ApprovalBlockTodos.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ApprovalBlockTodos.tsx index 3075725f6..25bcf7cd4 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ApprovalBlockTodos.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ApprovalBlockTodos.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { NodeColumn } from '../../approval-common/approval-columns/column.node'; import { ApprovalRecordStatusColumn } from '../../approval-common/approval-columns/column.status'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodos.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodos.tsx index 99d3c48dd..ff224d896 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodos.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodos.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { SchemaComponent, useRecord } from '@nocobase/client'; +import { SchemaComponent, useRecord } from '@tachybase/client'; import { ViewActionTodosContent } from './VC.ViewActionTodosContent'; // 审批-待办: 操作-查看 diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodosContent.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodosContent.tsx index 54131bccd..2e6f5d008 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodosContent.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/VC.ViewActionTodosContent.tsx @@ -5,7 +5,7 @@ import { useFormBlockContext, useRecord, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import { DetailsBlockProvider, ExecutionContextProvider } from '@tachybase/plugin-workflow/client'; import { Result, Spin } from 'antd'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalDetailBlockProps.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalDetailBlockProps.tsx index 765593c7d..fa4d89e3b 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalDetailBlockProps.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalDetailBlockProps.tsx @@ -1,4 +1,4 @@ -import { useFormBlockContext } from '@nocobase/client'; +import { useFormBlockContext } from '@tachybase/client'; import { useEffect } from 'react'; import { useContextApprovalExecutions } from '../Pd.ApprovalExecutions'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalFormBlockProps.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalFormBlockProps.tsx index 3bd0f1ea6..ec9df42f4 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalFormBlockProps.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useApprovalFormBlockProps.tsx @@ -1,4 +1,4 @@ -import { useFormBlockContext } from '@nocobase/client'; +import { useFormBlockContext } from '@tachybase/client'; export function useApprovalFormBlockProps() { const { form } = useFormBlockContext(); diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useSubmit.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useSubmit.tsx index cbcc7c2c6..5d5cd325f 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useSubmit.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/hooks/useSubmit.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useActionContext, useRefreshActionProps } from '@nocobase/client'; +import { useAPIClient, useActionContext, useRefreshActionProps } from '@tachybase/client'; import { useField, useForm } from '@tachybase/schema'; import { useContextApprovalAction } from '../Pd.ApprovalAction'; import { useContextApprovalExecutions } from '../Pd.ApprovalExecutions'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Pd.ApprovalData.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Pd.ApprovalData.tsx index e7c561dc7..5f4a7240e 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Pd.ApprovalData.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Pd.ApprovalData.tsx @@ -1,4 +1,4 @@ -import { useRecord } from '@nocobase/client'; +import { useRecord } from '@tachybase/client'; import React, { createContext, useContext } from 'react'; import { Approval } from '../approval-block/interface'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/VC.ApprovalProcess.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/VC.ApprovalProcess.tsx index 4e3d65f48..34c6c954f 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/VC.ApprovalProcess.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/VC.ApprovalProcess.tsx @@ -1,4 +1,4 @@ -import { createStyles, useCurrentUserContext } from '@nocobase/client'; +import { createStyles, useCurrentUserContext } from '@tachybase/client'; import { EXECUTION_STATUS } from '@tachybase/plugin-workflow/client'; import { Space, Table } from 'antd'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.status.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.status.tsx index a81dde72b..9e6a5c5d8 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.status.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.status.tsx @@ -1,4 +1,4 @@ -import { useCompile, useRecord } from '@nocobase/client'; +import { useCompile, useRecord } from '@tachybase/client'; import { Field, observer, useField } from '@tachybase/schema'; import { Tag } from 'antd'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.workflow.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.workflow.tsx index 42da79711..86a4295fc 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.workflow.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/approval-columns/column.workflow.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { observer, useField, Field } from '@tachybase/schema'; import { useTranslation } from '../../../locale'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/index.ts b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/index.ts index 3350325fe..9f9f87685 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { ApprovalDataProvider } from './Pd.ApprovalData'; import { ApprovalProcess } from './VC.ApprovalProcess'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.detail.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.detail.tsx index 754bf5468..5fbce6e5b 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.detail.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.detail.tsx @@ -1,4 +1,4 @@ -import { DatePicker, InputReadPretty, RecordProvider, useCurrentUserContext } from '@nocobase/client'; +import { DatePicker, InputReadPretty, RecordProvider, useCurrentUserContext } from '@tachybase/client'; import React, { useContext } from 'react'; import { ContextWithActionEnabled } from '../Pd.WithActionEnabled'; import { ViewActionLaunch } from '../../approval-block/launch/VC.ViewActionLaunch'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.status.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.status.tsx index cec7305a7..5e12c796d 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.status.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.status.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useCompile } from '@nocobase/client'; +import { useCompile } from '@tachybase/client'; import { Tag } from 'antd'; import { approvalStatusConfigObj } from '../../../constants'; import { ColumnStatusComponent } from '../approval-columns/column.status'; @@ -8,6 +8,7 @@ import { APPROVAL_STATUS } from '../../../constants'; export function renderColumnStatus(value, record, exist) { // return null; + // eslint-disable-next-line react-hooks/rules-of-hooks const compile = useCompile(); if (!exist) { const approvalStatusItem = diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.taskNode.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.taskNode.tsx index 9f9374050..c13927016 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.taskNode.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/process-columns/render.taskNode.tsx @@ -1,4 +1,4 @@ -import { css, useCompile } from '@nocobase/client'; +import { css, useCompile } from '@tachybase/client'; import { Progress, Tag } from 'antd'; import React from 'react'; import { @@ -11,6 +11,7 @@ import { // 审批处理: 任务节点值 export function renderColumnTaskNode(text, { node, job, groupCount, statusCount }, group) { + // eslint-disable-next-line react-hooks/rules-of-hooks const compile = useCompile(); const { branchMode, negotiation } = node?.config ? node : ({} as any); const enums = VoteCategoryEnums[voteOption(negotiation)]; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Dt.RecordApprovals.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Dt.RecordApprovals.tsx index f697a5b4c..f93967a05 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Dt.RecordApprovals.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Dt.RecordApprovals.tsx @@ -5,7 +5,7 @@ import { joinCollectionName, useCollection_deprecated, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useMemo } from 'react'; import { CollectionApprovals } from '../approval-common/Cn.Approvals'; import { CollectionApprovalTodos } from '../../common/Cn.ApprovalTodos'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Iz.RecordApprovals.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Iz.RecordApprovals.tsx index ea7e82f8b..39ad1ee7f 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Iz.RecordApprovals.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/Iz.RecordApprovals.tsx @@ -1,6 +1,6 @@ import { AuditOutlined } from '@ant-design/icons'; -import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; -import { uid } from '@nocobase/utils/client'; +import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; +import { uid } from '@tachybase/utils/client'; import React from 'react'; // 初始化器,创建区块-相关审批 diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/VC.RecordApprovals.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/VC.RecordApprovals.tsx index 41c5f83a6..e66ec5887 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/VC.RecordApprovals.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/VC.RecordApprovals.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { ApprovalRecordStatusColumn } from '../approval-common/approval-columns/column.status'; import { UserColumn } from '../approval-common/approval-columns/column.user'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/index.ts b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/index.ts index db370d829..e361709c1 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-record-block/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { tval } from '../../locale'; import PluginKitApprovalCommon from '../approval-common'; import { RecordApprovalsDecorator } from './Dt.RecordApprovals'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/index.ts b/packages/plugins/@hera/plugin-approval/src/client/usage/index.ts index cd6feb854..703d77306 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/index.ts +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginKitApprovalRecordBlock from './approval-record-block'; import PluginKitApprovalBlock from './approval-block'; diff --git a/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts b/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts index cb1cc4562..4d55027b9 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts @@ -1,4 +1,4 @@ -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; import { Instruction, JOB_STATUS } from '@tachybase/plugin-workflow'; import { APPROVAL_STATUS, APPROVAL_ACTION_STATUS } from './constants'; import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; diff --git a/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts b/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts index cba818b24..d129620c0 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts @@ -1,7 +1,7 @@ import { get } from 'lodash'; import { Op, BelongsTo, HasOne } from 'sequelize'; -import { modelAssociationByKey } from '@nocobase/database'; -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { modelAssociationByKey } from '@tachybase/database'; +import { parseCollectionName } from '@tachybase/data-source-manager'; import { EXECUTION_STATUS, Trigger, toJSON, JOB_STATUS } from '@tachybase/plugin-workflow'; import { APPROVAL_ACTION_STATUS, APPROVAL_STATUS } from './constants'; import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; diff --git a/packages/plugins/@hera/plugin-approval/src/server/actions.ts b/packages/plugins/@hera/plugin-approval/src/server/actions.ts index 52e29362e..15dfe3f67 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/actions.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/actions.ts @@ -1,7 +1,7 @@ -import actions, { utils } from '@nocobase/actions'; +import actions, { utils } from '@tachybase/actions'; import WorkflowPlugin, { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { APPROVAL_STATUS, APPROVAL_ACTION_STATUS } from './constants'; -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { parseCollectionName } from '@tachybase/data-source-manager'; const workflows = { async listApprovalFlows(context, next) { diff --git a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts index 8084f382e..93246d85a 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ namespace: 'workflow.approvalExecutions', diff --git a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts index d16e55394..caf21b18d 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ namespace: 'workflow.approvalRecords', dumpRules: 'required', diff --git a/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts b/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts index eeb84cdbc..b445cf881 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ namespace: 'workflow.approvals', dumpRules: 'required', diff --git a/packages/plugins/@hera/plugin-approval/src/server/plugin.ts b/packages/plugins/@hera/plugin-approval/src/server/plugin.ts index aac3fce6d..4d4f39856 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/plugin.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/plugin.ts @@ -1,5 +1,5 @@ import path from 'path'; -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import WorkflowPlugin from '@tachybase/plugin-workflow'; import ApprovalTrigger from './ApprovalTrigger'; import ApprovalInstruction from './ApprovalInstruction'; diff --git a/packages/plugins/@hera/plugin-audit-logs/package.json b/packages/plugins/@hera/plugin-audit-logs/package.json index 6b9c7e522..6fe280c41 100644 --- a/packages/plugins/@hera/plugin-audit-logs/package.json +++ b/packages/plugins/@hera/plugin-audit-logs/package.json @@ -15,12 +15,12 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*", - "@tachybase/schema": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/schema": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "审计日志。", "displayName.zh-CN": "审计日志" diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx index 51204e198..4dc47e0fc 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx @@ -5,7 +5,7 @@ import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { useAuditLogsTranslation } from './locale'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx index 360e2a1bb..45e74abad 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ExtendCollectionsProvider, TableBlockProvider } from '@nocobase/client'; +import { ExtendCollectionsProvider, TableBlockProvider } from '@tachybase/client'; import { useAuditChangesCollection, useAuditLogsCollection, useCollectionsCollection } from './collections'; export const AuditLogsBlockProvider: React.FC = ({ children, ...restProps }) => { diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsProvider.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsProvider.tsx index df1959f4a..aa067e441 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsProvider.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/AuditLogsProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { AuditLogsBlockInitializer } from './AuditLogsBlockInitializer'; import { AuditLogsBlockProvider } from './AuditLogsBlockProvider'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsField.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsField.tsx index c0a3065fd..f8aa27e82 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsField.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsField.tsx @@ -1,4 +1,4 @@ -import { EllipsisWithTooltip, useCompile } from '@nocobase/client'; +import { EllipsisWithTooltip, useCompile } from '@tachybase/client'; import React from 'react'; import { observer, useField } from '@tachybase/schema'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsValue.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsValue.tsx index 50ee5730a..e1caf78d8 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsValue.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsValue.tsx @@ -1,4 +1,4 @@ -import { EllipsisWithTooltip, FormProvider, SchemaComponent, useRecord } from '@nocobase/client'; +import { EllipsisWithTooltip, FormProvider, SchemaComponent, useRecord } from '@tachybase/client'; import React from 'react'; import { observer, useField } from '@tachybase/schema'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx index 87ca4df60..b4eb03d93 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx @@ -1,7 +1,7 @@ -import { ActionInitializer } from '@nocobase/client'; +import { ActionInitializer } from '@tachybase/client'; import React from 'react'; import { tval } from '../locale'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; export const AuditLogsViewActionInitializer = () => { const changes = { diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx index 950aaadbc..e8a25aac0 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx @@ -8,7 +8,7 @@ import { useCollection_deprecated, useCompile, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { createContext, useContext } from 'react'; import { AuditLogsDesigner } from './AuditLogsDesigner'; import { tval } from '../locale'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx index 32aa50988..bc2c10f9e 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx @@ -9,7 +9,7 @@ import { useDesignable, useFormBlockContext, useTableBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { useAuditLogsTranslation } from '../locale'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/index.ts b/packages/plugins/@hera/plugin-audit-logs/src/client/index.ts index e75cef292..427a12ee8 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/index.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin, SchemaInitializerItemType } from '@nocobase/client'; +import { Plugin, SchemaInitializerItemType } from '@tachybase/client'; import { AuditLogsProvider } from './AuditLogsProvider'; import { auditLogsTableActionColumnInitializers } from './initializers/AuditLogsTableActionColumnInitializers'; import { auditLogsTableActionInitializers } from './initializers/AuditLogsTableActionInitializers'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx index f95455d0f..c2833cffa 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx @@ -1,4 +1,4 @@ -import { InitializerWithSwitch, useSchemaInitializerItem } from '@nocobase/client'; +import { InitializerWithSwitch, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; import { tval } from '../locale'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx index a3bd93fe9..afc51513a 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx @@ -1,6 +1,6 @@ import { MenuOutlined } from '@ant-design/icons'; import { useFieldSchema } from '@tachybase/schema'; -import { createDesignable, Resizable, SchemaInitializer, useAPIClient, useDesignable } from '@nocobase/client'; +import { createDesignable, Resizable, SchemaInitializer, useAPIClient, useDesignable } from '@tachybase/client'; import React from 'react'; import { tval, useAuditLogsTranslation } from '../locale'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx index 0bc13ebf1..8e15cb388 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializer } from '@nocobase/client'; +import { SchemaInitializer } from '@tachybase/client'; import { tval } from '../locale'; export type { ButtonProps } from 'antd'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx index 1837c67be..5b975addf 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx @@ -5,7 +5,7 @@ import { useCompile, useInheritsTableColumnInitializerFields, useTableColumnInitializerFields, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { tval, useAuditLogsTranslation } from '../locale'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts b/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts index 03f966a1a..6be26ab50 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n, tval as nTval } from '@nocobase/client'; +import { i18n, tval as nTval } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = '@hera/plugin-audit-logs'; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/server/__tests__/hook.test.ts b/packages/plugins/@hera/plugin-audit-logs/src/server/__tests__/hook.test.ts index 4f8920a04..ba9545944 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/server/__tests__/hook.test.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/server/__tests__/hook.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('hook', () => { let api: MockServer; diff --git a/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditChanges.ts b/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditChanges.ts index c0713a451..1366434b6 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditChanges.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditChanges.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditLogs.ts b/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditLogs.ts index 76609b423..2718ad722 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditLogs.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/server/collections/auditLogs.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@hera/plugin-audit-logs/src/server/index.ts b/packages/plugins/@hera/plugin-audit-logs/src/server/index.ts index 7093d6227..57b7ff699 100644 --- a/packages/plugins/@hera/plugin-audit-logs/src/server/index.ts +++ b/packages/plugins/@hera/plugin-audit-logs/src/server/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import path from 'path'; import { afterCreate, afterDestroy, afterUpdate } from './hooks'; diff --git a/packages/plugins/@hera/plugin-core/package.json b/packages/plugins/@hera/plugin-core/package.json index 1ed4c1231..e05d21335 100644 --- a/packages/plugins/@hera/plugin-core/package.json +++ b/packages/plugins/@hera/plugin-core/package.json @@ -43,16 +43,17 @@ "ws": "^8.13.0" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/evaluators": "workspace:*", "@nocobase/plugin-acl": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*", + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/data-source-manager": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/evaluators": "workspace:*", "@tachybase/plugin-workflow": "workspace:*", - "@tachybase/schema": "workspace:*" + "@tachybase/schema": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供标准赫拉平台能力", "displayName.zh-CN": "赫拉平台" diff --git a/packages/plugins/@hera/plugin-core/src/client/components/PDFViewer.tsx b/packages/plugins/@hera/plugin-core/src/client/components/PDFViewer.tsx index fbb064eaa..6346f5e8e 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/PDFViewer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/PDFViewer.tsx @@ -6,7 +6,7 @@ import { saveAs } from 'file-saver'; import 'react-pdf/dist/Page/AnnotationLayer.css'; import 'react-pdf/dist/Page/TextLayer.css'; import { uid } from '@tachybase/schema'; -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import { useTranslation } from '../locale'; const options = { diff --git a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomAssociatedField.tsx b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomAssociatedField.tsx index dda7356c9..1d331dd7e 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomAssociatedField.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomAssociatedField.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; import { ErrorBoundaryFallBack } from './ErrorBoundary'; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomComponentDispatcher.tsx b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomComponentDispatcher.tsx index c7222bd19..33140ea63 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomComponentDispatcher.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomComponentDispatcher.tsx @@ -1,9 +1,9 @@ -import { SchemaComponent, SchemaSettings, useApp, useDesignable, usePlugin } from '@nocobase/client'; +import { SchemaComponent, SchemaSettings, useApp, useDesignable, usePlugin } from '@tachybase/client'; import React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; import { useTranslation } from '../../locale'; import { useField, useFieldSchema } from '@tachybase/schema'; -import { Field } from '@nocobase/database'; +import { Field } from '@tachybase/database'; import { useCustomComponent } from '../../hooks/useCustomComponent'; import { CustomComponentType } from './custom-components'; import { ErrorBoundaryFallBack } from './ErrorBoundary'; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomField.tsx b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomField.tsx index 3d2fbc323..465b51551 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomField.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/CustomField.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; import { ErrorBoundaryFallBack } from './ErrorBoundary'; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/excel-table/Sheet.tsx b/packages/plugins/@hera/plugin-core/src/client/components/excel-table/Sheet.tsx index a6341b1cf..97442c1d2 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/excel-table/Sheet.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/excel-table/Sheet.tsx @@ -1,6 +1,6 @@ import React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react'; import Spreadsheet from '../x-sheet'; -import { ClassNamesArg, css, cx } from '@nocobase/client'; +import { ClassNamesArg, css, cx } from '@tachybase/client'; export type SheetRef = { getData: () => any; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/fields/AssociatedField.tsx b/packages/plugins/@hera/plugin-core/src/client/components/fields/AssociatedField.tsx index 9b5fc8a79..ff1bd5392 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/fields/AssociatedField.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/fields/AssociatedField.tsx @@ -7,7 +7,7 @@ import { RecordProvider, useDesignable, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useCallback, useEffect, useState } from 'react'; const viewerSchema: ISchema = { diff --git a/packages/plugins/@hera/plugin-core/src/client/components/fields/CalcResult.tsx b/packages/plugins/@hera/plugin-core/src/client/components/fields/CalcResult.tsx index c3f15d7b2..99cc9f51a 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/fields/CalcResult.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/fields/CalcResult.tsx @@ -1,10 +1,10 @@ import { onFormValuesChange } from '@tachybase/schema'; import { useField, useFieldSchema, useForm, useFormEffects } from '@tachybase/schema'; -import { Input } from '@nocobase/client'; +import { Input } from '@tachybase/client'; import { Descriptions, DescriptionsProps } from 'antd'; import _ from 'lodash'; import React, { useEffect, useState } from 'react'; -import { evaluators } from '@nocobase/evaluators/client'; +import { evaluators } from '@tachybase/evaluators/client'; const transformFormula = (formula: string) => { if (!formula) return []; const formulaArray = formula.split(/([+\-*/?:()%])/).filter((item) => item); diff --git a/packages/plugins/@hera/plugin-core/src/client/components/fields/Expression.tsx b/packages/plugins/@hera/plugin-core/src/client/components/fields/Expression.tsx index 2991977b0..45cf6643d 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/fields/Expression.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/fields/Expression.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useAssociatedFields, useCollectionManager_deprecated, useCompile, Variable } from '@nocobase/client'; +import { useAssociatedFields, useCollectionManager_deprecated, useCompile, Variable } from '@tachybase/client'; export const Expression = (props) => { const { value = '', useCurrentFields, onChange } = props; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/filter-form/FormFilterScope.tsx b/packages/plugins/@hera/plugin-core/src/client/components/filter-form/FormFilterScope.tsx index 3ce2b7e12..ae08aa9e1 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/filter-form/FormFilterScope.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/filter-form/FormFilterScope.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { ArrayCollapse } from '@tachybase/components'; import { Form } from '@tachybase/schema'; import { observer, useField, useFieldSchema } from '@tachybase/schema'; @@ -11,7 +11,7 @@ import { __UNSAFE__VariablesContextType, __UNSAFE__DynamicComponentProps, __UNSAFE__VariableOption, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useMemo } from 'react'; import { FilterContext } from './context'; import { VariableInput } from './VariableInput'; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx b/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx index be112ad64..e4e81bede 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx @@ -15,7 +15,7 @@ import { useDateVariable, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import _ from 'lodash'; import React, { useCallback, useContext, useMemo } from 'react'; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx b/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx index 36a7711c6..3e995f634 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { cx, css, ClassNamesArg } from '@nocobase/client'; +import { cx, css, ClassNamesArg } from '@tachybase/client'; import { ModalHeader } from './ModalFullScreenChild'; interface ModalFullScreenProps { diff --git a/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreenChild.tsx b/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreenChild.tsx index eb4d49bc0..03713d83e 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreenChild.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreenChild.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { Button } from 'antd'; export const ModalHeader = (props) => { diff --git a/packages/plugins/@hera/plugin-core/src/client/components/system/MobileLink.tsx b/packages/plugins/@hera/plugin-core/src/client/components/system/MobileLink.tsx index 79f335d9f..493e07527 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/system/MobileLink.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/system/MobileLink.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { Button, Tooltip } from 'antd'; import { MobileOutlined } from '@ant-design/icons'; import { useTranslation } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx b/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx index 23d008ee6..5259a2381 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { css, useRequest } from '@nocobase/client'; +import { css, useRequest } from '@tachybase/client'; import { Badge, Button, Popover, List, message } from 'antd'; import { BellOutlined } from '@ant-design/icons'; import { useLinkKey, useInitializationLinkKey } from '../../hooks/useNotifications'; import { useNavigate } from 'react-router-dom'; -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; export const Notifications = () => { // 注册链接关联,链接管理使用nocobase代码方式注册数据表 diff --git a/packages/plugins/@hera/plugin-core/src/client/components/system/OnlineUserProvider.tsx b/packages/plugins/@hera/plugin-core/src/client/components/system/OnlineUserProvider.tsx index 7fffd5a80..7ab4c38a1 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/system/OnlineUserProvider.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/system/OnlineUserProvider.tsx @@ -1,5 +1,5 @@ import { uid } from '@tachybase/schema'; -import { css, useAPIClient, useApp } from '@nocobase/client'; +import { css, useAPIClient, useApp } from '@tachybase/client'; import { Button, Dropdown } from 'antd'; import React, { useEffect, useState } from 'react'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/assistant/Assistant.provider.tsx b/packages/plugins/@hera/plugin-core/src/client/features/assistant/Assistant.provider.tsx index 4855d6354..7eaf2e40f 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/assistant/Assistant.provider.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/assistant/Assistant.provider.tsx @@ -1,5 +1,5 @@ import { CalculatorOutlined, CommentOutlined, HighlightOutlined, ToolOutlined, ToolFilled } from '@ant-design/icons'; -import { useDesignable } from '@nocobase/client'; +import { useDesignable } from '@tachybase/client'; import { FloatButton } from 'antd'; import React from 'react'; import { useContextMenu } from '../context-menu/useContextMenu'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/assistant/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/assistant/index.ts index 2947a9a86..2bb2188ef 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/assistant/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/assistant/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { AssistantProvider } from './Assistant.provider'; export class PluginAssistant extends Plugin { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/context-menu/ContextMenu.provider.tsx b/packages/plugins/@hera/plugin-core/src/client/features/context-menu/ContextMenu.provider.tsx index 8e4e5e280..86e138722 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/context-menu/ContextMenu.provider.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/context-menu/ContextMenu.provider.tsx @@ -1,5 +1,5 @@ import React, { useRef, useState } from 'react'; -import { css, useDesignable } from '@nocobase/client'; +import { css, useDesignable } from '@tachybase/client'; import { ContextMenuTrigger } from '../../components/context-menu'; import { ContextMenu } from '../../components/context-menu'; import { ContextMenuItem } from '../../components/context-menu'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/context-menu/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/context-menu/index.ts index 354aba525..3da0bba1a 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/context-menu/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/context-menu/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { ContextMenuProvider } from './ContextMenu.provider'; export class PluginContextMenu extends Plugin { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/departments/index.tsx b/packages/plugins/@hera/plugin-core/src/client/features/departments/index.tsx index f8c8aaabc..9e47c4abc 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/departments/index.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/departments/index.tsx @@ -33,7 +33,7 @@ import { useRecord, useRequest, useResourceActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import PluginACLClient, { RolesManagerContext } from '@nocobase/plugin-acl/client'; import { connect, mapReadPretty, uid, useField, useFieldSchema, useForm } from '@tachybase/schema'; import { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedLayout.tsx b/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedLayout.tsx index 3b0502d72..f5046157e 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedLayout.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedLayout.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { Layout } from 'antd'; import React from 'react'; import { Outlet } from 'react-router-dom'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedPage.tsx b/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedPage.tsx index 38ab74da9..7d0355592 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedPage.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedPage.tsx @@ -1,4 +1,4 @@ -import { AdminProvider } from '@nocobase/client'; +import { AdminProvider } from '@tachybase/client'; import React, { useEffect } from 'react'; import { useLocation, useMatch, useNavigate } from 'react-router-dom'; import { NotAuthorityResult } from './NotAuthorityResult'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedSchemaComponent.tsx b/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedSchemaComponent.tsx index 3ba815cf0..01703ce6f 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedSchemaComponent.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/embed/EmbedSchemaComponent.tsx @@ -1,4 +1,4 @@ -import { RemoteSchemaComponent } from '@nocobase/client'; +import { RemoteSchemaComponent } from '@tachybase/client'; import React from 'react'; import { useParams } from 'react-router-dom'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/embed/index.tsx b/packages/plugins/@hera/plugin-core/src/client/features/embed/index.tsx index 32eade2f9..c70cb1a64 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/embed/index.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/embed/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { usePageSettingsProps } from './usePageSettingsProps'; import { EmbedSchemaComponent } from './EmbedSchemaComponent'; import { EmbedPage } from './EmbedPage'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/embed/useEmbedToken.tsx b/packages/plugins/@hera/plugin-core/src/client/features/embed/useEmbedToken.tsx index aedcb6751..a95dbc6db 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/embed/useEmbedToken.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/embed/useEmbedToken.tsx @@ -1,4 +1,4 @@ -import { useAPIClient } from '@nocobase/client'; +import { useAPIClient } from '@tachybase/client'; export function useEmbedToken() { const url = new URL(window.location.href); diff --git a/packages/plugins/@hera/plugin-core/src/client/features/extended-filter-form/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/extended-filter-form/index.ts index 51b054e1f..e4f8a5a67 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/extended-filter-form/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/extended-filter-form/index.ts @@ -1,4 +1,4 @@ -import { Plugin, useCollection } from '@nocobase/client'; +import { Plugin, useCollection } from '@tachybase/client'; import { EditDefaultValue, EditFormulaTitleField, diff --git a/packages/plugins/@hera/plugin-core/src/client/features/hera-version/HeraVersion.provider.tsx b/packages/plugins/@hera/plugin-core/src/client/features/hera-version/HeraVersion.provider.tsx index 1af974969..0c8e58ff1 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/hera-version/HeraVersion.provider.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/hera-version/HeraVersion.provider.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import { useCurrentUserSettingsMenu } from '@nocobase/client'; +import { useCurrentUserSettingsMenu } from '@tachybase/client'; import { usePluginVersion } from '../../hooks/usePluginVersion'; import { useTabSettings } from '../page-style/useTabSettings'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/hera-version/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/hera-version/index.ts index 8dc465589..fa1b701ab 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/hera-version/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/hera-version/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { HeraVersionProvider } from './HeraVersion.provider'; export class PluginHeraVersion extends Plugin { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/ModeHighlight.provider.tsx b/packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/ModeHighlight.provider.tsx new file mode 100644 index 000000000..b6dae3e93 --- /dev/null +++ b/packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/ModeHighlight.provider.tsx @@ -0,0 +1,19 @@ +import { css } from '@tachybase/client'; +import React from 'react'; +import { useTranslation } from '../../locale'; +export const ModeHighlightProvider = ({ children }) => { + const { t } = useTranslation(); + return ( + <> + + {children} + + ); +}; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/index.tsx b/packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/index.tsx new file mode 100644 index 000000000..b97289341 --- /dev/null +++ b/packages/plugins/@hera/plugin-core/src/client/features/mode-highlight/index.tsx @@ -0,0 +1,8 @@ +import { Plugin } from '@tachybase/client'; +import { ModeHighlightProvider } from './ModeHighlight.provider'; + +export class PluginModeHighlight extends Plugin { + async load() { + this.app.use(ModeHighlightProvider); + } +} diff --git a/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundLinkActionInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundLinkActionInitializer.tsx index 73b7a04ba..71b2e3946 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundLinkActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundLinkActionInitializer.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { ActionInitializer } from '@nocobase/client'; +import { ActionInitializer } from '@tachybase/client'; import { Popover, Space, Button, Input } from 'antd'; import { useFieldSchema } from '@tachybase/schema'; -import { useProps } from '@nocobase/client'; +import { useProps } from '@tachybase/client'; import { ShareAltOutlined } from '@ant-design/icons'; import { tval, useTranslation } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundPage.tsx b/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundPage.tsx index d6f164ec6..ce35f0b73 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundPage.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/outbound/OutboundPage.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { AdminProvider, RemoteCollectionManagerProvider, RemoteSchemaComponent } from '@nocobase/client'; +import { AdminProvider, RemoteCollectionManagerProvider, RemoteSchemaComponent } from '@tachybase/client'; import { useParams } from 'react-router-dom'; export const OutboundPage = () => { const params = useParams(); diff --git a/packages/plugins/@hera/plugin-core/src/client/features/outbound/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/outbound/index.ts index 0c3e83b5d..aa042536e 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/outbound/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/outbound/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { OutboundPage } from './OutboundPage'; import { OutboundButton, OutboundLinkActionInitializer } from './OutboundLinkActionInitializer'; import { lang } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageStyle.provider.tsx b/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageStyle.provider.tsx index cbf0c10f4..e033de2a1 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageStyle.provider.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageStyle.provider.tsx @@ -1,4 +1,4 @@ -import { useCurrentUserContext, useCurrentUserSettingsMenu } from '@nocobase/client'; +import { useCurrentUserContext, useCurrentUserSettingsMenu } from '@tachybase/client'; import React, { createContext, useEffect, useState } from 'react'; import { useTabSettings } from './useTabSettings'; import { TabsProps } from 'antd'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageTab.tsx b/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageTab.tsx index 5759f16ba..01b81ea28 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageTab.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/page-style/PageTab.tsx @@ -1,4 +1,4 @@ -import { RemoteSchemaComponent, css, useDocumentTitle } from '@nocobase/client'; +import { RemoteSchemaComponent, css, useDocumentTitle } from '@tachybase/client'; import { Tabs } from 'antd'; import React, { useContext, useEffect } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/page-style/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/page-style/index.ts index ca7b3ae80..7d783eea4 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/page-style/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/page-style/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { PageStyleProvider } from './PageStyle.provider'; export class PluginPageStyle extends Plugin { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/page-style/useTabSettings.tsx b/packages/plugins/@hera/plugin-core/src/client/features/page-style/useTabSettings.tsx index 5fcfb4ea8..caf405b82 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/page-style/useTabSettings.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/page-style/useTabSettings.tsx @@ -1,6 +1,6 @@ import React, { useCallback } from 'react'; -import { SelectWithTitle, useAPIClient, useCurrentUserContext } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { SelectWithTitle, useAPIClient, useCurrentUserContext } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { useTranslation } from '../../locale'; export const useTabSettings = () => { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/pdf/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/pdf/index.ts index 2cde6b952..31e1deef7 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/pdf/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/pdf/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { PDFViewerBlockInitializer, PDFViewerPrintActionInitializer, diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/ApiTrigger.tsx b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/ApiTrigger.tsx index 42062ece2..10787e742 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/ApiTrigger.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/ApiTrigger.tsx @@ -1,4 +1,4 @@ -import { useCompile, useCollectionManager_deprecated, useCollectionDataSource } from '@nocobase/client'; +import { useCompile, useCollectionManager_deprecated, useCollectionDataSource } from '@tachybase/client'; import { lang, tval } from '../../locale'; import { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateAction.Settings.tsx b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateAction.Settings.tsx index 11355aabd..42099c214 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateAction.Settings.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateAction.Settings.tsx @@ -5,7 +5,7 @@ import { useDesignable, useRequest, useSchemaToolbar, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateActionInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateActionInitializer.tsx index 04b600b44..ee7d5c334 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/BulkUpdateActionInitializer.tsx @@ -1,4 +1,4 @@ -import { BlockInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { BlockInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; import { tval } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/CustomizeActionInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/CustomizeActionInitializer.tsx index 482095fbc..6196fdff6 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/CustomizeActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/CustomizeActionInitializer.tsx @@ -1,4 +1,4 @@ -import { BlockInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { BlockInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; export const CustomizeActionInitializer = () => { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/index.tsx b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/index.tsx index 097a244eb..d0c79d0b3 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/index.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/index.tsx @@ -1,4 +1,4 @@ -import { Plugin, useCollection } from '@nocobase/client'; +import { Plugin, useCollection } from '@tachybase/client'; import { tval } from '../../locale'; import { BulkWorkflowActionInitializer } from './BulkUpdateActionInitializer'; import { bulkWorkflowActionSettings } from './BulkUpdateAction.Settings'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/utils.tsx b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/utils.tsx index f16496c27..b03486288 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/utils.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-bulk/utils.tsx @@ -10,7 +10,7 @@ import { useRequest, useTableBlockContext, useVariables, -} from '@nocobase/client'; +} from '@tachybase/client'; import { App } from 'antd'; import { useContext } from 'react'; import { useNavigate } from 'react-router-dom'; diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/WorkflowTriggerInterceptor.tsx b/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/WorkflowTriggerInterceptor.tsx index ff3debdf4..c7da45d72 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/WorkflowTriggerInterceptor.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/WorkflowTriggerInterceptor.tsx @@ -1,4 +1,4 @@ -import { useCompile, useCollectionManager_deprecated, useCollectionDataSource } from '@nocobase/client'; +import { useCompile, useCollectionManager_deprecated, useCollectionDataSource } from '@tachybase/client'; import { lang, tval } from '../../locale'; import { diff --git a/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/index.ts b/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/index.ts index 92615fafd..836daab53 100644 --- a/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/features/workflow-interceptor/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import PluginWorkflow from '@tachybase/plugin-workflow/client'; import { WorkflowTriggerInterceptor } from './WorkflowTriggerInterceptor'; diff --git a/packages/plugins/@hera/plugin-core/src/client/hooks/useCustomComponent.tsx b/packages/plugins/@hera/plugin-core/src/client/hooks/useCustomComponent.tsx index 2620b7054..c24e87f1f 100644 --- a/packages/plugins/@hera/plugin-core/src/client/hooks/useCustomComponent.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/hooks/useCustomComponent.tsx @@ -1,4 +1,4 @@ -import { useApp } from '@nocobase/client'; +import { useApp } from '@tachybase/client'; import _ from 'lodash'; import { CustomComponentType, CustomFunctionComponent } from '..'; diff --git a/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterBlockActionProps.tsx b/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterBlockActionProps.tsx index 13d6d2e99..c7a57d42b 100644 --- a/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterBlockActionProps.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterBlockActionProps.tsx @@ -7,7 +7,7 @@ import { useCollection_deprecated, useCollectionManager_deprecated, useFilterBlock, -} from '@nocobase/client'; +} from '@tachybase/client'; import flat from 'flat'; import { hasDuplicateKeys } from '../utils'; diff --git a/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterFormCustomProps.tsx b/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterFormCustomProps.tsx index 271926366..f0df6cf28 100644 --- a/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterFormCustomProps.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/hooks/useFilterFormCustomProps.tsx @@ -1,4 +1,4 @@ -import { useSchemaInitializer } from '@nocobase/client'; +import { useSchemaInitializer } from '@tachybase/client'; export const useFilterFormCustomProps = () => { const { insert } = useSchemaInitializer(); diff --git a/packages/plugins/@hera/plugin-core/src/client/hooks/useNotifications.ts b/packages/plugins/@hera/plugin-core/src/client/hooks/useNotifications.ts index 79fd81555..cc30a411b 100644 --- a/packages/plugins/@hera/plugin-core/src/client/hooks/useNotifications.ts +++ b/packages/plugins/@hera/plugin-core/src/client/hooks/useNotifications.ts @@ -1,4 +1,4 @@ -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; export const useLinkKey = () => { const { data } = useRequest<{ data: any; diff --git a/packages/plugins/@hera/plugin-core/src/client/hooks/usePluginVersion.ts b/packages/plugins/@hera/plugin-core/src/client/hooks/usePluginVersion.ts index b33a4c5d2..105321753 100644 --- a/packages/plugins/@hera/plugin-core/src/client/hooks/usePluginVersion.ts +++ b/packages/plugins/@hera/plugin-core/src/client/hooks/usePluginVersion.ts @@ -1,4 +1,4 @@ -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; interface IPluginDetailData { packageJson: PackageJSON; } diff --git a/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts b/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts index f56922e4c..62b740d93 100644 --- a/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts +++ b/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts @@ -1,4 +1,4 @@ -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import { useMemo } from 'react'; export const TokenConfigurationResourceKey = 'token-configuration'; diff --git a/packages/plugins/@hera/plugin-core/src/client/index.tsx b/packages/plugins/@hera/plugin-core/src/client/index.tsx index b6d5592ff..7fb815a2f 100644 --- a/packages/plugins/@hera/plugin-core/src/client/index.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Plugin, EditTitleField } from '@nocobase/client'; +import { Plugin, EditTitleField } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import { isValid } from '@tachybase/schema'; import { autorun } from '@tachybase/schema'; @@ -66,6 +66,7 @@ import { PluginWorkflowInterceptor } from './features/workflow-interceptor'; import { PluginPDF } from './features/pdf'; import { PluginExtendedFilterForm } from './features/extended-filter-form'; import { PluginOutbound } from './features/outbound'; +import { PluginModeHighlight } from './features/mode-highlight'; export { usePDFViewerRef } from './schema-initializer'; export * from './components/custom-components/custom-components'; @@ -85,6 +86,7 @@ export class PluginCoreClient extends Plugin { await this.app.pm.add(PluginPDF); await this.app.pm.add(PluginExtendedFilterForm); await this.app.pm.add(PluginOutbound); + await this.app.pm.add(PluginModeHighlight); } async registerSettings() { diff --git a/packages/plugins/@hera/plugin-core/src/client/interfaces/AssociatedFieldInterface.ts b/packages/plugins/@hera/plugin-core/src/client/interfaces/AssociatedFieldInterface.ts index bd8640723..ee022cef0 100644 --- a/packages/plugins/@hera/plugin-core/src/client/interfaces/AssociatedFieldInterface.ts +++ b/packages/plugins/@hera/plugin-core/src/client/interfaces/AssociatedFieldInterface.ts @@ -1,4 +1,4 @@ -import { CollectionFieldInterface, defaultProps } from '@nocobase/client'; +import { CollectionFieldInterface, defaultProps } from '@tachybase/client'; export class AssociatedFieldInterface extends CollectionFieldInterface { name = 'associated'; diff --git a/packages/plugins/@hera/plugin-core/src/client/interfaces/CalcFieldInterface.ts b/packages/plugins/@hera/plugin-core/src/client/interfaces/CalcFieldInterface.ts index 85728c6c3..2d52597ef 100644 --- a/packages/plugins/@hera/plugin-core/src/client/interfaces/CalcFieldInterface.ts +++ b/packages/plugins/@hera/plugin-core/src/client/interfaces/CalcFieldInterface.ts @@ -1,4 +1,4 @@ -import { interfacesProperties, CollectionFieldInterface } from '@nocobase/client'; +import { interfacesProperties, CollectionFieldInterface } from '@tachybase/client'; const { defaultProps } = interfacesProperties; const formulaType = [ diff --git a/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomAssociatedFieldInterface.ts b/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomAssociatedFieldInterface.ts index b254e657a..c0732e1e5 100644 --- a/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomAssociatedFieldInterface.ts +++ b/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomAssociatedFieldInterface.ts @@ -1,4 +1,4 @@ -import { defaultProps, CollectionFieldInterface } from '@nocobase/client'; +import { defaultProps, CollectionFieldInterface } from '@tachybase/client'; export class CustomAssociatedFieldInterface extends CollectionFieldInterface { name = 'customAssociated'; diff --git a/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomFieldInterface.ts b/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomFieldInterface.ts index 48de1d7be..e42883430 100644 --- a/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomFieldInterface.ts +++ b/packages/plugins/@hera/plugin-core/src/client/interfaces/CustomFieldInterface.ts @@ -1,4 +1,4 @@ -import { interfacesProperties, CollectionFieldInterface } from '@nocobase/client'; +import { interfacesProperties, CollectionFieldInterface } from '@tachybase/client'; const { defaultProps } = interfacesProperties; export class CustomFieldInterface extends CollectionFieldInterface { diff --git a/packages/plugins/@hera/plugin-core/src/client/interfaces/ExcelFieldInterface.ts b/packages/plugins/@hera/plugin-core/src/client/interfaces/ExcelFieldInterface.ts index c89c92ecd..4d63de376 100644 --- a/packages/plugins/@hera/plugin-core/src/client/interfaces/ExcelFieldInterface.ts +++ b/packages/plugins/@hera/plugin-core/src/client/interfaces/ExcelFieldInterface.ts @@ -1,4 +1,4 @@ -import { defaultProps, CollectionFieldInterface } from '@nocobase/client'; +import { defaultProps, CollectionFieldInterface } from '@tachybase/client'; import { tval } from '../locale'; export class ExcelFieldInterface extends CollectionFieldInterface { diff --git a/packages/plugins/@hera/plugin-core/src/client/interfaces/SignaturePadFieldInterface.ts b/packages/plugins/@hera/plugin-core/src/client/interfaces/SignaturePadFieldInterface.ts index 1f28fa69a..d114743ff 100644 --- a/packages/plugins/@hera/plugin-core/src/client/interfaces/SignaturePadFieldInterface.ts +++ b/packages/plugins/@hera/plugin-core/src/client/interfaces/SignaturePadFieldInterface.ts @@ -1,4 +1,4 @@ -import { defaultProps, CollectionFieldInterface } from '@nocobase/client'; +import { defaultProps, CollectionFieldInterface } from '@tachybase/client'; import { tval } from '../locale'; export class SignaturePadFieldInterface extends CollectionFieldInterface { diff --git a/packages/plugins/@hera/plugin-core/src/client/interfaces/TstzrangeFieldInterface.ts b/packages/plugins/@hera/plugin-core/src/client/interfaces/TstzrangeFieldInterface.ts index 3d416fa7d..a71e3b187 100644 --- a/packages/plugins/@hera/plugin-core/src/client/interfaces/TstzrangeFieldInterface.ts +++ b/packages/plugins/@hera/plugin-core/src/client/interfaces/TstzrangeFieldInterface.ts @@ -1,4 +1,4 @@ -import { defaultProps, CollectionFieldInterface } from '@nocobase/client'; +import { defaultProps, CollectionFieldInterface } from '@tachybase/client'; import { tval } from '../locale'; export class TstzrangeFieldInterface extends CollectionFieldInterface { diff --git a/packages/plugins/@hera/plugin-core/src/client/locale.tsx b/packages/plugins/@hera/plugin-core/src/client/locale.tsx index 50d6bfa95..11ffe69f3 100644 --- a/packages/plugins/@hera/plugin-core/src/client/locale.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/locale.tsx @@ -1,4 +1,4 @@ -import { Application, useApp, tval as nTval, i18n } from '@nocobase/client'; +import { Application, useApp, tval as nTval, i18n } from '@tachybase/client'; const NAMESPACE = '@hera/plugin-core'; diff --git a/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx b/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx index f62e13bc7..af44d0aec 100644 --- a/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx @@ -1,6 +1,6 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { useSessionStorageState } from 'ahooks'; -import { App, Layout } from 'antd'; +import { App, Layout, Alert } from 'antd'; import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react'; import { Link, Outlet, useMatch, useNavigate, useParams } from 'react-router-dom'; import { @@ -16,7 +16,7 @@ import { useSystemSettings, useToken, AdminProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import { OnlineUserDropdown } from '../components/system/OnlineUserProvider'; import { MobileLink } from '../components/system/MobileLink'; import { Notifications } from '../components/system/Notifications'; @@ -301,25 +301,17 @@ export const InternalAdminLayout = () => {
{params.name && ( - + +
+
)} = () => { const { styles } = useStyles(); diff --git a/packages/plugins/@hera/plugin-core/src/client/pages/style.ts b/packages/plugins/@hera/plugin-core/src/client/pages/style.ts index b96f87065..2088ea293 100644 --- a/packages/plugins/@hera/plugin-core/src/client/pages/style.ts +++ b/packages/plugins/@hera/plugin-core/src/client/pages/style.ts @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; export const useStyles = createStyles(({ css }) => ({ home: css` diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-components/association-cascader/AssociationCascader.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-components/association-cascader/AssociationCascader.tsx index 523040d8c..3b360edc2 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-components/association-cascader/AssociationCascader.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-components/association-cascader/AssociationCascader.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { Cascader } from 'antd'; import { connect } from '@tachybase/schema'; -import { useCollectionManager, useRequest } from '@nocobase/client'; +import { useCollectionManager, useRequest } from '@tachybase/client'; import _ from 'lodash'; const AssociationCascader = connect((props) => { diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-components/auto-complete/AutoComplete.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-components/auto-complete/AutoComplete.tsx index 4b216611e..aac2c34a7 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-components/auto-complete/AutoComplete.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-components/auto-complete/AutoComplete.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { AutoComplete as AntdAutoComplete } from 'antd'; import { connect, useFieldSchema } from '@tachybase/schema'; -import { useAPIClient } from '@nocobase/client'; +import { useAPIClient } from '@tachybase/client'; import { useAsyncEffect } from 'ahooks'; import { fuzzysearch } from '../../utils'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/GroupBlock.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/GroupBlock.tsx index 5bfc9c86b..cbfa3dce6 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/GroupBlock.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/GroupBlock.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { useField, useFieldSchema } from '@tachybase/schema'; -import { useAPIClient, useBlockRequestContext, useFilterBlock } from '@nocobase/client'; +import { useAPIClient, useBlockRequestContext, useFilterBlock } from '@tachybase/client'; import { Descriptions, DescriptionsProps, Spin, Table } from 'antd'; import { transformers } from '../../schema-settings/GroupBlockConfigure'; import { useAsyncEffect } from 'ahooks'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/PDFViewer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/PDFViewer.tsx index 0bd3222c9..62fc7b323 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/PDFViewer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-components/blocks/PDFViewer.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef, useState } from 'react'; import { PDFViewer } from '../../components/PDFViewer'; import { Space } from 'antd'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { usePDFViewerRef } from '../../schema-initializer/blocks/PDFVIewerBlockInitializer'; export const InternalPDFViewer = (props) => { diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/CreateSubmitActionInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/CreateSubmitActionInitializer.tsx index 3b8ed658f..2f5647e90 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/CreateSubmitActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/CreateSubmitActionInitializer.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ActionInitializer, tval } from '@nocobase/client'; +import { ActionInitializer, tval } from '@tachybase/client'; export const CreateSubmitActionInitializer: React.FC = (props) => { const schema = { diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/hooks/useCreateActionProps.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/hooks/useCreateActionProps.tsx index fadd98473..05fe03d0b 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/hooks/useCreateActionProps.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/actions/hooks/useCreateActionProps.tsx @@ -14,11 +14,11 @@ import { useLocalVariables, useRecord, useVariables, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useTranslation } from 'react-i18next'; import { App, message } from 'antd'; import { useNavigate, useParams } from 'react-router-dom'; -import { isURL } from '@nocobase/utils/client'; +import { isURL } from '@tachybase/utils/client'; import { useCallback } from 'react'; import _ from 'lodash'; import { tval } from '../../../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/GroupBlockInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/GroupBlockInitializer.tsx index c113be719..7a2b2c156 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/GroupBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/GroupBlockInitializer.tsx @@ -11,9 +11,9 @@ import { SchemaToolbarProps, Icon, Plugin, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { createContext, useState } from 'react'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; import { Spin } from 'antd'; import { GroupBlockConfigure } from '../../schema-settings/GroupBlockConfigure'; import { GroupBlock } from '../../schema-components'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/PDFVIewerBlockInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/PDFVIewerBlockInitializer.tsx index 2875e9e82..ec5a68770 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/PDFVIewerBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/PDFVIewerBlockInitializer.tsx @@ -7,7 +7,7 @@ import { useApp, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; const PDFViewerContext = createContext(null); diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SettingBlockInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SettingBlockInitializer.tsx index 73275c03e..ee6b22d56 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SettingBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SettingBlockInitializer.tsx @@ -1,7 +1,7 @@ import { FormOutlined } from '@ant-design/icons'; import { FormLayout } from '@tachybase/components'; import { SchemaOptionsContext } from '@tachybase/schema'; -import { APIClientProvider, createFormBlockSchema, useAPIClient, useCollectionManager } from '@nocobase/client'; +import { APIClientProvider, createFormBlockSchema, useAPIClient, useCollectionManager } from '@tachybase/client'; import { DataBlockInitializer, FormDialog, @@ -10,7 +10,7 @@ import { useGlobalTheme, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useContext } from 'react'; import { tval, useTranslation } from '../../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SheetBlockInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SheetBlockInitializer.tsx index a0d014b7f..6a50b9b54 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SheetBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/blocks/SheetBlockInitializer.tsx @@ -9,9 +9,9 @@ import { useCollectionManager, DataBlockProvider, useDataBlockRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { createContext, useRef } from 'react'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; import { Button, Spin } from 'antd'; import Sheet, { SheetRef } from '../../components/excel-table/Sheet'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/items/CustomFilterFormItemInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/items/CustomFilterFormItemInitializer.tsx index 1abb5a0fa..30f4c631c 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/items/CustomFilterFormItemInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/items/CustomFilterFormItemInitializer.tsx @@ -25,7 +25,7 @@ import { useCompile, Select, useCollectionManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ConfigProvider, Radio, Space } from 'antd'; import React, { memo, useCallback, useContext, useMemo, Profiler } from 'react'; import { Schema, SchemaOptionsContext, observer, useField, useFieldSchema, useForm } from '@tachybase/schema'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-settings/GroupBlockConfigure.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-settings/GroupBlockConfigure.tsx index 80c69f25f..46a9b2c93 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-settings/GroupBlockConfigure.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-settings/GroupBlockConfigure.tsx @@ -3,7 +3,7 @@ import { SchemaSettingsModalItem, useBlockRequestContext, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useContext } from 'react'; import { useTranslation } from '../locale'; import { GroupBlockContext } from '../schema-initializer/blocks/GroupBlockInitializer'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePickerType.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePickerType.tsx index e65a5846e..44178a149 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePickerType.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePickerType.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { ISchema, useField, useFieldSchema } from '@tachybase/schema'; -import { SchemaSettingsModalItem, useCollectionManager, useDesignable } from '@nocobase/client'; +import { SchemaSettingsModalItem, useCollectionManager, useDesignable } from '@tachybase/client'; import { tval, useTranslation } from '../locale'; export const SchemaSettingsDatePickerType: React.FC = () => { diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePresets.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePresets.tsx index 3bf4f9323..f42b64fc9 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePresets.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsDatePresets.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { ISchema, useFieldSchema } from '@tachybase/schema'; -import { SchemaSettingsModalItem, useCollectionManager, useDesignable } from '@nocobase/client'; +import { SchemaSettingsModalItem, useCollectionManager, useDesignable } from '@tachybase/client'; import { tval, useTranslation } from '../locale'; -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; export const useCustomPresets1 = () => { const fieldSchema = useFieldSchema(); diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsRemove.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsRemove.tsx index eb3dc1559..6260902e8 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsRemove.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsRemove.tsx @@ -1,5 +1,5 @@ import { ISchema, useField, useFieldSchema, useForm } from '@tachybase/schema'; -import { SchemaSettingsItem, useFormActiveFields, useSchemaSettings } from '@nocobase/client'; +import { SchemaSettingsItem, useFormActiveFields, useSchemaSettings } from '@tachybase/client'; import { App, ModalFuncProps } from 'antd'; import { FC } from 'react'; import { useTranslation } from '../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsSubmitDataType.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsSubmitDataType.tsx index a902ffea8..1841e72e1 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsSubmitDataType.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-settings/SchemaSettingsSubmitDataType.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useFieldSchema } from '@tachybase/schema'; -import { SchemaSettingsSwitchItem, useDesignable } from '@nocobase/client'; +import { SchemaSettingsSwitchItem, useDesignable } from '@tachybase/client'; import { useTranslation } from '../locale'; // 选择提交数据方式,是否增量提交,默认全量提交 diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-settings/index.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-settings/index.tsx index ee7266c6b..ce21d3e07 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-settings/index.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-settings/index.tsx @@ -21,7 +21,7 @@ import { useVariables, VariableInput, VariableScopeProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import _ from 'lodash'; import React, { useCallback, useEffect, useMemo } from 'react'; import { useTranslation } from '../locale'; diff --git a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/Features.tsx b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/Features.tsx index 57a5d2ffd..22ff2a0db 100644 --- a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/Features.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/Features.tsx @@ -1,4 +1,4 @@ -import { useApp } from '@nocobase/client'; +import { useApp } from '@tachybase/client'; import { Card, Divider, List, Typography } from 'antd'; import React from 'react'; import PluginCoreClient from '..'; diff --git a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/HomePageConfiguration.tsx b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/HomePageConfiguration.tsx index 58b77687a..887eb8370 100644 --- a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/HomePageConfiguration.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/HomePageConfiguration.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; export const HomePageConfiguration = (props) => { return ( diff --git a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/LinkManager.tsx b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/LinkManager.tsx index 90bbaf732..e6893d199 100644 --- a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/LinkManager.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/LinkManager.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { Button, Drawer, Form, Input, Select, Space, Table } from 'antd'; import type { ColumnsType } from 'antd/es/table'; -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; export const LinkManager = () => { const [open, setOpen] = useState(false); const [formData, setFormData] = useState({}); diff --git a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/TokenConfiguration.tsx b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/TokenConfiguration.tsx index 91efbcdca..4a0fbed97 100644 --- a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/TokenConfiguration.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/TokenConfiguration.tsx @@ -1,4 +1,4 @@ -import { useAPIClient } from '@nocobase/client'; +import { useAPIClient } from '@tachybase/client'; import { useBoolean } from 'ahooks'; import { Button, Card, Form, Input, Tabs, message } from 'antd'; import React, { useEffect, useMemo } from 'react'; diff --git a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/index.ts b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/index.ts index 3e20b7d94..8f8352bf8 100644 --- a/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/index.ts +++ b/packages/plugins/@hera/plugin-core/src/client/settings-manager-components/index.ts @@ -1,4 +1,4 @@ -import { Application } from '@nocobase/client'; +import { Application } from '@tachybase/client'; import { tval } from '../locale'; import { Configuration } from './TokenConfiguration'; import { HomePageConfiguration } from './HomePageConfiguration'; diff --git a/packages/plugins/@hera/plugin-core/src/server/actions/departments.ts b/packages/plugins/@hera/plugin-core/src/server/actions/departments.ts index c896f3c35..4d3b368d7 100644 --- a/packages/plugins/@hera/plugin-core/src/server/actions/departments.ts +++ b/packages/plugins/@hera/plugin-core/src/server/actions/departments.ts @@ -1,4 +1,4 @@ -import type { Context, Next } from '@nocobase/actions'; +import type { Context, Next } from '@tachybase/actions'; export const getAppendsOwners = async (ctx: Context, next: Next) => { const { filterByTk, appends } = ctx.action.params; diff --git a/packages/plugins/@hera/plugin-core/src/server/actions/link-manager-controller.ts b/packages/plugins/@hera/plugin-core/src/server/actions/link-manager-controller.ts index 810cf9083..32b283b5a 100644 --- a/packages/plugins/@hera/plugin-core/src/server/actions/link-manager-controller.ts +++ b/packages/plugins/@hera/plugin-core/src/server/actions/link-manager-controller.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { Action, Controller } from '@nocobase/utils'; +import { Context } from '@tachybase/actions'; +import { Action, Controller } from '@tachybase/utils'; @Controller('link-manage') export class LinkManagerController { diff --git a/packages/plugins/@hera/plugin-core/src/server/actions/plugin-version.ts b/packages/plugins/@hera/plugin-core/src/server/actions/plugin-version.ts index 8ab9a0090..4610a8aa9 100644 --- a/packages/plugins/@hera/plugin-core/src/server/actions/plugin-version.ts +++ b/packages/plugins/@hera/plugin-core/src/server/actions/plugin-version.ts @@ -1,5 +1,5 @@ -import { Action, Controller, Inject } from '@nocobase/utils'; -import { Context, Next } from '@nocobase/actions'; +import { Action, Controller, Inject } from '@tachybase/utils'; +import { Context, Next } from '@tachybase/actions'; import { PluginVersionService } from '../services/plugin-version'; @Controller('hera') diff --git a/packages/plugins/@hera/plugin-core/src/server/actions/robot-controller.ts b/packages/plugins/@hera/plugin-core/src/server/actions/robot-controller.ts index 2b6ae149d..6088a4575 100644 --- a/packages/plugins/@hera/plugin-core/src/server/actions/robot-controller.ts +++ b/packages/plugins/@hera/plugin-core/src/server/actions/robot-controller.ts @@ -1,6 +1,6 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; import axios from 'axios'; -import { Action, Controller } from '@nocobase/utils'; +import { Action, Controller } from '@tachybase/utils'; @Controller('robot') export class RobotController { diff --git a/packages/plugins/@hera/plugin-core/src/server/actions/system-message-controller.ts b/packages/plugins/@hera/plugin-core/src/server/actions/system-message-controller.ts index f377855a5..29d9ca7b0 100644 --- a/packages/plugins/@hera/plugin-core/src/server/actions/system-message-controller.ts +++ b/packages/plugins/@hera/plugin-core/src/server/actions/system-message-controller.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { Action, Controller } from '@nocobase/utils'; +import { Context } from '@tachybase/actions'; +import { Action, Controller } from '@tachybase/utils'; @Controller('system_notifications') export class SystemMessageController { diff --git a/packages/plugins/@hera/plugin-core/src/server/actions/token-configuration-controller.ts b/packages/plugins/@hera/plugin-core/src/server/actions/token-configuration-controller.ts index d58951f46..32edb2873 100644 --- a/packages/plugins/@hera/plugin-core/src/server/actions/token-configuration-controller.ts +++ b/packages/plugins/@hera/plugin-core/src/server/actions/token-configuration-controller.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { Action, Controller } from '@nocobase/utils'; +import { Context } from '@tachybase/actions'; +import { Action, Controller } from '@tachybase/utils'; @Controller('token-configuration') export class TokenConfigurationController { diff --git a/packages/plugins/@hera/plugin-core/src/server/actions/users.ts b/packages/plugins/@hera/plugin-core/src/server/actions/users.ts index 6d6095e4a..977e85796 100644 --- a/packages/plugins/@hera/plugin-core/src/server/actions/users.ts +++ b/packages/plugins/@hera/plugin-core/src/server/actions/users.ts @@ -1,4 +1,4 @@ -import { DEFAULT_PAGE, DEFAULT_PER_PAGE, type Context, type Next } from '@nocobase/actions'; +import { DEFAULT_PAGE, DEFAULT_PER_PAGE, type Context, type Next } from '@tachybase/actions'; export const listExcludeDept = async (ctx: Context, next: Next) => { const { departmentId, page = DEFAULT_PAGE, pageSize = DEFAULT_PER_PAGE } = ctx.action.params; const repo = ctx.db.getRepository('users'); diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/departmentRoles.ts b/packages/plugins/@hera/plugin-core/src/server/collections/departmentRoles.ts index 0c8e8a9c0..1b6a41a5a 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/departmentRoles.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/departmentRoles.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'departmentsRoles', }); diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/departments.ts b/packages/plugins/@hera/plugin-core/src/server/collections/departments.ts index 90a559acc..b53097247 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/departments.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/departments.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export const ownersField = { interface: 'm2m', type: 'belongsToMany', diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/departmentsUsers.ts b/packages/plugins/@hera/plugin-core/src/server/collections/departmentsUsers.ts index be2af15ff..f8d1bd357 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/departmentsUsers.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/departmentsUsers.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'departmentsUsers', fields: [ diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations-attachments.ts b/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations-attachments.ts index 2516c0787..f4d1061c8 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations-attachments.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations-attachments.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations.ts b/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations.ts index 8d48b95fb..d697eaae0 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/home-page-presentations.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/link-manage.ts b/packages/plugins/@hera/plugin-core/src/server/collections/link-manage.ts index 409e7630e..4de4b53f3 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/link-manage.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/link-manage.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/roles.ts b/packages/plugins/@hera/plugin-core/src/server/collections/roles.ts index 39e53f91a..ef4d16703 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/roles.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/roles.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'roles', fields: [ diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/systemSettings.ts b/packages/plugins/@hera/plugin-core/src/server/collections/systemSettings.ts index 18d7e5b73..19f987c2c 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/systemSettings.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/systemSettings.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'systemSettings', diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/system_message.ts b/packages/plugins/@hera/plugin-core/src/server/collections/system_message.ts index 512a38a36..f85352e7f 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/system_message.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/system_message.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; // 跟随core插件,消息通知表 export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/token-configuration.ts b/packages/plugins/@hera/plugin-core/src/server/collections/token-configuration.ts index bd790503c..78390ed2f 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/token-configuration.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/token-configuration.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@hera/plugin-core/src/server/collections/users.ts b/packages/plugins/@hera/plugin-core/src/server/collections/users.ts index 0eeaacbad..81cdb24df 100644 --- a/packages/plugins/@hera/plugin-core/src/server/collections/users.ts +++ b/packages/plugins/@hera/plugin-core/src/server/collections/users.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export const departmentsField = { collectionName: 'users', interface: 'm2m', diff --git a/packages/plugins/@hera/plugin-core/src/server/features/RequestInterceptionTrigger.ts b/packages/plugins/@hera/plugin-core/src/server/features/RequestInterceptionTrigger.ts index 3608a0713..bbd310976 100644 --- a/packages/plugins/@hera/plugin-core/src/server/features/RequestInterceptionTrigger.ts +++ b/packages/plugins/@hera/plugin-core/src/server/features/RequestInterceptionTrigger.ts @@ -1,7 +1,7 @@ import PluginErrorHandler from '@nocobase/plugin-error-handler'; import { Trigger, EXECUTION_STATUS } from '@tachybase/plugin-workflow'; -import { joinCollectionName } from '@nocobase/data-source-manager'; -import type { Context, Next } from '@nocobase/actions'; +import { joinCollectionName } from '@tachybase/data-source-manager'; +import type { Context, Next } from '@tachybase/actions'; import PluginWorkflow from '@tachybase/plugin-workflow'; class RequestInterceptionError extends Error { diff --git a/packages/plugins/@hera/plugin-core/src/server/features/departments.ts b/packages/plugins/@hera/plugin-core/src/server/features/departments.ts index fa9409f20..89a689e3b 100644 --- a/packages/plugins/@hera/plugin-core/src/server/features/departments.ts +++ b/packages/plugins/@hera/plugin-core/src/server/features/departments.ts @@ -1,5 +1,5 @@ import type { CollectionRepository } from '@nocobase/plugin-collection-manager'; -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { aggregateSearch, diff --git a/packages/plugins/@hera/plugin-core/src/server/features/interception.ts b/packages/plugins/@hera/plugin-core/src/server/features/interception.ts index 5df2fedfa..2c46e938b 100644 --- a/packages/plugins/@hera/plugin-core/src/server/features/interception.ts +++ b/packages/plugins/@hera/plugin-core/src/server/features/interception.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import PluginWorkflow from '@tachybase/plugin-workflow'; import { RequestInterceptionTrigger } from './RequestInterceptionTrigger'; import { ApiTrigger } from './ApiTrigger'; diff --git a/packages/plugins/@hera/plugin-core/src/server/fields/calc.ts b/packages/plugins/@hera/plugin-core/src/server/fields/calc.ts index 48fed8598..46e0af842 100644 --- a/packages/plugins/@hera/plugin-core/src/server/fields/calc.ts +++ b/packages/plugins/@hera/plugin-core/src/server/fields/calc.ts @@ -1,4 +1,4 @@ -import { BaseColumnFieldOptions, DataTypes, Field, Model } from '@nocobase/database'; +import { BaseColumnFieldOptions, DataTypes, Field, Model } from '@tachybase/database'; export interface CalcFieldOptions extends BaseColumnFieldOptions { type: 'calc'; diff --git a/packages/plugins/@hera/plugin-core/src/server/fields/tstzrange.ts b/packages/plugins/@hera/plugin-core/src/server/fields/tstzrange.ts index 1eb1f4c6f..4ad868b24 100644 --- a/packages/plugins/@hera/plugin-core/src/server/fields/tstzrange.ts +++ b/packages/plugins/@hera/plugin-core/src/server/fields/tstzrange.ts @@ -1,4 +1,4 @@ -import { BaseColumnFieldOptions, DataTypes, Field, Model } from '@nocobase/database'; +import { BaseColumnFieldOptions, DataTypes, Field, Model } from '@tachybase/database'; export interface TstzrangeFieldOptions extends BaseColumnFieldOptions { type: 'tstzrange'; diff --git a/packages/plugins/@hera/plugin-core/src/server/middlewares/destroy-department-check.ts b/packages/plugins/@hera/plugin-core/src/server/middlewares/destroy-department-check.ts index 2c8cda6e6..28d4cfea5 100644 --- a/packages/plugins/@hera/plugin-core/src/server/middlewares/destroy-department-check.ts +++ b/packages/plugins/@hera/plugin-core/src/server/middlewares/destroy-department-check.ts @@ -1,4 +1,4 @@ -import type { Context, Next } from '@nocobase/actions'; +import type { Context, Next } from '@tachybase/actions'; const destroyCheck = async (ctx: Context) => { const { filterByTk } = ctx.action.params; diff --git a/packages/plugins/@hera/plugin-core/src/server/middlewares/reset-user-departments-cache.ts b/packages/plugins/@hera/plugin-core/src/server/middlewares/reset-user-departments-cache.ts index 2475f7135..afa7979d2 100644 --- a/packages/plugins/@hera/plugin-core/src/server/middlewares/reset-user-departments-cache.ts +++ b/packages/plugins/@hera/plugin-core/src/server/middlewares/reset-user-departments-cache.ts @@ -1,4 +1,4 @@ -import type { Context, Next } from '@nocobase/actions'; +import type { Context, Next } from '@tachybase/actions'; export const resetUserDepartmentsCache = async (ctx: Context, next: Next) => { await next(); diff --git a/packages/plugins/@hera/plugin-core/src/server/middlewares/set-department-owners.ts b/packages/plugins/@hera/plugin-core/src/server/middlewares/set-department-owners.ts index b91fa1c53..9e3b3755c 100644 --- a/packages/plugins/@hera/plugin-core/src/server/middlewares/set-department-owners.ts +++ b/packages/plugins/@hera/plugin-core/src/server/middlewares/set-department-owners.ts @@ -1,4 +1,4 @@ -import type { Context, Next } from '@nocobase/actions'; +import type { Context, Next } from '@tachybase/actions'; import _ from 'lodash'; const setOwners = async (ctx: Context, filterByTk, owners) => { diff --git a/packages/plugins/@hera/plugin-core/src/server/middlewares/set-departments-roles.ts b/packages/plugins/@hera/plugin-core/src/server/middlewares/set-departments-roles.ts index dcb4e1ad8..18a02baf2 100644 --- a/packages/plugins/@hera/plugin-core/src/server/middlewares/set-departments-roles.ts +++ b/packages/plugins/@hera/plugin-core/src/server/middlewares/set-departments-roles.ts @@ -1,5 +1,5 @@ -import type { Context, Next } from '@nocobase/actions'; -import type { ArrayFieldRepository } from '@nocobase/database'; +import type { Context, Next } from '@tachybase/actions'; +import type { ArrayFieldRepository } from '@tachybase/database'; export const setDepartmentsInfo = async (ctx: Context, next: Next) => { const currentUser = ctx.state.currentUser; diff --git a/packages/plugins/@hera/plugin-core/src/server/middlewares/set-main-department.ts b/packages/plugins/@hera/plugin-core/src/server/middlewares/set-main-department.ts index 929418a2d..624452a44 100644 --- a/packages/plugins/@hera/plugin-core/src/server/middlewares/set-main-department.ts +++ b/packages/plugins/@hera/plugin-core/src/server/middlewares/set-main-department.ts @@ -1,4 +1,4 @@ -import type { Context, Next } from '@nocobase/actions'; +import type { Context, Next } from '@tachybase/actions'; export const setMainDepartment = async (ctx: Context, next: Next) => { await next(); diff --git a/packages/plugins/@hera/plugin-core/src/server/middlewares/update-department-isleaf.ts b/packages/plugins/@hera/plugin-core/src/server/middlewares/update-department-isleaf.ts index f82830bd7..e88773da7 100644 --- a/packages/plugins/@hera/plugin-core/src/server/middlewares/update-department-isleaf.ts +++ b/packages/plugins/@hera/plugin-core/src/server/middlewares/update-department-isleaf.ts @@ -1,4 +1,4 @@ -import type { Context, Next } from '@nocobase/actions'; +import type { Context, Next } from '@tachybase/actions'; const updateIsLeafWhenAddChild = async (repo, parent) => { if (parent && parent.isLeaf !== false) { diff --git a/packages/plugins/@hera/plugin-core/src/server/models/department.ts b/packages/plugins/@hera/plugin-core/src/server/models/department.ts index 634a229e4..b2274b6a6 100644 --- a/packages/plugins/@hera/plugin-core/src/server/models/department.ts +++ b/packages/plugins/@hera/plugin-core/src/server/models/department.ts @@ -1,4 +1,4 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; export class DepartmentModel extends Model { getOwners() { return this.getMembers({ diff --git a/packages/plugins/@hera/plugin-core/src/server/plugin.ts b/packages/plugins/@hera/plugin-core/src/server/plugin.ts index 4925893dd..595ef0e24 100644 --- a/packages/plugins/@hera/plugin-core/src/server/plugin.ts +++ b/packages/plugins/@hera/plugin-core/src/server/plugin.ts @@ -1,4 +1,4 @@ -import Application, { InstallOptions, Plugin, type PluginOptions } from '@nocobase/server'; +import Application, { InstallOptions, Plugin, type PluginOptions } from '@tachybase/server'; import path from 'path'; import CalcField from './fields/calc'; import { SqlLoader } from './services/sql-loader'; @@ -7,7 +7,7 @@ import { FontManager } from './services/font-manager'; import { HomePageService } from './services/home-page-service'; import { WebControllerService as WebService } from './services/web-service'; import './actions'; -import { Container } from '@nocobase/utils'; +import { Container } from '@tachybase/utils'; import { DepartmentsPlugin } from './features/departments'; import TstzrangeField from './fields/tstzrange'; import { PluginInterception } from './features/interception'; diff --git a/packages/plugins/@hera/plugin-core/src/server/services/connection-manager.ts b/packages/plugins/@hera/plugin-core/src/server/services/connection-manager.ts index 5a49f16e7..aaa67b4e1 100644 --- a/packages/plugins/@hera/plugin-core/src/server/services/connection-manager.ts +++ b/packages/plugins/@hera/plugin-core/src/server/services/connection-manager.ts @@ -1,9 +1,9 @@ -import Application, { Gateway } from '@nocobase/server'; +import Application, { Gateway } from '@tachybase/server'; import WebSocket from 'ws'; import jwt from 'jsonwebtoken'; import { createClient } from 'redis'; import { currentProcessNum, isMain } from '../utils/multiprocess'; -import { App, Service } from '@nocobase/utils'; +import { App, Service } from '@tachybase/utils'; const KEY_ONLINE_USERS = 'online_users'; @Service() diff --git a/packages/plugins/@hera/plugin-core/src/server/services/font-manager.ts b/packages/plugins/@hera/plugin-core/src/server/services/font-manager.ts index 90a68447a..71de168ad 100644 --- a/packages/plugins/@hera/plugin-core/src/server/services/font-manager.ts +++ b/packages/plugins/@hera/plugin-core/src/server/services/font-manager.ts @@ -2,7 +2,7 @@ import fs from 'fs-extra'; import path from 'path'; import { Font } from '@react-pdf/renderer'; import axios from 'axios'; -import { Service } from '@nocobase/utils'; +import { Service } from '@tachybase/utils'; @Service() export class FontManager { diff --git a/packages/plugins/@hera/plugin-core/src/server/services/home-page-service.ts b/packages/plugins/@hera/plugin-core/src/server/services/home-page-service.ts index 738797b48..27cb4530c 100644 --- a/packages/plugins/@hera/plugin-core/src/server/services/home-page-service.ts +++ b/packages/plugins/@hera/plugin-core/src/server/services/home-page-service.ts @@ -1,6 +1,6 @@ -import Application from '@nocobase/server'; -import { Service, App, Db } from '@nocobase/utils'; -import Database from '@nocobase/database'; +import Application from '@tachybase/server'; +import { Service, App, Db } from '@tachybase/utils'; +import Database from '@tachybase/database'; @Service() export class HomePageService { diff --git a/packages/plugins/@hera/plugin-core/src/server/services/plugin-version.ts b/packages/plugins/@hera/plugin-core/src/server/services/plugin-version.ts index 73db0be64..bd545086b 100644 --- a/packages/plugins/@hera/plugin-core/src/server/services/plugin-version.ts +++ b/packages/plugins/@hera/plugin-core/src/server/services/plugin-version.ts @@ -1,5 +1,5 @@ -import Application, { PluginManager } from '@nocobase/server'; -import { Service, App } from '@nocobase/utils'; +import Application, { PluginManager } from '@tachybase/server'; +import { Service, App } from '@tachybase/utils'; @Service() export class PluginVersionService { @@ -8,6 +8,7 @@ export class PluginVersionService { async get() { const pm = this.app.pm as PluginManager; - return pm.get('@hera/plugin-core').toJSON(); + const plugin = pm.get('@hera/plugin-core') ?? pm.get('core'); + return plugin.toJSON(); } } diff --git a/packages/plugins/@hera/plugin-core/src/server/services/sql-loader.ts b/packages/plugins/@hera/plugin-core/src/server/services/sql-loader.ts index 363c4276c..ff0d25248 100644 --- a/packages/plugins/@hera/plugin-core/src/server/services/sql-loader.ts +++ b/packages/plugins/@hera/plugin-core/src/server/services/sql-loader.ts @@ -1,7 +1,7 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import fs from 'fs-extra'; import path from 'path'; -import { Service, Db } from '@nocobase/utils'; +import { Service, Db } from '@tachybase/utils'; import { isMain } from '../utils/multiprocess'; @Service() diff --git a/packages/plugins/@hera/plugin-core/src/server/services/system-setting-service.ts b/packages/plugins/@hera/plugin-core/src/server/services/system-setting-service.ts index 306ce28fd..012f7f10b 100644 --- a/packages/plugins/@hera/plugin-core/src/server/services/system-setting-service.ts +++ b/packages/plugins/@hera/plugin-core/src/server/services/system-setting-service.ts @@ -1,5 +1,5 @@ -import { Service, Db } from '@nocobase/utils'; -import Database from '@nocobase/database'; +import { Service, Db } from '@tachybase/utils'; +import Database from '@tachybase/database'; export interface SystemSetting { title: string; diff --git a/packages/plugins/@hera/plugin-core/src/server/services/web-service.ts b/packages/plugins/@hera/plugin-core/src/server/services/web-service.ts index 0258fe708..daff144e3 100644 --- a/packages/plugins/@hera/plugin-core/src/server/services/web-service.ts +++ b/packages/plugins/@hera/plugin-core/src/server/services/web-service.ts @@ -1,6 +1,6 @@ -import { Context, Next } from '@nocobase/actions'; -import { Container, Service, Inject, App, ActionDef } from '@nocobase/utils'; -import Application from '@nocobase/server'; +import { Context, Next } from '@tachybase/actions'; +import { Container, Service, Inject, App, ActionDef } from '@tachybase/utils'; +import Application from '@tachybase/server'; @Service() export class WebControllerService { diff --git a/packages/plugins/@hera/plugin-external-data-source/package.json b/packages/plugins/@hera/plugin-external-data-source/package.json index f315bbff8..c08018907 100644 --- a/packages/plugins/@hera/plugin-external-data-source/package.json +++ b/packages/plugins/@hera/plugin-external-data-source/package.json @@ -12,9 +12,10 @@ "@types/lodash": "^4.17.0" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/plugin-data-source-manager": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/data-source-manager": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" } } diff --git a/packages/plugins/@hera/plugin-external-data-source/src/client/index.tsx b/packages/plugins/@hera/plugin-external-data-source/src/client/index.tsx index fee0eb60a..3ea0edaba 100644 --- a/packages/plugins/@hera/plugin-external-data-source/src/client/index.tsx +++ b/packages/plugins/@hera/plugin-external-data-source/src/client/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Plugin, SchemaComponent } from '@nocobase/client'; -import {} from '@nocobase/client'; +import { Plugin, SchemaComponent } from '@tachybase/client'; +import {} from '@tachybase/client'; import { PluginDataSourceManagerClient } from '@nocobase/plugin-data-source-manager/client'; import { Space } from 'antd'; import { generateNTemplate as tval, usePluginTranslation } from './locale'; diff --git a/packages/plugins/@hera/plugin-external-data-source/src/client/locale.ts b/packages/plugins/@hera/plugin-external-data-source/src/client/locale.ts index 9244f8cf3..4aefde70b 100644 --- a/packages/plugins/@hera/plugin-external-data-source/src/client/locale.ts +++ b/packages/plugins/@hera/plugin-external-data-source/src/client/locale.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = '@hera/plugin-external-data-source'; diff --git a/packages/plugins/@hera/plugin-external-data-source/src/server/plugin.ts b/packages/plugins/@hera/plugin-external-data-source/src/server/plugin.ts index 415bafe47..5d779c28b 100644 --- a/packages/plugins/@hera/plugin-external-data-source/src/server/plugin.ts +++ b/packages/plugins/@hera/plugin-external-data-source/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { PostgresDataSource } from './postgres-data-source'; export class PluginExternalDataSourceServer extends Plugin { diff --git a/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-collection-manager.ts b/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-collection-manager.ts index 9b9dd600b..5ec978a3d 100644 --- a/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-collection-manager.ts +++ b/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-collection-manager.ts @@ -1,2 +1,2 @@ -import { SequelizeCollectionManager } from '@nocobase/data-source-manager'; +import { SequelizeCollectionManager } from '@tachybase/data-source-manager'; export class PostgresCollectionManager extends SequelizeCollectionManager {} diff --git a/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-data-source.ts b/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-data-source.ts index 167be8d30..7ffd97b7d 100644 --- a/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-data-source.ts +++ b/packages/plugins/@hera/plugin-external-data-source/src/server/postgres-data-source.ts @@ -1,5 +1,5 @@ -import { DataSource } from '@nocobase/data-source-manager'; -import { Database } from '@nocobase/database'; +import { DataSource } from '@tachybase/data-source-manager'; +import { Database } from '@tachybase/database'; import { PostgresCollectionManager } from './postgres-collection-manager'; import { DatabaseIntrospector } from './services/database-introspector'; import typeInterfaceMap from './services/type-interface-map'; diff --git a/packages/plugins/@hera/plugin-external-data-source/src/server/services/database-introspector.ts b/packages/plugins/@hera/plugin-external-data-source/src/server/services/database-introspector.ts index 0fc6587e4..9680b8731 100644 --- a/packages/plugins/@hera/plugin-external-data-source/src/server/services/database-introspector.ts +++ b/packages/plugins/@hera/plugin-external-data-source/src/server/services/database-introspector.ts @@ -1,4 +1,4 @@ -import { ViewFieldInference } from '@nocobase/database'; +import { ViewFieldInference } from '@tachybase/database'; import { mergeOptions } from '@nocobase/plugin-data-source-manager'; import { EventEmitter } from 'events'; import _ from 'lodash'; diff --git a/packages/plugins/@hera/plugin-rental/package.json b/packages/plugins/@hera/plugin-rental/package.json index b56e6643b..168fefd7b 100644 --- a/packages/plugins/@hera/plugin-rental/package.json +++ b/packages/plugins/@hera/plugin-rental/package.json @@ -26,15 +26,15 @@ }, "peerDependencies": { "@hera/plugin-core": "workspace:*", - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-collection-manager": "workspace:*", "@nocobase/plugin-data-visualization": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供标准化的租赁管理系统,包括从物料到合同再到劳务人员的全面管理,同时提供健全的财务管理机制,以及实时监控租赁体系的运作能力。", "displayName.zh-CN": "创兴管理系统" diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/DetailChecks.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/DetailChecks.tsx index cb50559aa..30ef1551f 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/DetailChecks.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/DetailChecks.tsx @@ -3,7 +3,7 @@ import _ from 'lodash'; import { CustomComponentType, CustomFunctionComponent } from '@hera/plugin-core/client'; import { useField, useFieldSchema, useForm } from '@tachybase/schema'; import { FormPath } from '@tachybase/schema'; -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import { Space, Spin, Tag } from 'antd'; export const DetailChecks: CustomFunctionComponent = () => { diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/MovementStatus.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/MovementStatus.tsx new file mode 100644 index 000000000..8d4fce3c2 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/MovementStatus.tsx @@ -0,0 +1,50 @@ +import { ArrowRightOutlined } from '@ant-design/icons'; +import { observer, useField, useForm } from '@tachybase/schema'; +import { Col, Row, Tag } from 'antd'; +import React from 'react'; +import { useCompany } from '../hooks'; +import { css, useCollectionManager } from '@tachybase/client'; + +export const MovementStatus = observer( + (props: any) => { + const form = useForm(); + const field = useField(); + const contarct = form.getValuesIn(field.path.slice(0, 2).entire); + const { name: appendLeft } = sliceCompany(props.value === '-1' ? props.left : props.right); + const { name: appendRight } = sliceCompany(props.value === '-1' ? props.right : props.left); + const { data: company } = useCompany([appendLeft, appendRight], contarct?.contract?.id); + const cm = useCollectionManager(); + const titleField = cm.getCollection('company').titleField; + const left = company?.data[0] ? company?.data[0][appendLeft]?.[titleField] : '-'; + const right = company?.data[0] ? company?.data[0][appendRight]?.[titleField] : '-'; + return ( + props.onChange(props.value === '-1' ? '1' : '-1')} + > + {left} + + {right} + + ); + }, + { displayName: 'MovementStatus' }, +); + +const sliceCompany = (props) => { + const company = { name: '' }; + if (props) { + const match = props.match(/{{[^.]*\.(.*)}}/)[1]; + company.name = match; + } + return company; +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordDetails.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordDetails.tsx index 85c0531a1..f66f180f5 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordDetails.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordDetails.tsx @@ -3,10 +3,10 @@ import _ from 'lodash'; import { CustomComponentType, CustomFunctionComponent } from '@hera/plugin-core/client'; import { useField, useFieldSchema, useForm } from '@tachybase/schema'; import { FormPath } from '@tachybase/schema'; -import { useRequest } from '@nocobase/client'; +import { useCollection, useRequest } from '@tachybase/client'; import { Descriptions, Spin } from 'antd'; import { formatQuantity } from '../../utils/currencyUtils'; - +import { useProducts } from '../hooks'; export const RecordDetails: CustomFunctionComponent = () => { const form = useForm(); const fieldSchema = useFieldSchema(); @@ -14,103 +14,116 @@ export const RecordDetails: CustomFunctionComponent = () => { const path: any = field.path.entire; const fieldPath = path?.replace(`.${fieldSchema.name}`, ''); const itemPath = FormPath.parse('.', fieldPath).toString(); + const collection = useCollection(); + const record_id = + collection.template === 'view' ? form.getValuesIn(itemPath).record_id : form.getValuesIn(itemPath).id; const reqRecordItems = useRequest({ resource: 'record_items', action: 'list', params: { - appends: ['product', 'product.category'], + appends: ['new_product'], filter: { - record_id: form.getValuesIn(itemPath).id, + record_id, }, pageSize: 999, }, }); + const { data: products } = useProducts(); const reqRecordItemFeeItems = useRequest({ - resource: 'record_item_fee_items', + resource: 'record_contract', action: 'list', params: { - appends: ['product', 'record_item', 'record_item.product'], + appends: ['fees'], filter: { - record_item: { - record_id: form.getValuesIn(itemPath).id, - }, + record_id: { $eq: record_id }, }, pageSize: 999, }, }); - const productItem = {}; - let feeItems = null; + const feeItems = {}; // 根据关联产品名称来合并赔偿 if (reqRecordItemFeeItems.data) { - feeItems = reqRecordItemFeeItems.data.data?.reduce((prev, current) => { - if (current.record_item.product) { - const key = current.record_item.product.name; - if (!(key in prev)) { - prev[key] = {}; + reqRecordItemFeeItems.data.data?.forEach((contract, index) => { + if (!contract.fees.length) return; + const movement = contract.movement === '-1' ? '出库合同' : '入库合同'; + const contractfee = {}; + contract.fees.forEach((value) => { + if (!value.new_product_id) return; + const productItem = products.find((product) => product.id === value.new_product_id); + const categoryProductItem = products.find((product) => product.id === productItem.parentId); + const item = products.find((product) => product.id === value.new_fee_product_id); + const categoryItem = products.find((product) => product.id === item.parentId); + if (!productItem && !item && !categoryItem) return; + const key = categoryProductItem?.id || value.new_product_id; + const label = categoryItem.name ? `${categoryItem.name}[${item.name}]` : item.name; + if (!Object.keys(contractfee).includes(key)) { + contractfee[key] = {}; } - if (!current.product) { - return prev; - } - if (!(current.product.label in prev[key])) { - prev[key][current.product.label] = { - id: current.product.id, - label: current.product.label, + if (!Object.keys(contractfee).includes(categoryItem.id)) { + contractfee[key][categoryItem.id] = { + productId: key, + label, count: 0, }; } - prev[key][current.product.label].count += current.count; - } - return prev; - }, {}); + contractfee[key][categoryItem.id].count += value.count; + }); + feeItems[movement + (index + 1)] = contractfee; + }); } const items = []; - - if (reqRecordItems.data && feeItems) { + const productItem = {}; + if (reqRecordItems.data) { reqRecordItems.data.data?.forEach((item) => { - if (!item.product) return; - const key = item.product.name; - const count = item.product.category.convertible ? item.count * item.product.ratio : item.count; - const unit = item.product.category.convertible - ? item.product.category.conversion_unit - : item.product.category.unit; + if (!item.new_product_id) return; + const categoryItem = products.find((value) => value.id === item.new_product.parentId); + const key = categoryItem?.id || item.new_product.id; + const count = categoryItem?.convertible ? item.count * item.new_product.ratio : item.count; + const unit = categoryItem?.convertible ? categoryItem?.conversion_unit ?? '' : categoryItem?.unit ?? ''; - const weight = item.count * item.product.weight; + const weight = item.count * item.new_product.weight; if (productItem[key]) { productItem[key].count += count; + productItem[key].weight += weight; } else { productItem[key] = { - key: item.product.category_id, - label: item.product.name, - sort: item.product.category.sort, + key, + label: categoryItem?.name || item.new_product.name, unit, count, - weight: formatQuantity(weight, 2) + 'KG', + weight: weight, }; } }); for (const key in productItem) { + productItem[key]['children'] = formatQuantity(productItem[key].count, 2) + productItem[key].unit; + productItem[key]['span'] = 1; items.push(productItem[key]); - productItem[key].children = formatQuantity(productItem[key].count, 2) + productItem[key].unit; - productItem[key].span = 1; items.push({ label: '理论重量', - children: [productItem[key].weight], + children: formatQuantity(productItem[key].weight, 2) + 'KG', }); - - if (key in feeItems) { - productItem[key].span = 1; - const children = []; - for (const feeKey in feeItems[key]) { - if (children.length > 0) { - children.push(
); + if (Object.keys(feeItems).length) { + for (const fee in feeItems) { + const children = {}; + children['movement'] = fee; + const feeItem = feeItems[fee][key]; + if (!feeItem || !Object.keys(feeItem).length) { + items.push({ + label: '维修赔偿', + children: [''], + }); + } else { + children['label'] = Object.values(feeItem).reduce((pev, curr) => { + return pev + `${curr['label']}:${curr['count']}`; + }, ''); + items.push({ + label: '维修赔偿', + children: `${children['movement']} : ${children['label']}`, + }); } - children.push(feeItems[key][feeKey].label + ' ' + formatQuantity(feeItems[key][feeKey].count, 2)); } - items.push({ - label: '维修赔偿', - children, - }); } else { items.push({ label: '维修赔偿', @@ -119,7 +132,7 @@ export const RecordDetails: CustomFunctionComponent = () => { } } } - items.sort((a, b) => a.sort - b.sort); + items.sort((a, b) => a.key - b.key); if (reqRecordItems.loading || reqRecordItemFeeItems.loading) { return ; } diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx index a547968c0..7bb6b2a73 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx @@ -1,213 +1,170 @@ -import { onFieldInit, onFieldValueChange } from '@tachybase/schema'; +import { observer } from '@tachybase/schema'; import { useField, useForm, useFormEffects } from '@tachybase/schema'; -import { CustomComponentType, CustomFunctionComponent } from '@hera/plugin-core/client'; -import { useRequest } from '@nocobase/client'; +import { CustomComponentType, CustomFC, CustomFunctionComponent } from '@hera/plugin-core/client'; +import { useRequest } from '@tachybase/client'; import _ from 'lodash'; import React, { useEffect, useState } from 'react'; import { ConversionLogics, Movement, countCource } from '../../utils/constants'; import { formatQuantity } from '../../utils/currencyUtils'; +import { useCachedRequest, useFeeItems, useProductFeeItems, useProducts } from '../hooks'; +import { useDeepCompareEffect } from 'ahooks'; -export const RecordFeeConvertedAmount: CustomFunctionComponent = () => { - // 查数据,查里面的费用关联的数据 - const contractPlans = useRequest({ - resource: 'contract_plans', - action: 'list', - params: { - appends: [ - 'lease_items', - 'lease_items.products', - 'lease_items.fee_items', - 'lease_items.fee_items.conversion_logic', - 'lease_items.fee_items.conversion_logic.weight_items', - 'fee_items', - 'fee_items.conversion_logic', - 'fee_items.conversion_logic.weight_items', - ], - pageSize: 99999, - }, - }); - const productCategory = useRequest({ - resource: 'product_category', - action: 'list', - params: { - pageSize: 99999, - }, - }); - const [result, setResult] = useState('-'); - const [items, setItems] = useState([]); - const [feeItems, setFeeItems] = useState([]); - const [recordWeight, setWeight] = useState(0); +export const RecordFeeConvertedAmount = observer((props) => { const form = useForm(); const field = useField(); - const recordData = { - items: items, - record_fee_items: feeItems, - }; - const calcCount = () => { - const path = field.path.entire as string; - const newPath = path.replace('.converted_count.RecordFeeConvertedAmount', ''); - const pathArray: any = newPath.split('.'); - let target: any = recordData; - for (let i = 0; i < pathArray.length; i++) { - if (!isNaN(pathArray[i])) { - pathArray[i] = parseInt(pathArray[i]); - } - target = target[pathArray[i]]; - } - let calcValue = 0; - let feeRule; - if (form.values.contract_plan) { - const recordPlaid = contractPlans.data.data.find( - (item) => - item.id === form.values.contract_plan.id || - (item.contract_id === form.values.contract_id && - item.start_date <= form.values.date && - item.end_date >= form.values.date), - ); - const feeData = target; - if (pathArray.length > 2) { - // 关联产品费用 - const itemData = items[pathArray[1]]; - const productData = itemData?.product; - // 租金规则 - const leaseRule = recordPlaid.lease_items.find((rule) => - rule.products.find( - (product) => product.id - 99999 === productData.category_id || product.id === productData.id, - ), - ); - // 租金规则中的费用规则 - feeRule = leaseRule.fee_items.find((fee) => fee.fee_product_id === feeData.product?.id); - if (!feeRule || !feeRule.conversion_logic_id || !feeRule.count_source) return; - if (feeRule.count_source === countCource.artificial) { - // 手工录入 - calcValue = feeData.count || 0; - } else if ( - (feeRule.count_source === countCource.outProduct && form.values.movement === Movement.out) || - (feeRule.count_source === countCource.enterProduct && form.values.movement === Movement.in) || - feeRule.count_source === countCource.product - ) { - // 出库量, 入库量, 出入库量 - calcValue = itemData.count || 0; - } - const category = productCategory.data.data.find((item) => item.id === productData.category_id); - if ( - feeRule.conversion_logic_id === ConversionLogics.Keep || - feeRule.conversion_logic_id === ConversionLogics.ActualWeight - ) { - // 不必处理 - } else if (feeRule.conversion_logic_id === ConversionLogics.Product) { - calcValue = category.convertible ? calcValue * productData.ratio : calcValue; - } else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) { - calcValue = calcValue * productData.weight; - } else { - const weightItem = feeRule.conversion_logic?.weight_items.find( - (item) => item.product_id - 99999 === category.id || item.product_id === productData.id, - ); - if (!weightItem) return; - if (weightItem.conversion_logic_id === ConversionLogics.Keep) { - calcValue = calcValue * weightItem.weight; - } else if (weightItem.conversion_logic_id === ConversionLogics.Product) { - calcValue = category.convertible - ? calcValue * productData.ratio * weightItem.weight - : calcValue * weightItem.weight; - } - } - if (!productData) return; - // 定位组件所在的费用数据位置 - } else { - feeRule = recordPlaid.fee_items.find((fee) => fee.fee_product_id === feeData.product?.id); - if (!feeRule) return; - let count; - const category = productCategory.data.data.find((item) => item.id === feeData.product?.category_id); - // 人工录入 - if (feeRule.count_source === countCource.artificial) { - count = feeData.count; - if (feeRule.conversion_logic_id === ConversionLogics.Keep) { - calcValue = count; - } else if (feeRule.conversion_logic_id === ConversionLogics.Product) { - calcValue = category.convertible ? count * feeData.product?.ratio : count; - } else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) { - calcValue = count * (feeData.product?.weight || 1); - } else if (feeRule.conversion_logic_id === ConversionLogics.ActualWeight) { - calcValue = form.values?.weight; - } else { - const weightItem = feeRule.conversion_logic?.weight_items.find((item) => { - item.product_id - 99999 === category.id || item.product_id === feeData.product.id; - }); - if (!weightItem) return; - if (weightItem.conversion_logic_id === ConversionLogics.Keep) { - calcValue = count * weightItem.weight; - } else if (weightItem.conversion_logic_id === ConversionLogics.Product) { - calcValue = category.convertible - ? count * feeData.product.ratio * weightItem.weight - : count * weightItem.weight; - } - } - } else { - // 出库/入库/出入库量 - // 出库单,但是规则不是出库产品量 - if (form.values.movement === Movement.out && feeRule.count_source === countCource.enterProduct) return; - // 入库单,但是规则不是入库产品量 - if (form.values.movement === Movement.in && feeRule.count_source === countCource.outProduct) return; - count = feeData.count; - if (feeRule.conversion_logic_id === ConversionLogics.Keep) { - calcValue = count; - } else if (feeRule.conversion_logic_id === ConversionLogics.Product) { - calcValue = category.convertible ? count * feeData.product.ratio : count; - } else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) { - calcValue = count * (feeData.product.weight || 1); - } else if (feeRule.conversion_logic_id === ConversionLogics.ActualWeight) { - calcValue = form.values.weight; - } else { - let val = 0; - items.forEach((item) => { - const weightItem = feeRule.conversion_logic?.weight_items.find( - (fee) => item.product?.id === fee.product_id - 99999 || item.product?.id === fee.product_id, - ); - if (!weightItem) return; - if (weightItem.conversion_logic_id === ConversionLogics.Keep) { - val += item.count * weightItem.weight; - } else if (weightItem.conversion_logic_id === ConversionLogics.Product) { - val += category.convertible - ? item.count * feeData.product?.ratio * weightItem.weight - : item.count * weightItem.weight; - } - }); - calcValue = val / 1000; - } - } - } - } - setResult(formatQuantity(calcValue, 2) + (feeRule ? feeRule.unit : '')); - }; - useFormEffects(() => { - onFieldInit('items.*', () => { - setItems(_.cloneDeep(form.values.items)); - }); - onFieldValueChange('items.*', () => { - setItems(_.cloneDeep(form.values.items)); - }); - onFieldInit('record_fee_items.*', () => { - setFeeItems(_.cloneDeep(form.values.record_fee_items)); - }); - onFieldValueChange('record_fee_items.*', () => { - setFeeItems(_.cloneDeep(form.values.record_fee_items)); - }); - onFieldInit('weight', () => { - setWeight(_.cloneDeep(form.values.weight)); - }); - onFieldValueChange('weight', () => { - setWeight(_.cloneDeep(form.values.weight)); - }); + const contractsItem = form.getValuesIn(field.path.slice(0, 2).entire); + const date = form.getValuesIn('date'); + const formFeeItem = form.getValuesIn(field.path.slice(0, -2).entire); + const contractPlanId = [contractsItem.contract?.id].filter(Boolean); + const { data: products } = useProducts(); + const { data: feeItems } = useFeeItems(contractPlanId, date); + const { data: productFeeRuleItems } = useProductFeeItems(contractPlanId, date); + const reqWeightRules = useCachedRequest({ + resource: 'weight_rules', + action: 'list', + params: { + pageSize: 99999, + }, }); - useEffect(() => { - if (!contractPlans.loading && !productCategory.loading) { - calcCount(); + const result = {}; + if ( + contractsItem.contract?.id && + products && + formFeeItem.new_product?.id && + formFeeItem.new_fee_product?.id && + formFeeItem.count && + Object.keys(productFeeRuleItems).length + ) { + const productItem = products.find((value) => value.id === formFeeItem.new_product.id); + const categoryItem = products.find((value) => value.id === productItem.parentId); + const feeProductItem = products.find((value) => value.id === formFeeItem.new_fee_product.id); + const productFeeItem = productFeeRuleItems[contractsItem.contract.id].find((contractItem) => + productItem?.['parentScopeId'].includes(contractItem.new_products_id), + ); + const feeItem = productFeeItem?.fee_items?.find((value) => + feeProductItem?.['parentScopeId'].includes(value.new_fee_products_id), + ); + const calc = { unit: categoryItem.unit, count: 0 }; + if (feeItem.count_source === countCource.artificial) { + const { count, unit } = feeCalc( + feeItem, + productItem, + formFeeItem.count, + categoryItem, + form.values, + reqWeightRules?.data?.data, + ); + + calc.unit = unit; + calc.count = count; + } else if ( + ((feeItem.count_source === countCource.outProduct || feeItem.count_source === countCource.outItem) && + contractsItem.movement === '-1') || + ((feeItem.count_source === countCource.enterProduct || feeItem.count_source === countCource.enterItem) && + contractsItem.movement === '1') || + feeItem.count_source === countCource.product || + feeItem.count_source === countCource.item + ) { + const item = form.values.items.find((value) => value.new_product.id === formFeeItem.new_product.id); + const { count, unit } = feeCalc( + feeItem, + productItem, + item.count, + categoryItem, + form.values, + reqWeightRules?.data?.data, + ); + calc.unit = unit; + calc.count = count; } - }, [items, contractPlans, productCategory, feeItems, recordWeight]); - return {result}; -}; + result['unit'] = calc.unit; + result['count'] = calc.count; + } else if ( + contractsItem.contract?.id && + products && + !formFeeItem.new_product?.id && + formFeeItem.new_fee_product?.id && + formFeeItem.count && + Object.keys(feeItems).length + ) { + const feeItem = products.find((value) => value.id === formFeeItem.new_fee_product.id); + const ruleItem = feeItems[contractsItem.contract.id]?.find((value) => + feeItem?.['parentScopeId'].includes(value.new_fee_products_id), + ); + const calc = { unit: ruleItem.unit, count: 0 }; + if ( + ruleItem.count_source === countCource.artificial || + ruleItem.conversion_logic_id === ConversionLogics.ActualWeight + ) { + calc.count = formFeeItem.count; + if (ruleItem.conversion_logic_id === ConversionLogics.ActualWeight) calc.unit = '吨'; + } else if ( + ((ruleItem.count_source === countCource.outProduct || ruleItem.count_source === countCource.outItem) && + contractsItem.movement === '-1') || + ((ruleItem.count_source === countCource.enterProduct || ruleItem.count_source === countCource.enterItem) && + contractsItem.movement === '1') || + ruleItem.count_source === countCource.product || + ruleItem.count_source === countCource.item + ) { + calc.count = [...form.values.items].reduce((prv, curr) => { + if (!curr.new_product?.id) return prv + 0; + const productItem = products.find((value) => value.id === curr.new_product.id); + const categoryItem = products.find((value) => value.id === productItem.parentId); + const { count, unit } = feeCalc( + ruleItem, + productItem, + curr.count, + categoryItem, + form.values, + reqWeightRules?.data?.data, + ); + return prv + count; + }, 0); + } + result['unit'] = calc.unit; + result['count'] = calc.count; + } + useDeepCompareEffect(() => { + form.setValuesIn(field.path.entire, result); + }, [formFeeItem, result]); + return {`${result['count'] || 0}${result['unit'] || ''}`}; +}) as CustomFC; RecordFeeConvertedAmount.displayName = 'RecordFeeConvertedAmount'; RecordFeeConvertedAmount.__componentType = CustomComponentType.CUSTOM_FIELD; RecordFeeConvertedAmount.__componentLabel = '费用 - 换算数量'; + +const feeCalc = (rule, item, itemCount, category, form, weightRule) => { + const calc = { count: 0, unit: '' }; + if (rule.conversion_logic_id === ConversionLogics.Keep) { + calc.count = itemCount; + calc.unit = category.unit; + } else if (rule.conversion_logic_id === ConversionLogics.Product) { + calc.count = category.convertible ? item.ratio * itemCount : itemCount; + calc.unit = category.convertible ? category.conversion_unit : category.unit; + } else if (rule.conversion_logic_id === ConversionLogics.ActualWeight) { + const groupWeight = + form.group_weight_items?.find((value) => value.new_products?.id === category.id) || form.weight || 0; + calc.count = groupWeight; + calc.unit = '吨'; + } else if (rule.conversion_logic_id === ConversionLogics.ProductWeight) { + calc.count = (itemCount * item.weight) / 1000; + calc.unit = '吨'; + } else { + const weightRuleItem = weightRule?.find( + (weightItem) => weightItem.logic_id === rule.conversion_logic_id && weightItem.new_product_id === item.id, + ); + if (weightRuleItem) { + if (weightRuleItem.conversion_logic_id === ConversionLogics.Keep) { + calc.count = (itemCount * weightRuleItem.weight) / 1000; + calc.unit = '吨'; + } else if (weightRuleItem.conversion_logic_id === ConversionLogics.Product) { + calc.count = category.convertible + ? (itemCount * item.ratio * weightRuleItem.weight) / 1000 + : (itemCount * weightRuleItem.weight) / 1000; + calc.unit = '吨'; + } + } + } + return calc; +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx index ed50a2ac1..95602f3c0 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx @@ -1,7 +1,7 @@ import { onFieldInit, onFieldValueChange } from '@tachybase/schema'; import { useForm, useFormEffects } from '@tachybase/schema'; import { CustomComponentType, CustomFunctionComponent } from '@hera/plugin-core/client'; -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import _ from 'lodash'; import React, { useEffect, useState } from 'react'; import { ConversionLogics, Movement, countCource } from '../../utils/constants'; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeScope.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeScope.tsx index 34f7577d5..608a7f4cb 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeScope.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeScope.tsx @@ -1,69 +1,64 @@ import _ from 'lodash'; import { Spin } from 'antd'; -import React from 'react'; +import React, { useEffect } from 'react'; import { observer, useField, useFieldSchema, useForm } from '@tachybase/schema'; import { CustomComponentType, CustomFC } from '@hera/plugin-core/client'; -import { useFeeItems } from '../hooks'; +import { useCachedRequest, useFeeItems, useProductFeeItems, useProducts } from '../hooks'; import { useDeepCompareEffect } from 'ahooks'; export const RecordFeeScope = observer(() => { const form = useForm(); - const fieldSchema = useFieldSchema(); const field = useField(); - const path: any = field.path.entire; - const fieldPath = path?.replace(`.${fieldSchema.name}`, ''); - const item = form.getValuesIn(field.path.slice(0, -2).entire); - let _loading = false; - let contractLoading = false; - const data = { - data: [], - }; - if (form.values.record_category === '1' || form.values.record_category === '0') { - let _in = [], - _out = []; - const { data: inData, loading: inLoading } = useFeeItems( - item.product?.category_id, - form.values.in_contract_plan?.id, + const contractsItem = form.getValuesIn(field.path.slice(0, 2).entire); + const date = form.getValuesIn('date'); + const productsItem = form.getValuesIn(field.path.slice(0, -2).entire); + const contractPlanId = [contractsItem.contract?.id].filter(Boolean); + const { data: products } = useProducts(); + const { data: feeItems } = useFeeItems(contractPlanId, date); + const { data: productFeeItems } = useProductFeeItems(contractPlanId, date); + const result = []; + const feeScope = { scopeItem: {} }; + if (contractsItem.contract?.id && products && productsItem.new_product?.id && Object.values(productFeeItems).length) { + const productItem = products.find((value) => value.id === productsItem.new_product.id); + const productFeeItem = productFeeItems[contractsItem.contract?.id]?.find((contractItem) => + productItem?.['parentScopeId'].includes(contractItem.new_products_id), ); - _in = inData?.data || []; - contractLoading = contractLoading || inLoading; - if (form.values.record_category === '1') { - const { data: outData, loading: outLoading } = useFeeItems( - item.product?.category_id, - form.values.out_contract_plan?.id, - ); - _out = outData?.data || []; - contractLoading = contractLoading || outLoading; - } - data.data = [..._in, ..._out]; - } else { - const { data: origin, loading } = useFeeItems(item.product?.category_id, form.values.contract_plan?.id); - data.data = origin?.data; - _loading = _loading || loading; - } - let result = []; - if (data.data?.length > 0) { - const items = data.data as { - products: { category_id: Number }[]; - fee_items: { fee_product_id: Number }[]; - }[]; - result = items.reduce((acc, current) => { - acc.push(...current.fee_items.map((item) => ({ id: item.fee_product_id }))); - return acc; - }, []); + productFeeItem?.fee_items.forEach((feeItem) => { + const item = products.find((value) => value.id === feeItem.new_fee_products_id); + if (!item) return; + feeScope.scopeItem = isExist(feeScope.scopeItem, item); + }); + result.push(...Object.values(feeScope.scopeItem)); + } else if (contractsItem.contract?.id && products && Object.values(feeItems).length) { + feeItems[contractsItem.contract.id]?.forEach((feeItem) => { + const item = products.find((value) => value.id === feeItem.new_fee_products_id); + if (!item) return; + feeScope.scopeItem = isExist(feeScope.scopeItem, item); + }); + result.push(...Object.values(feeScope.scopeItem)); } useDeepCompareEffect(() => { - form.setValuesIn(fieldPath, result); - }, [result, form, fieldPath]); - - return ((form.values.record_category === '1' || form.values.record_category === '0') && contractLoading) || - _loading ? ( - - ) : ( - <> - ); + form.setValuesIn(field.path.slice(0, -1).entire, result); + }, [result, form]); + return !contractsItem ? : <>; }) as CustomFC; RecordFeeScope.displayName = 'RecordFeeScope'; RecordFeeScope.__componentType = CustomComponentType.CUSTOM_ASSOCIATED_FIELD; RecordFeeScope.__componentLabel = '记录单 - 费用范围'; + +const isExist = (feeItemScope, item) => { + if (!Object.keys(feeItemScope).length) feeItemScope[item.id] = item; + const isParent = Object.values(feeItemScope)?.find( + (value) => value['parentScopeId'].includes(item.id) && item.id !== value['id'], + ); + const isChildren = Object.values(feeItemScope)?.find( + (value) => item['parentScopeId'].includes(value['id']) && item.id !== value['id'], + ); + if (isParent) return feeItemScope; + if (isChildren) { + delete feeItemScope[isChildren['id']]; + } + feeItemScope[item.id] = item; + return feeItemScope; +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemCount.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemCount.tsx index 8b8759f61..a78920bbb 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemCount.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemCount.tsx @@ -4,30 +4,21 @@ import { observer, useField, useForm } from '@tachybase/schema'; import _ from 'lodash'; import { formatQuantity } from '../../utils/currencyUtils'; import { Spin } from 'antd'; -import { useCachedRequest } from '../hooks'; +import { useCachedRequest, useProducts } from '../hooks'; export const RecordItemCount = observer((props) => { const form = useForm(); const field = useField(); - const param = { - resource: 'product_category', - action: 'list', - params: { - pageSize: 99999, - }, - }; - const { loading, data } = useCachedRequest(param); - - if (!data && loading) { + const { data } = useProducts(); + if (!data) { return ; } const item = form.getValuesIn(field.path.slice(0, -2).entire); - if (item?.product && item?.count) { - const category = data.data?.find((category) => category.id === item?.product.category_id); + if (item?.new_product && item?.count) { + const category = data.find((category) => category.id === item?.new_product.parentId); if (!category) return; - const value = category.convertible ? (item.product.ratio || 0) * item.count : item.count; + const value = category.convertible ? (item.new_product.ratio || 0) * item.count : item.count; const unit = category.convertible ? category.conversion_unit : category.unit || ''; - return {formatQuantity(value, 2) + unit}; } return - ; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx index 14cade392..c09d9c64c 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx @@ -2,27 +2,24 @@ import React from 'react'; import { CustomComponentType, CustomFC } from '@hera/plugin-core/client'; import { observer, useField, useForm } from '@tachybase/schema'; import _ from 'lodash'; -import { ConversionLogics, RecordCategory } from '../../utils/constants'; +import { ConversionLogics } from '../../utils/constants'; import { formatQuantity } from '../../utils/currencyUtils'; -import { useCachedRequest, useLeaseItems, useProductFeeItems } from '../hooks'; +import { useCachedRequest, useLeaseItems, useProducts } from '../hooks'; // 计价数量 export const RecordItemValuationQuantity = observer((props) => { const form = useForm(); const field = useField(); - const contractPlanId = form.getValuesIn('contract_plan')?.id; - const inContractPlanId = form.getValuesIn('in_contract_plan')?.id; - const outContractPlanId = form.getValuesIn('out_contract_plan')?.id; - const priceItems = form.getValuesIn('price_items'); + const contractPlanId = form + .getValuesIn('new_contracts') + ?.map((value) => { + return value.contract?.id; + }) + .filter(Boolean); + const contractPlan = form.getValuesIn('new_contracts'); + const date = form.getValuesIn('date'); const result = []; - const reqProduct = useCachedRequest({ - resource: 'product', - action: 'list', - params: { - appends: ['category'], - pageSize: 99999, - }, - }); + const { data: reqProduct } = useProducts(); const reqWeightRules = useCachedRequest({ resource: 'weight_rules', action: 'list', @@ -30,116 +27,25 @@ export const RecordItemValuationQuantity = observer((props) => { pageSize: 99999, }, }); - const { data: leaseItems } = useLeaseItems(contractPlanId); - const { data: inLeaseItems } = useLeaseItems(inContractPlanId); - const { data: outLeaseItems } = useLeaseItems(outContractPlanId); - const { data: ProductFeeItems } = useProductFeeItems(contractPlanId); - const { data: inProductFeeItems } = useProductFeeItems(inContractPlanId); - const { data: outProductFeeItems } = useProductFeeItems(outContractPlanId); + const { data: leaseItems } = useLeaseItems(contractPlanId, date); const item = form.getValuesIn(field.path.slice(0, -2).entire); - if (item?.product && item?.count) { + + if (item?.new_product && item?.count && Object.keys(leaseItems).length) { // 关联产品 - if (!reqProduct.data) { + if (!reqProduct) { return; } - const productCategory = reqProduct.data.data?.find( - (product) => product.category_id === item.product?.category_id, - )?.category; - // 合同 - if (form.values.category === RecordCategory.lease && leaseItems) { - const rule = leaseItems.data.find((leaseItem) => - leaseItem.products.find( - (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, - ), - ); - const feeRule = ProductFeeItems?.data.find((feeItem) => feeItem.fee_product_id === item.product?.id); - let count; - if (!rule && feeRule) { - count = subtotal(feeRule, item, productCategory, reqWeightRules, 'fee'); - } else { - count = subtotal(rule, item, productCategory, reqWeightRules); - } - count && result.push({ label: '合同', value: count }); - } - // 采购 - if (form.values.category === RecordCategory.purchase && priceItems) { - const rule = priceItems?.find( - (rule) => rule.product?.category_id === item.product?.category_id || rule.product?.id === item.product?.id, - ); - if (rule) { - rule.conversion_logic_id = rule.conversion_logic?.id; - const count = subtotal(rule, item, productCategory, reqWeightRules); - count && result.push({ label: '报价', value: count }); - } - } - // 暂存或结存 - if (form.values.category === RecordCategory.inventory || form.values.category === RecordCategory.staging) { - result.push([{ label: '', value: '-' }]); - } - // 采购直发 - if (form.values.category === RecordCategory.purchase2lease && priceItems && inLeaseItems) { - const rule = priceItems?.find( - (rule) => rule.product?.category_id === item.product?.category_id || rule.product?.id === item.product?.id, - ); - if (rule) { - rule.conversion_logic_id = rule.conversion_logic.id; - const count = subtotal(rule, item, productCategory, reqWeightRules); - count && result.push({ label: '报价', value: count }); - } - - const leaseRule = inLeaseItems.data.find((leaseItem) => - leaseItem.products.find( - (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, - ), - ); - const feeRule = inProductFeeItems?.data.find( - (feeItem) => - feeItem.fee_product_id === item.product?.id || item.product?.category_id === feeItem.fee_product.category_id, - ); - let count; - if (!leaseRule && feeRule) { - count = subtotal(feeRule, item, productCategory, reqWeightRules, 'fee'); - } else { - count = subtotal(leaseRule, item, productCategory, reqWeightRules); - } - count && result.push({ label: '入库合同', value: count }); - } - // 租赁直发 - if (form.values.category === RecordCategory.lease2lease && inLeaseItems && outLeaseItems) { - const contractPlain_out = outLeaseItems.data.find((leaseItem) => - leaseItem.products.find( - (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, - ), - ); - const contractPlain_out_fee = outProductFeeItems?.data.find( - (feeItem) => - feeItem.fee_product_id === item.product?.id || item.product?.category_id === feeItem.fee_product.category_id, - ); - let count_out; - if (!contractPlain_out && contractPlain_out_fee) { - count_out = subtotal(contractPlain_out_fee, item, productCategory, reqWeightRules, 'fee'); - } else { - count_out = subtotal(contractPlain_out, item, productCategory, reqWeightRules); - } - count_out && result.push({ label: '出库合同', value: count_out }); - const contractPlain_in = inLeaseItems.data.find((leaseItem) => - leaseItem.products.find( - (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, - ), - ); - const contractPlain_in_fee = outProductFeeItems?.data.find( - (feeItem) => - feeItem.fee_product_id === item.product?.id || item.product?.category_id === feeItem.fee_product.category_id, - ); - let count_in; - if (!contractPlain_in && contractPlain_in_fee) { - count_in = subtotal(contractPlain_in_fee, item, productCategory, reqWeightRules, 'fee'); - } else { - count_in = subtotal(contractPlain_in, item, productCategory, reqWeightRules); - } - count_in && result.push({ label: '入库合同', value: count_in }); - } + const productCategory = reqProduct.find((value) => value.id === item.new_product.parentId); + contractPlan.forEach((contractPlanItem, index) => { + if (!contractPlanItem.contract) return; + const rule = leaseItems[contractPlanItem.contract.id]?.find((product) => { + return selParentId(reqProduct, item.new_product, product.new_products_id); + }); + const count = subtotal(rule, item, productCategory, reqWeightRules); + const movement = contractPlanItem.movement === '-1' ? '出库' : '入库'; + count && result.push({ label: movement + '合同' + (index + 1), value: count }); + }); } return ( <> @@ -156,21 +62,17 @@ RecordItemValuationQuantity.displayName = 'RecordItemValuationQuantity'; RecordItemValuationQuantity.__componentType = CustomComponentType.CUSTOM_FIELD; RecordItemValuationQuantity.__componentLabel = '记录单 - 明细 - 计价数量'; -const subtotal = (rule: any, itemData: any, productCategory: any, reqWeightRules: any, item?: any) => { +const subtotal = (rule: any, itemData: any, productCategory: any, reqWeightRules: any) => { let count: number; let unit: string; if (rule?.conversion_logic_id === ConversionLogics.Keep) { count = itemData.count; - unit = item ? rule.unit || '' : productCategory.unit || ''; + unit = productCategory.unit || ''; } else if (rule?.conversion_logic_id === ConversionLogics.Product) { - count = productCategory.convertible ? itemData.count * itemData.product.ratio : itemData.count; - unit = item - ? rule.unit || '' - : productCategory.convertible - ? productCategory.conversion_unit || '' - : productCategory.unit || ''; + count = productCategory.convertible ? itemData.count * itemData.new_product.ratio : itemData.count; + unit = productCategory.convertible ? productCategory.conversion_unit || '' : productCategory.unit || ''; } else if (rule?.conversion_logic_id === ConversionLogics.ProductWeight) { - count = item ? itemData.count : (itemData.count * itemData.product.weight) / 1000; + count = (itemData.count * itemData.weight) / 1000; unit = '吨'; } else if (rule?.conversion_logic_id === ConversionLogics.ActualWeight) { count = 0; @@ -178,23 +80,29 @@ const subtotal = (rule: any, itemData: any, productCategory: any, reqWeightRules } else { // 查询重量规则 const weightRule = reqWeightRules?.data?.data?.find( - (weight_item) => - weight_item.logic_id === rule?.conversion_logic_id && - (weight_item.product_id === itemData.product?.id || - weight_item.product_id === itemData.product?.category_id + 99999), + (weightItem) => + weightItem.logic_id === rule?.conversion_logic_id && weightItem.new_product_id === itemData.new_product.id, ); - if (!weightRule) return; - if (weightRule.conversion_logic_id === ConversionLogics.Keep) { - count = item ? (itemData.count || 0) * weightRule.weight : ((itemData.count || 0) * weightRule.weight) / 1000; + if (weightRule?.conversion_logic_id === ConversionLogics.Keep) { + count = ((itemData.count || 0) * weightRule.weight) / 1000; unit = '吨'; - } else if (weightRule.conversion_logic_id === ConversionLogics.Product) { - const sacl = productCategory.convertible ? itemData.product.ratio : 1; - count = item - ? (itemData.count || 0) * sacl * weightRule.weight - : ((itemData.count || 0) * sacl * weightRule.weight) / 1000; + } else if (weightRule?.conversion_logic_id === ConversionLogics.Product) { + const sacl = productCategory.convertible ? itemData.ratio : 1; + count = ((itemData.count || 0) * sacl * weightRule.weight) / 1000; unit = '吨'; } } const res = count > 0 ? formatQuantity(count, 2) + unit : '-'; return res; }; + +const selParentId = (products, item, priceItemsId) => { + if (item.id === priceItemsId || item?.parentId === priceItemsId) { + return item; + } else if (item.parentId) { + const productItem = products.find((value) => value.id === item.parentId); + return selParentId(products, productItem, priceItemsId); + } else { + return false; + } +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemWeight.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemWeight.tsx index f73457f5d..f1842ff5c 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemWeight.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemWeight.tsx @@ -8,10 +8,10 @@ export const RecordItemWeight = observer((props) => { const form = useForm(); const field = useField(); const item = form.getValuesIn(field.path.slice(0, -2).entire); - if (item?.product && item?.count) { - const value = ((item.product.weight || 0) * item.count) / 1000; + if (item?.new_product && item?.count) { + const value = ((item.new_product.weight || 0) * item.count) / 1000; if (value) { - return {formatQuantity(value, 2) + '吨'}; + return {formatQuantity(value, 3) + '吨'}; } } return - ; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordProductScope.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordProductScope.tsx index 50444e49e..882de6e1b 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordProductScope.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordProductScope.tsx @@ -4,147 +4,51 @@ import React from 'react'; import { observer, useForm } from '@tachybase/schema'; import { RecordCategory } from '../../utils/constants'; import { CustomComponentType, CustomFC } from '@hera/plugin-core/client'; -import { useCachedRequest, useLeaseItems, useProductFeeItems } from '../hooks'; +import { useCachedRequest, useLeaseItems, useProducts } from '../hooks'; import { useDeepCompareEffect } from 'ahooks'; export const RecordProductScope = observer(() => { const form = useForm(); - const contractPlanId = form.getValuesIn('contract_plan')?.id; - const inContractPlanId = form.getValuesIn('in_contract_plan')?.id; - const outContractPlanId = form.getValuesIn('out_contract_plan')?.id; - - let required = { price: false, contract: false, inContract: false, outContract: false }; - const { data, loading } = useCachedRequest({ - resource: 'product', - action: 'list', - params: { - pageSize: 99999, - }, - }); - const { data: leaseItems, loading: leaseItemsLoading } = useLeaseItems(contractPlanId); - const { data: feeseItems, loading: feeItemsLoading } = useProductFeeItems(contractPlanId); - const { data: inLeaseItems, loading: inLeaseItemsLoading } = useLeaseItems(inContractPlanId); - const { data: inFeeseItems, loading: inFeeItemsLoading } = useProductFeeItems(inContractPlanId); - const { data: outLeaseItems, loading: outLeaseItemsLoading } = useLeaseItems(outContractPlanId); - const { data: outFeeseItems, loading: outFeeItemsLoading } = useProductFeeItems(outContractPlanId); - - /** - * 合同费用数据格式trans - */ - const transFee = (fee: any[]) => { - if (fee) { - const feeData = fee.map((fee) => { - const data = { - ...fee, - }; - data.products = [data.fee_product]; - return data; - }); - return feeData || []; - } else { - return []; - } - }; - - /** - * 生成合同产品/费用的id或category_id数据 - */ - const contractLeaseFee = (leaseData, feeData) => { - const data = - [...leaseData, ...transFee(feeData)].reduce((acc, current) => { - acc.push( - ...current.products.map((item) => { - if (item.id < 99999) { - return { id: item.id }; - } else { - return { category_id: item.id - 99999 }; - } - }), + const contractPlanId = form + .getValuesIn('new_contracts') + ?.map((value) => { + return value.contract?.id; + }) + .filter(Boolean); + const contractPlan = form.getValuesIn('new_contracts'); + const date = form.getValuesIn('date'); + const { data: products } = useProducts(); + const { data: leaseItems } = useLeaseItems(contractPlanId, date); + const result = []; + if (contractPlanId?.length && products && Object.keys(leaseItems).length) { + const leaseItem = {}; + contractPlan.forEach((contractPlanItem) => { + leaseItems[contractPlanItem.contract?.id]?.forEach((contractItem) => { + if (!contractItem.new_products?.id) return; + const item = products.find((value) => value.id === contractItem.new_products.id); + const isParent = Object.values(leaseItem).find( + (value) => value['parentScopeId'].includes(item.id) && item.id !== value['id'], ); - return acc; - }, []) ?? []; - return data; - }; - const contractProducts = contractLeaseFee(leaseItems?.data || [], feeseItems?.data); - const inContractProducts = contractLeaseFee(inLeaseItems?.data || [], inFeeseItems?.data); - const inContractFee = contractLeaseFee([], inFeeseItems?.data); - const outContractProducts = contractLeaseFee(outLeaseItems?.data || [], outFeeseItems?.data); - - const priceProducts = - form.values.price_items - ?.filter((item) => item.product) - .map((item) => { - if (item.product.id > 99999) { - return { - category_id: item.product.category_id, - }; + const isChildren = Object.values(leaseItem).find( + (value) => item['parentScopeId'].includes(value['id']) && item.id !== value['id'], + ); + if (isParent) return; + if (isChildren) { + delete leaseItem[isChildren['id']]; + leaseItem[item.id] = item; } else { - return { - id: item.product.id, - }; + leaseItem[item.id] = item; } - }) ?? []; - - switch (form.values.category) { - case RecordCategory.lease: - required = { price: false, contract: true, inContract: false, outContract: false }; - break; - case RecordCategory.purchase: - required = { price: true, contract: false, inContract: false, outContract: false }; - break; - case RecordCategory.lease2lease: - required = { price: false, contract: false, inContract: true, outContract: true }; - break; - case RecordCategory.purchase2lease: // 报价,入库合同的产品范围交集, 加入入库合同的费用数据 - required = { price: true, contract: false, inContract: true, outContract: false }; - break; - case RecordCategory.inventory: - case RecordCategory.staging: - required = { price: false, contract: false, inContract: false, outContract: false }; - break; - default: - break; - } - let result = data?.data ?? []; - if (required.inContract && required.outContract) { - // 租赁直发单 - const intersection = [ - _.intersectionBy(inContractProducts, outContractProducts, 'id'), - _.intersectionBy(inContractProducts, outContractProducts, 'category_id'), - ].flat(); - const data = intersectionByMultiple(result, intersection, 'category_id'); - result = [_.intersectionBy(result, intersection, 'id'), data].flat(); - } else if (required.price && required.inContract) { - const intersection = [ - _.intersectionBy(inContractProducts, priceProducts, 'id'), - _.intersectionBy(inContractProducts, priceProducts, 'category_id'), - ].flat(); - intersection.push(...inContractFee); - const data = intersectionByMultiple(result, intersection, 'category_id'); - result = [_.intersectionBy(result, intersection, 'id'), data].flat(); - } else if (required.price) { - const data = intersectionByMultiple(result, priceProducts, 'category_id'); - result = [_.intersectionBy(result, priceProducts, 'id'), data].flat(); - } else if (required.contract) { - const data = intersectionByMultiple(result, contractProducts, 'category_id'); - result = [_.intersectionBy(result, contractProducts, 'id'), data].flat(); + }); + }); + result.push(...Object.values(leaseItem)); } useDeepCompareEffect(() => { form.setValues({ product_scope: result, }); }, [result, form]); - return loading || - leaseItemsLoading || - inLeaseItemsLoading || - outLeaseItemsLoading || - feeItemsLoading || - inFeeItemsLoading || - outFeeItemsLoading ? ( - - ) : ( - <> - ); + return !Object.keys(leaseItems).length && !products ? : <>; }) as CustomFC; RecordProductScope.displayName = 'RecordProductScope'; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordSummary.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordSummary.tsx index fc65ccb46..292250473 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordSummary.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordSummary.tsx @@ -1,21 +1,22 @@ import { observer, useForm } from '@tachybase/schema'; -import { ConversionLogics, RecordCategory } from '../../utils/constants'; +import { ConversionLogics } from '../../utils/constants'; import { Descriptions, Tabs } from 'antd'; -import { CustomComponentType, CustomFC, CustomFunctionComponent } from '@hera/plugin-core/client'; +import { CustomComponentType, CustomFC } from '@hera/plugin-core/client'; import React from 'react'; import _ from 'lodash'; import { formatCurrency, formatQuantity } from '../../utils/currencyUtils'; -import { useCachedRequest, useLeaseItems, useProductFeeItems } from '../hooks'; -import { RecordItems } from '../../interfaces/records'; -const cache = []; +import { useCachedRequest, useLeaseItems, useProducts } from '../hooks'; export const RecordSummary = observer((): any => { - cache.length = 0; const form = useForm(); - const contractPlanId = form.values.contract_plan?.id; - const inContractPlanId = form.values.in_contract_plan?.id; - const outContractPlanId = form.values.out_contract_plan?.id; - - const leaseData = form.values.price_items; + const contractPlanId = form + .getValuesIn('new_contracts') + ?.map((value) => { + return value.contract?.id; + }) + .filter(Boolean); + const contractPlan = form.getValuesIn('new_contracts'); + const date = form.getValuesIn('date'); + const resultForm = form.values; const reqWeightRules = useCachedRequest({ resource: 'weight_rules', action: 'list', @@ -23,136 +24,75 @@ export const RecordSummary = observer((): any => { pageSize: 99999, }, }); - const reqProduct = useCachedRequest({ - resource: 'product', - action: 'list', - params: { - appends: ['category'], - pageSize: 99999, - }, - }); + const { data: products } = useProducts(); //合同方案 - const { data: leaseItems } = useLeaseItems(contractPlanId); - const { data: inLeaseItems } = useLeaseItems(inContractPlanId); - const { data: outLeaseItems } = useLeaseItems(outContractPlanId); + const { data: leaseItems } = useLeaseItems(contractPlanId, date); - if (!reqProduct.data) { + if (!products) { return ''; } - const allPrice = { - name: '总金额', - total: 0, - unit: '', - }; - const weight = { - name: '理论重量', - total: 0, - unit: '吨', - }; - const priceWeight = { - name: '理论重量', - total: 0, - unit: '吨', - }; - const contractWeight = { - name: '理论重量', - total: 0, - unit: '吨', - }; - const outContractWeight = { - name: '理论重量', - total: 0, - unit: '吨', - }; - // 订单分组实际重量 - const recordData = form.values; - // 基础小结 - const summaryProduct = {}; - // 合同小结/入库合同小结 - const contractSummary = {}; - // 出库合同小结 - const outContractSummary = {}; - // 报价小结 - const quoteSummary = {}; - form.values.items?.forEach((item) => { - const productCategory = reqProduct.data.data?.find( - (product) => product.category_id === item.product?.category_id, - )?.category; - if (!(JSON.stringify(productCategory?.attr) === `["6"]`)) { - if (!item.product || !item.count) return; - const element = _.cloneDeep(item); - // 获取产品的分类数据信息 - if (!productCategory) return; - element.product.category = productCategory; - // 基础小结 - const { calc } = summary(element, null, null); - weight.total += calc.weight / 1000; - calcProductCount(summaryProduct, calc, productCategory); - // 合同小结(租赁出入库单/租赁直发单) - if (form.values.category === RecordCategory.lease || form.values.category === RecordCategory.lease2lease) { - if (form.values.category === RecordCategory.lease && !leaseItems) return; - if (form.values.category === RecordCategory.lease2lease && !inLeaseItems) return; - const in_contract = form.values.category === RecordCategory.lease ? leaseItems.data : inLeaseItems.data; - const { ruleCalc } = summary(element, in_contract, reqWeightRules, recordData); - contractWeight.total += ruleCalc.weight / 1000; - calcProductCount(contractSummary, ruleCalc, productCategory); - if (form.values.category === RecordCategory.lease2lease && outLeaseItems) { - // 还需要生成出库合同小结 - const out_contract = outLeaseItems.data; - const { ruleCalc } = summary(element, out_contract, reqWeightRules, recordData); - outContractWeight.total += ruleCalc.weight / 1000; - calcProductCount(outContractSummary, ruleCalc, productCategory); - } - } - // 采购出入库/采购直发小结 - if (form.values.category === RecordCategory.purchase || form.values.category === RecordCategory.purchase2lease) { - const priceRules = leaseData?.map((rule) => { - return { - conversion_logic_id: rule.conversion_logic.id, - products: rule.product, - unit_price: rule.unit_price, - }; - }); - const { ruleCalc } = summary(element, priceRules, reqWeightRules, recordData); - priceWeight.total += ruleCalc.weight / 1000; - allPrice.total += ruleCalc.price; - calcProductCount(quoteSummary, ruleCalc, productCategory); - if (form.values.category === RecordCategory.purchase2lease && inLeaseItems) { - const in_contract = inLeaseItems.data; - const { ruleCalc } = summary(element, in_contract, null, recordData); - contractWeight.total += ruleCalc.weight / 1000; - calcProductCount(contractSummary, ruleCalc, productCategory); - } - } - } - }); - summaryProduct['0'] = weight; - contractSummary['0'] = contractWeight; - outContractSummary['0'] = outContractWeight; - quoteSummary['0'] = priceWeight; - quoteSummary['999'] = allPrice; + const resultItems = {}; + if (form.values.items?.length && contractPlan?.length) { + form.values.items.forEach((item) => { + if (!item?.new_product_id && !item?.count) return; + const productItem = products.find((value) => value.id === item.new_product.id); + const productCategory = products?.find((value) => value.id === item.new_product.parentId); + resultItems['basis'] = basisItem(productCategory, item, productItem, resultItems['basis']); + contractPlan.forEach((contractPlanItem, index) => { + if (!contractPlanItem.contract) return; + const movement = contractPlanItem.movement === '-1' ? '出库' : '入库'; + const record_category = contractPlanItem.contract.record_category; + const rule = leaseItems[contractPlanItem.contract.id]?.find((value) => + productItem?.parentScopeId.includes(value.new_products_id), + ); + resultItems[movement + index] = ruleItem( + record_category, + movement, + index + 1, + rule, + resultForm, + productCategory, + item, + productItem, + resultItems[movement + index], + reqWeightRules, + ); + }); + }); + } - const resultItems = [ - { label: '基础', value: transDescriptions(Object.values(summaryProduct)) }, - { label: '报价', value: transDescriptions(Object.values(quoteSummary)) }, - { label: '出库合同', value: transDescriptions(Object.values(outContractSummary)) }, - { - label: form.values.category === RecordCategory.lease ? '合同' : '入库合同', - value: transDescriptions(Object.values(contractSummary)), - }, - ]; - - const trans: any[] = resultItems + const trans: any[] = Object.values(resultItems) .map((item) => { - if (item.value.length) { - const data = { - label: item.label, - key: item.label, - children: , + let price = 0; + let weight = 0; + const valueItem = Object.values(item['value']).map((resultValue) => { + price += resultValue['price'] ?? 0; + weight += resultValue['weight'] ?? 0; + return { + key: resultValue['label'], + label: resultValue['label'], + children: formatQuantity(resultValue['count'], 3) + resultValue['unit'], }; - return data; + }); + valueItem.unshift({ + key: '理论重量', + label: '理论重量', + children: formatQuantity(weight, 3) + '吨', + }); + if (item['record_category'] === '1') { + valueItem.push({ + key: '总金额', + label: '总金额', + children: formatCurrency(price, 3), + }); } + const data = { + label: item['label'], + key: item['label'], + children: , + }; + return data; }) .filter(Boolean); @@ -176,125 +116,144 @@ RecordSummary.__componentType = CustomComponentType.CUSTOM_FORM_ITEM; RecordSummary.__componentLabel = '记录单 - 小结'; /** 计算小结 - * @param event RecordItem 订单项,record_item */ -const summary = (event: RecordItems, rules: any[], ruleWeight: any, recordData = null) => { - // 1. 没有规则直接默认产品表换算逻辑 +const summary = (rule, itemCount, category, item, ruleWeight) => { const calc = { name: '', count: 0, weight: 0, unit: '', - }; - const ruleCalc = { - name: '', - count: 0, - weight: 0, - unit: '', price: 0, }; - const category = event.product.category; - const convertiblen = category.convertible; - if (!rules) { - const count = convertiblen ? event.count * event.product.ratio : event.count; - const unit = convertiblen ? category.conversion_unit : category.unit; - calc.name = category.name; - calc.count = count; - calc.unit = unit; - calc.weight = event.product.weight * event.count; + calc.name = category.name; + const convertible = category.convertible; + if (rule.conversion_logic_id === ConversionLogics.Keep) { + calc.count = itemCount; + calc.unit = category.unit; + } else if (rule.conversion_logic_id === ConversionLogics.Product) { + calc.count = convertible ? itemCount * item.ratio : itemCount; + calc.unit = convertible ? category.conversion_unit : category.unit; + } else if (rule.conversion_logic_id === ConversionLogics.ProductWeight) { + calc.count = (itemCount * item.weight) / 1000; + calc.unit = '吨'; } else { - // 2. 存在规则(实际重量情况不计算) - const plain = rules.find((item) => - // 处理报价跟合同不同数据结构问题 [].flat() - [item.products] - .flat() - .find((product) => product?.id - 99999 === event.product.category_id || product?.id === event.product.id), + const weightRule = ruleWeight?.find( + (weightItem) => weightItem.logic_id === rule.conversion_logic_id && weightItem.new_product_id === item.id, ); - if (!plain) return { ruleCalc }; - ruleCalc.name = category.name; - if (plain.conversion_logic_id === ConversionLogics.Keep) { - ruleCalc.count = event.count; - ruleCalc.unit = category.unit; - } else if (plain.conversion_logic_id === ConversionLogics.Product) { - const count = convertiblen ? event.count * event.product.ratio : event.count; - const unit = convertiblen ? category.conversion_unit : category.unit; - ruleCalc.count = count; - ruleCalc.unit = unit; - } else if (plain.conversion_logic_id === ConversionLogics.ProductWeight) { - ruleCalc.count = (event.count * event.product.weight) / 1000; - ruleCalc.unit = '吨'; - } else if (plain.conversion_logic_id === ConversionLogics.ActualWeight) { - const cacheData = cache.find( - (c) => c.id === plain.conversion_logic_id && c.category_id === event.product.category_id, - ); - if (!cacheData) { - const weight = - recordData?.group_weight_items?.find((g) => - g.product_categories?.find((pc) => pc.id === event.product?.category_id), - )?.weight || recordData?.weight; - cache.push({ - id: plain.conversion_logic_id, - category_id: event.product?.category_id, - weight: weight, - }); - ruleCalc.count = weight; - ruleCalc.unit = '吨'; + if (weightRule) { + if (weightRule.conversion_logic_id === ConversionLogics.Keep) { + calc.count = (itemCount * weightRule.weight) / 1000; + calc.unit = '吨'; + } else if (weightRule.conversion_logic_id === ConversionLogics.Product) { + calc.count = convertible + ? (itemCount * item.ratio * weightRule.weight) / 1000 + : (itemCount * weightRule.weight) / 1000; + calc.unit = '吨'; } - } else { - const weightRule = ruleWeight.data?.data?.find( - (item) => - (item.product_id === event.product.id || item.product_id - 99999 === event.product.category_id) && - item.logic_id === plain.conversion_logic_id, - ); - if (weightRule) { - if (weightRule.conversion_logic_id === ConversionLogics.Keep) { - ruleCalc.count = (event.count * weightRule.weight) / 1000; - ruleCalc.unit = '吨'; - } else if (weightRule.conversion_logic_id === ConversionLogics.Product) { - ruleCalc.count = convertiblen - ? (event.count * event.product.ratio * weightRule.weight) / 1000 - : (event.count * weightRule.weight) / 1000; - ruleCalc.unit = '吨'; - } - // 合同理论重量,换算逻辑是重量表取重量表换算后的值(重量) - ruleCalc.weight = ruleCalc.count * 1000; - ruleCalc.price = ruleCalc.count * plain.unit_price; - } - } - // 合同理论重量,非重量表规则都是取产品重量 - if (plain.conversion_logic_id <= 4) { - ruleCalc.price = ruleCalc.count * plain.unit_price; - ruleCalc.weight = event.product.weight * event.count; + // 合同理论重量,换算逻辑是重量表取重量表换算后的值(重量) + calc.weight = calc.count; + calc.price = calc.count * rule.unit_price; } } - - return { calc, ruleCalc }; + // 合同理论重量,非重量表规则都是取产品重量 + if (rule.conversion_logic_id <= 4) { + calc.weight = (item.weight * itemCount) / 1000; + calc.price = rule.unit_price * calc.count; + } + return calc; }; -/** - * 产品数量汇总方法 - */ -const calcProductCount = (summary: any, calc: any, category: any) => { - if (summary[category.id]) { - summary[category.id].total += calc.count; - } else { - summary[category.id] = { - name: calc.name, - total: calc.count, - unit: calc.unit, +const basisItem = (productCategory, item, productItem, basis) => { + const calc = { + count: 0, + unit: '', + label: '', + weight: 0, + }; + + calc.count = productCategory?.convertible ? item.count * productItem.ratio : item.count; + calc.weight = (item.count * productItem.weight) / 1000; + calc.unit = productCategory.convertible ? productCategory.conversion_unit : productCategory.unit; + calc.label = productCategory.name; + if (!basis) { + basis = { + label: '基础', + value: {}, }; } + const basisProduct = basis.value[productCategory.id]; + if (basisProduct) { + basisProduct.count += calc.count; + basisProduct.weight += calc.weight; + } else { + basis.value[productCategory.id] = { label: calc.label, count: calc.count, unit: calc.unit, weight: calc.weight }; + } + return basis; }; -const transDescriptions = (data) => { - const values = data.map((item: any, index) => { - if (item.total) { - return { - key: item.name, - label: item.name, - children: item.name === '总金额' ? formatCurrency(item.total, 2) : formatQuantity(item.total, 3) + item.unit, - }; - } - }); - return values.filter(Boolean); +const ruleItem = ( + record_category, + movement, + index, + rule, + resultForm, + productCategory, + item, + productItem, + contract, + reqWeightRules, +) => { + const calc = { + count: 0, + unit: '', + label: '', + weight: 0, + price: 0, + }; + if (!contract) { + contract = { + label: movement + '合同' + index, + record_category, + value: {}, + }; + } + if (!rule) return contract; + if (rule.conversion_logic_id === ConversionLogics.ActualWeight) { + const groupWeight = + resultForm.group_weight_items?.find((value) => value.new_products?.id === productCategory.id) || + resultForm.weight; + calc.label = productCategory.name; + calc.count = groupWeight ?? 0; + calc.unit = '吨'; + calc.price = calc.count * rule.unit_price; + calc.weight = (item.count * productItem.weight) / 1000; + } else { + const { + name: ruleName, + count: ruleCount, + weight: ruleWeight, + unit: ruleUnit, + price: rulePrice, + } = summary(rule, item.count, productCategory, productItem, reqWeightRules?.data?.data); + calc.weight = ruleWeight; + calc.price = rulePrice; + calc.label = ruleName; + calc.count = ruleCount; + calc.unit = ruleUnit; + } + const product = contract.value[productCategory.id]; + if (product) { + product.count += calc.count; + product.price += calc.price; + product.weight += calc.weight; + } else { + contract.value[productCategory.id] = { + label: calc.label, + count: calc.count, + unit: calc.unit, + price: calc.price, + weight: calc.weight, + }; + } + return contract; }; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordTotalPrice.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordTotalPrice.tsx index 94e24cf29..02c839282 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordTotalPrice.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordTotalPrice.tsx @@ -2,7 +2,7 @@ import { onFieldValueChange, onFieldInit } from '@tachybase/schema'; import { useField, useForm, useFormEffects } from '@tachybase/schema'; import React, { useEffect, useState } from 'react'; import { ConversionLogics } from '../../utils/constants'; -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import _ from 'lodash'; import { formatCurrency } from '../../utils/currencyUtils'; import { CustomComponentType, CustomFunctionComponent } from '@hera/plugin-core/client'; @@ -32,6 +32,7 @@ export const RecordTotalPrice: CustomFunctionComponent = () => { const [products, setProducts] = useState([]); const [groupWeight, setGroupWeight] = useState([]); const [recordWeight, setRecordWeight] = useState(0); + return; // 总金额计算方法 const computeTotalPrice = () => { if (!leaseData) return; diff --git a/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx b/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx index 2d7b738c7..f9f715925 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx @@ -1,90 +1,183 @@ -import { useRequest } from '@nocobase/client'; +import { useAPIClient, useRequest } from '@tachybase/client'; +import dayjs from 'dayjs'; import { stringify } from 'flatted'; -import { useEffect } from 'react'; +import { useEffect, useState } from 'react'; export function useCachedRequest

(params: {}, options = {}) { const cacheKey = stringify(params); return useRequest

(params, { cacheKey, ...options }); } -export const useLeaseItems = (planId) => { - const params = { - resource: 'contract_plan_lease_items', - action: 'list', - params: { - appends: ['products'], - filter: { - contract_plan_id: planId, - }, - pageSize: 99999, - }, - }; - const { data, loading, run } = useCachedRequest(params, { - manual: true, - }); - useEffect(() => { - if (planId) { - run(); - } - }, [planId]); - return { data, loading }; -}; - -export const useProductFeeItems = (planId) => { - const feeParams = { - resource: 'contract_plan_fee_items', - action: 'list', - params: { - appends: ['fee_product'], - filter: { - contract_plan_id: planId, - }, - pageSize: 99999, - }, - }; - - const { data, loading, run } = useCachedRequest(feeParams, { - manual: true, - }); - useEffect(() => { - if (planId) { - run(); - } - }, [planId]); - return { data, loading }; -}; - -export const useFeeItems = (categoryId, planId) => { - const { data, loading, run } = useCachedRequest( - { - resource: 'contract_plan_lease_items', - action: 'list', - params: { - appends: ['fee_items', 'products'], - filter: { - $and: [ - { - contract_plan_id: planId, - }, - { - products: { - category_id: categoryId ?? -1, +export const useLeaseItems = (planId, date) => { + const [data, setData] = useState({}); + const api = useAPIClient(); + const day = date || new Date(); + const nowDay = dayjs(day).startOf('day').add(-1, 'minute'); + if (typeof planId !== 'object') return { data }; + planId?.forEach((value) => { + if (!value) return; + if (!data[value]) { + api + .request({ + resource: 'contract_plan_lease_items', + action: 'list', + params: { + appends: ['new_products'], + filter: { + contract_plan: { + contract_items: { + start_date: { $dateBefore: nowDay }, + end_date: { $dateAfter: nowDay }, + contract_id: { + $eq: value, + }, + }, }, }, - ], - }, - pageSize: 99999, + pageSize: 99999, + }, + }) + .then((res) => { + const result = { ...data }; + result[value] = res.data?.data; + setData(result); + }) + .catch(() => { + return; + }); + } + }); + return { data }; +}; + +export const useFeeItems = (planId, date) => { + const [data, setData] = useState({}); + const api = useAPIClient(); + const day = date || new Date(); + const nowDay = dayjs(day).startOf('day').add(-1, 'minute'); + if (typeof planId !== 'object') return { data }; + planId?.forEach((value) => { + if (!value) return; + if (!data[value]) { + api + .request({ + resource: 'contract_plan_fee_items', + action: 'list', + params: { + appends: ['new_fee_products'], + filter: { + contract_plan: { + contract_items: { + start_date: { $dateBefore: nowDay }, + end_date: { $dateAfter: nowDay }, + contract_id: { + $eq: value, + }, + }, + }, + }, + pageSize: 99999, + }, + }) + .then((res) => { + const result = { ...data }; + result[value] = res.data?.data; + setData(result); + }) + .catch(() => { + return; + }); + } + }); + return { data }; +}; + +export const useProductFeeItems = (planId, date) => { + const [data, setData] = useState({}); + const api = useAPIClient(); + const day = date || new Date(); + const nowDay = dayjs(day).startOf('day').add(-1, 'minute'); + if (typeof planId !== 'object') return { data }; + planId?.forEach((value) => { + if (!value) return; + if (!data[value]) { + api + .request({ + resource: 'contract_plan_lease_items', + action: 'list', + params: { + appends: ['fee_items', 'new_products'], + filter: { + contract_plan: { + contract_items: { + start_date: { $dateBefore: nowDay }, + end_date: { $dateAfter: nowDay }, + contract_id: { + $eq: value, + }, + }, + }, + }, + pageSize: 99999, + }, + }) + .then((res) => { + const result = { ...data }; + result[value] = res.data?.data; + setData(result); + }) + .catch(() => { + return; + }); + } + }); + return { data }; +}; + +export const useProducts = () => { + const { data } = useCachedRequest({ + resource: 'products', + action: 'list', + params: { + pageSize: 99999, + }, + }); + if (data?.data) { + data.data.forEach((value) => { + value['parentScopeId'] = selParentId(data.data, value, []); + }); + } + return { data: data?.data }; +}; + +export const useCompany = (appends, id) => { + const { data, loading, run } = useCachedRequest( + { + resource: 'contracts', + action: 'list', + params: { + filter: { id: { $eq: id } }, + appends, }, }, - { - manual: true, - }, + { manual: true }, ); - useEffect(() => { - if (planId && categoryId) { + if (id) { run(); } - }, [planId, categoryId]); + }, [id]); return { data, loading }; }; + +const selParentId = (products, item, scopeId) => { + scopeId.push(item.id); + if (!item.parentId) { + return scopeId; + } + const items = products.find((value) => value.id === item.parentId); + if (!items) { + return scopeId; + } + return selParentId(products, items, scopeId); +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/hooks/useAddToChecklistActionProps.tsx b/packages/plugins/@hera/plugin-rental/src/client/hooks/useAddToChecklistActionProps.tsx index 7fb492624..d77d1e084 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/hooks/useAddToChecklistActionProps.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/hooks/useAddToChecklistActionProps.tsx @@ -1,5 +1,5 @@ import { useForm } from '@tachybase/schema'; -import { useAPIClient, useBlockRequestContext, useRequest } from '@nocobase/client'; +import { useAPIClient, useBlockRequestContext, useRequest } from '@tachybase/client'; import { useChartFilter } from '@nocobase/plugin-data-visualization/client'; import { message } from 'antd'; import { useNavigate } from 'react-router-dom'; diff --git a/packages/plugins/@hera/plugin-rental/src/client/hooks/usePdfPath.tsx b/packages/plugins/@hera/plugin-rental/src/client/hooks/usePdfPath.tsx index be422b083..9ea0b1e56 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/hooks/usePdfPath.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/hooks/usePdfPath.tsx @@ -1,7 +1,12 @@ -import { useRecord } from '@nocobase/client'; +import { useRecord } from '@tachybase/client'; import React, { createContext, useContext, useMemo, useState } from 'react'; import { SettlementStyleContext } from '../schema-initializer/actions/SettlementStyleSwitchActionInitializer'; +export const PdfPaperSwitchingContext = createContext({ + paper: null, + setPaper: null, +}); + export const PdfIsDoubleContext = createContext({ isDouble: null, setIsDouble: null, @@ -17,27 +22,59 @@ export const PdfMargingTopContext = createContext({ setMargingTop: null, }); +// 页面缩放 +export const FontSizeContext = createContext({ + size: null, + setSize: null, +}); + +// 注释 +export const AnnotateContext = createContext({ + annotate: null, + setAnnotate: null, +}); + export const PdfIsDoubleProvider = (props) => { const [isDouble, setIsDouble] = useState(false); const [settingType, setSettingLoad] = useState(false); const [margingTop, setMargingTop] = useState(0); + const [paper, setPaper] = useState('A4'); + const [size, setSize] = useState('9'); + const [annotate, setAnnotate] = useState(false); return ( - - - {props.children} - - + + + + + + {props.children} + + + + + ); }; export const useRecordPdfPath = () => { const record = useRecord(); + let recordId = record.id; + if (record.__collectionName === 'contracts' && record.__parent) { + recordId = record.__parent.id; + } + if (typeof record.id === 'string') { + recordId = record.id.split('_')[1] || record.id; + } const { isDouble } = useContext(PdfIsDoubleContext); const { settingType } = useContext(PdfIsLoadContext); const { margingTop } = useContext(PdfMargingTopContext); + const { paper } = useContext(PdfPaperSwitchingContext); + const { size } = useContext(FontSizeContext); + const { annotate } = useContext(AnnotateContext); const path = useMemo( - () => `/records:pdf?recordId=${record.id}&isDouble=${isDouble}&settingType=${settingType}&margingTop=${margingTop}`, - [record.id, isDouble, settingType, margingTop], + () => + `/records:pdf?recordId=${recordId}&isDouble=${isDouble}&settingType=${settingType}&margingTop=${margingTop}&paper=${paper}&font=${size}&annotate=${annotate}`, + [recordId, isDouble, settingType, margingTop, paper, size, annotate], ); return path; }; diff --git a/packages/plugins/@hera/plugin-rental/src/client/index.tsx b/packages/plugins/@hera/plugin-rental/src/client/index.tsx index 2376910bc..f41d112c9 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/index.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin, useCollection } from '@nocobase/client'; +import { Plugin, useCollection } from '@tachybase/client'; import { RecordSummary } from './custom-components/RecordSummary'; import { RecordTotalPrice } from './custom-components/RecordTotalPrice'; import { RecordItemWeight } from './custom-components/RecordItemWeight'; @@ -49,8 +49,16 @@ import { PrintSetupMargingTop, } from './schema-initializer/actions/RecordPrintSetupMargingTopInitializer'; import { UnusedRecordsBlockHelper } from './schema-initializer/blocks/UnusedRecordsBlockInitializer'; + +import { PaperSwitching, PaperSwitchingInitializer } from './schema-initializer/actions/paperSwitching'; +import { + RecordPrintAnnotateActionInitializer, + Annotate, +} from './schema-initializer/actions/RecordPrintAnnotateActionInitializer'; +import { PrintFontSize, PrintFontSizeInitializer } from './schema-initializer/actions/RecordPrintFontSizeInitializer'; import { MovementFieldInterface } from './interfaces/movement'; import { Movement } from './schema-components/Movement'; +import { MovementStatus } from './custom-components/MovementStatus'; export class PluginRentalClient extends Plugin { locale: Locale; async afterAdd() {} @@ -86,26 +94,44 @@ export class PluginRentalClient extends Plugin { type: 'item', title: '{{t("Column switch")}}', component: 'ColumnSwitchActionInitializer', - useVisible() { - const collection = useCollection(); - const name = collection['options']['name']; - return name === 'records'; - }, + // useVisible() { + // const collection = useCollection(); + // const name = collection['options']['name']; + // return name === 'records'; + // }, }); + this.app.schemaInitializerManager.addItem('PDFViewActionInitializer', 'enbaleActions.paperSwitching', { + type: 'item', + title: '{{t("paper switching")}}', + component: 'PaperSwitchingInitializer', + }); + this.app.schemaInitializerManager.addItem('PDFViewActionInitializer', 'enbaleActions.paperSwitching', { + type: 'item', + title: '{{t("font size")}}', + component: 'PrintFontSizeInitializer', + }); + this.app.schemaInitializerManager.addItem('PDFViewActionInitializer', 'enbaleActions.recordPrintSetup', { type: 'item', title: '{{t("Record print setup")}}', component: 'RecordPrintSetupActionInitializer', }); + + this.app.schemaInitializerManager.addItem('PDFViewActionInitializer', 'enbaleActions.recordPrintAnnotate', { + type: 'item', + title: '{{t("Record print annotate")}}', + component: 'RecordPrintAnnotateActionInitializer', + }); + this.app.schemaInitializerManager.addItem('PDFViewActionInitializer', 'enbaleActions.recordPrintMargingTop', { type: 'item', title: '{{t("Record print margingtop")}}', component: 'RecordPrintSetupMargingTopInitializer', - useVisible() { - const collection = useCollection(); - const name = collection['options']['name']; - return name === 'records' || name === 'waybills'; - }, + // useVisible() { + // const collection = useCollection(); + // const name = collection['options']['name']; + // return name === 'records' || name === 'waybills'; + // }, }); this.app.schemaInitializerManager.addItem('PDFViewActionInitializer', 'enbaleActions.settlementExcelExport', { type: 'item', @@ -186,6 +212,12 @@ export class PluginRentalClient extends Plugin { PDFViewerCountablePrintActionInitializer, ColumnSwitchActionInitializer, ColumnSwitchAction, + PaperSwitching, + PrintFontSize, + Annotate, + RecordPrintAnnotateActionInitializer, + PaperSwitchingInitializer, + PrintFontSizeInitializer, SettlementExcelExportActionInitializer, SettlementStyleProvider, SettlementStyleSwitchActionInitializer, @@ -194,6 +226,7 @@ export class PluginRentalClient extends Plugin { RecordPrintSetupMargingTopInitializer, PrintSetup, PrintSetupMargingTop, + MovementStatus, }); this.app.addScopes({ useAddToChecklistActionProps, diff --git a/packages/plugins/@hera/plugin-rental/src/client/interfaces/movement.ts b/packages/plugins/@hera/plugin-rental/src/client/interfaces/movement.ts index 3b0c4f503..19a088779 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/interfaces/movement.ts +++ b/packages/plugins/@hera/plugin-rental/src/client/interfaces/movement.ts @@ -1,4 +1,4 @@ -import { CollectionFieldInterface, dataSource, defaultProps, operators } from '@nocobase/client'; +import { CollectionFieldInterface, dataSource, defaultProps, operators } from '@tachybase/client'; import { tval } from '../locale'; import { Field, uid } from '@tachybase/schema'; @@ -18,7 +18,7 @@ export class MovementFieldInterface extends CollectionFieldInterface { availableTypes = ['string', 'integer', 'boolean', 'integer']; properties = { ...defaultProps, - 'uiSchema.left': { + 'uiSchema.x-component-props.left': { type: 'string', title: tval('Left part'), required: true, @@ -28,7 +28,7 @@ export class MovementFieldInterface extends CollectionFieldInterface { useCurrentFields: '{{ useCurrentFields }}', }, }, - 'uiSchema.righ': { + 'uiSchema.x-component-props.right': { type: 'string', title: tval('Right part'), required: true, diff --git a/packages/plugins/@hera/plugin-rental/src/client/locale.tsx b/packages/plugins/@hera/plugin-rental/src/client/locale.tsx index f8dc08a74..f58b138d4 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/locale.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/locale.tsx @@ -1,4 +1,4 @@ -import { Application, useApp, tval as nTval } from '@nocobase/client'; +import { Application, useApp, tval as nTval } from '@tachybase/client'; const NAMESPACE = '@hera/plugin-rental'; diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-components/Movement.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-components/Movement.tsx index cd90749dd..c279711ae 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-components/Movement.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-components/Movement.tsx @@ -1,11 +1,12 @@ -import { useCollectionField } from '@nocobase/client'; +import { useCollectionField } from '@tachybase/client'; import { connect, isValid, mapProps, mapReadPretty, useField } from '@tachybase/schema'; -import { Radio, Tag } from 'antd'; +import { Tag } from 'antd'; import React from 'react'; import { useEffect } from 'react'; +import { MovementStatus } from '../custom-components/MovementStatus'; export const Movement = connect( - Radio.Group, + MovementStatus, mapProps( { dataSource: 'options', diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/AddToChecklistActionInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/AddToChecklistActionInitializer.tsx index 17adedd95..4420eed9a 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/AddToChecklistActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/AddToChecklistActionInitializer.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ActionInitializer } from '@nocobase/client'; +import { ActionInitializer } from '@tachybase/client'; import { tval } from '../../locale'; export const AddToChecklistActionInitializer = (props) => { diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/ColumnSwitchActionInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/ColumnSwitchActionInitializer.tsx index 6ae092298..15247ed19 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/ColumnSwitchActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/ColumnSwitchActionInitializer.tsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState } from 'react'; -import { ActionInitializer, useRequest } from '@nocobase/client'; +import { ActionInitializer, useRequest } from '@tachybase/client'; import { Radio } from 'antd'; import { PdfIsDoubleContext } from '../../hooks/usePdfPath'; diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/PDFViewerPrintActionInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/PDFViewerPrintActionInitializer.tsx index 3ddabca8e..bba9fd68c 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/PDFViewerPrintActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/PDFViewerPrintActionInitializer.tsx @@ -1,5 +1,5 @@ import { usePDFViewerRef } from '@hera/plugin-core/client'; -import { Action, ActionInitializer, useAPIClient, useRecord } from '@nocobase/client'; +import { Action, ActionInitializer, useAPIClient, useRecord } from '@tachybase/client'; import React, { createContext, useContext, useState } from 'react'; const PrintCounterContext = createContext(null); diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintAnnotateActionInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintAnnotateActionInitializer.tsx new file mode 100644 index 000000000..bbc09d261 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintAnnotateActionInitializer.tsx @@ -0,0 +1,30 @@ +import React, { useContext, useEffect, useState } from 'react'; +import { ActionInitializer } from '@tachybase/client'; +import { Switch } from 'antd'; +import { useRequest } from '@tachybase/client'; +import { AnnotateContext } from '../../hooks/usePdfPath'; +export const Annotate = (props) => { + const { setAnnotate } = useContext(AnnotateContext); + return ( +

+
统一注释:
+ { + setAnnotate(e); + }} + /> +
+ ); +}; + +export const RecordPrintAnnotateActionInitializer = (props) => { + const schema = { + title: '{{ t("record print annotate") }}', + 'x-action': 'annotate', + 'x-component': 'Annotate', + 'x-designer': 'Action.Designer', + }; + return ; +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintFontSizeInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintFontSizeInitializer.tsx new file mode 100644 index 000000000..2edcc9f17 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintFontSizeInitializer.tsx @@ -0,0 +1,36 @@ +import React, { useContext, useState } from 'react'; +import { ActionInitializer } from '@tachybase/client'; +import { Input } from 'antd'; +import { debounce } from 'lodash'; +import { FontSizeContext } from '../../hooks/usePdfPath'; +export const PrintFontSize = (props) => { + const [value, setValue] = useState('9'); + const { setSize } = useContext(FontSizeContext); + const change = debounce(async (v) => { + setSize(v); + }, 2000); + return ( + { + change(e.target.value); + setValue(e.target.value); + }} + /> + ); +}; + +export const PrintFontSizeInitializer = (props) => { + const schema = { + title: '{{ t("record print font size") }}', + 'x-action': 'printFontSize', + 'x-component': 'PrintFontSize', + 'x-designer': 'Action.Designer', + }; + return ; +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupActionInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupActionInitializer.tsx index ce6e25d08..31052bcb2 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupActionInitializer.tsx @@ -1,8 +1,8 @@ import React, { useContext, useEffect, useState } from 'react'; -import { ActionInitializer } from '@nocobase/client'; +import { ActionInitializer } from '@tachybase/client'; import { Radio, RadioChangeEvent } from 'antd'; -import { useRequest } from '@nocobase/client'; -import { PdfIsLoadContext } from '../../hooks/usePdfPath'; +import { useRequest } from '@tachybase/client'; +import { PdfIsLoadContext, ScaleContext } from '../../hooks/usePdfPath'; export const PrintSetup = (props) => { const [value, setValue] = useState(''); const settingsData = useRequest({ diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupMargingTopInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupMargingTopInitializer.tsx index 33523091a..7ea5b12a7 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupMargingTopInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/RecordPrintSetupMargingTopInitializer.tsx @@ -1,10 +1,10 @@ import React, { useContext, useEffect, useState } from 'react'; -import { ActionInitializer, useAPIClient } from '@nocobase/client'; +import { ActionInitializer, useAPIClient } from '@tachybase/client'; import { Input } from 'antd'; -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import { PdfMargingTopContext } from '../../hooks/usePdfPath'; import { debounce } from 'lodash'; -import { useCurrentUserContext } from '@nocobase/client'; +import { useCurrentUserContext } from '@tachybase/client'; export const PrintSetupMargingTop = (props) => { const { data } = useCurrentUserContext(); const userId = data.data?.id; diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExcelExportActionInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExcelExportActionInitializer.tsx index 6a8628d92..854731939 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExcelExportActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExcelExportActionInitializer.tsx @@ -1,5 +1,5 @@ import React, { useContext } from 'react'; -import { ActionInitializer, useAPIClient, useRecord } from '@nocobase/client'; +import { ActionInitializer, useAPIClient, useRecord } from '@tachybase/client'; import { useField } from '@tachybase/schema'; import { SettlementStyleContext } from './SettlementStyleSwitchActionInitializer'; import { ExportToExcel } from './SettlementExportExcel'; diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExportExcel.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExportExcel.tsx index f3d17a613..b619411da 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExportExcel.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementExportExcel.tsx @@ -56,8 +56,8 @@ export const excelDataHandle = (excelData) => { */ const nameRows = [ { - companyName: { name: '承租单位:', value: `${contracts.project?.company?.name ?? ''}` }, - companyName1: { name: '合同编号:', value: `${contracts.project?.code ?? ''}` }, + companyName: { name: '承租单位:', value: `${contracts.party_b?.name ?? ''}` }, + companyName1: { name: '合同编号:', value: `${contracts.number ?? ''}` }, rowId: '3', }, { @@ -78,7 +78,7 @@ export const excelDataHandle = (excelData) => { name: '项目联系人:', value: `${contracts?.project.contacts.map((contact) => contact.name + ' ' + contact.phone).join(' ')}`, }, - endData: { name: '经办人:', value: `${contracts.operator.nickname}` }, + endData: { name: '制表人:', value: `${contracts.operator.nickname}` }, rowId: '6', }, ]; @@ -148,7 +148,7 @@ export const excelDataHandle = (excelData) => { parseFloat(calc.n_compensate.toFixed(2)), parseFloat(calc.h_compensate.toFixed(2)), parseFloat(calc.loadfreight.toFixed(2)), - parseFloat(calc.other.toFixed(2)), + parseFloat(calc.other ? calc.other.toFixed(2) : 0), formatPercent(calc.tax, 2), parseFloat(calc.current_expenses.toFixed(2)), parseFloat(calc.accumulate.toFixed(2)), @@ -170,30 +170,34 @@ export const excelDataHandle = (excelData) => { columns: [ { name: '物料名称', + key: 'name1', + }, + { + name: ' ', + key: '', + }, + { + name: '费用类别', + key: 'name2', + }, + { + name: '单位', + key: 'name3', + }, + { + name: '订单数量', + key: 'name4', + }, + { + name: '出入库数量', + key: 'name5', + }, + { + name: '租赁单价', key: 'name', }, { name: ' ', - key: ' ', - }, - { - name: '费用类别', - key: 'name', - }, - { - name: '单位', - key: 'name', - }, - { - name: '订单数量', - key: 'name', - }, - { - name: '出入库数量', - key: 'name', - }, - { - name: '租赁单价', key: 'name', }, { @@ -206,7 +210,7 @@ export const excelDataHandle = (excelData) => { }, { name: ' ', - key: ' ', + key: '', }, ], rows: [], @@ -221,6 +225,7 @@ export const excelDataHandle = (excelData) => { parseFloat(value.item_count?.toFixed(2) || 0), parseFloat(value.count.toFixed(2)), parseFloat(value.unit_price.toFixed(5)), + '', value.days, parseFloat(value.amount.toFixed(2)), '', @@ -253,6 +258,10 @@ export const excelDataHandle = (excelData) => { name: '物质名称', key: 'name', }, + { + name: ' ', + key: '', + }, { name: '费用类别', key: 'name', @@ -291,6 +300,7 @@ export const excelDataHandle = (excelData) => { converDate(value.date, 'YYYY-MM-DD'), value.movement === '-1' ? '出库' : value.movement === '1' ? '入库' : '出入库', value.name, + '', category, value.unit_name, parseFloat(value.item_count?.toFixed(2) || 0), @@ -355,6 +365,10 @@ export const excelDataHandle = (excelData) => { name: ' ', key: ' ', }, + { + name: ' ', + key: ' ', + }, ], rows: [], }; @@ -370,6 +384,7 @@ export const excelDataHandle = (excelData) => { item.notes, '', '', + '', ]); }); @@ -413,7 +428,7 @@ export const excelDataHandle = (excelData) => { }, { name: ' ', - key: ' ', + key: '', }, { name: '单位', @@ -427,6 +442,10 @@ export const excelDataHandle = (excelData) => { name: '结存数量', key: 'name5', }, + { + name: ' ', + key: '', + }, ], rows: [], }; @@ -445,6 +464,7 @@ export const excelDataHandle = (excelData) => { calc.summary[countNum]?.unit_name ?? '', calc.summary[countNum] ? parseFloat(calc.summary[countNum]?.item_count?.toFixed(2) || 0) : '', calc.summary[countNum] ? parseFloat(calc.summary[countNum]?.count.toFixed(2)) : '', + '', ]); } }); @@ -458,17 +478,25 @@ export const excelDataHandle = (excelData) => { const footRows = [ { - companyName: { name: '制表人:' }, - companyName1: { name: '审核人:' }, - companyName2: { name: '验收人:' }, + companyName: { name: `承租单位:${contracts.party_b?.name ?? ''}` }, + companyName1: { name: `出租单位:${contracts.first_party?.name ?? PromptText.noContractedCompany}` }, rowId: notesRow + 2, }, { companyName: { name: '承租单位项目经理:' }, - companyName1: { name: '材料负责人:' }, - companyName2: { name: '出租单位代表人:' }, + companyName1: { name: '出租单位审核人:' }, rowId: notesRow + 4, }, + { + companyName: { name: '承租单位材料负责人:' }, + companyName1: { name: '出租单位对账人:' }, + rowId: notesRow + 6, + }, + { + companyName: { name: '签署日期:' }, + companyName1: { name: '签署日期:' }, + rowId: notesRow + 8, + }, ]; return { table1, @@ -492,7 +520,7 @@ export const excelDataHandle = (excelData) => { const excelAddTable = (tablerow, tableHeaderText, ws, table) => { ws.getCell(`A${tablerow - 1}`).value = tableHeaderText; - ws.mergeCells(`A${tablerow - 1}:J${tablerow - 1}`); + ws.mergeCells(`A${tablerow - 1}:K${tablerow - 1}`); ws.getCell(`A${tablerow - 1}`).alignment = { horizontal: 'center' }; ws.getCell(`A${tablerow - 1}`).border = { top: { style: 'thin' }, @@ -546,7 +574,7 @@ export const ExportToExcel = async (data) => { value.height = 20; }); //设置表格边框 - const cols = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J']; + const cols = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K']; const CellBorder = (row) => { cols.forEach((value) => { if (value === 'A' && row === `${notesRow}`) { @@ -572,9 +600,7 @@ export const ExportToExcel = async (data) => { }); }; //设置表格表头 - ws.getCell('A1').value = `${ - contracts.project?.associated_company?.name ?? `${PromptText.noContractedCompany}` - } 对账单`; + ws.getCell('A1').value = `${contracts.first_party?.name ?? `${PromptText.noContractedCompany}`} 对账单`; ws.mergeCells('A1:J1'); ws.getCell('A1').alignment = { vertical: 'middle', horizontal: 'center' }; ws.getCell('A1').font = { @@ -584,19 +610,19 @@ export const ExportToExcel = async (data) => { row.height = 30; //设置第一行内容 ws.getCell('A2').value = '客户各项费用明细'; - ws.mergeCells('A2:J2'); + ws.mergeCells('A2:K2'); ws.getCell('A2').alignment = { horizontal: 'center' }; //设置表格上层合同信息 nameRows.forEach((value) => { ws.getCell(`A${value?.rowId}`).value = value[Object.keys(value)[0]].name + value[Object.keys(value)[0]].value; ws.mergeCells(`A${value?.rowId}:F${value?.rowId}`); ws.getCell(`G${value?.rowId}`).value = value[Object.keys(value)[1]].name + value[Object.keys(value)[1]].value; - ws.mergeCells(`G${value?.rowId}:J${value?.rowId}`); + ws.mergeCells(`G${value?.rowId}:K${value?.rowId}`); }); //本期汇总 ws.getCell(`A${table1Row - 1}`).value = '本期汇总'; - ws.mergeCells(`A${table1Row - 1}:J${table1Row - 1}`); + ws.mergeCells(`A${table1Row - 1}:K${table1Row - 1}`); ws.getCell(`A${table1Row - 1}`).alignment = { horizontal: 'center' }; ws.getCell(`A${table1Row - 1}`).border = { bottom: { style: 'thin' }, @@ -616,7 +642,8 @@ export const ExportToExcel = async (data) => { const rows24 = ws.getRows(table2Row, calc.history ? calc.history?.length + 1 : 1); rows24.forEach((value) => { ws.mergeCells(`A${value['_number']}:B${value['_number']}`); - ws.mergeCells(`I${value['_number']}:J${value['_number']}`); + ws.mergeCells(`G${value['_number']}:H${value['_number']}`); + ws.mergeCells(`J${value['_number']}:K${value['_number']}`); if (value['_number'] !== table2Row) { const row25 = ws.getRow(value['_number']); row25.alignment = { horizontal: 'right' }; @@ -631,6 +658,7 @@ export const ExportToExcel = async (data) => { excelAddTable(table3Row, '本期明细', ws, table3); const rows37 = ws.getRows(table3Row, calc.list ? calc.list?.length + 1 : 1); rows37.forEach((value) => { + ws.mergeCells(`C${value['_number']}:D${value['_number']}`); if (value['_number'] !== table3Row) { const row38 = ws.getRow(value['_number']); row38.alignment = { horizontal: 'right' }; @@ -645,7 +673,7 @@ export const ExportToExcel = async (data) => { ws.mergeCells(`A${value['_number']}:B${value['_number']}`); ws.mergeCells(`C${value['_number']}:D${value['_number']}`); ws.mergeCells(`F${value['_number']}:G${value['_number']}`); - ws.mergeCells(`H${value['_number']}:J${value['_number']}`); + ws.mergeCells(`H${value['_number']}:K${value['_number']}`); if (value['_number'] !== table4row) { const row38 = ws.getRow(value['_number']); row38.alignment = { horizontal: 'right' }; @@ -667,6 +695,7 @@ export const ExportToExcel = async (data) => { rows1?.forEach((value) => { ws.mergeCells(`A${value['_number']}:B${value['_number']}`); ws.mergeCells(`F${value['_number']}:G${value['_number']}`); + ws.mergeCells(`J${value['_number']}:K${value['_number']}`); if (value['_number'] !== table5Row) { const row38 = ws.getRow(value['_number']); row38.alignment = { horizontal: 'right' }; @@ -685,9 +714,8 @@ export const ExportToExcel = async (data) => { '承租单位收到租费单结算明细15日内未提异议即视为确认。请签字盖章后邮寄一份至' + contracts.project?.associated_company.address; ws.getCell(`F${notesRow}`).value = ` - 备注:${contracts.project?.comment ?? ''} - 出租单位:${contracts.project?.associated_company?.name ?? PromptText.noContractedCompany}`; - ws.mergeCells(`F${notesRow}:J${notesRow}`); + 备注:${contracts.project?.comment ?? ''}`; + ws.mergeCells(`F${notesRow}:K${notesRow}`); const url = 'http://985.so/bpw6g'; const imageUrl = await QRCode.toDataURL(url); const imageId1 = workBook.addImage({ @@ -704,11 +732,9 @@ export const ExportToExcel = async (data) => { //设置底部签名区域 footRows.forEach((value) => { ws.getCell(`A${value?.rowId}`).value = value[Object.keys(value)[0]].name; - ws.mergeCells(`A${value?.rowId}:C${value?.rowId}`); - ws.getCell(`D${value?.rowId}`).value = value[Object.keys(value)[1]].name; - ws.mergeCells(`D${value?.rowId}:G${value?.rowId}`); - ws.getCell(`H${value?.rowId}`).value = value[Object.keys(value)[2]].name; - ws.mergeCells(`H${value?.rowId}:J${value?.rowId}`); + ws.mergeCells(`A${value?.rowId}:E${value?.rowId}`); + ws.getCell(`F${value?.rowId}`).value = value[Object.keys(value)[1]].name; + ws.mergeCells(`F${value?.rowId}:K${value?.rowId}`); }); const buffer = await workBook.xlsx.writeBuffer(); diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementStyleSwitchActionInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementStyleSwitchActionInitializer.tsx index 9cf15772e..9a860c5c6 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementStyleSwitchActionInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/SettlementStyleSwitchActionInitializer.tsx @@ -1,5 +1,5 @@ import React, { createContext, useContext, useState } from 'react'; -import { Action, ActionInitializer } from '@nocobase/client'; +import { Action, ActionInitializer } from '@tachybase/client'; export const SettlementStyleContext = createContext({ style: 'category', diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/paperSwitching.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/paperSwitching.tsx new file mode 100644 index 000000000..de44ea8b1 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/actions/paperSwitching.tsx @@ -0,0 +1,66 @@ +import React, { useContext, useEffect, useRef, useState } from 'react'; +import { ActionInitializer, useRequest } from '@tachybase/client'; +import { Button, Divider, Input, InputRef, Radio, Select, Space } from 'antd'; +import { PdfPaperSwitchingContext } from '../../hooks/usePdfPath'; +import { PlusOutlined } from '@ant-design/icons'; + +export const PaperSwitching = (props) => { + const { setPaper } = useContext(PdfPaperSwitchingContext); + + const index = 0; + const [items, setItems] = useState(['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'B1', 'B2', 'B3', 'B4']); + // const [name, setName] = useState(''); + // const inputRef = useRef(null); + // const onNameChange = (event: React.ChangeEvent) => { + // setName(event.target.value); + // }; + + // const addItem = (e: React.MouseEvent) => { + // e.preventDefault(); + // setItems([...items, name || `New item ${index++}`]); + // setName(''); + // setTimeout(() => { + // inputRef.current?.focus(); + // }, 0); + // }; + const handleChange = (event) => { + setPaper(event); + }; + return ( + e.stopPropagation()} + /> + + */} + + )} + options={items.map((item) => ({ label: item, value: item }))} + /> + ); +}; + +export const PaperSwitchingInitializer = (props) => { + const schema = { + title: '{{ t("paper switching") }}', + 'x-action': 'paperSwitching', + 'x-component': 'PaperSwitching', + 'x-designer': 'Action.Designer', + }; + return ; +}; diff --git a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/blocks/UnusedRecordsBlockInitializer.tsx b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/blocks/UnusedRecordsBlockInitializer.tsx index 0c999312f..5cfd027e0 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/blocks/UnusedRecordsBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/schema-initializer/blocks/UnusedRecordsBlockInitializer.tsx @@ -7,7 +7,7 @@ import { useRequest, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import { ToolOutlined } from '@ant-design/icons'; import { Tag } from 'antd'; diff --git a/packages/plugins/@hera/plugin-rental/src/interfaces/options.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/options.ts index cf752c863..f94108ea2 100644 --- a/packages/plugins/@hera/plugin-rental/src/interfaces/options.ts +++ b/packages/plugins/@hera/plugin-rental/src/interfaces/options.ts @@ -1,4 +1,6 @@ export interface RecordPdfOptions { isDouble: number; printSetup: String; + margingTop: number; + paper: string; } diff --git a/packages/plugins/@hera/plugin-rental/src/interfaces/waybill.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/waybill.ts index ad2196a29..1c9a07f67 100644 --- a/packages/plugins/@hera/plugin-rental/src/interfaces/waybill.ts +++ b/packages/plugins/@hera/plugin-rental/src/interfaces/waybill.ts @@ -1,22 +1,34 @@ import { Record } from './record'; export interface Waybill { - side_information: string; - driver: any; - carrier: any; - consignee_contact: any; - in_stock: any; - shipper_contact: any; - out_stock: any; - payee_account: any; - payer: any; + record_number: string; + weight_or_amount: number; + off_date: Date; + arrival_date: Date; + unit_price: number; pay_date: Date; additional_cost: number; - unit_price: number; - weight_or_amount: number; - arrival_date: Date; - off_date: Date; - pdfExplain: string; - record: Record; + products: any[]; + payer_company: string; + payer_name: string; + payee_account_name: string; + payee_account_bank: string; + payee_account_number: string; + shipper_company: string; + shipper_name: string; + shipper_contact_phone: string; + shipper_address: string; + consignee_company: string; + consignee_contact_phone: string; + consignee_address: string; + consignee_name: string; comment: string; + shipper_contact: string; + carrier: string; + driver: string; + driver_idcard: string; + vehicles: string; + driver_phone: string; + side_information: string; + consignee_contact: string; } diff --git a/packages/plugins/@hera/plugin-rental/src/server/actions/contracts-controller.ts b/packages/plugins/@hera/plugin-rental/src/server/actions/contracts-controller.ts index 187f48b71..92ddffbb3 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/actions/contracts-controller.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/actions/contracts-controller.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { Action, Controller } from '@nocobase/utils'; +import { Context } from '@tachybase/actions'; +import { Action, Controller } from '@tachybase/utils'; @Controller('contracts') export class ContractsController { diff --git a/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts b/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts index 4e0a3432c..bc3c928c6 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts @@ -1,13 +1,13 @@ -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; import { QueryTypes } from 'sequelize'; import { RecordPdfService } from '../services/record-pdf-service'; import { SystemSettingService, SqlLoader } from '@hera/plugin-core'; -import { Action, Controller, Inject } from '@nocobase/utils'; +import { Action, Controller, Inject } from '@tachybase/utils'; import { Movement } from '../../utils/constants'; import _ from 'lodash'; -import { FilterParser, Repository } from '@nocobase/database'; +import { FilterParser, Repository } from '@tachybase/database'; import { CollectionRepository } from '@nocobase/plugin-collection-manager'; -import { Cache } from '@nocobase/cache'; +import { Cache } from '@tachybase/cache'; import getStream from 'get-stream'; import { stringify } from 'flatted'; @@ -42,46 +42,54 @@ export class RecordPreviewController { const query = { where: where || {}, attributes: [ - [sequelize.fn('sum', sequelize.col('items.count')), 'count'], - [sequelize.col('items.product_id'), 'product_id'], - [sequelize.col('records.movement'), 'movement'], + [sequelize.fn('sum', sequelize.col('record.items.count')), 'count'], + [sequelize.col('record.items.new_product_id'), 'new_product_id'], + [sequelize.col('view_records_contracts.movement'), 'movement'], ], include: [ { - association: 'items', + association: 'record', attributes: [], + include: [ + { + association: 'items', + attributes: [], + }, + ], }, ...parsedFilterInclude, ], - group: [sequelize.col('items.product_id'), sequelize.col('records.movement')], + group: [sequelize.col('record.items.new_product_id'), sequelize.col('view_records_contracts.movement')], order: [], subQuery: false, raw: true, } as any; - const records = await ctx.db.getModel('records').findAll(query); + const records = await ctx.db.getModel('view_records_contracts').findAll(query); if (records) { - const allProducts = await ctx.db.getRepository('product').find({ appends: ['category'] }); + const allProducts = await ctx.db.getRepository('products').find(); if (!allProducts) return; - const items = {} as { [key: string]: { name: string; sort: number; out: number; in: number; total: number } }; + const items = {} as { [key: string]: { name: string; out: number; in: number; total: number } }; records.forEach((item) => { - const product = allProducts.find((p) => p.id === item?.product_id); + const product = allProducts.find((p) => p.id === item?.new_product_id); if (!product) return; - if (!items[product.name]) { - items[product.name] = { - name: product.name, - sort: product.category.sort, + const parent = allProducts.find((p) => p.id === product.parentId); + const name = parent?.name || product.name; + if (!items[name]) { + items[name] = { + name: name, out: 0, in: 0, total: 0, }; } - const count = product.category.convertible ? item.count * product.ratio : item.count; + // 根据产品找父级产品的分类 + const count = parent?.convertible || product.convertible ? item.count * product.ratio : item.count; if (item.movement === Movement.in) { - items[product.name].in += count; - items[product.name].total += count; + items[name].in += count; + items[name].total += count; } else { - items[product.name].out += count; - items[product.name].total -= count; + items[name].out += count; + items[name].total -= count; } }); const result = { @@ -97,7 +105,7 @@ export class RecordPreviewController { @Action('allweight') async groupWeight(ctx: Context) { const { filter } = ctx.action.params.values; - const collectionName = 'records'; + const collectionName = 'view_records_contracts'; const collection = ctx.db.getCollection(collectionName); const fields = collection.fields; const filterParser = new FilterParser(filter, { @@ -115,16 +123,22 @@ export class RecordPreviewController { const query = { where: where || {}, attributes: [ - [sequelize.fn('sum', sequelize.col('records.weight')), 'weight'], - [sequelize.col('records.movement'), 'movement'], + [sequelize.fn('sum', sequelize.col('record.weight')), 'weight'], + [sequelize.col('view_records_contracts.movement'), 'movement'], + ], + group: [sequelize.col('view_records_contracts.movement')], + include: [ + { + association: 'record', + attributes: [], + }, + ...parsedFilterInclude, ], - group: [sequelize.col('records.movement')], - include: [...parsedFilterInclude], order: [], subQuery: false, raw: true, } as any; - const records = await ctx.db.getModel('records').findAll(query); + const records = await ctx.db.getModel('view_records_contracts').findAll(query); const inNum = records.find((item) => item.movement === Movement.in)?.weight ?? 0; const outNum = records.find((item) => item.movement === Movement.out)?.weight ?? 0; const data = { @@ -136,7 +150,7 @@ export class RecordPreviewController { @Action('allprice') async groupPrice(ctx: Context) { const { filter } = ctx.action.params.values; - const collectionName = 'records'; + const collectionName = 'view_records_contracts'; const collection = ctx.db.getCollection(collectionName); const fields = collection.fields; const filterParser = new FilterParser(filter, { @@ -154,17 +168,22 @@ export class RecordPreviewController { const query = { where: where || {}, attributes: [ - [sequelize.fn('sum', sequelize.col('records.all_price')), 'all_price'], - [sequelize.col('records.movement'), 'movement'], + [sequelize.fn('sum', sequelize.col('record.all_price')), 'all_price'], + [sequelize.col('view_records_contracts.movement'), 'movement'], + ], + group: [sequelize.col('view_records_contracts.movement')], + include: [ + { + association: 'record', + attributes: [], + }, + ...parsedFilterInclude, ], - group: [sequelize.col('records.movement')], - include: [...parsedFilterInclude], order: [], subQuery: false, raw: true, } as any; - const records = await ctx.db.getModel('records').findAll(query); - + const records = await ctx.db.getModel('view_records_contracts').findAll(query); const inNum = records.find((item) => item.movement === Movement.in)?.all_price ?? 0; const outNum = records.find((item) => item.movement === Movement.out)?.all_price ?? 0; const data = { @@ -177,69 +196,140 @@ export class RecordPreviewController { @Action('pdf') async printPreview(ctx: Context) { const { - params: { recordId, isDouble, settingType, margingTop }, + params: { recordId: id, isDouble, settingType, margingTop, paper, font, annotate }, } = ctx.action; + let pdfTop: number; + const isAnnotate = annotate === 'true' ? true : false; + // 查询合同订单中间表,获得订单id,合同id,出入库信息 + const intermediate = await ctx.db.getRepository('record_contract').findOne({ filter: { id } }); + const recordId = intermediate.record_id; + const contractId = intermediate.contract_id; + // 订单基本数据 + const baseRecord = await ctx.db.getRepository('records').findOne({ + filter: { id: recordId }, + appends: [ + 'vehicles', + 'in_stock', + 'in_stock.company', + 'in_stock.contacts', + 'out_stock', + 'out_stock.company', + 'out_stock.contacts', + ], + }); + const userID = baseRecord.createdById || baseRecord.updatedById; + const user = await ctx.db.getRepository('users').findOne({ filter: { id: userID } }); + baseRecord.nickname = user?.nickname || ''; + baseRecord.userPhone = user?.phone || ''; // 拉侧面文字说明 const pdfExplain = await ctx.db.getRepository('basic_configuration').find(); + baseRecord.pdfExplain = pdfExplain[0]?.out_of_storage_explain; + const products_view = this.sqlLoader.sqlFiles['products_search_rule_special']; + await ctx.db.sequelize.query(products_view); // 租金数据 - const leaseData = await ctx.db.sequelize.query(this.sqlLoader.sqlFiles['pdf_record_lease'], { + const leaseData: any = await ctx.db.sequelize.query(this.sqlLoader.sqlFiles['pdf_record_product_item'], { replacements: { recordId, + contractId, }, type: QueryTypes.SELECT, }); - // 记录单数据 - const records = await ctx.db.sequelize.query(this.sqlLoader.sqlFiles['pdf_record'], { + // 租金赔偿数据 + const leaseFeeData: any = await ctx.db.sequelize.query(this.sqlLoader.sqlFiles['pdf_record_product_fee_item'], { replacements: { - recordId, + intermediateId: intermediate.id, }, type: QueryTypes.SELECT, }); - const record = records[0] as any; - // 拉标题 - const systemSetting = await this.systemSetting.get(); - record.systemTitle = systemSetting?.title || '异常数据,请联系相关负责人!'; - const userID = record.createdById || record.updatedById; - const user = await ctx.db.getRepository('users').findOne({ filter: { id: userID } }); - record.nickname = user?.nickname || ''; - record.userPhone = user?.phone || ''; - record.pdfExplain = pdfExplain[0]?.out_of_storage_explain; - if (Number(margingTop)) { - record.margingTop = Number(margingTop); - } else { - // 查询当前用户信息 - const currentUser = await ctx.db.getRepository('users').findOne({ filter: { id: ctx.state.currentUser.id } }); - record.margingTop = Number(currentUser?.pdf_top_margin) || 0; - } + // 无关联数据 + const noLeaseProductFeeData: any = await ctx.db.sequelize.query( + this.sqlLoader.sqlFiles['pdf_record_no_porduct_fees'], + { + replacements: { + recordId, + contractId, + }, + type: QueryTypes.SELECT, + }, + ); - // 费用数据 - const feeData = await ctx.db.sequelize.query(this.sqlLoader.sqlFiles['pdf_record_fee'], { - replacements: { - recordId, + // 比如运费按照出入库量,但是录单存在排除的情况,特殊处理 + const noRuleexcluded: any = await ctx.db.sequelize.query( + ` + select + rfin.count , + rfin."comment" , + rfin.new_fee_product_id, + p2.name || '[' || p.name || ']' as fee_name, + p.custom_name, + rfin.is_excluded + from record_contract rc + join record_fee_items_new rfin on rfin.record_contract_id = rc.id and rfin.is_excluded is true and rfin.new_product_id is null + join products p on p.id = rfin.new_fee_product_id + left join products p2 on p."parentId" = p2.id + where rc.id = :intermediateId + `, + { + replacements: { + intermediateId: intermediate.id, + }, + type: QueryTypes.SELECT, }, - type: QueryTypes.SELECT, + ); + // 合同基本数据 + const contracts = await ctx.db.getRepository('contracts').findOne({ + filter: { + id: intermediate.contract_id, + }, + appends: ['first_party', 'first_party.projects', 'party_b', 'party_b.projects'], }); - // 订单打印选项 + contracts.movement = intermediate.movement; + + const double = isDouble === '0' || isDouble === '1' ? isDouble : pdfExplain[0].record_columns; const printSetup = settingType === '0' || settingType === '1' || settingType === '2' ? settingType : pdfExplain[0]?.record_print_setup; - const double = isDouble === '0' || isDouble === '1' ? isDouble : pdfExplain[0].record_columns; + if (Number(margingTop)) { + pdfTop = Number(margingTop); + } else { + const currentUser = await ctx.db.getRepository('users').findOne({ filter: { id: ctx.state.currentUser.id } }); + pdfTop = Number(currentUser?.pdf_top_margin); + } const cache = ctx.app.cacheManager.getCache('@hera/plugin-rental') as Cache; - const key = stringify({ record, leaseData, feeData, settings: { isDouble: double, printSetup } }); + const key = stringify({ + intermediate, + baseRecord, + leaseData, + leaseFeeData, + noLeaseProductFeeData, + noRuleexcluded, + contracts, + settings: { isDouble: double, printSetup, margingTop: pdfTop, paper, font, isAnnotate }, + }); const result = await cache.get(key); if (result) { if (Buffer.isBuffer(result)) { ctx.body = result; } else { + //@ts-ignore ctx.body = Buffer.from(result.data); } } else { const buf = await getStream.buffer( - // @ts-ignore - await this.recordPdfService.transformPdfV2(record, leaseData, feeData, { isDouble: double, printSetup }), + //@ts-ignore + await this.recordPdfService.transformPdfV2( + intermediate, + baseRecord, + leaseData, + leaseFeeData, + noLeaseProductFeeData, + noRuleexcluded, + contracts, + { isDouble: double, printSetup, margingTop: pdfTop, paper, font, isAnnotate }, + ), ); ctx.body = buf; await cache.set(key, buf); diff --git a/packages/plugins/@hera/plugin-rental/src/server/actions/settlement-controller.ts b/packages/plugins/@hera/plugin-rental/src/server/actions/settlement-controller.ts index 6a0bfeb18..142493776 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/actions/settlement-controller.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/actions/settlement-controller.ts @@ -1,12 +1,13 @@ -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; import { SqlLoader, SystemSettingService } from '@hera/plugin-core'; -import { Inject, Action, Controller, Db } from '@nocobase/utils'; +import { Inject, Action, Controller, Db } from '@tachybase/utils'; import { renderIt } from '../pdf-documents/settlements-document'; import { SettlementService } from '../services/settlement-service'; import { QueryTypes } from 'sequelize'; -import { Cache } from '@nocobase/cache'; +import { Cache } from '@tachybase/cache'; import getStream from 'get-stream'; import { stringify } from 'flatted'; +import { SettlementProductsService } from '../services/settlement-products-service'; @Controller('settlements') export class SettlementController { @@ -19,23 +20,78 @@ export class SettlementController { @Inject(() => SettlementService) private settlmentService: SettlementService; + @Inject(() => SettlementProductsService) + private SettlementProductsService: SettlementProductsService; + @Action('calculate') async updateOrderDetails(ctx: Context) { const { params: { settlementsId }, } = ctx.action; - - const SQL = this.sqlLoader.sqlFiles['settlement_calc']; - const settlement = await ctx.db.sequelize.query(SQL, { - logging: console.log, - raw: true, - plain: true, + const products_view = this.sqlLoader.sqlFiles['products_search_rule_special']; + await ctx.db.sequelize.query(products_view); + const leaseSql = this.sqlLoader.sqlFiles['settlement_calc_products']; + const feeSql = this.sqlLoader.sqlFiles['settlement_calc_fee_products']; + const feeNoProductSql = this.sqlLoader.sqlFiles['settlement_calc_fee_no_products']; + const recordFeeSql = this.sqlLoader.sqlFiles['settlement_calc_record_fee_products']; + const settlementLeaseData = await ctx.db.sequelize.query(leaseSql, { replacements: { settlementsId, }, type: QueryTypes.SELECT, }); - await this.settlmentService.calculate(settlement as any, settlementsId); + const settlementFeeData = await ctx.db.sequelize.query(feeSql, { + replacements: { + settlementsId, + }, + type: QueryTypes.SELECT, + }); + const settlementFeeNoProductData: any = await ctx.db.sequelize.query(feeNoProductSql, { + replacements: { + settlementsId, + }, + type: QueryTypes.SELECT, + }); + const settlement = await ctx.db.getRepository('settlements').findOne({ + where: { + id: settlementsId, + }, + fields: ['start_date', 'end_date'], + }); + const settlementRecordFee: any = await ctx.db.sequelize.query(recordFeeSql, { + replacements: { + settlementsId, + }, + type: QueryTypes.SELECT, + }); + for (const item of settlementFeeNoProductData) { + if (item.conversion_logic_id > 4) { + const weightRules = await ctx.db.getRepository('weight_rules').find({ + where: { + logic_id: item.conversion_logic_id, + }, + appends: ['new_product'], + }); + item['weightRules'] = weightRules; + } else { + item['weightRules'] = null; + } + } + const settlementAddItems = await ctx.db.getRepository('settlement_add_items').findOne({ + where: { + add_id: settlementsId, + }, + }); + const settlementAbout = { + settlementLeaseData, + settlementFeeData, + settlementFeeNoProductData, + settlementRecordFee, + settlementAddItems, + start_date: settlement.start_date, + end_date: settlement.end_date, + }; + await this.SettlementProductsService.calculate(settlementAbout as any, settlementsId); } @Action('pdf') diff --git a/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts b/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts index 0a11e83e9..9fbc0e508 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts @@ -1,10 +1,10 @@ -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; import { renderWaybill } from '../pdf-documents/waybills-document'; import { SqlLoader } from '@hera/plugin-core'; -import { Action, Controller, Inject } from '@nocobase/utils'; +import { Action, Controller, Inject } from '@tachybase/utils'; import { QueryTypes } from 'sequelize'; import { Waybill } from '../../interfaces/waybill'; -import { FilterParser } from '@nocobase/database'; +import { FilterParser } from '@tachybase/database'; @Controller('waybills') export class WaybillsController { @@ -20,12 +20,20 @@ export class WaybillsController { ctx.body = await renderWaybill(null); return; } + const products = await ctx.db.sequelize.query(this.sqlLoader.sqlFiles['waybills_products'], { + replacements: { + recordId: recordId, + }, + type: QueryTypes.SELECT, + }); const waybills = await ctx.db.sequelize.query(this.sqlLoader.sqlFiles['pdf_waybills'], { replacements: { recordId: recordId, }, type: QueryTypes.SELECT, }); + const data = waybills[0]; + data['products'] = products; const settings = {}; if (Number(margingTop)) { settings['margingTop'] = Number(margingTop); @@ -33,7 +41,7 @@ export class WaybillsController { const currentUser = await ctx.db.getRepository('users').findOne({ filter: { id: ctx.state.currentUser.id } }); settings['margingTop'] = Number(currentUser?.pdf_top_margin) || 0; } - ctx.body = await renderWaybill(waybills[0] as Waybill, settings); + ctx.body = await renderWaybill(data as Waybill, settings); } @Action('group') diff --git a/packages/plugins/@hera/plugin-rental/src/server/collections/inventory-orders.ts b/packages/plugins/@hera/plugin-rental/src/server/collections/inventory-orders.ts index 5d8fa1e1a..a75584acf 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/collections/inventory-orders.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/collections/inventory-orders.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@hera/plugin-rental/src/server/collections/transfer-orders.ts b/packages/plugins/@hera/plugin-rental/src/server/collections/transfer-orders.ts index 4d53ee51d..8a1f04369 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/collections/transfer-orders.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/collections/transfer-orders.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@hera/plugin-rental/src/server/collections/undetermined-projects.ts b/packages/plugins/@hera/plugin-rental/src/server/collections/undetermined-projects.ts index bbbead25a..035add415 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/collections/undetermined-projects.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/collections/undetermined-projects.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@hera/plugin-rental/src/server/migrations/20240122202859-update-record_category_script.ts b/packages/plugins/@hera/plugin-rental/src/server/migrations/20240122202859-update-record_category_script.ts index 1724c11a9..52fca3171 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/migrations/20240122202859-update-record_category_script.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/migrations/20240122202859-update-record_category_script.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' diff --git a/packages/plugins/@hera/plugin-rental/src/server/migrations/20240202134835-update-contract_name.ts b/packages/plugins/@hera/plugin-rental/src/server/migrations/20240202134835-update-contract_name.ts index a821ffb9c..5ee6c61c8 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/migrations/20240202134835-update-contract_name.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/migrations/20240202134835-update-contract_name.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' diff --git a/packages/plugins/@hera/plugin-rental/src/server/migrations/delect-notifications.ts b/packages/plugins/@hera/plugin-rental/src/server/migrations/delect-notifications.ts index db6a8e4e2..c67652a3c 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/migrations/delect-notifications.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/migrations/delect-notifications.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { on = 'beforeLoad'; diff --git a/packages/plugins/@hera/plugin-rental/src/server/migrations/import-contract-rule-v2.ts b/packages/plugins/@hera/plugin-rental/src/server/migrations/import-contract-rule-v2.ts index 928b5a804..20cc842d4 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/migrations/import-contract-rule-v2.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/migrations/import-contract-rule-v2.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.19.0-alpha.3'; diff --git a/packages/plugins/@hera/plugin-rental/src/server/migrations/update-contracts_rule_items.ts b/packages/plugins/@hera/plugin-rental/src/server/migrations/update-contracts_rule_items.ts index ef5c0696a..43edb8282 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/migrations/update-contracts_rule_items.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/migrations/update-contracts_rule_items.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.19.0-alpha.3'; diff --git a/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-all_price.ts b/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-all_price.ts index a7d9b0023..0435431f3 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-all_price.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-all_price.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { ConversionLogics } from '../../utils/constants'; export default class extends Migration { diff --git a/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-contract_id.ts b/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-contract_id.ts index fd3fef8e8..41e50e912 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-contract_id.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/migrations/update-record-contract_id.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.19.0-alpha.3'; diff --git a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx index 42b75c511..bceacf3bc 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx +++ b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-documentV2.tsx @@ -1,197 +1,10 @@ import React from 'react'; import { Document, Page, Text, View, StyleSheet, Image, renderToStream } from '@hera/plugin-core'; import * as QRCode from 'qrcode'; -import { RecordCategory } from '../../utils/constants'; import { formatCurrency, formatQuantity } from '../../utils/currencyUtils'; -import { dayjs } from '@nocobase/utils'; -import { PrintSetup } from '../../utils/system'; -const fontSizes = { - title: '13px', - subTitle: '11px', - main: '9px', - side: '8px', -}; -const styles = StyleSheet.create({ - page: { - flexDirection: 'column', - backgroundColor: '#FFF', - fontFamily: 'source-han-sans', - padding: '12px', - }, - title: { - textAlign: 'center', - fontSize: fontSizes.title, - }, - subTitle: { - textAlign: 'center', - fontSize: fontSizes.subTitle, - }, - content: { - flexDirection: 'row', - marginLeft: '10pt', - marginRight: '10pt', - }, - main: { - flex: 1, - }, - side: { - width: '11px', - fontSize: fontSizes.side, - paddingLeft: '2px', - }, - tableHeader: { - fontSize: fontSizes.main, - flexDirection: 'row', - }, - headerLeft: { - width: '205px', - }, - headerMiddle: { - flex: 1, - }, - headerLeftLeft: { - flex: 2, - }, - headerLeftRight: { - flex: 1, - }, - headerRight: { - width: '205px', - }, - tableContentTitle: { - fontSize: fontSizes.main, - flexDirection: 'row', - }, - tableCellLargeTitle: { - flex: 2, - textAlign: 'center', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - }, - tableCellTitle: { - flex: 1, - textAlign: 'center', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - }, - tableCell2Title: { - flex: 2, - textAlign: 'center', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - }, - tableCellTitleLast: { - flex: 1, - textAlign: 'center', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - borderRight: '1px solid black', - marginRight: '-1px', - }, - tableCell2TitleLast: { - flex: 2, - textAlign: 'center', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - borderRight: '1px solid black', - marginRight: '-1px', - }, - tableContent: { - fontSize: fontSizes.main, - flexDirection: 'row', - }, - tableCell: { - flex: 1, - textAlign: 'right', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - borderBottom: '1px solid black', - }, - tableCellNoLeft: { - flex: 1, - textAlign: 'right', - borderTop: '1px solid black', - marginTop: '-1px', - borderBottom: '1px solid black', - }, - tableCell2: { - flex: 2, - textAlign: 'right', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - borderBottom: '1px solid black', - }, - tableCellLast: { - flex: 1, - textAlign: 'right', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - borderRight: '1px solid black', - marginRight: '-1px', - borderBottom: '1px solid black', - }, - tableCell2Last: { - flex: 2, - textAlign: 'right', - borderLeft: '1px solid black', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - borderRight: '1px solid black', - marginRight: '-1px', - borderBottom: '1px solid black', - }, - tableFooter: { - flexDirection: 'row', - }, - tableFooterQr: { - width: '50px', - marginLeft: '-50px', - transform: 'translate(50px, 0)', - }, - tableFooterLeft: { - flex: 1, - fontSize: fontSizes.main, - borderLeft: '1px solid black', - paddingLeft: '50px', - marginLeft: '-1px', - borderTop: '1px solid black', - marginTop: '-1px', - borderBottom: '1px solid black', - marginBottom: '-1px', - }, - tableFooterRight: { - flex: 1, - fontSize: fontSizes.main, - border: '1px solid black', - paddingRight: '50px', - margin: '-1px', - }, - sign: { - marginTop: '0px', - flexDirection: 'row', - }, - signPart: { - flex: 1, - fontSize: fontSizes.main, - }, -}); +import { dayjs } from '@tachybase/utils'; +import { RecordPdfOptions } from '../../interfaces/options'; + /** * * @param isDouble 0为单列,1为双列 @@ -202,67 +15,224 @@ const PreviewDocument = ({ detail, record, priceRule, - isDouble, - printSetup, + options, }: { imageUrl: string; detail: any; record: any[]; priceRule: any[]; - isDouble: Number; - printSetup: String; + options: any; // RecordPdfOptions; }) => { - isDouble = Number(isDouble); - const date = detail.date; - const number = detail.number; - const origin = detail.original_number; - const singlePlayer = detail.nickname + ' ' + detail?.userPhone; - const car = detail.vehicles ? detail.vehicles.map((item) => item?.number).join(' ') : ''; - const outOfStorage = detail.movement > 0 ? '入库' : '出库'; - const getTitle = () => { - let name; - if (detail.category === RecordCategory.lease) { - name = detail.contract?.project?.associated_company?.name ?? detail.systemTitle; - } else { - if (outOfStorage === '入库') { - name = detail.in_stock?.name ?? detail.systemTitle; - } else { - name = detail.out_stock?.name ?? detail.systemTitle; + const fontSizes = { + title: '13px', + subTitle: '11px', + main: `${options.font || 9}px`, + side: '8px', + }; + const styles = StyleSheet.create({ + page: { + flexDirection: 'column', + backgroundColor: '#FFF', + fontFamily: 'source-han-sans', + padding: '12px', + }, + title: { + textAlign: 'center', + fontSize: fontSizes.title, + }, + subTitle: { + textAlign: 'center', + fontSize: fontSizes.subTitle, + }, + content: { + flexDirection: 'row', + marginLeft: '10pt', + marginRight: '10pt', + }, + main: { + flex: 1, + }, + side: { + width: '11px', + fontSize: fontSizes.side, + paddingLeft: '2px', + }, + tableHeader: { + fontSize: fontSizes.main, + flexDirection: 'row', + }, + headerLeft: { + width: '205px', + }, + headerMiddle: { + flex: 1, + }, + headerLeftLeft: { + flex: 2, + }, + headerLeftRight: { + flex: 1, + }, + headerRight: { + width: '205px', + }, + tableContentTitle: { + fontSize: fontSizes.main, + flexDirection: 'row', + }, + tableCellLargeTitle: { + flex: 2, + textAlign: 'center', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + }, + tableCellTitle: { + flex: 1, + textAlign: 'center', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + }, + tableCell2Title: { + flex: 2, + textAlign: 'center', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + }, + tableCellTitleLast: { + flex: 1, + textAlign: 'center', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + borderRight: '1px solid black', + marginRight: '-1px', + }, + tableCell2TitleLast: { + flex: 2, + textAlign: 'center', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + borderRight: '1px solid black', + marginRight: '-1px', + }, + tableContent: { + fontSize: fontSizes.main, + flexDirection: 'row', + }, + tableCell: { + flex: 1, + textAlign: 'right', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + borderBottom: '1px solid black', + }, + tableCellNoLeft: { + flex: 1, + textAlign: 'right', + borderTop: '1px solid black', + marginTop: '-1px', + borderBottom: '1px solid black', + }, + tableCell2: { + flex: 2, + textAlign: 'right', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + borderBottom: '1px solid black', + }, + tableCellLast: { + flex: 1, + textAlign: 'right', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + borderRight: '1px solid black', + marginRight: '-1px', + borderBottom: '1px solid black', + }, + tableCell2Last: { + flex: 2, + textAlign: 'right', + borderLeft: '1px solid black', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + borderRight: '1px solid black', + marginRight: '-1px', + borderBottom: '1px solid black', + }, + tableFooter: { + flexDirection: 'row', + }, + tableFooterQr: { + width: '50px', + marginLeft: '-50px', + transform: 'translate(50px, 0)', + }, + tableFooterLeft: { + flex: 1, + fontSize: fontSizes.main, + borderLeft: '1px solid black', + paddingLeft: '50px', + marginLeft: '-1px', + borderTop: '1px solid black', + marginTop: '-1px', + borderBottom: '1px solid black', + marginBottom: '-1px', + }, + tableFooterRight: { + flex: 1, + fontSize: fontSizes.main, + border: '1px solid black', + paddingRight: '50px', + margin: '-1px', + }, + sign: { + marginTop: '0px', + flexDirection: 'row', + }, + signPart: { + flex: 1, + fontSize: fontSizes.main, + }, + }); + const annotate = options.isAnnotate; + if (annotate) { + let commentIndex = 1; + record.forEach((item) => { + if (item.comment) { + item.commentIndex = commentIndex; + commentIndex++; } - } - return name; - }; - const recordsName = getTitle(); - const outOfStorageAddress = (type) => { - // 此type用于展示出入类型 - if (type === 1) { - // 返回出库 - return detail.out_stock.name; - } else { - // 确定入库 - return detail.in_stock.name; - } - }; - const projectPhone = detail.contract?.project?.contacts - ?.map((item) => (item.name || '') + (item.phone || '')) - .join(' '); - const recordType = { - '0': '租赁', - '1': '购销', - '2': '暂存', - '3': '盘点', - }; + }); + } + const paper = options.paper; + const isDouble = Number(options.isDouble); const explain = - detail.category === RecordCategory.inventory + detail.type_new === '1' ? `盘点单用于清算仓库盈亏盈余。` : `如供需双方未签正式合同,本${ - recordType[detail.category] - }${outOfStorage}单经供需双方代表签字确认后, 将作为合同及发生业务往来的有效凭证,如已签合同,则成为该合同的组成部分。${ - outOfStorage === '入库' ? '出库方' : '采购方' + detail.record_category + }${detail.movement}单经供需双方代表签字确认后, 将作为合同及发生业务往来的有效凭证,如已签合同,则成为该合同的组成部分。${ + detail.movement === '入库' ? '出库方' : '采购方' }须核对 以上产品规格、数量确认后可签字认可。`; const getAllPrice = () => { let price = 0; - if (detail.category === RecordCategory.purchase && priceRule.filter(Boolean).length) { + if (detail.record_category === '购销' && priceRule.filter(Boolean).length) { priceRule.forEach((element) => { price += element.all_price; }); @@ -270,7 +240,7 @@ const PreviewDocument = ({ return formatCurrency(price, 2); }; const dobulePriceRule = []; - if (isDouble && detail.category === RecordCategory.purchase && priceRule.filter(Boolean).length) { + if (isDouble && detail.record_category === '购销' && priceRule.filter(Boolean).length) { // 双列展示 const leftData = priceRule.slice(0, Math.ceil(priceRule.length / 2)); const rightData = priceRule.slice(Math.ceil(priceRule.length / 2)); @@ -309,26 +279,40 @@ const PreviewDocument = ({ {columns.map((column, columnIndex) => ( - {item[column + 'name']} + + {annotate && item[column + 'commentIndex'] + ? item[column + 'commentIndex'] + '……' + item[column + 'name'] + : item[column + 'name']} + {!item[column + 'count'] ? '' : formatQuantity(item[column + 'count'], 2) + item[column + 'unit']} - + {!item[column + 'total'] ? '' : formatQuantity(item[column + 'total'], 2) + item[column + 'conversion_unit']} - - {item[column + 'isExcluded'] - ? '不计入合同 ' + (item[column + 'comment'] || '') - : item[column + 'comment'] || ''} - + {!annotate && ( + + {item[column + 'isExcluded'] + ? '不计入合同 ' + (item[column + 'comment'] || '') + : item[column + 'comment'] || ''} + + )} ))} )); let addCol = <>; - if (detail.category === RecordCategory.purchase) { + if (detail.record_category === '购销') { const allprice = getAllPrice(); addCol = ( @@ -336,15 +320,27 @@ const PreviewDocument = ({ {column === 'left_' ? '' : '总金额'} - {column === 'left_' ? '' : allprice} - + + {column === 'left_' ? '' : allprice} + + {!annotate && ( + + )} ))} ); } - return detail.category === RecordCategory.purchase ? ( + return detail.record_category === '购销' ? ( <> {page} {addCol} @@ -381,71 +377,76 @@ const PreviewDocument = ({ )); }; + const projectPhone = detail.record_party_b.contacts?.map((item) => (item.name || '') + (item.phone || '')).join(' '); + + const car = detail.vehicles ? detail.vehicles.map((item) => item?.number).join(' ') : ''; return ( - - {recordsName} - {detail.category === RecordCategory.inventory ? '盘点' : outOfStorage}单 + + {' '} + {/**transform: `scale(${trans})` */} + {detail.contract_first_party?.name || '异常数据,请联系相关负责人!'} + {detail.contract_first_party ? detail.movement : '盘点'}单 - {/* 第一行 */} - - {detail.category === RecordCategory.purchase && ( - 销售单位:{outOfStorageAddress(1)} - )} - {detail.category === RecordCategory.staging && ( - 出库方:{outOfStorageAddress(1)} - )} - {detail.category === RecordCategory.inventory && ( - 盘点单位:{detail.in_stock?.name} - )} - {detail.category !== RecordCategory.lease && ( - 日期:{date && dayjs(date).format('YYYY-MM-DD')} - )} - {detail.category !== RecordCategory.lease && 流水号:{number}} - - {/* 第二行 */} - - {detail.category === RecordCategory.purchase && ( - 采购单位:{outOfStorageAddress(0)} - )} - {detail.category === RecordCategory.staging && ( - 入库方:{outOfStorageAddress(0)} - )} - {detail.category !== RecordCategory.inventory && detail.category !== RecordCategory.lease && ( - 车号:{car} - )} - {detail.category !== RecordCategory.inventory && detail.category !== RecordCategory.lease && ( - 原始单号:{origin} - )} - - {/* 租赁 */} - {detail.category === RecordCategory.lease && ( - - 承租单位:{detail.contract?.project?.company?.name || ''} - 日期:{date && dayjs(date).format('YYYY-MM-DD')} + {detail.record_category === '租赁' && ( + + + 承租单位:{detail.record_party_b.company.name || ''} + + 日期:{detail.record_date && dayjs(detail.record_date).format('YYYY-MM-DD')} + + + + + 项目名称:{detail.record_party_b.name || ''} + 流水号:{detail.record_number} + + + + 项目地址:{detail.record_party_b.address} + 原始单号:{detail.record_origin} + + + + 项目联系人:{projectPhone} + 车号:{car} + )} - {detail.category === RecordCategory.lease && ( - - 项目名称:{detail.contract?.project?.name || ''} - 流水号:{number} + + {detail.record_category === '购销' && ( + + + + 销售单位:{detail.record_party_b.company.name || ''} {detail.record_party_b.name || ''} + + + 日期:{detail.record_date && dayjs(detail.record_date).format('YYYY-MM-DD')} + + 流水号:{detail.record_number} + + + 采购单位:{detail.record_party_a.name || ''} + 车号:{car} + 原始单号:{detail.record_origin} + )} - {detail.category === RecordCategory.lease && ( - - 项目地址:{detail.contract?.project?.address} - 原始单号:{origin} - - )} - {detail.category === RecordCategory.lease && ( - - 项目联系人:{projectPhone} - 车号:{car} + {!detail.record_category && ( + + + 盘点单位:{detail.record_party_a.name || ''} + + 日期:{detail.record_date && dayjs(detail.record_date).format('YYYY-MM-DD')} + + 流水号:{detail.record_number} + )} + {/* 定价 */} - {detail.category === RecordCategory.purchase && ( + {detail.record_category === '购销' && ( 物料名称及规格 单价 @@ -463,21 +464,20 @@ const PreviewDocument = ({ )} )} - {detail.category === RecordCategory.purchase && - renderPrice(isDouble ? dobulePriceRule : priceRule, isDouble)} + {detail.record_category === '购销' && renderPrice(isDouble ? dobulePriceRule : priceRule, isDouble)} {/* ============================================================两表分割================================================================================= */} {/* 单列租金及费用 */} 物料名称及规格 数量 小计 - 备注 + {!annotate && 备注} {isDouble && ( <> 物料名称及规格 数量 - 小计 - 备注 + 小计 + {!annotate && 备注} )} @@ -495,14 +495,21 @@ const PreviewDocument = ({ - 制表人:{singlePlayer} - {detail.category === RecordCategory.lease && 出租单位(签名):} - {detail.category === RecordCategory.lease && 租借单位(签名):} - {detail.category === RecordCategory.purchase && 采购单位(签名):} - {detail.category === RecordCategory.purchase && 购入单位(签名):} - {detail.category === RecordCategory.staging && 暂存仓库(签名):} - {detail.category === RecordCategory.inventory && 盘点仓库(签名):} + 制表人:{detail.nickname + ' ' + detail?.userPhone} + {detail.record_category === '租赁' && 出租单位(签名):} + {detail.record_category === '租赁' && 租借单位(签名):} + {detail.record_category === '购销' && 采购单位(签名):} + {detail.record_category === '购销' && 购入单位(签名):} + {!detail.record_category && 盘点仓库(签名):} + {record.map((item) => ( + <> + + + {annotate && item.commentIndex && {item.commentIndex + ':' + item.comment}} + + + ))} {detail.pdfExplain} @@ -512,13 +519,7 @@ const PreviewDocument = ({ ); }; -export const renderItV2 = async (rent: { - detail: any; - record: any[]; - priceRule: any[]; - isDouble: Number; - printSetup: String; -}) => { +export const renderItV2 = async (rent: { detail: any; record: any[]; priceRule: any[]; options: any }) => { const url = 'https://shcx.daoyoucloud.com/admin'; const imageUrl = await QRCode.toDataURL(url); return await renderToStream(); diff --git a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/settlements-document.tsx b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/settlements-document.tsx index 96bf7e941..8f48b3aff 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/settlements-document.tsx +++ b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/settlements-document.tsx @@ -222,7 +222,7 @@ const PreviewDocument = ({ - {contracts.project?.associated_company?.name ?? `${PromptText.noContractedCompany}`} + {contracts.first_party?.name ?? `${PromptText.noContractedCompany}`} 对账单 客户各项费用明细 @@ -231,7 +231,7 @@ const PreviewDocument = ({ 承租单位: - {contracts?.project?.company?.name} + {contracts.party_b?.name} 合同编号: @@ -259,7 +259,7 @@ const PreviewDocument = ({ 项目联系人: {contracts.project?.contacts.map((contact) => contact.name + ' ' + contact.phone).join(' ')} - 经办人:{contracts.operator.nickname} + 制表人:{contracts.operator.nickname} @@ -412,21 +412,23 @@ const PreviewDocument = ({ 备注:{contracts.project?.comment} - - 出租单位: - {contracts.project?.associated_company?.name ?? `${PromptText.noContractedCompany}`} - - 制表人: - 审核人: - 验收: + 承租单位:{contracts.party_b?.name} + 出租单位:{contracts.first_party?.name} 承租单位项目经理: - 材料负责人: - 出租单位代表人: + 出租单位审核人: + + + 承租单位材料负责人: + 出租对账人: + + + 签署日期: + 签署日期: diff --git a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/waybills-document.tsx b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/waybills-document.tsx index f52896cf3..ae1501682 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/waybills-document.tsx +++ b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/waybills-document.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Document, Page, Text, View, StyleSheet, renderToStream } from '@hera/plugin-core'; -import { formatCurrency, formatQuantity } from '../../utils/currencyUtils'; +import { formatQuantity } from '../../utils/currencyUtils'; import { converDate } from '../../utils/daysUtils'; import { Waybill } from '../../interfaces/waybill'; @@ -193,23 +193,20 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an ); } // 单号 - const recordNumber = waybill.record.number; - const items = ( - waybill.record.items - ? waybill.record.items.map((item) => { - const convertible = item.product.category.convertible; - const data = { - name: item.product.name + '/' + item.product.spec, - count: item.count, - unit: item.product.category.unit, - conversion_unit: convertible ? item.product.category.conversion_unit : item.product.category.unit, - sort: item.product.category.sort * 100000 + item.product.sort, - total: formatQuantity(convertible ? item.count * item.product.ratio : item.count, 2), - }; - return data; - }) - : [] - ).sort((a, b) => a.sort - b.sort); + const recordNumber = waybill.record_number; + const items = waybill.products + ? waybill.products.map((item) => { + const convertible = item.convertible; + const data = { + name: item.products_name, + count: item.count, + unit: item.unit, + conversion_unit: convertible ? item.conversion_unit : item.unit, + total: formatQuantity(item.total, 2), + }; + return data; + }) + : []; const chunkedArray = Array.from({ length: Math.ceil(items.length / 3) }, (_, i) => { const chunk = items.slice(i * 3, i * 3 + 3); @@ -344,15 +341,15 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an - {waybill.payer?.company?.name} {waybill.payer?.name} + {waybill.payer_company} {waybill.payer_name} - {waybill.payee_account?.name} + {waybill.payee_account_name} - {waybill.payee_account?.bank} {waybill.payee_account?.number} + {waybill.payee_account_bank} {waybill.payee_account_number} @@ -368,14 +365,14 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an 发货方单位 - {waybill.out_stock?.company?.name} {waybill.out_stock?.name} + {waybill.shipper_company} {waybill.shipper_name} - {waybill.shipper_contact?.name} + {waybill.shipper_contact} - {waybill.shipper_contact?.phone} + {waybill.shipper_contact_phone} @@ -383,7 +380,7 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an 发货方地址 - {waybill.out_stock?.address} + {waybill.shipper_address} @@ -396,14 +393,14 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an - {waybill.in_stock?.company?.name} {waybill.in_stock?.name} + {waybill.consignee_company} {waybill.consignee_name} - {waybill.consignee_contact?.name} + {waybill.consignee_contact} - {waybill.consignee_contact?.phone} + {waybill.consignee_contact_phone} @@ -411,7 +408,7 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an 收货方地址 - {waybill.in_stock?.address} + {waybill.consignee_address} @@ -421,7 +418,7 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an 承运方单位 - {waybill.carrier?.name} + {waybill.carrier} @@ -431,15 +428,15 @@ const PreviewDocument = ({ waybill, settings }: { waybill: Waybill; settings: an 驾驶员 - {waybill.driver?.name} + {waybill.driver} 身份证 - {waybill.driver?.id_card} + {waybill.driver_idcard} - {waybill.record.vehicles.map((item) => item?.number).join(' ')} + {waybill.vehicles} - {waybill.driver?.phone} + {waybill.driver_phone} diff --git a/packages/plugins/@hera/plugin-rental/src/server/plugin.ts b/packages/plugins/@hera/plugin-rental/src/server/plugin.ts index 57cd896e7..5affaba16 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/plugin.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/plugin.ts @@ -1,17 +1,17 @@ import path from 'path'; -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { RecordService } from './services/record-service'; import { ContractRuleService } from './services/contract-rule-service'; import { ContractService } from './services/contract-service'; import { ProjectService } from './services/project-service'; -import { Container } from '@nocobase/utils'; +import { Container } from '@tachybase/utils'; import './actions'; import { SqlLoader } from '@hera/plugin-core'; import { DetailCheckService } from './services/detail-check-service'; import { CollectionRepository } from '@nocobase/plugin-collection-manager'; -import { Repository } from '@nocobase/database'; +import { Repository } from '@tachybase/database'; import { VehiclesService } from './services/vehicles-service'; -import { Cache } from '@nocobase/cache'; +import { Cache } from '@tachybase/cache'; export class PluginRentalServer extends Plugin { cache: Cache; @@ -59,6 +59,7 @@ export class PluginRentalServer extends Plugin { await collectionRepo.createMany({ records: categories + .filter(Boolean) .filter((item) => typeof item.id !== 'undefined') .map((item) => ({ collectionName, categoryId: item.id })), }); diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts index 4370fe8c5..402ae3cf9 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts @@ -1,19 +1,38 @@ -import Database, { CreateOptions, MagicAttributeModel } from '@nocobase/database'; -import { Db, Service } from '@nocobase/utils'; - +import Database, { CreateOptions, MagicAttributeModel } from '@tachybase/database'; +import { Db, Service } from '@tachybase/utils'; +import { Op } from 'sequelize'; @Service() export class ContractRuleService { @Db() private db: Database; - + // 合同重复项需要重新是实现 async load() { // 合同方案规则重复校验 + this.db.on('contract_plan_lease_items.beforeSave', this.leaseItemBeforeSave.bind(this)); + // 上表最底表的hooks不会作用到合同方案整体的重复判断,所以需要contract_plan的hooks this.db.on('contract_plans.beforeSave', this.contractPlansBeforeSave.bind(this)); - // beforeSave无法获取多对多关联关系的数据 - this.db.on('contract_plan_lease_items.beforeCreate', this.contractPlanLeaseItemsBeforeSave.bind(this)); - this.db.on('contract_plan_lease_items.beforeUpdate', this.contractPlanLeaseItemsBeforeSave.bind(this)); - this.db.on('contract_plan_fee_items.beforeCreate', this.contractPlanFeeItemsBeforeSave.bind(this)); - this.db.on('contract_plan_fee_items.beforeUpdate', this.contractPlanFeeItemsBeforeSave.bind(this)); + } + + async leaseItemBeforeSave(model: MagicAttributeModel, options: CreateOptions): Promise { + if (!options.values) return; + // 只适用单个表数据修改 + if (options.values.contract_plan?.id && options.values.new_products?.id) { + const where = { + contract_plan_id: options.values.contract_plan.id, + new_products_id: options.values.new_products.id, + }; + if (!model.isNewRecord) { + where['id'] = { + [Op.ne]: model.id, + }; + } + const data = await this.db.getRepository('contract_plan_lease_items').findOne({ + where, + }); + if (data) { + throw new Error('租金存在'); + } + } } /** @@ -24,158 +43,28 @@ export class ContractRuleService { */ async contractPlansBeforeSave(model: MagicAttributeModel, options: CreateOptions): Promise { if (!options.values) return; - const leaseData2 = options.values.lease_items.map((item) => item.products); - const repeatData = this.repeatQuery2(leaseData2); + const leaseData = options.values.lease_items.map((item) => item.new_products); + const repeatData = this.repeatQuery(leaseData); if (repeatData.length > 0) { - const products = repeatData.map((item) => item.label).join(','); - throw new Error('租金规则中的产品重复!重复产品:' + products); + throw new Error('租金规则中的产品重复!' + repeatData.map((item) => item.name)); } - const feeData = options.values.fee_items.map((fee) => fee.fee_product); - const feeRepeatData = this.repeatQuery(feeData); - if (feeRepeatData.length > 0) { - const products = feeRepeatData.map((item) => item.label).join(','); - throw new Error('费用规则中的产品重复!重复费用:' + products); - } - const productFeeRepeatData = []; - for (const index in options.values.lease_items) { - const fees = options.values.lease_items[index].fee_items?.filter(Boolean); - if (!fees) return; - // 租金,费用,租金费用使用同一判断重复方法,需要处理一下租金费用数据结构 - const transFee = fees.map((item) => { - if (Object.keys(item).length > 0 && item.fee_product) { - return { ...item, id: item.fee_product.id, raw_category_id: item.fee_product.id }; - } - }); - const data = this.repeatQuery(transFee); - if (data.length > 0) { - productFeeRepeatData.push({ index, value: data.map((item) => item.fee_product.label).join(',') }); - } - } - if (productFeeRepeatData.length > 0) { - const tips = []; - for (const iterator of productFeeRepeatData) { - const tip = `第${Number(iterator.index) + 1}条租金数据中费用重复添加`; - tips.push(tip); - } - throw new Error(tips.join(',')); + + const feeData = options.values.fee_items.map((item) => item.new_fee_products); + const repeatFeeData = this.repeatQuery(feeData); + if (repeatFeeData.length > 0) { + throw new Error('费用规则中的产品重复!' + repeatFeeData.map((item) => item.name)); } } - /** - * 租金单条规则创建before seqlizeHooks事件 - * @param model - * @param options - * @returns - */ - async contractPlanLeaseItemsBeforeSave(model: MagicAttributeModel, options: CreateOptions): Promise { - if (!options.values?.contract_plan && !options.values?.products) return; - const plan = await this.db.getRepository('contract_plans').findOne({ - where: { - id: options.values?.contract_plan?.id || options.values?.contract_plan_id, - }, - appends: ['lease_items', 'lease_items.products'], - }); - const add = options.values.products; - const productData = plan.lease_items - .filter((item) => item.id !== options.values.id && item.products.length === add.length) - .map((item) => item.products) - .flat(); - productData.forEach((item) => { - const isHas = add.find( - (p) => - (p.id < 99999 && (p.id === item.id || (item.id > 99999 && p.raw_category_id === item.raw_category_id))) || - (p.id > 99999 && p.raw_category_id === item.raw_category_id), - ); - if (isHas) { - throw new Error('方案中存在此产品'); - } - }); - } - - /** - * 费用规则创建before seqlizeHooks事件 - * @param model - * @param options - * @returns - */ - async contractPlanFeeItemsBeforeSave(model: MagicAttributeModel, options: CreateOptions): Promise { - if (!options.values?.contract_plan || !options.values?.fee_product) return; - const plan = await this.db.getRepository('contract_plans').findOne({ - where: { - id: options.values.contract_plan.id, - }, - appends: ['lease_items', 'lease_items.products', 'fee_items', 'fee_items.fee_product'], - }); - if (options.values.lease_product) { - // 待页面完成确定入参数格式后 - // const feeProduct = plan.fee_items.filter((item) => item.lease_item_id === options.values.lease_product.id // 确定options.values.lease_product是否为数组格式) - } else { - const add = options.values.fee_product; - if (!Array.isArray(add)) return; - const feeData = plan.fee_items.filter((item) => !item.lease_item_id).map((item) => item.fee_product); - feeData.forEach((item) => { - const isHas = add.find((p) => p.id === item.id); - if (isHas) { - throw new Error('方案中存在此赔偿项'); - } - }); - } - } - - /** - * 租金规则重复查询 - * @param data - * @returns - */ repeatQuery(data: any[]): any[] { - if (data.filter(Boolean).length > 0) { - const queryData = data.filter(Boolean); - if (queryData.length > 0) { - const arr = []; - for (let index = 0; index < queryData.length; index++) { - const repea = queryData.slice(index + 1).filter((item) => { - if (item) { - return ( - item.id === queryData[index].id || - (item.raw_category_id === queryData[index].raw_category_id && - (item.id > 99999 || queryData[index].id > 99999)) - ); - } - }); - arr.push(...repea.filter(Boolean)); + const repea = []; + for (let i = 0; i < data.length; i++) { + for (let j = i + 1; j < data.length; j++) { + if (data[i].id === data[j].id) { + repea.push(data[i]); } - return arr; - } else { - return []; } - } else { - return []; } - } - - /** - * 与原实现相差较多,新写一实现方法 - * 租金产品多选重复查询,一个组合算是一个整体进行比较 - * @param data - * @returns - */ - repeatQuery2(data: any[]): any[] { - const result = data.reduce((acc, curr) => { - const found = acc.find((subArr) => subArr.length === curr.length); - if (found) { - found.push(...curr); - } else { - acc.push(curr); - } - return acc; - }, []); - const rep = []; - result.forEach((item) => { - const repeatData = this.repeatQuery(item); - if (repeatData.length > 0) { - rep.push(...item); - } - }); - return rep; + return repea; } } diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/contract-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/contract-service.ts index 3fae2fe9d..7eea0595a 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/contract-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/contract-service.ts @@ -1,5 +1,5 @@ -import Database, { CreateOptions, MagicAttributeModel } from '@nocobase/database'; -import { Db, Service } from '@nocobase/utils'; +import Database, { CreateOptions, MagicAttributeModel } from '@tachybase/database'; +import { Db, Service } from '@tachybase/utils'; @Service() export class ContractService { @@ -33,7 +33,7 @@ export class ContractService { if (!options.values) return; if (options.values.settlementTemplate) { const temp = { - 上个月: `MONTH(EOMONTH(TODAY(), -1))`, + 上个月: `MONTH(EOMONTH(TODAY(), -1))`, // 工作流默认 本月: `MONTH(TODAY())`, 当年: `YEAR(EOMONTH(TODAY(), -1))`, }; diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/detail-check-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/detail-check-service.ts index d87505e6f..2050b5623 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/detail-check-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/detail-check-service.ts @@ -1,5 +1,5 @@ -import Database, { CreateOptions, MagicAttributeModel } from '@nocobase/database'; -import { Db, Service } from '@nocobase/utils'; +import Database, { CreateOptions, MagicAttributeModel } from '@tachybase/database'; +import { Db, Service } from '@tachybase/utils'; @Service() export class DetailCheckService { diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/project-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/project-service.ts index 3769bbc31..ba7968c5b 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/project-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/project-service.ts @@ -1,6 +1,6 @@ -import Database, { CreateOptions, MagicAttributeModel } from '@nocobase/database'; +import Database, { CreateOptions, MagicAttributeModel } from '@tachybase/database'; import { SqlLoader } from '@hera/plugin-core'; -import { Db, Service, Inject } from '@nocobase/utils'; +import { Db, Service, Inject } from '@tachybase/utils'; @Service() export class ProjectService { diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts index c0981b167..593941517 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts @@ -1,337 +1,321 @@ import { ConversionLogics, RecordCategory, RulesNumber, SourcesType, countCource } from '../../utils/constants'; import { renderItV2 } from '../pdf-documents/records-documentV2'; -import { Db, Service } from '@nocobase/utils'; +import { Db, Service } from '@tachybase/utils'; import { RecordPdfOptions } from '../../interfaces/options'; import { PrintSetup } from '../../utils/system'; -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; @Service() export class RecordPdfService { @Db() private db: Database; - async transformPdfV2(recordData: any, lease_data: any, fee_data: any, options: RecordPdfOptions) { - const { isDouble, printSetup } = options; - // 直发单不需要打印预览 - if (recordData.category === RecordCategory.purchase2lease || recordData.category === RecordCategory.lease2lease) - return; - - // 盘点/暂存单使用默认产品表的换算逻辑 - if (recordData.category === RecordCategory.staging || recordData.category === RecordCategory.inventory) { - lease_data = lease_data.map((item) => { - const data = { - ...item, - }; - // 根据产品表换算 - data['conversion_logic_id'] = 2; - return data; - }); - } - let make_price; - - // 购销单计算报价数据 - if (recordData.category === RecordCategory.purchase) { - const price_rule = lease_data.map((item) => { - const data = { - name: item.price_label, - unit_price: item.price_price, - comment: item.price_comment, - }; - if (!item.conversion_logic_id) return; - if (item.conversion_logic_id === ConversionLogics.Keep) { - data['count'] = item.count; - data['unit'] = item.unit; - } else if (item.conversion_logic_id === ConversionLogics.Product) { - if (item.convertible) { - data['count'] = item.count * item.ratio; - data['unit'] = item.conversion_unit; - } else { - data['count'] = item.count; - data['unit'] = item.unit; - } - } else if (item.conversion_logic_id === ConversionLogics.ProductWeight) { - data['count'] = item.count * item.weight; - data['unit'] = 'KG'; - } else if (item.conversion_logic_id === ConversionLogics.ActualWeight) { - const weight = recordData.record_group_weight_items?.find((w) => w.category.id === item.product_category_id); - if (weight) { - data['count'] = weight.weight; - data['unit'] = '吨'; - } else { - data['count'] = recordData.weight; - data['unit'] = '吨'; - } - } else { - data['unit'] = 'KG'; - if (item.wr.conversion_logic_id === ConversionLogics.Keep) { - data['count'] = item.count * item.wr.weight; - } else if (item.wr.conversion_logic_id === ConversionLogics.Product) { - data['count'] = item.count * item.ratio * item.wr.weight; - } - } - data['all_price'] = data['count'] * data['unit_price']; - return data; - }); - - const setData = Object.values( - price_rule.reduce((acc, item) => { - if (!item) { - console.error('报价计算出错', price_rule); - return acc; - } - if (!acc[item.name]) { - acc[item.name] = { ...item }; - } else { - acc[item.name].count += item.count; - acc[item.name].all_price += item.all_price; - } - return acc; - }, {}), - ); - make_price = setData; - } - - // !产品 - const leaseData = lease_data - .map((lease) => { - const data = { - name: lease.label, - count: lease.count, - unit: lease.unit, - comment: lease.item_comment, - product_id: lease.product_id, - category_id: lease.category_id, - product_category_name: lease.product_category_name, - }; - if (lease.conversion_logic_id === ConversionLogics.Keep) { - data['total'] = lease.count; - data['conversion_unit'] = lease.unit; - } else if (lease.conversion_logic_id === ConversionLogics.Product) { - if (lease.convertible) { - data['total'] = lease.count * lease.ratio; - data['conversion_unit'] = lease.conversion_unit; - } else { - data['total'] = lease.count; - data['conversion_unit'] = lease.unit; - } - } else if (lease.conversion_logic_id === ConversionLogics.ProductWeight) { - data['total'] = lease.count * lease.weight; - data['conversion_unit'] = 'KG'; - } else if (lease.conversion_logic_id === ConversionLogics.ActualWeight) { - if (lease.convertible) { - data['total'] = lease.count * lease.ratio; - data['conversion_unit'] = lease.conversion_unit; - } else { - data['total'] = lease.count; - data['conversion_unit'] = lease.unit; - } - } else { - data['conversion_unit'] = 'KG'; - if (lease.wr?.conversion_logic_id === ConversionLogics.Keep) { - data['total'] = lease.count * lease.wr?.weight; - } else if (lease.wr?.conversion_logic_id === ConversionLogics.Product) { - data['total'] = lease.count * lease.ratio * lease.wr?.weight; - } - } - return data; - }) - .sort((a, b) => a.category_id - b.category_id); - - // !产品赔偿 - const product_fee = - printSetup === PrintSetup.Manual - ? fee_data.filter((item) => item.product_id && item.count_source === SourcesType.staff) - : fee_data.filter((item) => item.product_id); - const transFormProductFee = product_fee.map((item, index) => { - // 购销/暂存/盘点无费用信息 - if ( - recordData.category === RecordCategory.purchase || - recordData.category === RecordCategory.staging || - recordData.category === RecordCategory.inventory - ) { - return; - } - // 人工录入没有数量 - if (item.count_source === SourcesType.staff && !item.fee_count) return; - // 出库单,计数为入库量 - if (item.record_movement === '-1' && item.count_source === SourcesType.inbound) return; - // 入库单,计数为出库量 - if (item.record_movement === '1' && item.count_source === SourcesType.outbound) return; + /** + * 注意点 + * 1. 正常租赁产品 + * 2. 租赁产品的维修赔偿 + * 3. 无关联产品的维修赔偿(实际总重量,出入库量) + * 4. 无关联产品的维修赔偿(人工录入) + * 5. 报价 + */ + async transformPdfV2( + intermediate, // 中间表 + baseRecord, //订单基础数据 + leaseData, // 租金数据 + leaseFeeData, // 赔偿数据 + noLeaseProductFeeData, + noRuleexcluded, + contracts, + options, + ) { + const { printSetup } = options; + const movement = (movement: string) => { const data = { - isFee: true, - isExcluded: item.is_excluded, - name: item.custom_name || item.label, - count1: item.count_source === SourcesType.staff ? item.fee_count : item.product_count, - unit: item.unit, - comment: '', - product_id: item.product_id + '.' + (index + 1), - category_id: item.product_category_id, + '-1': '出库', + '1': '入库', }; - if (item.conversion_logic_id === ConversionLogics.Keep) { - data['total'] = data.count1; - } else if (item.conversion_logic_id === ConversionLogics.Product) { - if (item.convertible) { - data['total'] = data.count1 * item.product_ratio; - } else { - data['total'] = data.count1; - } - } else if (item.conversion_logic_id === ConversionLogics.ProductWeight) { - data['total'] = data.count1 * item.product_weight; - } else if (item.conversion_logic_id === ConversionLogics.ActualWeight) { - data['total'] = item.actual_weight || item.record_weight; - } else { - if (item.weight_rules?.conversion_logic_id === ConversionLogics.Keep) { - data['total'] = data.count1 * item.weight_rules.weight; - } else if (item.weight_rules?.conversion_logic_id === ConversionLogics.Product) { - data['total'] = data.count1 * item.weight_rules.weight * item.product_ratio; + return data[movement]; + }; + + const record_category = (category) => { + const data = { + '0': '租赁', + '1': '购销', + }; + return data[category]; + }; + const needRecord = { + record_type: baseRecord.type_new, + record_number: baseRecord.number, + record_date: baseRecord.date, + record_origin: baseRecord.origin, + record_party_b: movement(contracts.movement) === '出库' ? baseRecord.in_stock : baseRecord.out_stock, // 还需要判断第三个合同的情况,确定一下出库入是否合同公司有关 + record_party_a: movement(contracts.movement) === '入库' ? baseRecord.in_stock : baseRecord.out_stock, + vehicles: baseRecord.vehicles, + record_category: record_category(contracts.record_category), + contract_first_party: contracts.first_party, //公司信息,甲方,我们 + movement: movement(contracts.movement), + pdfExplain: baseRecord.pdfExplain, + nickname: baseRecord.nickname, + userPhone: baseRecord.userPhone, + }; + // !租金数据 + const leasePorducts = leaseData.map((leas) => { + const data = { + ...leas, + }; + let total: number; + const unit = leas.unit; + let conversion_unit = leas.conversion_unit; + if (leas.conversion_logic_id === ConversionLogics.Keep) { + total = leas.count; + conversion_unit = leas.unit; + } else if ( + leas.conversion_logic_id === ConversionLogics.Product || + leas.conversion_logic_id === ConversionLogics.ActualWeight + ) { + const ratio = leas.convertible ? leas.products_ratio : 1; + total = leas.count * ratio; + conversion_unit = leas.convertible ? leas.conversion_unit : leas.unit; + } else if (leas.conversion_logic_id === ConversionLogics.ProductWeight) { + total = leas.count * leas.products_weight; + conversion_unit = 'KG'; + } else if (leas.conversion_logic_id > 4) { + if (leas.wr_logic_id === ConversionLogics.Keep) { + total = leas.count * leas.wr_weight; + } else if (leas.wr_logic_id === ConversionLogics.Product) { + const ratio = leas.convertible ? leas.products_ratio : 1; + total = leas.count * leas.wr_weight * ratio; } + conversion_unit = 'KG'; + } + data['total'] = total; + data.unit = unit; + data.conversion_unit = conversion_unit; + return data; + }); + // !租金赔偿 + const leaseProductsFees = leaseFeeData.map((fee) => { + const data = { + products_id: fee.products_id, + name: fee.fee_custom_name || fee.fee_product, + comment: fee.is_excluded ? fee.comment + '_不计入合同' : fee.comment, + }; + let count: number; + if (fee.count_source === SourcesType.staff) { + count = fee.fee_count; + } else if ( + fee.count_source === SourcesType.inAndOut || + (fee.count_source === SourcesType.inbound && contracts.movement === '1') || + (fee.count_source === SourcesType.outbound && contracts.movement === '0') + ) { + count = fee.count; + } + let total: number; + let conversion_unit = fee.fee_rule_unit; + if (fee.conversion_logic_id === ConversionLogics.Keep) { + total = count; + conversion_unit = fee.fee_unit; + } else if ( + fee.conversion_logic_id === ConversionLogics.Product || + fee.conversion_logic_id === ConversionLogics.ActualWeight + ) { + const ratio = fee.fee_convertible ? fee.fee_ratio : 1; + total = count * ratio; + } else if (fee.conversion_logic_id === ConversionLogics.ProductWeight) { + total = count * fee.fee_weight; + conversion_unit = 'KG'; + } else if (fee.conversion_logic_id > 4) { + const ProductWeightRule = leaseData.findOne((leas) => leas.products_id === fee.products_id); + if (ProductWeightRule.wr_logic_id === ConversionLogics.Keep) { + total = count * ProductWeightRule.wr_weight; + } else if (ProductWeightRule.wr_logic_id === ConversionLogics.Product) { + const ratio = ProductWeightRule.convertible ? ProductWeightRule.products_ratio : 1; + total = count * ProductWeightRule.wr_weight * ratio; + } + conversion_unit = 'KG'; } - data['conversion_unit'] = item.unit; if (printSetup === PrintSetup.DisplayAndPrice) { - data['count'] = data['total']; - data['total'] = data['total'] * item.unit_price; + data['count'] = total; + data['unit'] = conversion_unit; + data['total'] = total * fee.unit_price; data['conversion_unit'] = '元'; + } else { + data['conversion_unit'] = conversion_unit; + data['total'] = total; } return data; }); - // !无关联赔偿 item中 - let manualData = []; - const noProductFee = fee_data.filter((item) => !item.product_id && item.count_source === SourcesType.staff); - if (noProductFee.length) { - const itemFee = await this.db.sequelize.query(` - select ri.product_id, ri.count, p.category_id, ri.comment - from records r - left join record_items ri on ri.record_id = r.id and ri.product_id in (${noProductFee.map((item) => item.fee_product_id).join(',')}) - join product p on p.id = ri.product_id - where r.id = ${recordData.id} - `); - const result: any = itemFee[0]; - manualData = result.map((item) => { - const feeRule = noProductFee.find((f) => f.fee_product_id === item.product_id); - if (!feeRule) return; - const data = { - name: feeRule.custom_name || feeRule.label, - unit: feeRule.unit, - conversion_unit: feeRule.unit, - comment: item.comment || '', - }; - if (feeRule.conversion_logic_id === ConversionLogics.Keep) { - data['total'] = item.count; - } else if (feeRule.conversion_logic_id === ConversionLogics.Product) { - data['total'] = feeRule.convertible ? item.count * feeRule.product_ratio : item.count; - } else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) { - data['total'] = item.count * feeRule.weight; - } else if (feeRule.conversion_logic_id === ConversionLogics.ActualWeight) { - data['total'] = feeRule.record_weight; - } else { - const weight_rule = item.weight_rules.find( - (l) => l.product_id === item.product_id || l.product - RulesNumber === item.category_id, - ); - if (weight_rule && weight_rule.conversion_logic_id === ConversionLogics.Keep) { - return item.count * weight_rule.weight; - } else if (weight_rule && weight_rule.conversion_logic_id === ConversionLogics.Product) { - return item.count * feeRule.product_ratio * weight_rule.weight; - } - } - if (printSetup === PrintSetup.DisplayAndPrice) { - data['count'] = data['total']; - data['total'] = data['total'] * feeRule.unit_price; - data['conversion_unit'] = '元'; - } - return data; - }); - } - // !无关联赔偿,出入库量 - const fee = - printSetup === PrintSetup.Manual - ? [] - : fee_data.filter((item) => !item.product_id && item.count_source !== SourcesType.staff); - const no_product_fee = fee - .map((item) => { - if ( - recordData.category === RecordCategory.purchase || - recordData.category === RecordCategory.staging || - recordData.category === RecordCategory.inventory - ) { - return; - } - if (item.record_movement === '-1' && item.count_source === SourcesType.inbound) return; - if (item.record_movement === '1' && item.count_source === SourcesType.outbound) return; - const data = { - isFee: true, - name: item.custom_name || item.label, - unit: item.unit, - comment: '', - }; - if (item.conversion_logic_id === ConversionLogics.Keep) { - data['total'] = lease_data.reduce((a, b) => a + b.count, 0); - } else if (item.conversion_logic_id === ConversionLogics.Product) { - data['total'] = lease_data.reduce((a, b) => a + (item.convertible ? b.count * b.ratio : b.count), 0); - } else if (item.conversion_logic_id === ConversionLogics.ProductWeight) { - data['total'] = lease_data.reduce((a, b) => a + b.count * b.weight, 0) / 1000; - } else if (item.conversion_logic_id === ConversionLogics.ActualWeight) { - data['total'] = item.record_weight; - } else { - if (item.weight_rules?.length) { - data['total'] = lease_data.reduce((a, b) => { - const weight_rule = item.weight_rules.find( - (l) => l.product_id === b.product_id || l.product - RulesNumber === b.category_id, - ); - if (weight_rule && weight_rule.conversion_logic_id === ConversionLogics.Keep) { - return a + b.count * weight_rule.weight; - } else if (weight_rule && weight_rule.conversion_logic_id === ConversionLogics.Product) { - return a + b.count * b.ratio * weight_rule.weight; - } - }, 0); - } - } - data['conversion_unit'] = '吨'; - if (printSetup === PrintSetup.DisplayAndPrice) { - data['count'] = data['total']; - data['total'] = data['total'] * item.unit_price; - data['conversion_unit'] = '元'; - } - return data; - }) - .filter((item) => item && item.total); - - const product_fees = transFormProductFee.filter(Boolean); - // 内容(租金+费用) - const product_correlation = [...leaseData, ...product_fees].sort((a, b) => a.product_id - b.product_id); - + const rentData = [...leasePorducts, ...leaseProductsFees].sort((a, b) => a.products_id - b.products_id); // 生成小计 const productTotal = {}; - leaseData.forEach((element) => { + leasePorducts.forEach((element) => { if (element) { - productTotal[element.category_id] = { - name: element.product_category_name + '[小计]', - total: (productTotal[element.category_id]?.total ?? 0) + element?.total, + productTotal[element.parentId] = { + name: element.parentName + '[小计]', + total: (productTotal[element.parentId]?.total ?? 0) + element.total, conversion_unit: element.conversion_unit, count: '', unit: '', isTotal: true, comment: '', - category_id: element.category_id, + parentId: element.parentId, + // 报价用 + priceName: element.parentName, + price: element.unit_price, }; } }); + // 插入小计 const productTotalItems = Object.entries(productTotal).map(([_, value]) => value); productTotalItems.forEach((itemB: any) => { - const lastIndex = product_correlation.map((itemA) => itemA.category_id).lastIndexOf(itemB.category_id); + const lastIndex = rentData.map((itemA) => itemA.parentId).lastIndexOf(itemB.parentId); if (lastIndex !== -1) { - product_correlation.splice(lastIndex + 1, 0, itemB); + rentData.splice(lastIndex + 1, 0, itemB); } else { - product_correlation.push(itemB); + rentData.push(itemB); } }); - const recordPdfData = [...product_correlation, ...manualData, ...no_product_fee].filter(Boolean); + + // !无关联费用(人工录入) + const noproFeesStaff = noLeaseProductFeeData + .filter((item) => item.count_source === SourcesType.staff) + .map((fee) => { + const data = { + fee_products_id: fee.fee_products_id, + name: fee.name, + comment: fee.is_excluded ? fee.comment + '_不计入合同' : fee.comment, + }; + let total: number; + let conversion_unit; + if (fee.conversion_logic_id === ConversionLogics.Keep) { + total = fee.count; + conversion_unit = fee.unit; + } else if ( + fee.conversion_logic_id === ConversionLogics.Product || + fee.conversion_logic_id === ConversionLogics.ActualWeight + ) { + const ratio = fee.convertible ? fee.ratio : 1; + total = fee.count * ratio; + conversion_unit = fee.convertible ? fee.conversion_unit : fee.unit; + } else if (fee.conversion_logic_id === ConversionLogics.ProductWeight) { + total = fee.count * fee.weight; + conversion_unit = 'KG'; + } else if (fee.conversion_logic_id > 4) { + if (fee.wr_logic_id === ConversionLogics.Keep) { + total = fee.count * fee.wr_weight; + } else if (fee.wr_logic_id === ConversionLogics.Product) { + const ratio = fee.convertible ? fee.ratio : 1; + total = fee.count * fee.wr_weight * ratio; + } + conversion_unit = 'KG'; + } + if (printSetup === PrintSetup.DisplayAndPrice) { + data['count'] = total; + data['unit'] = conversion_unit; + data['total'] = total * fee.unit_price; + data['conversion_unit'] = '元'; + } else { + data['conversion_unit'] = conversion_unit; + data['total'] = total; + } + return data; + }); + rentData.push(...noproFeesStaff); + + // !无关联费用(出入库量) + if (printSetup === PrintSetup.Display || printSetup === PrintSetup.DisplayAndPrice) { + const noproFees = noLeaseProductFeeData + .filter((item) => item.count_source !== SourcesType.staff) + .map((fee) => { + const data = { + name: fee.custom_name || fee.name, + }; + if ( + fee.count_source === SourcesType.inAndOut || + (fee.count_source === SourcesType.inbound && intermediate.movement === '1') || + (fee.count_source === SourcesType.outbound && intermediate.movement === '-1') + ) { + let total = 0; + let conversion_unit: string; + leaseData.forEach((ele) => { + if (fee.conversion_logic_id === ConversionLogics.Keep) { + total += ele.count; + conversion_unit = ele.unit; + } else if (fee.conversion_logic_id === ConversionLogics.Product) { + const ratio = ele.convertible ? ele.ratio : 1; + total += ele.count * ratio; + conversion_unit = ele.convertible ? ele.conversion_unit : ele.unit; + } else if (fee.count_logic_id === ConversionLogics.ActualWeight) { + total = baseRecord.weight; + conversion_unit = '吨'; + } else if (fee.conversion_logic_id === ConversionLogics.ProductWeight) { + total += ele.count * ele.weight; + conversion_unit = 'KG'; + } else if (fee.conversion_logic_id > 4) { + const weightRule = fee.weight_rules.find((item) => item.new_product_id === ele.products_id); + if (weightRule) { + if (weightRule.conversion_logic_id === ConversionLogics.Keep) { + total += ele.count * weightRule.weight; + } else if (weightRule.conversion_logic_id === ConversionLogics.Product) { + const ratio = weightRule.convertible ? weightRule.ratio : 1; + total += ele.count * weightRule.weight * ratio; + } + conversion_unit = 'KG'; + } + } + }); + data['isFee'] = true; + conversion_unit = fee.fee_rule_unit || conversion_unit; + if (printSetup === PrintSetup.DisplayAndPrice) { + data['count'] = total; + data['unit'] = conversion_unit; + data['total'] = total * fee.unit_price; + data['conversion_unit'] = '元'; + } else { + data['conversion_unit'] = conversion_unit; + data['total'] = total; + } + return data; + } + }) + .filter(Boolean); + rentData.push(...noproFees); + const excluded = noRuleexcluded + .map((item) => { + const data = { + name: item.custom_name || item.fee_name, + total: item.count, + comment: item.is_excluded ? (item.comment || '') + ' 不计入合同' : item.comment || '', + conversion_unit: '', + }; + return data; + }) + .filter(Boolean); + rentData.push(...excluded); + } + + // 报价 + let priceRule = []; + if (needRecord.record_category === '购销') { + priceRule = productTotalItems.map((item: any) => { + return { + name: item.priceName, + unit_price: item.price, + unit: item.conversion_unit, + count: item.total, + all_price: item.total * item.price, + comment: item.comment, + }; + }); + } + // 注意不记录合同 return await renderItV2({ - detail: recordData, - record: recordPdfData, - priceRule: make_price, - isDouble, - printSetup, + detail: needRecord, + record: rentData, + priceRule, + options, }); } } diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts index 907dddc76..df676c27e 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts @@ -1,63 +1,20 @@ -import Database, { CreateOptions, MagicAttributeModel, Transaction } from '@nocobase/database'; -import { Db, Service } from '@nocobase/utils'; -import { ConversionLogics, Movement, RecordCategory, RecordTypes, settlementStatus } from '../../utils/constants'; +import Database, { CreateOptions, MagicAttributeModel } from '@tachybase/database'; +import { Db, Service } from '@tachybase/utils'; +import { ConversionLogics, RecordCategory, settlementStatus } from '../../utils/constants'; import validateLicensePlate from '../../utils/validateLIcensePlate'; - +import { QueryTypes } from 'sequelize'; +import _ from 'lodash'; @Service() export class RecordService { @Db() private db: Database; - async load() { - // 1. 创建项目/更新项目( 直发单,生成对应租赁/购销,出入库单数据, 并且设置订单多对多project字段关系) - this.db.on('records.afterCreate', this.afterCreateDirectRecord.bind(this)); - this.db.on('records.afterUpdate', this.afterUpdateDirectRecord.bind(this)); this.db.on('records.afterSave', this.recordsAfterSave.bind(this)); + this.db.on('records.beforeSave', this._calcAllPrice.bind(this)); + // 盘点单 + this.db.on('records.afterSaveWithAssociations', this._createStock.bind(this)); } - /** - * 处理直发单生成单 - */ - async afterCreateDirectRecord(model: MagicAttributeModel, options: CreateOptions): Promise { - const { values, transaction, context } = options; - if (!values) { - return; - } - if (values.record_category === RecordTypes.purchaseDirect || values.record_category === RecordTypes.rentDirect) { - await this._createRecord(model, values, transaction, context, null); - } - } - /** - * 处理直发单生成单 - */ - async afterUpdateDirectRecord(model: MagicAttributeModel, options: CreateOptions): Promise { - const { values, transaction, context } = options; - if (!values) { - return; - } - // 运输单的创建会走订单的update,如果存在waybill一定是在录运输单 - if (values.waybill) return; - if (values.record_category === RecordTypes.purchaseDirect || values.record_category === RecordTypes.rentDirect) { - const deleteDatas = await this.db.getRepository('records').find({ where: { direct_record_id: model.id } }); - // 删除订单多对多项目表数据 - const records = await this.db.getRepository('records').find({ where: { direct_record_id: model.id } }); - await this._deleteReocrdProject( - records.map((item) => item.id), - transaction, - ); - // 删除新建时创建的订单 - await this.db.sequelize.query( - ` - delete from records - where records.direct_record_id = ${model.id} - `, - { - transaction, - }, - ); - const numbers = deleteDatas.map((item) => item.number); - await this._createRecord(model, values, transaction, context, numbers); - } - } + /** * 订单afterSave hooks * @param model @@ -66,173 +23,11 @@ export class RecordService { async recordsAfterSave(model: MagicAttributeModel, options: CreateOptions): Promise { // 运输单导致的订单更新不必走以下订单逻辑,减少性能消耗,有waybill一定是运输单录入 if (options.values?.waybill) return; - // 订单新建更新后(根据合同确定出入库字段) - await this._setProject(model, options); // 订单发生变化时更新对应结算单的状态(需要重新计算) await this._updateSettlementStatus(model, options); // 车牌号校验 await this._checkPlateNumber(model, options); } - - /** - * 校验车牌号 - */ - async _checkPlateNumber(record: MagicAttributeModel, options: CreateOptions) { - const { transaction, context } = options; - if (record.dataValues?.vehicles) { - const ids = record.dataValues.vehicles.filter((item) => typeof item === 'number').join(','); - const vehicles = await this.db.sequelize.query(`select * from vehicles where id in (${ids})`, { - transaction, - }); - if (vehicles[0].length) { - vehicles[0].forEach((item: any) => { - if (item.number) { - const validate = validateLicensePlate(item.number); - if (!validate) { - throw new Error('车牌号格式错误'); - } - } - }); - } - } - } - - // 新版订单录入界面,手动赋值对应的出入库信息 - async _setProject(record: MagicAttributeModel, options: CreateOptions) { - const { values, transaction, context } = options; - - // 非新增和修改订单信息的 - if (!values || values.record_category === undefined) { - return; - } - // 暂存和盘点是不需要处理的 - if (values.category === RecordCategory.inventory) { - // values.category === RecordCategory.staging || - return; - } - const where = {}; - // 订单导入直接取值 - if (values.import && values.in_stock && values.out_stock) { - where['in_stock_id'] = values.in_stock.id; - where['out_stock_id'] = values.out_stock.id; - } else { - let out_stock, in_stock; - if (values.record_category === RecordTypes.purchaseDirect || values.record_category === RecordTypes.rentDirect) { - // 采购直发/租赁直发 - const inContract = values.in_contract; - const contractProject = await this.db - .getRepository('project') - .findOne({ where: { id: inContract.project_id } }); - in_stock = contractProject.dataValues; - if (values.record_category === RecordTypes.rentDirect) { - const project = await this.db - .getRepository('project') - .findOne({ where: { id: values.out_contract.project_id } }); - out_stock = project.dataValues; - } else { - out_stock = values.out_stock; - } - } else if ( - values.record_category === RecordTypes.rentInStock || - values.record_category === RecordTypes.rentOutStock - ) { - if (!values.contract) return; - const contract = values.contract; - const contractProject = await this.db.getRepository('project').findOne({ where: { id: contract.project_id } }); - // 租赁出库/租赁入库,确定出入库 - // out_stock, in_stock - // 租赁入库, out_stock = 合同中project_id, in_stock = 合同中项目的associated_company_id => 项目表id - const associatedCompanyProject = await this.db - .getRepository('project') - .findOne({ where: { company_id: contractProject.associated_company_id, category: '1' } }); - - if (values.record_category === RecordTypes.rentInStock) { - out_stock = contractProject.dataValues; - in_stock = associatedCompanyProject?.dataValues; - } else { - out_stock = associatedCompanyProject?.dataValues; - in_stock = contractProject.dataValues; - } - } else if ( - values.record_category === RecordTypes.purchaseInStock || - values.record_category === RecordTypes.sellOutStock - ) { - out_stock = values.out_stock; - const associatedCompanyProject = await this.db - .getRepository('project') - .findOne({ where: { company_id: out_stock.company_id } }); - in_stock = associatedCompanyProject; - } else if (values.category === RecordCategory.staging) { - in_stock = values.in_stock; - out_stock = values.out_stock; - } - if (in_stock) { - where['in_stock_id'] = in_stock.id; - } - if (out_stock) { - where['out_stock_id'] = out_stock.id; - } - } - await record.update(where, { transaction }); - if (where['in_stock_id'] && where['out_stock_id']) { - // 设置完出库入,设置项目 - await this._updateRecordProjects(record, values, transaction, where); - } - } - /** - * 订单多对多项目hook赋值方法 - * @param model - * @param values - * @param transaction - * @param where - */ - async _updateRecordProjects(model, values, transaction, where) { - if ( - values.category === RecordCategory.purchase2lease || - values.category === RecordCategory.lease2lease || - values.category === RecordCategory.staging - ) { - await this._deleteReocrdProject([model.id], transaction); - await this.db.sequelize.query( - ` - INSERT INTO record_projects (project_id, record_id) - SELECT ${where.in_stock_id} AS project_id, ${model.id} AS record_id - UNION ALL - SELECT ${where.out_stock_id} AS project_id, ${model.id} AS project_id; - `, - { transaction }, - ); - } else { - await this._deleteReocrdProject([model.id], transaction); - await this.db.sequelize.query( - ` - INSERT INTO record_projects (project_id, record_id) - SELECT - CASE WHEN movement = '1' THEN ${where.out_stock_id} ELSE ${where.in_stock_id} END AS project_id, - id AS record_id - FROM records - WHERE records.id = ${model.id} - `, - { transaction }, - ); - } - } - /** - * 订单发生变化时删除已经存在的多对多关系的表数据 - * @param id - * @param transaction - */ - async _deleteReocrdProject(id: number[], transaction: Transaction) { - await this.db.getRepository('record_projects').destroy({ - transaction, - filter: { - record_id: { - $eq: id, - }, - }, - }); - } - /** * 更新订单对应的结算表状态 */ @@ -265,235 +60,176 @@ export class RecordService { } } } - if (values?.category === RecordCategory.purchase) { - // 定价 - const rule = values.price_items; - // 产品 - const products = values.items; - // 分组实际总量 - const weight_items = values.group_weight_items; - let allPrice = 0; - for (const item of rule) { - const data = await this._amountCalculation(item, products, weight_items, values.weight); - allPrice += data; - } - const recordId = record.id; - // 更新订单总金额字段 - await this.db.getModel('records').update( - { all_price: allPrice }, - { - where: { - id: recordId, - }, - transaction, - }, - ); - } } - /** - * 根据产品数据计算金额 - * @param rule 单个规则 - * @param products 全部产品 - * @param weight_items 全部分组实际重量 - * @returns 单个规则产生的总金额 + * 校验车牌号 */ - private async _amountCalculation(rule, products, weight_items, recprdWeight) { - const calc_products = products.filter( - (product) => product.product.category_id === rule.product.id - 99999 || product.product.id === rule.product.id, - ); - const categoryIds = calc_products.map((item) => item.product.category_id).filter(Boolean); - const categoryIdsStr = categoryIds.join(','); - - const datas = await this.db.sequelize.query(` - SELECT pc.* - FROM product_category pc - WHERE pc.id IN (${categoryIdsStr ? categoryIdsStr : 'null'}); - `); - // 相关分类数据 - const categoryDatas = datas[0]; - if (!categoryDatas.length) return; - if (rule.conversion_logic.id === ConversionLogics.Keep) { - const allPrice = calc_products.reduce( - (accumulator, currentValue) => accumulator + currentValue.count * rule.unit_price, - 0, - ); - return allPrice; - } else if (rule.conversion_logic.id === ConversionLogics.Product) { - const allPrice = calc_products.reduce((accumulator, currentValue) => { - const category: any = categoryDatas.find((item: any) => currentValue.product.category_id === item.id); - if (category.convertible) { - return accumulator + currentValue.count * currentValue.product.ratio * rule.unit_price; - } else { - return accumulator + currentValue.count * rule.unit_price; - } - }, 0); - return allPrice; - } else if (rule.conversion_logic.id === ConversionLogics.ProductWeight) { - const allPrice = calc_products.reduce( - (accumulator, currentValue) => accumulator + currentValue.count * currentValue.product.weight * rule.unit_price, - 0, - ); - return allPrice / 1000; - } else if (rule.conversion_logic.id === ConversionLogics.ActualWeight) { - // 根据产品找分组实际重量 - const weightDate = - weight_items.find((item) => item.products?.find((product) => product?.id === rule.product.id - 99999)) - ?.weight || recprdWeight; - if (weightDate) { - const allPrice = weightDate * rule.unit_price; - return allPrice; - } else { - const allPrice = calc_products.reduce((accumulator, currentValue) => { - const category: any = categoryDatas.find((item: any) => currentValue.product.category_id === item.id); - if (category.convertible) { - return accumulator + currentValue.count * currentValue.product.ratio * rule.unit_price; - } else { - return accumulator + currentValue.count * rule.unit_price; + async _checkPlateNumber(record: MagicAttributeModel, options: CreateOptions) { + const { transaction, context } = options; + if (record.dataValues?.vehicles) { + const ids = record.dataValues.vehicles.filter((item) => typeof item === 'number').join(','); + const vehicles = await this.db.sequelize.query(`select * from vehicles where id in (${ids})`, { + transaction, + }); + if (vehicles[0].length) { + vehicles[0].forEach((item: any) => { + if (item.number) { + const validate = validateLicensePlate(item.number); + if (!validate) { + throw new Error('车牌号格式错误'); + } } - }, 0); - return allPrice; + }); } - } else { - const ids = calc_products - .map((item) => item.product.category_id) - .filter(Boolean) - .join(','); - const rules = this.db.sequelize.query(` - select wr.* - from weight_rules wr - where wr.product_id IN (${ids}) and wr.logic_id = ${rule.conversion_logic.id} - `); - const weight_rules = rules[0]; - const allPrice = calc_products.reduce((accumulator, currentValue) => { - const weight_rule: any = weight_rules?.find((item: any) => currentValue.product_id === item.id); - const category: any = categoryDatas.find((item: any) => currentValue.product.category_id === item.id); - if (category.convertible && weight_rule?.logic_id === ConversionLogics.Keep) { - return accumulator + currentValue.count * currentValue.product.ratio * rule.unit_price; - } else if (category.convertible && weight_rule?.logic_id === ConversionLogics.Product) { - return accumulator + currentValue.count * currentValue.product.ratio * weight_rule.weight * rule.unit_price; - } else if (!category.convertible && weight_rule?.logic_id === ConversionLogics.Keep) { - return accumulator + currentValue.count * rule.unit_price; - } else { - return accumulator + currentValue.count * weight_rule?.weight * rule.unit_price; - } - }, 0); - return allPrice || 0; } } /** - * 根据直发单创建对应出库订单 + * 报价合同计算总金额 */ - async _createRecord(model, values, transaction, context, numbers) { - delete values.number; - delete values.id; - values.vehicles?.forEach((item) => delete item.record_vehicles); - //采购直发单 - if (values.record_category === RecordTypes.purchaseDirect && values.category === RecordCategory.purchase2lease) { - const inProject = await this.db.getModel('project').findOne({ - where: { - id: values.in_contract.project_id, - }, - }); - const base_project = await this.db.getModel('project').findOne({ - where: { - company_id: inProject.associated_company_id, // 签约公司id - category: '1', - }, - }); - //1. 创建购销入库单 - const purchaseData = { - ...values, - direct_record_id: model.id, - }; - purchaseData['record_category'] = RecordTypes.purchaseInStock; - purchaseData['movement'] = Movement.in; - purchaseData['category'] = RecordCategory.purchase; - purchaseData['in_stock'] = base_project.dataValues; - if (numbers?.[0]) { - purchaseData['number'] = numbers[0]; + async _calcAllPrice(record: MagicAttributeModel, options: CreateOptions) { + const { values } = options; + if (!values) return; + if (values.new_contracts.length) { + const contracts = values.new_contracts.map((item) => item.contract).find((i) => i.record_category === '1'); + if (contracts && values.items.length) { + const leaseRule = await this.db.getRepository('contract_plan_lease_items').find({ + where: { + contract_id: contracts.id, + }, + appends: ['conversion_logic', 'conversion_logic.weight_items'], + }); + const sql = ` + WITH RECURSIVE tree1 AS ( + SELECT id, "parentId" + FROM products + WHERE id = :dataId + UNION ALL + SELECT p.id, p."parentId" + FROM tree1 up + JOIN products p ON up."parentId" = p.id + ) + select id + from tree1 + `; + let allPrice = 0; + for (const item of values.items) { + const treeIds = await this.db.sequelize.query(sql, { + replacements: { + dataId: item.new_product.id, + }, + type: QueryTypes.SELECT, + }); + const rule = leaseRule.find((rule) => treeIds.find((i: any) => i.id === rule.new_products_id)); + if (rule) { + const price = rule.unit_price || 0; + const count = item.count || 0; + if (rule.conversion_logic_id === ConversionLogics.Keep) { + allPrice += price * count; + } else if ( + rule.conversion_logic_id === ConversionLogics.Product || + rule.conversion_logic_id === ConversionLogics.ActualWeight + ) { + const ratio = item.new_product.parent?.convertible ? item.new_product.ratio : 1; + allPrice += price * count * ratio; + } else if (rule.conversion_logic_id === ConversionLogics.ProductWeight) { + allPrice += price * count * (item.new_product.weight || 0); + } else { + const weightRule = rule.conversion_logic.weight_items.find((weight) => + treeIds.find((i: any) => i.id === weight.new_product_id), + ); + if (weightRule.conversion_logic_id === ConversionLogics.Keep) { + allPrice += price * count * weightRule.weight; + } else if (weightRule.conversion_logic_id === ConversionLogics.Product) { + const ratio = item.new_product.parent?.convertible ? item.new_product.ratio : 1; + allPrice += price * count * ratio * weightRule.weight; + } + } + } + } + if (values.all_price !== allPrice) { + record.all_price = allPrice; + } } - purchaseData.items.forEach((element) => { - delete element.record_id; - delete element.id; - }); - await this.db.getRepository('records').create({ values: purchaseData, transaction, context }); - // 2. 创建租赁出库单 - const leaseData = { - ...values, - direct_record_id: model.id, - }; - leaseData['record_category'] = RecordTypes.rentOutStock; - leaseData['movement'] = Movement.out; - leaseData['category'] = RecordCategory.lease; - leaseData['contract'] = values.in_contract; - leaseData['out_stock'] = base_project.dataValues; - leaseData['in_stock'] = inProject.dataValues; - if (numbers?.[1]) { - leaseData['number'] = numbers[1]; - } - leaseData.items.forEach((element) => { - delete element.record_id; - delete element.id; - }); - await this.db.getRepository('records').create({ values: leaseData, transaction, context }); } - if (values.record_category === RecordTypes.rentDirect && values.category === RecordCategory.lease2lease) { - // 1.创建租赁入库 - const leaseInData = { - ...values, - direct_record_id: model.id, - }; - const outProject = await this.db.getModel('project').findOne({ + } + + /** + * 盘点单创建 + */ + async _createStock(record: MagicAttributeModel, options: CreateOptions) { + const { values, transaction, context } = options; + if (!values) return; + const record_contract = record.get('new_contracts').filter((item) => typeof item === 'object'); + if (record_contract.length) { + const stockProduct = await this.db.getRepository('products').find({ where: { - id: values.out_contract.project_id, - }, - }); - const inProject = await this.db.getModel('project').findOne({ - where: { - id: values.in_contract.project_id, - }, - }); - const baseProject = await this.db.getModel('project').findOne({ - where: { - company_id: inProject.associated_company_id, // 签约公司id category: '1', }, }); - leaseInData['record_category'] = RecordTypes.rentInStock; - leaseInData['movement'] = Movement.in; - leaseInData['category'] = RecordCategory.lease; - leaseInData['contract'] = values.out_contract; - leaseInData['out_stock'] = outProject.dataValues; - leaseInData['in_stock'] = baseProject.dataValues; - if (numbers?.[0]) { - leaseInData['number'] = numbers[0]; + const sql = ` + WITH RECURSIVE tree1 AS ( + SELECT id, "parentId" + FROM products + WHERE id = :dataId + UNION ALL + SELECT p.id, p."parentId" + FROM tree1 up + JOIN products p ON up."parentId" = p.id + ) + select id + from tree1 + `; + for (const i of record_contract) { + const item = i.dataValues; + const stock = { + record_contract_id: item.id, + items: [], + project_id: item.contract.dataValues.project_id, + }; + const stockItems = await Promise.all( + item.fees.map(async (fee) => { + if (typeof fee !== 'object') return; + const treeIds = await this.db.sequelize.query(sql, { + replacements: { + dataId: fee.dataValues.new_fee_product.id, + }, + type: QueryTypes.SELECT, + }); + // 两数组ID,取并集 + const isStockProduct = _.intersectionBy(stockProduct, treeIds, 'id'); + if (isStockProduct.length > 0) { + // 这里一般是无关联产品的费用,有赔偿标记的类别为需要找对应的产品 + // 这里需要平替找到对应的产品,目前没有这个分类的产品 + const parent = await this.db.getRepository('products').find({ + where: { + id: fee.dataValues.new_fee_product.parentId, + }, + }); + const fee_products = await this.db.getRepository('products').find({ + where: { + name: fee.dataValues.new_fee_product.name, + }, + appends: ['parent'], + }); + const pro = fee_products.find((pro) => pro.parent?.name === parent.name); + return { new_product: pro || fee.dataValues.new_fee_product, count: fee.count }; + } else { + if (fee.dataValues.new_product) { + return { new_product: fee.dataValues.new_product, count: fee.count }; + } + } + }), + ); + if (stockItems.filter(Boolean).length > 0) { + stock.items = stockItems; + await this.db.getRepository('record_stock').updateOrCreate({ + filterKeys: ['record_contract_id'], + values: stock, + transaction, + }); + } } - leaseInData.items.forEach((element) => { - delete element.record_id; - delete element.id; - }); - await this.db.getRepository('records').create({ values: leaseInData, transaction, context }); - // 2.创建租赁出库单 - const leaseOutData = { - ...values, - direct_record_id: model.id, - }; - leaseOutData['record_category'] = RecordTypes.rentOutStock; - leaseOutData['movement'] = Movement.out; - leaseOutData['category'] = RecordCategory.lease; - leaseOutData['contract'] = values.in_contract; - leaseOutData['out_stock'] = baseProject.dataValues; - leaseOutData['in_stock'] = inProject.dataValues; - if (numbers?.[1]) { - leaseOutData['number'] = numbers[1]; - } - leaseOutData.items.forEach((element) => { - delete element.record_id; - delete element.id; - }); - await this.db.getRepository('records').create({ values: leaseOutData, transaction, context }); } } } diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/settlement-products-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-products-service.ts new file mode 100644 index 000000000..e8cc48011 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-products-service.ts @@ -0,0 +1,598 @@ +import { Db, Service } from '@tachybase/utils'; +import Database from '@tachybase/database'; +import dayjs from 'dayjs'; +import { + AddItemsCategory, + CalcDateType, + ConversionLogics, + Itemcategory, + RulesNumber, + countCource, +} from '../../utils/constants'; +import { converDate } from '../../utils/daysUtils'; +import { converUnitCount } from '../../utils/unitUtils'; +import { Settlement } from '../../interfaces/settlement'; +import { FeeRule, LeaseRule } from '../../interfaces/rule'; +import { Record } from '../../interfaces/record'; +import { RecordItems } from '../../interfaces/records'; +import { formatQuantity } from '../../utils/currencyUtils'; + +@Service() +export class SettlementProductsService { + @Db() + private db: Database; + + async calculate(settlementAbout, settlementsId) { + /** + * 租金计算方式 + * 0: 计头不计尾 + * 1. 计尾不计头 + * 2. 计头又计尾 + * 3. 不计头不计尾 + */ + let createFeesDatas = []; + const record = []; //已有录入的订单 + let createLeasDatas = []; + //计算正常租赁订单 + settlementAbout.settlementLeaseData?.forEach((recordItem) => { + if (!recordItem) return; + const dateIsBefore = dayjs(recordItem.date).isBefore(settlementAbout.start_date); + const start_date = dateIsBefore ? settlementAbout.start_date : recordItem.date; + const movement = recordItem.movement === '-1' ? '1' : '-1'; + const data = { + settlement_id: settlementsId, //合同ID + movement: recordItem.movement, //出入库状态 + date: recordItem.date, //时间 + name: recordItem.product_name, + label: recordItem.product_label, + category: '0', //费用类别 + //租赁天数 历史订单就存开始日期到结束日期 当前订单存储订单日期到结束日期 + unit_price: recordItem.unit_price, + days: afterDays(recordItem.calc_type, recordItem.movement, start_date, settlementAbout.end_date), + item_count: recordItem.product_count * Number(movement), + }; + //3实际重量 + if (recordItem.conversion_logic_id === ConversionLogics.ActualWeight) { + const productData = { ...data }; + let weightName; + if (recordItem.belong_to_group_weight_name) { + weightName = + recordItem.belong_to_group_weight_name === recordItem.product_name + ? recordItem.product_label + '&&' + : `${recordItem.belong_to_group_weight_name}-` + `${recordItem.product_label}&&`; + } else { + weightName = recordItem.product_label + '&&'; + } + productData['name'] = recordItem.belong_to_group_weight_name ?? recordItem.product_name; + productData['label'] = weightName; + productData['count'] = 0; + productData['amount'] = 0; + productData['unit_name'] = '吨'; + createLeasDatas.push(productData); + if (recordItem.group_weight) { + const isRecord = record.find( + (item) => + item.record_id === recordItem.record_id && + item.belong_to_group_weight_id === recordItem.belong_to_group_weight_id, + ); + if (isRecord) return; + record.push(recordItem); + data['count'] = recordItem.group_weight; + } else if (recordItem.record_weight) { + const isRecord = record.find((item) => item.record_id === recordItem.record_id); + if (isRecord) return; + record.push(recordItem); + data['count'] = recordItem.record_weight; + } + data['name'] = recordItem.belong_to_group_weight_name ?? recordItem.product_name; + data['label'] = recordItem.belong_to_group_weight_name ?? recordItem.product_name; + data['unit_price'] = data['unit_price'] * 1000; + data['item_count'] = 0; + data['unit_name'] = '吨'; + } else { + const { count, unit } = calcItemCount(recordItem, recordItem.product_count); + data['count'] = count; + data['unit_name'] = unit; + } + data['count'] = data['count'] * Number(movement); + data['amount'] = data['count'] * recordItem.unit_price * data['days']; + createLeasDatas.push(data); + }); + + //计算有关联费用 + settlementAbout.settlementFeeData?.forEach((feeItem) => { + if (!dayjs(feeItem.date).isBetween(settlementAbout.start_date, settlementAbout.end_date, 'day', '[]')) return; + const recordItem = settlementAbout.settlementLeaseData.find( + (item) => item.record_id === feeItem.number && item.product_id === feeItem.product_id, + ); + if (!feeItem || !recordItem) return; + const data = { + settlement_id: settlementsId, //合同ID + movement: recordItem.movement, //出入库状态 + date: recordItem.date, //时间 + name: recordItem.product_name + '-' + feeItem.fee_product_label, + label: recordItem.product_label + '-' + feeItem.fee_product_label, + category: feeItem.fee_product_name, //费用类别 + unit_price: feeItem.fee_price, + days: afterDays(recordItem.calc_type, recordItem.movement, feeItem.date, settlementAbout.end_date), + item_count: recordItem.product_count, + }; + if (feeItem.conversion_logic_id === ConversionLogics.ActualWeight) { + if (!recordItem.group_weight && !recordItem.record_weight) return; + const itemCount = recordItem.group_weight || recordItem.record_weight; + if (feeItem.count_source === countCource.outProduct || feeItem.count_source === countCource.outItem) { + if (recordItem.movement === '1') return; + if (feeItem.count) { + data['count'] = feeItem.is_excluded ? itemCount - feeItem.count : itemCount; + } + } else if ( + feeItem.count_source === countCource.enterProduct || + feeItem.count_source === countCource.enterItem + ) { + if (recordItem.movement === '-1') return; + if (feeItem.count) { + data['count'] = feeItem.is_excluded ? itemCount - feeItem.count : itemCount; + } + } else { + return; + } + const { count, unit } = calcItemCount(recordItem, itemCount, feeItem); + let feeName = feeItem.belong_to_group_weight_name + '-' + recordItem.product_name; + let feeLabel = feeItem.belong_to_group_weight_name + '-' + recordItem.product_label; + if (feeItem.belong_to_group_weight_name === recordItem.product_name) feeName = recordItem.product_name; + feeLabel = recordItem.product_label; + data['count'] = count; + data['unit_name'] = unit; + data['name'] = feeName + '-' + feeItem.fee_product_label; + data['label'] = feeLabel + '-' + feeItem.fee_product_label; + } else { + //人工录入 + if ( + feeItem.count_source === countCource.artificial && + feeItem.conversion_logic_id !== ConversionLogics.ActualWeight + ) { + if (!feeItem.count) return; + data['count'] = feeItem.count; + } //出库 + else if (feeItem.count_source === countCource.outProduct || feeItem.count_source === countCource.outItem) { + if (recordItem.movement === '1') return; + } //入库 + else if (feeItem.count_source === countCource.enterProduct || feeItem.count_source === countCource.enterItem) { + if (recordItem.movement === '-1') return; + } else { + return; + } + const { count, unit } = calcItemCount(recordItem, data['count'], feeItem); + data['count'] = count; + data['unit_name'] = unit; + } + data['amount'] = data['count'] * data['unit_price'] * data['days']; + createLeasDatas.push(data); + }); + + //计算无关联费用 + settlementAbout.settlementFeeNoProductData?.forEach((nFeeItem) => { + const feeItem = []; + const is_excludedItems = []; + settlementAbout.settlementLeaseData.forEach((recordItem) => { + if (!dayjs(recordItem.date).isBetween(settlementAbout.start_date, settlementAbout.end_date, 'day', '[]')) + return; + const data = { + settlement_id: settlementsId, //合同ID + movement: nFeeItem.movement, //出入库状态 + date: dayjs(recordItem.date).endOf('day'), + name: nFeeItem.fee_label, + label: nFeeItem.fee_label, + category: nFeeItem.fee_name, //费用类别 + unit_price: nFeeItem.unit_price, + unit_name: nFeeItem.unit, + days: 0, + count: 0, + exist: false, + }; + if (nFeeItem.conversion_logic_id > 4 && nFeeItem.weightRules) { + const weight_rules = nFeeItem.weightRules.find((value) => value.new_product_id === recordItem.product_id); + nFeeItem['weight_rules_weight'] = weight_rules?.weight; + nFeeItem['weight_rule_conversion_logic_id'] = weight_rules?.conversion_logic_id; + } + if (nFeeItem.conversion_logic_id === ConversionLogics.ActualWeight) { + if ( + (!recordItem.record_weight && !recordItem.group_weight) || + nFeeItem.count_source === countCource.artificial + ) + return; + if (nFeeItem.count_source === countCource.outProduct || nFeeItem.count_source === countCource.outItem) { + if (recordItem.movement === '1') return; + data.movement = '-1'; + } else if ( + nFeeItem.count_source === countCource.enterProduct || + nFeeItem.count_source === countCource.enterItem + ) { + if (recordItem.movement === '-1') return; + data.movement = '1'; + } + if (recordItem.group_weight) { + const isRecord = feeItem.find( + (value) => + value.record_number === recordItem.record_number && + value.belong_to_group_weight_id === recordItem.belong_to_group_weight_id, + ); + if (isRecord) return; + feeItem.push(recordItem); + data.count = recordItem.group_weight; + data.exist = true; + } else if (recordItem.record_weight) { + const isRecord = feeItem.find((value) => value.record_number === recordItem.record_number); + if (isRecord) return; + feeItem.push(recordItem); + data.count = recordItem.record_weight; + data.exist = true; + } + } else { + if (nFeeItem.count_source === countCource.artificial) { + const record = settlementAbout.settlementRecordFee.find( + (value) => value.number === recordItem.record_number && value.fee_product_id === nFeeItem.fee_product_id, + ); + const isRecord = feeItem.find((value) => value.fee_product_id === record?.fee_product_id); + if (!record || isRecord) return; + feeItem.push(record); + data.count = record.count; + data.exist = true; + } else if ( + nFeeItem.count_source === countCource.outProduct || + nFeeItem.count_source === countCource.outItem + ) { + if (recordItem.movement === '1') return; + data.movement = '-1'; + const { count } = calcItemCount(recordItem, recordItem.product_count, nFeeItem); + data.count = count; + data.exist = true; + } else if ( + nFeeItem.count_source === countCource.enterProduct || + nFeeItem.count_source === countCource.enterItem + ) { + if (recordItem.movement === '-1') return; + data.movement = '1'; + const { count } = calcItemCount(recordItem, recordItem.product_count, nFeeItem); + data.count = count; + data.exist = true; + } else if (nFeeItem.count_source === countCource.product || nFeeItem.count_source === countCource.item) { + const { count } = calcItemCount(recordItem, recordItem.product_count, nFeeItem); + data.count = count; + data.exist = true; + } + } + if (nFeeItem.count_source !== countCource.artificial) { + const record = settlementAbout.settlementRecordFee?.find( + (value) => value.number === recordItem.record_number && value.fee_product_id === nFeeItem.fee_product_id, + ); + + const isRecord = is_excludedItems.find((value) => value.fee_product_id === record?.fee_product_id); + if (record && !isRecord) { + is_excludedItems.push(record); + data.count += record.is_excluded ? data.count - record.count : data.count; + } + } + if ( + nFeeItem.count_source !== countCource.artificial && + nFeeItem.conversion_logic_id !== ConversionLogics.ActualWeight + ) { + data.count = data.count / 1000; + } + if (data.exist) { + data['item_count'] = data.count; + data['amount'] = data.count * data.unit_price; + createFeesDatas.push(data); + } + }); + }); + + createFeesDatas = createFeesDatas?.filter(Boolean); + createLeasDatas = createLeasDatas?.filter(Boolean); + + const createCategoryDatasItem = screenData(createLeasDatas, settlementAbout, 'category'); + const createProductDatasItem = screenData(createLeasDatas, settlementAbout, 'product'); + const createCategoryFeeItem = screenData(createFeesDatas, settlementAbout, 'category'); + const createProductFeeItem = screenData(createFeesDatas, settlementAbout, 'product'); + + //本期信息 + const createDatas = [ + ...createCategoryDatasItem.list, + ...createProductDatasItem.list, + ...createCategoryFeeItem.list, + ...createProductFeeItem.list, + ]; + createDatas.sort((a, b) => { + return new Date(a.date).getTime() - new Date(b.date).getTime(); + }); + //筛选历史结存 + createCategoryDatasItem.history = createCategoryDatasItem.history?.filter((value) => value.count); + createProductDatasItem.history = createProductDatasItem.history?.filter((value) => value.count); + //汇总项信息 + const summaryCategoryItems = []; + for (const value in createCategoryDatasItem) { + createCategoryDatasItem[value].forEach((item) => { + if (!summaryCategoryItems.find((value) => value.name === item.name && item.category === '0')) { + summaryCategoryItems.push({ + settlement_id: settlementsId, + name: item.name, + item_count: item.item_count, + count: item.count, + unit_name: item.unit_name, + type: 'category', + }); + } else { + summaryCategoryItems.forEach((value) => { + if (value.name === item.name) { + value.count += item.count; + value.item_count += item.item_count; + } + }); + } + }); + } + const summaryProductItems = []; + for (const value in createProductDatasItem) { + createProductDatasItem[value].forEach((item) => { + if (!summaryProductItems.find((value) => value.name === item.name && item.category === '0')) { + summaryProductItems.push({ + settlement_id: settlementsId, + name: item.name, + count: item.count, + unit_name: item.unit_name, + item_count: item.item_count, + type: 'product', + }); + } else { + summaryProductItems.forEach((value) => { + if (value.name === item.name) { + value.count += item.count; + value.item_count += item.item_count; + } + }); + } + }); + } + const summaryItems = [...summaryCategoryItems, ...summaryProductItems]; + + //结算表信息 + const summaryPeriod = { + rent: 0.0, //租金 + maintenance: 0.0, //维修人工 + n_compensate: 0.0, //无物赔偿 + h_compensate: 0.0, //有物赔偿 + loadfreight: 0.0, //装卸运费 + current_expenses: 0.0, //本期费用 + tax: 0.0, //税率 + accumulate: 0.0, //累计费用 + current_collection: 0.0, //本期收款 + accumulate_collection: 0.0, //累计收款 + status: '2', + }; + // 结算表费用 + createCategoryDatasItem.list.forEach((value) => { + switch (value.category) { + case Itemcategory.maintenance: + summaryPeriod.maintenance += value.amount; + break; + case Itemcategory.n_compensate: + summaryPeriod.n_compensate += value.amount; + break; + case Itemcategory.h_compensate: + summaryPeriod.h_compensate += value.amount; + break; + case Itemcategory.loadFreight: + summaryPeriod.loadfreight += value.amount; + break; + } + }); + settlementAbout.settlementAddItems?.forEach((value) => { + switch (value.category) { + case AddItemsCategory.rent: + summaryPeriod.rent += value.amount; + break; + case AddItemsCategory.maintenance: + summaryPeriod.maintenance += value.amount; + break; + case AddItemsCategory.n_compensate: + summaryPeriod.n_compensate += value.amount; + break; + case AddItemsCategory.h_compensate: + summaryPeriod.h_compensate += value.amount; + break; + case AddItemsCategory.loadFreight: + summaryPeriod.loadfreight += value.amount; + break; + } + }); + const tax_included = settlementAbout.settlementLeaseData[0]?.tax_included ?? 0; + const tax_rate = settlementAbout.settlementLeaseData[0]?.tax_rate ?? 0; + summaryPeriod.rent = createCategoryDatasItem.list.reduce((sum, curr) => sum + curr.amount, summaryPeriod.rent); + summaryPeriod.rent = createCategoryDatasItem.history.reduce((sum, curr) => sum + curr.amount, summaryPeriod.rent); + summaryPeriod.tax = tax_included ? 0 : tax_rate; + summaryPeriod.current_expenses = + (summaryPeriod.rent + + summaryPeriod.maintenance + + summaryPeriod.n_compensate + + summaryPeriod.h_compensate + + summaryPeriod.loadfreight) * + (summaryPeriod.tax + 1); + // const settlement = settlementAbout.settlements?.filter((value) => + // dayjs(value.end_date).isBefore(settlementAbout.start_date), + // ); + + // summaryPeriod.accumulate = settlement.length + // ? settlement.reduce((sum, curr) => sum + curr.current_expenses, summaryPeriod.current_expenses) + // : summaryPeriod.current_expenses; + await this.db.sequelize.query(`delete from settlement_items where settlement_id=${settlementsId}`); + await this.db.sequelize.query(`delete from settlement_history_items where settlement_id=${settlementsId}`); + await this.db.sequelize.query(`delete from settlement_summary_items where settlement_id=${settlementsId}`); + //修改结算表数据 + await this.db.getRepository('settlements').update({ + values: summaryPeriod, + filter: { + id: settlementsId, + }, + }); + await this.db.getModel('settlement_items').bulkCreate(createDatas); + await this.db.getModel('settlement_history_items').bulkCreate(createCategoryDatasItem.history); + await this.db.getModel('settlement_history_items').bulkCreate(createProductDatasItem.history); + await this.db.getModel('settlement_summary_items').bulkCreate(summaryItems); + } +} + +const calcItemCount = (recordItem, itemCount, feeItem?) => { + let count; + let unit; + const conversion_logic_id = feeItem ? feeItem.conversion_logic_id : recordItem.conversion_logic_id; + const weight_rules_conversion_logic_id = feeItem + ? feeItem.weight_rules_conversion_logic_id + : recordItem.weight_rules_conversion_logic_id; + const weight_rules_weight = feeItem ? feeItem.weight_rules_weight : recordItem.weight_rules_weight; + //1不换算 + if (conversion_logic_id === ConversionLogics.Keep) { + count = itemCount; + unit = recordItem.product_unit; + } //2产品表换算 + else if (conversion_logic_id === ConversionLogics.Product) { + count = recordItem.product_conbertible ? itemCount * recordItem.porduct_ratio : itemCount; + unit = recordItem.product_conbertible ? recordItem.product_convertible_unit : recordItem.product_unit; + } //4默认重量 + else if (conversion_logic_id === ConversionLogics.ProductWeight) { + count = itemCount * recordItem.product_weight ?? 0; + } //重量表 + else { + if (weight_rules_conversion_logic_id === ConversionLogics.Product) { + count = itemCount * weight_rules_weight ?? 0 * recordItem.porduct_ratio; + } else if (weight_rules_conversion_logic_id === ConversionLogics.Keep) { + count = itemCount * weight_rules_weight ?? 0; + } else { + count = 0; + } + unit = recordItem.product_conbertible ? recordItem.product_convertible_unit : recordItem.product_unit; + } + return { count, unit }; +}; + +// 结存时间 +/** + * 租金天数计算 + * @param { calc_type, movement, date } 租金计算方式,出入库,订单日期 + * 2:计头计尾:出库多加一天 + * 3:不计头不计尾:入库多加一天 + * 0:计头不计尾:出入库都加一天 + * 其他情况正常计算天数 + * 1:计尾不计头:正常计算天数 + * @returns days 根据租金计算方式返回租借天数 + */ +const afterDays = (calc_type, movement, start, end) => { + const l = dayjs(end).startOf('day'); + const r = dayjs(start).startOf('day'); + let ofterDays = l.diff(r, 'day'); + switch (calc_type) { + case CalcDateType.countHeads: + ofterDays += 1; + break; + case CalcDateType.countTails: + break; + case CalcDateType.countHT: + if (movement === '-1') { + ofterDays += 1; + } + break; + case CalcDateType.withoutHT: + if (movement === '1') { + ofterDays += 1; + } + break; + } + return ofterDays; +}; + +const formatNumber = (count) => { + const c = formatQuantity(count, 5); + return parseFloat(c.replace(/,/g, '')); +}; + +/** + * 筛选租赁信息处理条件 + * @param data 当前需要处理的订单 + * @param settlementAbout 合同中统计的信息 + * @returns screenDatas 一个对象中包含了历史订单和当期订单 + */ +const screenData = (data, settlementAbout, type) => { + const history = {}; + const list = {}; + const screenDatas = { + history: [], + list: [], + }; + data.forEach((value) => { + let name = value.name; + let listKey = `${name}_${value.movement}_${converDate(value.date, 'YYYY-MM-DD')}`; + let historyKey = `${name}`; + switch (type) { + case 'category': + listKey = `${name}_${value.movement}_${converDate(value.date, 'YYYY-MM-DD')}`; + historyKey = `${name}`; + value.item_count = 0; + break; + case 'product': + listKey = `${value.label}_${value.movement}_${converDate(value.date, 'YYYY-MM-DD')}`; + historyKey = `${value.label}`; + name = value.label; + break; + } + if (dayjs(value.date).isBefore(settlementAbout.start_date)) { + if (!history[historyKey]) { + history[historyKey] = { + settlement_id: value.settlement_id, + amount: value.amount, + category: value.category, + count: value.count, + days: afterDays(data.calc_type, value.movement, settlementAbout.start_date, settlementAbout.end_date), + name: name, + unit_name: value.unit_name, + unit_price: value.unit_price, + item_count: value.item_count, + is_excluded: value.is_excluded, + type: type, + }; + } else { + history[historyKey].count = formatNumber(history[historyKey].count) + formatNumber(value.count); + history[historyKey].amount = formatNumber(history[historyKey].amount) + formatNumber(value.amount); + history[historyKey].unit_price = + history[historyKey].amount / history[historyKey].count / history[historyKey].days; + history[historyKey].item_count = formatNumber(history[historyKey].item_count) + formatNumber(value.item_count); + } + } else { + if (!list[listKey]) { + list[listKey] = { + settlement_id: value.settlement_id, + movement: value.movement, + date: value.date, + amount: value.amount, + category: value.category, + count: value.count, + days: value.days || 0, + name: name, + unit_name: value.unit_name, + item_count: value.item_count, + unit_price: value.unit_price, + is_excluded: value.is_excluded, + type: type, + }; + } else { + list[listKey].count = formatNumber(list[listKey].count) + formatNumber(value.count); + list[listKey].amount = formatNumber(list[listKey].amount) + formatNumber(value.amount); + list[listKey].unit_price = isNaN(list[listKey].amount / list[listKey].count / list[listKey].days) + ? 0 + : list[listKey].amount / list[listKey].count / list[listKey].days; + list[listKey].item_count = formatNumber(list[listKey].item_count) + formatNumber(value.item_count); + } + } + }); + screenDatas['history'].push(...Object.values(history)); + screenDatas['list'].push(...Object.values(list)); + return screenDatas; +}; diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts index 7415a08ac..524e14c3d 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts @@ -1,5 +1,5 @@ -import { Db, Service } from '@nocobase/utils'; -import Database from '@nocobase/database'; +import { Db, Service } from '@tachybase/utils'; +import Database from '@tachybase/database'; import dayjs from 'dayjs'; import { AddItemsCategory, @@ -887,8 +887,8 @@ export class SettlementService { }); calc.list.forEach((value) => { const productDate = converDate(value.date, 'YYYY-MM-DD'); - if ((value.name as string).includes('-')) { - const name = value.name.split('-')[0]; + if ((value.name as string)?.includes('-')) { + const name = value.name?.split('-')[0]; const valueItem = calc.list.filter( (item) => converDate(item.date, 'YYYY-MM-DD') === productDate && item.name === name, )[0]; @@ -896,8 +896,8 @@ export class SettlementService { value.date = dayjs(valueItem.date).add(1, 'seconds'); } } - if (value.name.includes('$$')) { - value.name = value.name.replace('$$', ''); + if (value.name?.includes('&&')) { + value.name = value.name.replace('&&', ''); } }); calc.list?.sort((a, b) => { diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/vehicles-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/vehicles-service.ts index 5c5e8b5dd..91a4d6c63 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/vehicles-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/vehicles-service.ts @@ -1,5 +1,5 @@ -import Database, { CreateOptions, MagicAttributeModel } from '@nocobase/database'; -import { Db, Service } from '@nocobase/utils'; +import Database, { CreateOptions, MagicAttributeModel } from '@tachybase/database'; +import { Db, Service } from '@tachybase/utils'; import validateLicensePlate from '../../utils/validateLIcensePlate'; @Service() diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record.sql deleted file mode 100644 index 891ce6a5b..000000000 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record.sql +++ /dev/null @@ -1,120 +0,0 @@ -SELECT - r.*, - -- ================================出入库信息================================ - ( - SELECT - TO_JSONB( - JSONB_SET( - TO_JSONB(project), - '{associated_company}', - COALESCE(TO_JSONB(c2), '{}'::jsonb) - ) - ) - FROM - project - LEFT JOIN company c2 ON project.associated_company_id = c2.id - WHERE - project.id = r.out_stock_id - ) AS out_stock, - -- 查订单入库方 - ( - SELECT - TO_JSONB( - JSONB_SET( - TO_JSONB(project), - '{associated_company}', - COALESCE(TO_JSONB(c), '{}'::jsonb) - ) - ) - FROM - project - LEFT JOIN company c ON project.associated_company_id = c.id - WHERE - project.id = r.in_stock_id - ) AS in_stock, - TO_JSONB( - -- 项目/客户数据(只有租赁才有此项目,其他项目就是出入库数据) - JSONB_SET( - TO_JSONB(c), - '{project}', - ( - SELECT - COALESCE( - TO_JSONB( - JSONB_SET( - TO_JSONB(p3), - '{associated_company}', - CASE - WHEN p3.associated_company_id IS NOT NULL THEN ( - SELECT - COALESCE(TO_JSONB(c), '{}'::jsonb) - FROM - company c - WHERE - p3.associated_company_id = c.id - ) - ELSE '{}'::jsonb - END - ) || JSONB_SET( - TO_JSONB(p3), - '{company}', - ( - SELECT - TO_JSONB(c) - FROM - company c - WHERE - p3.company_id = c.id - ) - ) || JSONB_SET( - TO_JSONB(p3), - '{contacts}', - ( - SELECT - COALESCE(JSONB_AGG(c), '[]'::jsonb) - FROM - project_contacts pc - JOIN contacts c ON pc.contact_id = c.id - WHERE - p3.id = pc.project_id - ) - ) - ), - '{}'::jsonb - ) - FROM - project p3 - WHERE - c.project_id = p3.id - ) - ) - ) AS contract, - -- ==========================================车号========================================== - ( - SELECT - COALESCE(JSONB_AGG(v), '[]'::jsonb) - FROM - record_vehicles rv - JOIN vehicles v ON rv.vehicle_id = v.id - WHERE - r.id = rv.record_id - ) AS vehicles, - -- 查询分组实际重量 - ( - SELECT - JSONB_AGG( - JSONB_SET(TO_JSONB(rgwi), '{category}', TO_JSONB(pc)) - ) - FROM - record_group_weight_items rgwi - JOIN record_group_weight_items_products rgwip ON rgwip.item_id = rgwi.id - JOIN product_category pc ON rgwip.product_category_id = pc.id - WHERE - rgwi.record_id = r.id - ) AS record_group_weight_items -FROM - records r - -- 合同数据(租赁有合同) - LEFT JOIN contracts c ON r.contract_id = c.id -WHERE - r.id = :recordId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_fee.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_fee.sql deleted file mode 100644 index 182d570a1..000000000 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_fee.sql +++ /dev/null @@ -1,122 +0,0 @@ -SELECT - r.movement AS record_movement, - r.weight AS record_weight, - NULL AS actual_weight, - NULL AS product_id, - NULL AS product_count, - NULL AS fee_count, - NULL AS is_excluded, - cpfi.fee_product_id, - p.*, - p.weight AS product_weight, - NULL AS product_ratio, - NULL AS convertible, - NULL AS product_category_id, - cpfi.unit_price, - cpfi.conversion_logic_id, - cpfi.unit, - cpfi.count_source, - cpfi."comment", - cpfi.id, - ( - SELECT - JSONB_AGG(wr) - FROM - weight_rules wr - WHERE - wr.logic_id = cpfi.conversion_logic_id - ) AS weight_rules -FROM - records r - LEFT JOIN contracts c ON r.contract_id = c.id - LEFT JOIN contract_items ci ON c.id = ci.contract_id - AND ci.start_date <= r.date - AND ci.end_date >= r."date" - LEFT JOIN contract_plans cp ON ci.contract_plan_id = cp.id - LEFT JOIN contract_plan_fee_items cpfi ON cp.id = cpfi.contract_plan_id --有lease_item_id证明是关联产品的费用 - JOIN product p ON p.id = cpfi.fee_product_id - LEFT JOIN product_category pc3 ON p.category_id = pc3.id - JOIN product_category pc ON pc.id = p.category_id - JOIN unit_conversion_logics ucl ON ucl.id = cpfi.conversion_logic_id -WHERE - r.id = :recordId -GROUP BY - cpfi.id, - p.id, - r.id -UNION -SELECT - r2.movement AS record_movement, - r2.weight AS record_weight, - rwi.weight AS actual_weight, - ri.product_id, - ri.count AS product_count, - rifi.count AS fee_count, - rifi.is_excluded AS is_excluded, -- 不计入合同 - cpfi2.fee_product_id, - p1.*, - p2.weight AS product_weight, - p2.ratio AS product_ratio, - pc2.convertible AS convertible, - pc2.id AS product_category_id, - cpfi2.unit_price, - cpfi2.conversion_logic_id, - cpfi2.unit, - cpfi2.count_source, - cpfi2."comment", - cpfi2.id, - ( - SELECT - TO_JSONB(wr) - FROM - weight_rules wr - WHERE - ucl2.id > 4 - AND wr.logic_id = ucl2.id - AND wr.product_id = ri.product_id - LIMIT - 1 - ) AS weight_rules -FROM - records r2 - LEFT JOIN contracts c2 ON r2.contract_id = c2.id - LEFT JOIN contract_items ci2 ON c2.id = ci2.contract_id - AND ci2.start_date <= r2.date - AND ci2.end_date >= r2."date" - LEFT JOIN contract_plans cp2 ON ci2.contract_plan_id = cp2.id - LEFT JOIN contract_plan_lease_items cpli ON cp2.id = cpli.contract_plan_id -- 查租金 - JOIN contract_plan_lease_items_products cplip ON cplip.lease_item_id = cpli.id -- 查租金产品 - JOIN contract_plan_fee_items cpfi2 ON cpfi2.lease_item_id = cpli.id - AND cpfi2.count_source = '0' -- 查费用 - JOIN unit_conversion_logics ucl2 ON ucl2.id = cpfi2.conversion_logic_id -- 查计算规则 - JOIN record_items ri ON ri.record_id = r2.id - AND ( - ri.product_id = cplip.product_id - OR ( - SELECT - p.category_id - FROM - product p - WHERE - p.id = ri.product_id - ) = cplip.product_id - 99999 - ) - LEFT JOIN ( - SELECT - record_group_weight_items.id, - COMMENT, - weight, - record_id, - product_category_id - FROM - record_group_weight_items - JOIN record_group_weight_items_products ON record_group_weight_items.id = record_group_weight_items_products.item_id - ) rwi ON r2.id = rwi.record_id - AND rwi.product_category_id = ri.product_id - LEFT JOIN record_item_fee_items rifi ON ri.id = rifi.record_item_id - AND rifi.product_id = cpfi2.fee_product_id - JOIN product p1 ON p1.id = cpfi2.fee_product_id - LEFT JOIN product p2 ON ri.product_id = p2.id - LEFT JOIN product_category pc2 ON p2.category_id = pc2.id -WHERE - r2.id = :recordId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_lease.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_lease.sql deleted file mode 100644 index 8a92a97fc..000000000 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_lease.sql +++ /dev/null @@ -1,112 +0,0 @@ --- 租金 --- distinct说明:sql根据订单中产品去合同规则中找规则,如果合同存在单个产品多条规则,会连接查询出多条规则,所以需要distinct --- 直接disinct掉,不会有任何影响,因为查询数据只关注点单产品数量,根换算逻辑,正好多条规则换算逻辑是一样的 -SELECT DISTINCT - r.category, - ri.comment AS item_comment, - ri.count, - ri.product_id, - p.label, - p.ratio, - p.weight, - p.category_id, - pc.name AS product_category_name, - pc.unit, - pc.convertible, - pc.conversion_unit, - lr.unit_price AS price_price, - vp."label" AS price_label, - lr."comment" AS price_comment, - rwi.product_category_id, - CASE - WHEN r.category = '0' THEN cpli.conversion_logic_id - ELSE lr.conversion_logic_id - END AS conversion_logic_id, - CASE - WHEN ucl.id > 4 - AND c.id IS NOT NULL THEN ( - SELECT - TO_JSONB(wr) - FROM - weight_rules wr - WHERE - ucl.id = wr.logic_id - AND ( - wr.product_id = p.id - OR wr.product_id = pc.id + 99999 - ) - ) - WHEN lr.conversion_logic_id > 4 - AND c.id IS NULL THEN ( - SELECT - TO_JSONB(wr2) - FROM - weight_rules wr2 - WHERE - lr.conversion_logic_id = wr2.logic_id - AND ( - wr2.product_id = p.id - OR wr2.product_id = pc.id + 99999 - ) - ) - END AS wr -FROM - records r - LEFT JOIN record_items ri ON r.id = ri.record_id - LEFT JOIN product p ON ri.product_id = p.id - LEFT JOIN product_category pc ON p.category_id = pc.id - ---- 租赁找合同规则 - LEFT JOIN contracts c ON r.contract_id = c.id - LEFT JOIN contract_items ci ON c.id = ci.contract_id - AND ci.start_date <= r.date - AND ci.end_date >= r."date" - LEFT JOIN contract_plans cp ON ci.contract_plan_id = cp.id - LEFT JOIN contract_plan_lease_items cpli ON cp.id = cpli.contract_plan_id - LEFT JOIN unit_conversion_logics ucl ON cpli.conversion_logic_id = ucl.id - AND cpli.conversion_logic_id > 4 - ------ 购销找租金定价 - LEFT JOIN lease_rules lr ON r.id = lr.record_id - AND ( - lr.product_id = p.id - OR lr.product_id = pc.id + 99999 - ) - LEFT JOIN view_products vp ON vp.id = lr.product_id - LEFT JOIN ( - SELECT - record_group_weight_items.id, - COMMENT, - weight, - record_id, - product_category_id - FROM - record_group_weight_items - JOIN record_group_weight_items_products ON record_group_weight_items.id = record_group_weight_items_products.item_id - ) rwi ON r.id = rwi.record_id - AND rwi.product_category_id = pc.id -WHERE - r.id = :recordId - AND ( - CASE - WHEN c.id IS NOT NULL THEN ( - ri.product_id = ( - SELECT - cplip.product_id - FROM - contract_plan_lease_items_products cplip - WHERE - cplip.lease_item_id = cpli.id - AND cplip.product_id = p.id - ) - OR pc.id + 99999 = ( - SELECT - cplip.product_id - FROM - contract_plan_lease_items_products cplip - WHERE - cplip.lease_item_id = cpli.id - AND cplip.product_id - 99999 = pc.id - ) - ) - ELSE TRUE - END - ) diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_no_porduct_fees.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_no_porduct_fees.sql new file mode 100644 index 000000000..26aed2ae4 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_no_porduct_fees.sql @@ -0,0 +1,59 @@ +SELECT + p.weight, + p.ratio, + p2.convertible, + p2.unit, + p2.conversion_unit, + p2.name || '[' || p.name || ']' AS NAME, + p.custom_name, + cpfi.unit_price, + cpfi.conversion_logic_id, + cpfi.unit, + cpfi.count_source, + cpfi.new_fee_products_id AS fee_products_id, + rfin.count, -- 无关联手工录入数量 + rfin.is_excluded, + wr2.weight AS wr_weight, --人工录入数量重量规则 + wr2.conversion_logic_id AS wr_logic_id, + COALESCE(JSONB_AGG(wr), '[]'::jsonb) AS weight_rules -- 出库入库量的重量规则表 +FROM + contracts c + JOIN records r ON r.id = :recordId + JOIN contract_items ci ON c.id = ci.contract_id + AND ci.start_date <= r."date" + AND ci.end_date >= r."date" + JOIN contract_plans cp ON cp.id = ci.contract_plan_id + JOIN contract_plan_fee_items cpfi ON cpfi.contract_plan_id = cp.id + JOIN products p ON p.id = cpfi.new_fee_products_id + LEFT JOIN products p2 ON p."parentId" = p2.id + JOIN record_contract rc ON rc.record_id = r.id + AND rc.contract_id = c.id + JOIN record_fee_items_new rfin ON rfin.record_contract_id = rc.id + AND rfin.new_fee_product_id = cpfi.new_fee_products_id + AND cpfi.count_source = '0' + LEFT JOIN weight_rules wr ON cpfi.conversion_logic_id = wr.logic_id + AND cpfi.count_source != '0' + AND cpfi.conversion_logic_id > 4 + LEFT JOIN weight_rules wr2 ON cpfi.conversion_logic_id = wr.logic_id + AND cpfi.new_fee_products_id = wr2.new_product_id + AND cpfi.count_source = '0' +WHERE + c.id = :contractId +GROUP BY --jsonb_agg需要分组 + cpfi.unit_price, + cpfi.conversion_logic_id, + cpfi.unit, + cpfi.count_source, + cpfi.new_fee_products_id, + rfin.count, + p.weight, + p.ratio, + p2.convertible, + p2.unit, + p2.conversion_unit, + p.name, + p2.name, + p.custom_name, + wr2.weight, + wr2.conversion_logic_id, + rfin.is_excluded diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_fee_item.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_fee_item.sql new file mode 100644 index 000000000..514118825 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_fee_item.sql @@ -0,0 +1,39 @@ +SELECT + ri.count, + rfin.count AS fee_count, + rfin.new_product_id AS products_id, + rfin.new_fee_product_id AS fee_product_id, + p2."name" || '[' || p."name" || ']' AS fee_product, + p.custom_name AS fee_custom_name, + p4.convertible AS fee_convertible, + p4.unit AS fee_unit, + p4.conversion_unit AS fee_conversion_unit, + p3.weight AS fee_weight, + p3.ratio AS fee_ratio, + rfin.is_excluded, + rfin."comment", + cpfi.count_source, + cpfi.conversion_logic_id, + cpfi.unit AS fee_rule_unit, + cpfi.unit_price +FROM + record_contract rc + JOIN records r ON r.id = rc.record_id + JOIN contract_items ci ON ci.contract_id = rc.contract_id + AND ci.start_date <= r."date" + AND ci.end_date >= r."date" + JOIN contract_plans cp ON cp.id = ci.contract_plan_id + JOIN contract_plan_lease_items cpli ON cpli.contract_plan_id = cp.id + JOIN view_products_search_rule_special vpsrs ON cpli.new_products_id = ANY (vpsrs.parents) + JOIN record_fee_items_new rfin ON rfin.record_contract_id = rc.id + AND rfin.new_product_id = vpsrs.id + JOIN products p ON p.id = rfin.new_fee_product_id + LEFT JOIN products p2 ON p."parentId" = p2.id + JOIN contract_plan_fee_items cpfi ON cpfi.lease_item_id = cpli.id + AND cpfi.new_fee_products_id = rfin.new_fee_product_id + JOIN record_items ri ON ri.record_id = r.id + AND ri.new_product_id = vpsrs.id + JOIN products p3 ON p3.id = ri.new_product_id + LEFT JOIN products p4 ON p3."parentId" = p4.id +WHERE + rc.id = :intermediateId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_item.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_item.sql new file mode 100644 index 000000000..b173939f3 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_record_product_item.sql @@ -0,0 +1,42 @@ +SELECT + r."date", + p.id AS products_id, + p2.id AS "parentId", + p2.name AS "parentName", + p2.name || '[' || p.name || ']' AS "name", + p2.unit, + p2.convertible, + p2.conversion_unit, + p.weight AS products_weight, + p.ratio AS products_ratio, + cpli.conversion_logic_id, + ri.count, + ri.comment, + wr.conversion_logic_id AS wr_logic_id, + wr.weight AS wr_weight, + cpli.unit_price +FROM + records r + JOIN contracts c ON c.id = :contractId + LEFT JOIN contract_items ci ON c.id = ci.contract_id + AND ci.start_date <= r."date" + AND ci.end_date >= r."date" + LEFT JOIN contract_plans cp ON cp.id = ci.contract_plan_id + JOIN contract_plan_lease_items cpli ON ( + cpli.contract_plan_id = cp.id + AND c.effectiveness = '0' + ) + OR ( + cpli.contract_id = c.id + AND c.effectiveness = '1' + ) + JOIN view_products_search_rule_special vpsrs ON cpli.new_products_id = ANY (vpsrs.parents) + JOIN record_items ri ON ri.record_id = r.id + AND ri.new_product_id = vpsrs.id + JOIN products p ON p.id = ri.new_product_id + LEFT JOIN products p2 ON p."parentId" = p2.id + LEFT JOIN weight_rules wr ON cpli.conversion_logic_id = wr.logic_id + AND cpli.conversion_logic_id > 4 + AND wr.new_product_id = ri.new_product_id +WHERE + r.id = :recordId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_waybills.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_waybills.sql index d29f275bf..d5c9329d5 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_waybills.sql +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/pdf_waybills.sql @@ -1,114 +1,64 @@ SELECT + r.number record_number, + w.arrival_date, -- 到货日期 + w.off_date, -- 承运日期 + w.weight_or_amount, -- 吨/趟 + w.unit_price, -- 单价 + w.additional_cost, -- 附加金额 + w.pay_date, -- 付款日期 + w.comment, + p."name" AS payer_name, -- 付款方 + c."name" AS payer_company, -- 付款方公司 + a."name" AS payee_account_name, -- 收款账户 + a."number" AS payee_account_number, -- 收款账户 + a.bank AS payee_account_bank, -- 收款名称 + p2.address AS shipper_address, -- 发货方 + p2."name" AS shipper_name, -- 发货方单位 + c3.name AS shipper_company, -- 发货方单位 + c4."name" AS shipper_contact, -- 发货方联系人 + c4.phone AS shipper_contact_phone, -- 发货方联系人 + c2."name" AS consignee_contact, -- 收款人 + p3.name AS consignee_name, -- 收货方单位 + p3.address AS consignee_address, + c5."name" AS consignee_company, -- 收货方单位 + c6."name" AS consignee_contact, -- 收货人 + c6.phone AS consignee_contact_phone, + c7.name AS carrier, -- 承运商 + c8.name AS driver, -- 驾驶员 + c8.phone AS driver_phone, + c8.id_card AS driver_idcard, --驾驶员 + ( + SELECT + STRING_AGG(v.number::TEXT, ', ') + FROM + record_vehicles rv + JOIN vehicles v ON rv.vehicle_id = v.id + WHERE + r.id = rv.record_id + ) AS vehicles, ( SELECT waybills_explain FROM basic_configuration - ) side_information, - w.*, - TO_JSONB( - JSONB_SET( - TO_JSONB(payer), - '{company}', - ( - SELECT - TO_JSONB(c2) - FROM - company c2 - WHERE - payer.company_id = c2.id - ) - ) - ) AS payer, -- 付款方, 查公司company_id - TO_JSONB(payee_account) AS payee_account, -- 收款方账号 - TO_JSONB(shipper_contact) AS shipper_contact, -- 发货方联系人 - TO_JSONB(consignee_contact) AS consignee_contact, -- 收货方联系人 - TO_JSONB(carrier) AS carrier, -- 承运商 - TO_JSONB(driver) AS driver, --司机 - TO_JSONB( - JSONB_SET( - TO_JSONB(in_stock), - '{company}', - ( - SELECT - TO_JSONB(c) - FROM - company c - WHERE - in_stock.company_id = c.id - ) - ) - ) AS in_stock, - TO_JSONB( - JSONB_SET( - TO_JSONB(out_stock), - '{company}', - ( - SELECT - TO_JSONB(c) - FROM - company c - WHERE - out_stock.company_id = c.id - ) - ) - ) AS out_stock, - TO_JSONB(records.*) || JSONB_BUILD_OBJECT( - 'items', - ( - SELECT - JSONB_AGG( - TO_JSONB(record_items) || JSONB_BUILD_OBJECT( - 'product', - TO_JSONB(product.*) || JSONB_BUILD_OBJECT('category', TO_JSONB(product_category.*)) - ) - ) - FROM - record_items - LEFT JOIN product ON record_items.product_id = product.id - LEFT JOIN product_category ON product.category_id = product_category.id - WHERE - records.id = record_items.record_id - ), - 'vehicles', - ( - SELECT - COALESCE(JSONB_AGG(v), '[]'::jsonb) - FROM - record_vehicles rv - JOIN vehicles v ON rv.vehicle_id = v.id - WHERE - records.id = rv.record_id - ) - ) AS record + ) side_information FROM waybills w - LEFT JOIN - -- 付款方 - project payer ON w.payer_id = payer.id - LEFT JOIN - -- 收款方账户 - account payee_account ON w.payee_account_id = payee_account.id - LEFT JOIN - -- 发货方联系人 - contacts shipper_contact ON w.shipper_contact_id = shipper_contact.id - LEFT JOIN - -- 收货方联系人 - contacts consignee_contact ON w.consignee_contact_id = consignee_contact.id - LEFT JOIN - -- 承运商 - company carrier ON w.carrier_id = carrier.id - LEFT JOIN - -- 司机 - contacts driver ON w.driver_id = driver.id - JOIN - -- 订单信息 - records ON w.record_id = records.id - JOIN record_items ON record_items.record_id = w.record_id - JOIN product ON product.id = record_items.product_id - JOIN product_category ON product_category.id = product.category_id - LEFT JOIN record_vehicles ON records.id = record_vehicles.record_id - LEFT JOIN project in_stock ON records.in_stock_id = in_stock.id - LEFT JOIN project out_stock ON records.out_stock_id = out_stock.id + JOIN records r ON r.id = w.record_id + LEFT JOIN record_contract rc ON r.id = rc.record_id + LEFT JOIN project p ON w.payer_id = p.id + LEFT JOIN company c ON p.company_id = c.id + LEFT JOIN account a ON w.payee_account_id = a.id + LEFT JOIN contacts c2 ON w.consignee_contact_id = c2.id + JOIN project p2 ON r.out_stock_id = p2.id -- 发货方 + LEFT JOIN company c3 ON p2.company_id = c3.id + LEFT JOIN contacts c4 ON w.shipper_contact_id = c4.id + JOIN project p3 ON r.in_stock_id = p3.id -- 收货方 + LEFT JOIN company c5 ON p3.company_id = c5.id + LEFT JOIN contacts c6 ON w.consignee_contact_id = c6.id + LEFT JOIN company c7 ON w.carrier_id = c7.id + LEFT JOIN contacts c8 ON w.driver_id = c8.id WHERE w.id = :recordId +LIMIT + 1 --rc数量不为1 diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/products_search_rule_special.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/products_search_rule_special.sql new file mode 100644 index 000000000..70bdebd11 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/products_search_rule_special.sql @@ -0,0 +1,24 @@ +CREATE OR REPLACE VIEW + public.view_products_search_rule_special AS +WITH RECURSIVE + tree_nodes AS ( + SELECT + id, + ARRAY[id] AS parents + FROM + products + WHERE + "parentId" IS NULL + UNION ALL + SELECT + t.id, + tn.parents || t.id + FROM + products t + JOIN tree_nodes tn ON t."parentId" = tn.id + ) +SELECT DISTINCT + id, + parents +FROM + tree_nodes diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql deleted file mode 100644 index 201d44314..000000000 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc.sql +++ /dev/null @@ -1,276 +0,0 @@ -SELECT - s.*, - TO_JSONB( - JSONB_SET( - TO_JSONB(c), - '{rule_items}', - ( - SELECT - JSONB_AGG( - JSONB_SET( - TO_JSONB(ci), - '{rule}', - TO_JSONB( - -- 租金 - JSONB_SET( - TO_JSONB(cp), - '{lease_items}', - ( - SELECT - JSONB_AGG( - JSONB_SET( - TO_JSONB(cpli), - '{ucl}', - TO_JSONB( - JSONB_SET( - TO_JSONB(ucl), - '{weight_items}', - ( - SELECT - COALESCE(JSONB_AGG(wr), '[]'::jsonb) - FROM - weight_rules wr - WHERE - ucl.id = wr.logic_id - AND ucl.id > 4 - ) - ) - ) - ) || JSONB_SET( - TO_JSONB(cpli), - '{product_fee}', - ( - SELECT - COALESCE( - JSONB_AGG( - JSONB_SET(TO_JSONB(cpfi), '{product}', TO_JSONB(product)) || JSONB_SET( - TO_JSONB(cpfi), - '{weight_items}', - ( - SELECT - COALESCE(JSONB_AGG(wrs), '[]'::jsonb) - FROM - weight_rules wrs - WHERE - wrs.logic_id = cpfi.conversion_logic_id - AND cpfi.conversion_logic_id > 4 - ) - ) - ), - '[]'::jsonb - ) - FROM - contract_plan_fee_items cpfi - JOIN product ON cpfi.fee_product_id = product.id - WHERE - cpfi.lease_item_id = cpli.id - ) - ) || JSONB_SET( - TO_JSONB(cpli), - '{products}', - ( - SELECT - JSONB_AGG(cplip) - FROM - contract_plan_lease_items_products cplip - WHERE - cplip.lease_item_id = cpli.id - ) - ) - ) - FROM - contract_plan_lease_items cpli - JOIN unit_conversion_logics ucl ON ucl.id = cpli.conversion_logic_id - WHERE - cpli.contract_plan_id = cp.id - ) - ) || - -- 费用 - JSONB_SET( - TO_JSONB(cp), - '{fee_item}', - ( - SELECT - COALESCE( - JSONB_AGG( - JSONB_SET( - TO_JSONB(cpfi), - '{ucl}', - TO_JSONB( - JSONB_SET( - TO_JSONB(ucl), - '{weight_items}', - ( - SELECT - COALESCE(JSONB_AGG(wr), '[]'::jsonb) - FROM - weight_rules wr - WHERE - cpfi.conversion_logic_id = wr.logic_id - AND cpfi.conversion_logic_id > 4 - ) - ) - ) - ) || JSONB_SET( - TO_JSONB(cpfi), - '{product}', - ( - SELECT - TO_JSONB(product) - FROM - product - WHERE - cpfi.fee_product_id = product.id - ) - ) - ), - '[]'::jsonb - ) - FROM - contract_plan_fee_items cpfi - JOIN unit_conversion_logics ucl ON ucl.id = cpfi.conversion_logic_id - WHERE - cpfi.contract_plan_id = cp.id - ) - ) - ) - ) - ) - FROM - contract_items ci - LEFT JOIN contract_plans cp ON ci.contract_plan_id = cp.id - WHERE - ci.contract_id = COALESCE(main.id, c.id) - AND ci.start_date IS NOT NULL - AND ci.end_date IS NOT NULL - ) - ) - ) AS contracts, - ( - SELECT - JSONB_AGG( - JSONB_SET( - TO_JSONB(r), - '{record_items}', - ( - SELECT - COALESCE( - JSONB_AGG( - JSONB_SET( - TO_JSONB(ri), - '{product}', - -- 产品 - ( - SELECT - TO_JSONB( - JSONB_SET( - TO_JSONB(p), - '{product_category}', - -- 产品分类 - TO_JSONB(pc) - ) - ) - FROM - product p - JOIN product_category pc ON p.category_id = pc.id - WHERE - p.id = ri.product_id - ) - ) || JSONB_SET( - TO_JSONB(ri), - '{record_item_fee_items}', - ( - SELECT - COALESCE( - JSONB_AGG( - JSONB_SET(TO_JSONB(rifi), '{product}', TO_JSONB(p)) - ), - '[]'::jsonb - ) - FROM - record_item_fee_items rifi - JOIN product p ON rifi.product_id = p.id - WHERE - rifi.record_item_id = ri.id - ) - ) - ), - '[]'::jsonb - ) - FROM - record_items ri - WHERE - ri.record_id = r.id - ) - ) || JSONB_SET( - -- 维修赔偿(无产品关联,如:运费) - TO_JSONB(r), - '{fee_item}', - ( - SELECT - COALESCE( - JSONB_AGG( - JSONB_SET(TO_JSONB(rfi), '{product}', TO_JSONB(p)) - ), - '[]'::jsonb - ) - FROM - record_fee_items rfi - JOIN product p ON rfi.product_id = p.id - WHERE - rfi.record_id = r.id - ) - ) || JSONB_SET( - TO_JSONB(r), - '{weight_items}', - ( - SELECT - COALESCE(JSONB_AGG(rwi), '[]'::jsonb) - FROM - ( - SELECT - record_group_weight_items.id, - COMMENT, - weight, - record_id, - product_category_id - FROM - record_group_weight_items - JOIN record_group_weight_items_products ON record_group_weight_items.id = record_group_weight_items_products.item_id - ) rwi - WHERE - rwi.record_id = r.id - ) - ) - ) - FROM - records r - WHERE - r.contract_id = COALESCE(main.id, c.id) - AND r.category = '0' - AND (s.end_date + INTERVAL '1 day - 1 millisecond') >= r.date - ) AS records, - ( - SELECT - COALESCE(JSONB_AGG(sai), '[]'::jsonb) - FROM - settlement_add_items sai - WHERE - s.id = sai.add_id - ) AS settlement_add_items, - ( - SELECT - JSONB_AGG(s1) - FROM - settlements s1 - WHERE - s1.contract_id = c.id - ) AS settlements -FROM - settlements s - JOIN - -- 合同 一对一 - contracts c ON c.id = s.contract_id - LEFT JOIN contracts main ON main.id = c.alternative_contract_id -WHERE - s.id = :settlementsId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_no_products.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_no_products.sql new file mode 100644 index 000000000..54e98bb80 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_no_products.sql @@ -0,0 +1,21 @@ +SELECT + cpfi.conversion_logic_id, + cpfi.count_source, + cpfi.unit_price, + cpfi.unit, + p.id AS fee_product_id, + p2.name AS fee_name, + p2.name || '[' || p.name || ']' AS fee_label +FROM + settlements s + -- 开始查产品费用规则 + JOIN contracts c ON c.id = s.contract_id + JOIN contract_items ci ON c.id = ci.contract_id + AND ci.start_date <= s.start_date + AND ci.end_date >= s.start_date + JOIN contract_plans cp ON cp.id = ci.contract_plan_id + JOIN contract_plan_fee_items cpfi ON cpfi.contract_plan_id = cp.id + JOIN products p ON p.id = cpfi.new_fee_products_id + LEFT JOIN products p2 ON p."parentId" = p2.id +WHERE + s.id = :settlementsId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_products.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_products.sql new file mode 100644 index 000000000..575410fad --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_fee_products.sql @@ -0,0 +1,59 @@ +SELECT + rc.movement, + r.number, + ri.new_product_id AS product_id, + p2."name" AS fee_product_name, + p."name" AS fee_product_label, + cpfi.unit_price AS fee_price, + cpfi.conversion_logic_id, + cpfi.unit, + cpfi.count_source, + rifi.count, + wr.conversion_logic_id AS weight_rule_conversion_logic_id, + wr.weight AS weight_rules_weight, + rgwi.weight AS group_weight, + rgwi.new_product_id AS belong_to_group_weight_id, + p3.name AS belong_to_group_weight_name, + r.weight AS records_weight, + c.calc_type, + r.date, + rifi.is_excluded +FROM + settlements s + -- 开始查产品费用规则 + JOIN contracts c ON c.id = s.contract_id + JOIN contract_items ci ON c.id = ci.contract_id + AND ci.start_date <= s.start_date + AND ci.end_date >= s.start_date + JOIN contract_plans cp ON cp.id = ci.contract_plan_id + JOIN contract_plan_lease_items cpli ON cpli.contract_plan_id = cp.id + JOIN contract_plan_fee_items cpfi ON cpfi.lease_item_id = cpli.id + -- 产品费用查询完毕 + -- 新版产品匹配处理join + JOIN view_products_search_rule_special vpsrs ON cpli.new_products_id = ANY (vpsrs.parents) + -- 新版产品匹配处理join end + -- 开始查询订单相关,产品赔偿等 + JOIN record_contract rc ON rc.contract_id = c.id + JOIN records r ON r.id = rc.record_id + AND (s.end_date + INTERVAL '1 day - 1 millisecond') >= r.date + JOIN record_items ri ON ri.record_id = r.id + AND ri.new_product_id = vpsrs.id + -- 要做的是查订单item中的赔偿要跟cpfi中费用产品join + JOIN record_item_fee_items rifi ON rifi.record_item_id = ri.id + AND rifi.new_product_id = cpfi.new_fee_products_id + JOIN products p ON p.id = rifi.new_product_id + LEFT JOIN products p2 ON p."parentId" = p2.id + -- 开始查询订单相关,产品等,结束 + -- 实际重量查询 + LEFT JOIN record_group_weight_items rgwi ON rgwi.record_id = r.id + AND cpfi.conversion_logic_id = 3 + AND rgwi.new_product_id = ANY (vpsrs.parents) + JOIN products p3 ON p3.id = rgwi.new_product_id + -- 实际重量查询结束 + -- 重量表情况 + LEFT JOIN weight_rules wr ON cpfi.conversion_logic_id = wr.logic_id + AND cpfi.conversion_logic_id > 4 + AND wr.new_product_id = ri.new_product_id + -- 重量表情况结束 +WHERE + s.id = :settlementsId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_products.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_products.sql new file mode 100644 index 000000000..95ef479ab --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_products.sql @@ -0,0 +1,60 @@ +SELECT + rc.movement, + r.id AS record_id, + r.number AS record_number, + r.weight AS record_weight, + p.id AS product_id, + ri.count AS product_count, + p2."name" AS product_name, + p2."name" || '[' || p.name || ']' AS product_label, + p2.convertible AS product_conbertible, + p2.unit AS product_unit, + p2.conversion_unit AS product_convertible_unit, + p.weight AS product_weight, + p.ratio AS porduct_ratio, + rgwi.weight AS group_weight, + wr.conversion_logic_id AS weight_rules_conversion_logic_id, + wr.weight AS weight_rules_weight, + cpli.conversion_logic_id, + cpli.unit_price, + c.calc_type, + c.tax_included, + c.tax_rate, + r.date, + rgwi.new_product_id AS belong_to_group_weight_id, + p3.name AS belong_to_group_weight_name +FROM + settlements s + -- 开始查租金规则 + JOIN contracts c ON c.id = s.contract_id + JOIN contract_items ci ON c.id = ci.contract_id + AND ci.start_date <= s.start_date + AND ci.end_date >= s.start_date + JOIN contract_plans cp ON cp.id = ci.contract_plan_id + JOIN contract_plan_lease_items cpli ON cpli.contract_plan_id = cp.id + -- 租金规则查询完毕 + -- 新版产品匹配处理join + JOIN view_products_search_rule_special vpsrs ON cpli.new_products_id = ANY (vpsrs.parents) + -- 新版产品匹配处理join end + -- 开始查询订单相关,产品等 + JOIN record_contract rc ON rc.contract_id = c.id + JOIN records r ON r.id = rc.record_id + AND (s.end_date + INTERVAL '1 day - 1 millisecond') >= r.date + JOIN record_items ri ON ri.record_id = r.id + AND ri.new_product_id = vpsrs.id + JOIN products p ON p.id = ri.new_product_id + LEFT JOIN products p2 ON p."parentId" = p2.id + -- 开始查询订单相关,产品等,结束 + -- 实际重量查询 + LEFT JOIN record_group_weight_items rgwi ON rgwi.record_id = r.id + AND cpli.conversion_logic_id = 3 + AND rgwi.new_product_id = ANY (vpsrs.parents) + LEFT JOIN products p3 ON p3.id = rgwi.new_product_id + -- 实际重量查询结束 + -- 重量表情况 + LEFT JOIN weight_rules wr ON cpli.conversion_logic_id = wr.logic_id + AND cpli.conversion_logic_id > 4 + AND wr.new_product_id = ri.new_product_id + -- 重量表情况结束 +WHERE + s.id = :settlementsId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_record_fee_products.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_record_fee_products.sql new file mode 100644 index 000000000..877614c3e --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_calc_record_fee_products.sql @@ -0,0 +1,19 @@ +SELECT + r.id, + r.date, + r.number, + r."date", + rc.movement, + rfi.is_excluded, + rfi.count, + p.name, + p.id AS fee_product_id +FROM + settlements s + JOIN record_contract rc ON rc.contract_id = s.contract_id + JOIN records r ON r.id = rc.record_id + AND (s.end_date + INTERVAL '1 day - 1 millisecond') >= r.date + JOIN record_fee_items rfi ON rfi.record_id = r.id + JOIN products p ON p.id = rfi.new_product_id +WHERE + s.id = :settlementsId diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_select.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_select.sql index 7fe182edf..b41c0528e 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_select.sql +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/settlement_select.sql @@ -48,6 +48,28 @@ SELECT WHERE contracts."updatedById" = u.id ) + ) || JSONB_SET( + TO_JSONB(contracts), + '{first_party}', + ( + SELECT + TO_JSONB(c) + FROM + company c + WHERE + c.id = contracts.first_party_id + ) + ) || JSONB_SET( + TO_JSONB(contracts), + '{party_b}', + ( + SELECT + TO_JSONB(c) + FROM + company c + WHERE + c.id = contracts.party_b_id + ) ) ) AS contracts, ( diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql new file mode 100644 index 000000000..f57cbd7a4 --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql @@ -0,0 +1,56 @@ +CREATE OR REPLACE VIEW + public.view_records_contracts AS +SELECT + c.id AS contract_id, + r.id AS record_id, + CAST('c_' || rc.id AS VARCHAR) AS id, + rc.id AS rc_id, -- 页面更新中间表存根联/回根联用 + rc.movement, + c1.id AS company_id, + p.id AS project_id, + rc.has_receipt, + rc.has_stub, + c.record_category +FROM + records r + JOIN record_contract rc ON rc.record_id = r.id + JOIN contracts c ON c.id = rc.contract_id + JOIN company c1 ON c1.id = c.first_party_id + JOIN project p ON p.id = ( + CASE + WHEN rc.movement = '1' THEN r.out_stock_id + ELSE r.in_stock_id + END + ) +UNION ALL +SELECT + NULL AS contract_id, + r.id AS record_id, + CAST('r_' || r.id AS VARCHAR) AS id, + NULL AS rc_id, + ( + CASE + WHEN p3.id = r.in_stock_id THEN '1' + ELSE '-1' + END + ) AS movement, + c.id AS company_id, + p3.id AS project_id, + rc.has_receipt, + rc.has_stub, + '2' AS record_category +FROM + records r + LEFT JOIN record_contract rc ON rc.record_id = r.id + JOIN project p ON p.id = r.in_stock_id + JOIN project p2 ON p2.id = r.out_stock_id + JOIN company c ON c.roles @> '["associated"]' + AND c.id = p.company_id + OR c.id = p2.company_id + JOIN project p3 ON p3.company_id = c.id + AND p3.id = p.id + OR p3.id = p2.id +WHERE + rc.id IS NULL + AND r.in_stock_id IS NOT NULL + AND r.out_stock_id IS NOT NULL diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/waybills_products.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/waybills_products.sql new file mode 100644 index 000000000..00cf6f48a --- /dev/null +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/waybills_products.sql @@ -0,0 +1,19 @@ +SELECT + p2."name" || '/' || p.name AS products_name, + p2.convertible, + p2.unit, + p2.conversion_unit, + p.ratio, + ri.count, + CASE + WHEN p2.convertible THEN ri.count * COALESCE(p.ratio, 1) + ELSE ri.count + END AS total +FROM + waybills w + JOIN record_items ri ON ri.record_id = w.record_id + JOIN products p ON p.id = ri.new_product_id + JOIN products p2 ON p2.id = p."parentId" +WHERE + w.id = :recordId + -- 运输单相关产品查询 diff --git a/packages/plugins/@hera/plugin-rental/src/utils/constants.ts b/packages/plugins/@hera/plugin-rental/src/utils/constants.ts index 8f4a4201a..953e51bbb 100644 --- a/packages/plugins/@hera/plugin-rental/src/utils/constants.ts +++ b/packages/plugins/@hera/plugin-rental/src/utils/constants.ts @@ -84,18 +84,6 @@ export enum SourcesType { * 3 出入库量 */ inAndOut = '3', - /** - * 4 出库单数 - */ - outboundNumber = '4', - /** - * 5 入库单数 - */ - inboundNumber = '5', - /** - * 6 出入库单数 - */ - inAndOutNumber = '6', } export enum PromptText { diff --git a/packages/plugins/@hera/plugin-sancongtou/package.json b/packages/plugins/@hera/plugin-sancongtou/package.json index 7acb17e5b..cb6be327f 100644 --- a/packages/plugins/@hera/plugin-sancongtou/package.json +++ b/packages/plugins/@hera/plugin-sancongtou/package.json @@ -9,9 +9,9 @@ "antd-mobile": "^5.35.0" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@tachybase/client": "0.x", + "@tachybase/server": "0.x", + "@tachybase/test": "0.x" }, "description.zh-CN": "提供移动端: 定制化的三聪头项目页面,.", "displayName.zh-CN": "移动端: 三聪头,定制化页面配置" diff --git a/packages/plugins/@hera/plugin-sancongtou/src/client/index.tsx b/packages/plugins/@hera/plugin-sancongtou/src/client/index.tsx index aaaa43283..8da09673c 100644 --- a/packages/plugins/@hera/plugin-sancongtou/src/client/index.tsx +++ b/packages/plugins/@hera/plugin-sancongtou/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { ProductDetail } from './pages/ProductDetail'; import { ShareProduct } from './components/ShareProduct'; diff --git a/packages/plugins/@hera/plugin-sancongtou/src/client/pages/ProductDetail.tsx b/packages/plugins/@hera/plugin-sancongtou/src/client/pages/ProductDetail.tsx index 1389cf101..2f7ad61f9 100644 --- a/packages/plugins/@hera/plugin-sancongtou/src/client/pages/ProductDetail.tsx +++ b/packages/plugins/@hera/plugin-sancongtou/src/client/pages/ProductDetail.tsx @@ -2,7 +2,7 @@ import { NavBar, Image } from 'antd-mobile'; import React from 'react'; import detailHeaderImpage from '../assets/detail_lt_header.png'; import detailContentImage from '../assets/detail_lt_content.png'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; export const ProductDetail = () => { const onBack = () => { diff --git a/packages/plugins/@hera/plugin-sancongtou/src/server/plugin.ts b/packages/plugins/@hera/plugin-sancongtou/src/server/plugin.ts index 802f9ec23..8ff487392 100644 --- a/packages/plugins/@hera/plugin-sancongtou/src/server/plugin.ts +++ b/packages/plugins/@hera/plugin-sancongtou/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; export class PluginSancongtouServer extends Plugin { async afterAdd() {} diff --git a/packages/plugins/@nocobase/plugin-acl/package.json b/packages/plugins/@nocobase/plugin-acl/package.json index 88b1be4d4..c28f0c2bd 100644 --- a/packages/plugins/@nocobase/plugin-acl/package.json +++ b/packages/plugins/@nocobase/plugin-acl/package.json @@ -30,14 +30,14 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/acl": "workspace:*", - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/acl": "workspace:*", + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。", "displayName.zh-CN": "权限控制", diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/NewRole.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/NewRole.tsx index ca48e4c04..4d07a2454 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/NewRole.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/NewRole.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent, useActionContext, useRequest } from '@nocobase/client'; +import { SchemaComponent, useActionContext, useRequest } from '@tachybase/client'; import React from 'react'; import { useACLTranslation } from './locale'; import { uid } from '@tachybase/schema'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/RolesManagement.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/RolesManagement.tsx index d6ce33faa..a133ff8cf 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/RolesManagement.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/RolesManagement.tsx @@ -7,7 +7,7 @@ import { SchemaComponentContext, usePlugin, useSchemaComponentContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ISchema, Schema } from '@tachybase/schema'; import { RolesMenu } from './RolesMenu'; import { useACLTranslation } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/RolesMenu.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/RolesMenu.tsx index 54e113473..a46e2ba4e 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/RolesMenu.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/RolesMenu.tsx @@ -4,7 +4,7 @@ import { SchemaComponent, useAPIClient, useResourceActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Menu, Empty, Dropdown, App, Tag, Row, Col, Spin } from 'antd'; import { TagOutlined, MoreOutlined } from '@ant-design/icons'; import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/association.test.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/association.test.ts index 27a376d8f..28841b811 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/association.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/association.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneTableBlock } from './utils'; test.describe('view', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/collection.test.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/collection.test.ts index c23b86510..11fc1afac 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/collection.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/collection.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneTableBlock, newTableBlock } from './utils'; test.describe('view', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts index b84d78a38..d89b47074 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneTableBlock } from './utils'; test('allows to configure interface', async ({ page, mockPage, mockRole, updateRole }) => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts index deb78f6a9..08f16c651 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; test('menu permission ', async ({ page, mockPage, mockRole, updateRole }) => { const page2 = mockPage({ name: 'page2' }); diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts index c67278a46..6b180f821 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { general, PageConfig } from '@nocobase/test/e2e'; +import { general, PageConfig } from '@tachybase/test/e2e'; /** * 页面中有一个空的 Table 区块,并且配有字段:普通字段和关系字段 */ diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/index.ts b/packages/plugins/@nocobase/plugin-acl/src/client/index.ts index cec44c813..07765ce52 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { RolesManagement } from './RolesManagement'; import { RolesManager } from './roles-manager'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ActionPermissions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ActionPermissions.tsx index ab60918e3..b3f58b6b2 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ActionPermissions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ActionPermissions.tsx @@ -11,7 +11,7 @@ import { useRecord, useRequest, useResourceActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useContext, useEffect } from 'react'; import { RolesManagerContext } from '../RolesManagerProvider'; import { roleCollectionsSchema } from '../schemas/roles'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/AvailableActions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/AvailableActions.tsx index 1bbee689f..7b44291b4 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/AvailableActions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/AvailableActions.tsx @@ -1,4 +1,4 @@ -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import { Spin } from 'antd'; import React, { createContext, useContext } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/GeneralPermissions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/GeneralPermissions.tsx index 07c76295c..c1b569900 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/GeneralPermissions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/GeneralPermissions.tsx @@ -1,6 +1,6 @@ import { onFormValuesChange, createForm, Form } from '@tachybase/schema'; import { connect } from '@tachybase/schema'; -import { SchemaComponent, useAPIClient, useRequest } from '@nocobase/client'; +import { SchemaComponent, useAPIClient, useRequest } from '@tachybase/client'; import { Checkbox, message } from 'antd'; import uniq from 'lodash/uniq'; import React, { useContext, useMemo } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuItemsProvider.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuItemsProvider.tsx index fc5469eb8..dab6b8590 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuItemsProvider.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuItemsProvider.tsx @@ -1,4 +1,4 @@ -import { useAdminSchemaUid, useRequest } from '@nocobase/client'; +import { useAdminSchemaUid, useRequest } from '@tachybase/client'; import { Spin } from 'antd'; import React, { createContext, useContext } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuPermissions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuPermissions.tsx index c79eee4a6..4ee0c4ad9 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuPermissions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/MenuPermissions.tsx @@ -4,7 +4,7 @@ import { uniq } from 'lodash'; import React, { useContext, useState, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { uid } from '@tachybase/schema'; -import { useAPIClient, SchemaComponent, useRequest } from '@nocobase/client'; +import { useAPIClient, SchemaComponent, useRequest } from '@tachybase/client'; import { useStyles } from './style'; import { useMemoizedFn } from 'ahooks'; import { RolesManagerContext } from '../RolesManagerProvider'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/Permissions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/Permissions.tsx index 8b28cdbda..e39eee239 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/Permissions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/Permissions.tsx @@ -1,4 +1,4 @@ -import { useApp, useRequest, useAPIClient } from '@nocobase/client'; +import { useApp, useRequest, useAPIClient } from '@tachybase/client'; import { Tabs } from 'antd'; import React, { useContext, useEffect, useMemo } from 'react'; import { RolesManagerContext } from '../RolesManagerProvider'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/PluginPermissions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/PluginPermissions.tsx index f42090efb..8bc6cb71e 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/PluginPermissions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/PluginPermissions.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useApp, useCompile, useCollectionRecord, useRequest } from '@nocobase/client'; +import { useAPIClient, useApp, useCompile, useCollectionRecord, useRequest } from '@tachybase/client'; import { Checkbox, message, Table } from 'antd'; import React, { useContext, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/RolesResourcesActions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/RolesResourcesActions.tsx index cc5e4fbf9..004cb5d25 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/RolesResourcesActions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/RolesResourcesActions.tsx @@ -7,7 +7,7 @@ import { useCompile, useCollectionRecord, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Checkbox, Table, Tag } from 'antd'; import { isEmpty } from 'lodash'; import React, { createContext } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ScopeSelect.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ScopeSelect.tsx index f905d402b..909e6d12d 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ScopeSelect.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/ScopeSelect.tsx @@ -1,6 +1,6 @@ import { createForm } from '@tachybase/schema'; import React, { createContext, useContext, useMemo, useState } from 'react'; -import { FormProvider, SchemaComponent } from '@nocobase/client'; +import { FormProvider, SchemaComponent } from '@tachybase/client'; import { scopesSchema } from '../schemas/scopes'; const RolesResourcesScopesSelectedRowKeysContext = createContext(null); diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/StrategyActions.tsx b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/StrategyActions.tsx index 2f45ed3ae..e49971866 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/StrategyActions.tsx +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/StrategyActions.tsx @@ -3,7 +3,7 @@ import { connect, useField } from '@tachybase/schema'; import { Checkbox, Select, Table, Tag } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; -import { useCompile } from '@nocobase/client'; +import { useCompile } from '@tachybase/client'; import { useAvailableActions } from './AvailableActions'; const toScopes = (value) => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/roles-manager.ts b/packages/plugins/@nocobase/plugin-acl/src/client/roles-manager.ts index 6b3e800d7..203168e85 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/roles-manager.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/roles-manager.ts @@ -1,4 +1,4 @@ -import { Registry } from '@nocobase/utils/client'; +import { Registry } from '@tachybase/utils/client'; export type RolesManagerOptions = { title: string; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/schemas/roles.ts b/packages/plugins/@nocobase/plugin-acl/src/client/schemas/roles.ts index 2f444b574..3bf80ac76 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/schemas/roles.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/schemas/roles.ts @@ -1,5 +1,5 @@ import { uid } from '@tachybase/schema'; -import { useActionContext, useCollectionRecord, useRecord, useRequest } from '@nocobase/client'; +import { useActionContext, useCollectionRecord, useRecord, useRequest } from '@tachybase/client'; import { useEffect } from 'react'; import pick from 'lodash/pick'; import { ISchema } from '@tachybase/schema'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts b/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts index 3ec00dca3..35cf190c1 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { VariableInput, useFilterOptions, useFormBlockContext } from '@nocobase/client'; +import { VariableInput, useFilterOptions, useFormBlockContext } from '@tachybase/client'; import { useContext, useEffect } from 'react'; import { RoleResourceCollectionContext } from '../permissions/RolesResourcesActions'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/acl.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/acl.test.ts index 82f4ed122..f4dd02087 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/acl.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/acl.test.ts @@ -1,8 +1,8 @@ -import { ACL } from '@nocobase/acl'; -import { Database } from '@nocobase/database'; +import { ACL } from '@tachybase/acl'; +import { Database } from '@tachybase/database'; import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('acl', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/actions.test.ts index a5b2fb17a..ab81fe9a7 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/actions.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('destroy action with acl', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/association-field.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/association-field.test.ts index 70da330a6..95d1a91a8 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/association-field.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/association-field.test.ts @@ -1,7 +1,7 @@ -import { ACL } from '@nocobase/acl'; -import { Database, HasManyRepository } from '@nocobase/database'; +import { ACL } from '@tachybase/acl'; +import { Database, HasManyRepository } from '@tachybase/database'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('association test', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/configuration.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/configuration.test.ts index c19c4f231..d32012bcd 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/configuration.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/configuration.test.ts @@ -1,6 +1,6 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('configuration', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/list-action.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/list-action.test.ts index c71c958b2..6da933328 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/list-action.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/list-action.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('list action with acl', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/middleware.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/middleware.test.ts index 1014ee3ac..6f73280c9 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/middleware.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/middleware.test.ts @@ -1,7 +1,7 @@ -import { ACL } from '@nocobase/acl'; -import { Database, Model } from '@nocobase/database'; +import { ACL } from '@tachybase/acl'; +import { Database, Model } from '@tachybase/database'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('middleware', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/own.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/own.test.ts index a26099bcd..587e37ea7 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/own.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/own.test.ts @@ -1,7 +1,7 @@ -import { ACL } from '@nocobase/acl'; -import { Database } from '@nocobase/database'; +import { ACL } from '@tachybase/acl'; +import { Database } from '@tachybase/database'; import PluginUser from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('own test', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/prepare.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/prepare.ts index babf2b5aa..85d2aa806 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/prepare.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/prepare.ts @@ -1,4 +1,4 @@ -import { createMockServer, MockServer } from '@nocobase/test'; +import { createMockServer, MockServer } from '@tachybase/test'; export async function prepareApp(): Promise { const app = await createMockServer({ diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-check.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-check.test.ts index 280d727d8..6bd6be9b0 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-check.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-check.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; import { CollectionRepository } from '@nocobase/plugin-collection-manager'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-resource.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-resource.test.ts index f303626f0..251c4f7ea 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-resource.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-resource.test.ts @@ -1,7 +1,7 @@ -import { Database, Model } from '@nocobase/database'; +import { Database, Model } from '@tachybase/database'; import { CollectionRepository } from '@nocobase/plugin-collection-manager'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('role resource api', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-user.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-user.test.ts index b8613579e..89f85b8a3 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-user.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-user.test.ts @@ -1,6 +1,6 @@ -import Database, { BelongsToManyRepository } from '@nocobase/database'; +import Database, { BelongsToManyRepository } from '@tachybase/database'; import UsersPlugin from '@nocobase/plugin-users'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { createMockServer, MockServer } from '@tachybase/test'; import jwt from 'jsonwebtoken'; describe('role', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role.test.ts index fee341fa3..a956de3fa 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role.test.ts @@ -1,6 +1,6 @@ -import { ArrayFieldRepository, Database, Model } from '@nocobase/database'; +import { ArrayFieldRepository, Database, Model } from '@tachybase/database'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('role api', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/scope.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/scope.test.ts index 9c56177ba..2f57e6bb9 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/scope.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/scope.test.ts @@ -1,6 +1,6 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('scope api', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/setCurrentRole.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/setCurrentRole.test.ts index d0e98b09f..902119150 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/setCurrentRole.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/setCurrentRole.test.ts @@ -1,7 +1,7 @@ import { vi } from 'vitest'; -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import UsersPlugin from '@nocobase/plugin-users'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { setCurrentRole } from '../middlewares/setCurrentRole'; import { prepareApp } from './prepare'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/snippets.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/snippets.test.ts index dd6bcaa97..d67ef1bae 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/snippets.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/snippets.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('snippet', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts index e8ab3dbbf..6c7021800 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { prepareApp } from './prepare'; describe('actions', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/write-role-to-acl.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/write-role-to-acl.test.ts index 9e9ad281e..bbe5095d7 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/write-role-to-acl.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/write-role-to-acl.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import { Database } from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import { Database } from '@tachybase/database'; import { prepareApp } from './prepare'; describe('write role to acl', () => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/actions/role-collections.ts b/packages/plugins/@nocobase/plugin-acl/src/server/actions/role-collections.ts index a6c4356bb..1f47053d6 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/actions/role-collections.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/actions/role-collections.ts @@ -1,4 +1,4 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; type UsingConfigType = 'strategy' | 'resourceAction'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/actions/user-setDefaultRole.ts b/packages/plugins/@nocobase/plugin-acl/src/server/actions/user-setDefaultRole.ts index 740010597..e1acc5608 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/actions/user-setDefaultRole.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/actions/user-setDefaultRole.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; export async function setDefaultRole(ctx: Context, next: Next) { const { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles-users.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles-users.ts index c82a431df..f4ac085b3 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles-users.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles-users.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'rolesUsers', diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles.ts index c3bab89d6..d0d54d884 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ origin: '@nocobase/plugin-acl', diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResources.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResources.ts index a03b1f7f6..a43382249 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResources.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResources.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesActions.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesActions.ts index 05da21007..a4e43515c 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesActions.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesActions.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesScopes.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesScopes.ts index 1ff4ea708..18f411df9 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesScopes.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesScopes.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/collections/users.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/users.ts index 00a9056b4..359aee4e7 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/collections/users.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/collections/users.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'users', diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/setCurrentRole.ts b/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/setCurrentRole.ts index 5c7502124..be74c5742 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/setCurrentRole.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/setCurrentRole.ts @@ -1,6 +1,6 @@ -import { Context } from '@nocobase/actions'; -import { Cache } from '@nocobase/cache'; -import { Model, Repository } from '@nocobase/database'; +import { Context } from '@tachybase/actions'; +import { Cache } from '@tachybase/cache'; +import { Model, Repository } from '@tachybase/database'; export async function setCurrentRole(ctx: Context, next) { const currentRole = ctx.get('X-Role'); diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/with-acl-meta.ts b/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/with-acl-meta.ts index 5af8e929d..6664734ad 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/with-acl-meta.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/with-acl-meta.ts @@ -1,6 +1,6 @@ import lodash from 'lodash'; -import { NoPermissionError } from '@nocobase/acl'; -import { snakeCase } from '@nocobase/database'; +import { NoPermissionError } from '@tachybase/acl'; +import { snakeCase } from '@tachybase/database'; function createWithACLMetaMiddleware() { return async (ctx: any, next) => { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/migrations/20221214072638-set-role-snippets.ts b/packages/plugins/@nocobase/plugin-acl/src/server/migrations/20221214072638-set-role-snippets.ts index 5b98163f8..bce0fbcbe 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/migrations/20221214072638-set-role-snippets.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/migrations/20221214072638-set-role-snippets.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.9.0-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleModel.ts b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleModel.ts index e6a2b40fe..f69d086f9 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleModel.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleModel.ts @@ -1,5 +1,5 @@ -import { Model } from '@nocobase/database'; -import { ACL } from '@nocobase/acl'; +import { Model } from '@tachybase/database'; +import { ACL } from '@tachybase/acl'; export class RoleModel extends Model { writeToAcl(options: { acl: ACL; withOutStrategy?: boolean }) { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceActionModel.ts b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceActionModel.ts index be2456875..bd87fd769 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceActionModel.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceActionModel.ts @@ -1,5 +1,5 @@ -import { ACL, ACLRole } from '@nocobase/acl'; -import { Database, Model } from '@nocobase/database'; +import { ACL, ACLRole } from '@tachybase/acl'; +import { Database, Model } from '@tachybase/database'; import { AssociationFieldAction, AssociationFieldsActions, GrantHelper } from '../server'; export class RoleResourceActionModel extends Model { diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceModel.ts b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceModel.ts index 48f5e349d..a93d0725c 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceModel.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceModel.ts @@ -1,5 +1,5 @@ -import { ACL, ACLResource, ACLRole } from '@nocobase/acl'; -import { Model } from '@nocobase/database'; +import { ACL, ACLResource, ACLRole } from '@tachybase/acl'; +import { Model } from '@tachybase/database'; import { AssociationFieldsActions, GrantHelper } from '../server'; import { RoleResourceActionModel } from './RoleResourceActionModel'; diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts index 807773a0d..bec9222ce 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts @@ -1,7 +1,7 @@ -import { Context, utils as actionUtils } from '@nocobase/actions'; -import { Cache } from '@nocobase/cache'; -import { Collection, RelationField } from '@nocobase/database'; -import { Plugin } from '@nocobase/server'; +import { Context, utils as actionUtils } from '@tachybase/actions'; +import { Cache } from '@tachybase/cache'; +import { Collection, RelationField } from '@tachybase/database'; +import { Plugin } from '@tachybase/server'; import { Mutex } from 'async-mutex'; import lodash from 'lodash'; import { resolve } from 'path'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json index f00ed04e6..561fcee54 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json @@ -20,10 +20,10 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "对全部数据或选中的数据进行批量编辑。", "displayName.zh-CN": "操作:批量编辑", diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditAction.Settings.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditAction.Settings.tsx index c9c9621ae..f734177e2 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditAction.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditAction.Settings.tsx @@ -10,7 +10,7 @@ import { useCompile, useDesignable, useSchemaToolbar, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ModalProps } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditActionInitializer.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditActionInitializer.tsx index 581a8ed49..145f815a6 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditActionInitializer.tsx @@ -1,4 +1,4 @@ -import { BlockInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { BlockInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; export const BulkEditActionInitializer = () => { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditBlockInitializers.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditBlockInitializers.tsx index 61607416c..22bcfed8c 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditBlockInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditBlockInitializers.tsx @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, SchemaInitializer, gridRowColWrap } from '@nocobase/client'; +import { CompatibleSchemaInitializer, SchemaInitializer, gridRowColWrap } from '@tachybase/client'; import { CreateFormBulkEditBlockInitializer } from './CreateFormBulkEditBlockInitializer'; /** diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormActionInitializers.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormActionInitializers.tsx index 2b5257745..a5f14d234 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormActionInitializers.tsx @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, SchemaInitializer } from '@nocobase/client'; +import { CompatibleSchemaInitializer, SchemaInitializer } from '@tachybase/client'; import { BulkEditSubmitActionInitializer } from './BulkEditSubmitActionInitializer'; /** diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormItemInitializers.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormItemInitializers.tsx index 9f42168e4..b492b37a4 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormItemInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditFormItemInitializers.tsx @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, gridRowColWrap } from '@nocobase/client'; +import { CompatibleSchemaInitializer, gridRowColWrap } from '@tachybase/client'; import { useCustomBulkEditFormItemInitializerFields } from './utils'; /** diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditSubmitActionInitializer.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditSubmitActionInitializer.tsx index 878deb997..89271fb1a 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditSubmitActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditSubmitActionInitializer.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ActionInitializer } from '@nocobase/client'; +import { ActionInitializer } from '@tachybase/client'; export const BulkEditSubmitActionInitializer = (props) => { const schema = { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx index ab2291b42..d819ddebf 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx @@ -8,7 +8,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaTemplateManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { createBulkEditBlockUISchema } from './createBulkEditBlockUISchema'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaInitailizer.test.ts index 248b13c7b..9e30ad809 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaInitailizer.test.ts @@ -1,4 +1,4 @@ -import { expect, oneEmptyTableBlockWithActions, test } from '@nocobase/test/e2e'; +import { expect, oneEmptyTableBlockWithActions, test } from '@tachybase/test/e2e'; import { oneEmptyGantt } from './utils'; test.describe('TableActionInitializers & GanttActionInitializers & MapActionInitializers should add bulk edit action', () => { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaSettings.test.ts index 9e424c76b..4d1767c50 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneEmptyTableBlockWithCustomizeActions } from './utils'; test.describe('bulk edit action setting', () => { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts index 75af4dd96..93b117a08 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { CollectionSetting, PageConfig } from '@nocobase/test/e2e'; +import { CollectionSetting, PageConfig } from '@tachybase/test/e2e'; /** * 1. 创建一个名为 general 的 collection,其包含 时间、Percent 类型的字段 diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/bulkEditFormItemSettings.ts b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/bulkEditFormItemSettings.ts index 66fcbdec7..19655a9b0 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/bulkEditFormItemSettings.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/bulkEditFormItemSettings.ts @@ -11,7 +11,7 @@ import { useFormBlockContext, useIsFormReadPretty, useValidateSchema, -} from '@nocobase/client'; +} from '@tachybase/client'; import _ from 'lodash'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/component/BulkEditField.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/component/BulkEditField.tsx index 58e6c8ac8..df487d391 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/component/BulkEditField.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/component/BulkEditField.tsx @@ -9,7 +9,7 @@ import { useCompile, useComponent, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Checkbox, Select, Space } from 'antd'; import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx index b64ac562d..dd0ad0463 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin, useCollection_deprecated } from '@nocobase/client'; +import { Plugin, useCollection_deprecated } from '@tachybase/client'; import { bulkEditActionSettings, deprecatedBulkEditActionSettings } from './BulkEditAction.Settings'; import { BulkEditActionInitializer } from './BulkEditActionInitializer'; import { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/locale/index.ts index da9aa4d92..3fc5e83ab 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = '@nocobase/plugin-bulk-edit'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/utils.tsx index 6ee05b0b1..d7f6b596b 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/utils.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/utils.tsx @@ -8,13 +8,13 @@ import { useCompile, useTableBlockContext, TableFieldResource, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useContext } from 'react'; import { App, message } from 'antd'; import { useNavigate } from 'react-router-dom'; import { SchemaExpressionScopeContext, useField, useForm } from '@tachybase/schema'; import { cloneDeep } from 'lodash'; -import { isURL } from '@nocobase/utils/client'; +import { isURL } from '@tachybase/utils/client'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { BulkEditFormItemValueType } from './component/BulkEditField'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/server/plugin.ts index fdf463f46..30623a3c0 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; export class PluginActionBulkEditServer extends Plugin {} diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json index c1baae778..38c0604d4 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json @@ -16,10 +16,10 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "对全部数据或选中的数据进行批量更新。", "displayName.zh-CN": "操作:批量更新", diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateAction.Settings.tsx b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateAction.Settings.tsx index 21b147b08..f454b0623 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateAction.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateAction.Settings.tsx @@ -9,7 +9,7 @@ import { AssignedFieldValues, useDesignable, useSchemaToolbar, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useTranslation } from 'react-i18next'; import React from 'react'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateActionInitializer.tsx b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateActionInitializer.tsx index fa89e0cab..ee2d33d6c 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/BulkUpdateActionInitializer.tsx @@ -1,4 +1,4 @@ -import { BlockInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { BlockInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; export const BulkUpdateActionInitializer = () => { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/CustomizeActionInitializer.tsx b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/CustomizeActionInitializer.tsx index 482095fbc..6196fdff6 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/CustomizeActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/CustomizeActionInitializer.tsx @@ -1,4 +1,4 @@ -import { BlockInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { BlockInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; export const CustomizeActionInitializer = () => { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaInitailizer.test.ts index d29899c60..d9289c06a 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaInitailizer.test.ts @@ -1,4 +1,4 @@ -import { expect, oneEmptyTableBlockWithCustomizeActions, test } from '@nocobase/test/e2e'; +import { expect, oneEmptyTableBlockWithCustomizeActions, test } from '@tachybase/test/e2e'; import { oneEmptyGantt } from './utils'; test.describe('TableActionInitializers & GanttActionInitializers & MapActionInitializers ', () => { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaSettings.test.ts index af5097940..7b0ec3c9e 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneEmptyTableBlockWithCustomizeUpdate } from './utils'; test.describe('data will be updated && Assign field values && after successful submission', () => { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts index 61f7aaae9..c27fed361 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { CollectionSetting, PageConfig, generalWithM2oSingleSelect } from '@nocobase/test/e2e'; +import { CollectionSetting, PageConfig, generalWithM2oSingleSelect } from '@tachybase/test/e2e'; /** * 1. 创建一个名为 general 的 collection,其包含 时间、Percent 类型的字段 diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx index e8ee9a03e..dbdbd84dc 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin, useCollection_deprecated } from '@nocobase/client'; +import { Plugin, useCollection_deprecated } from '@tachybase/client'; import { bulkUpdateActionSettings, deprecatedBulkUpdateActionSettings } from './BulkUpdateAction.Settings'; import { BulkUpdateActionInitializer } from './BulkUpdateActionInitializer'; import { CustomizeActionInitializer } from './CustomizeActionInitializer'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/locale/index.ts index 2028aa4a4..1b29304e1 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'bulk-update'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/utils.tsx index ff6d77205..7bd2fe63d 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/utils.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/utils.tsx @@ -10,8 +10,8 @@ import { useRecord, useTableBlockContext, useVariables, -} from '@nocobase/client'; -import { isURL } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { isURL } from '@tachybase/utils/client'; import { App, message } from 'antd'; import { useContext } from 'react'; import { useNavigate } from 'react-router-dom'; diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-action-bulk-update/src/server/plugin.ts index 7292c86de..de486ae54 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; export class PluginActionBulkUpdateServer extends Plugin { afterAdd() {} diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/package.json b/packages/plugins/@nocobase/plugin-action-duplicate/package.json index 72de9eb6f..a79279441 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/package.json +++ b/packages/plugins/@nocobase/plugin-action-duplicate/package.json @@ -17,9 +17,9 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "复制一条记录,可以复制到表单中编辑后再提交,也可以直接复制并生成一条新记录。", "displayName.zh-CN": "操作:复制记录", diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.Settings.tsx b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.Settings.tsx index 0b9fcfaa5..f29212bbf 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.Settings.tsx @@ -13,7 +13,7 @@ import { useSchemaToolbar, useSyncFromForm, SchemaSettings, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Tree as AntdTree } from 'antd'; import { cloneDeep } from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.tsx b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.tsx index c2c89b0ff..7ec7eb406 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.tsx +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateAction.tsx @@ -16,7 +16,7 @@ import { useCollectionParentRecordData, useRecord, useCollection, -} from '@nocobase/client'; +} from '@tachybase/client'; import { App, Button } from 'antd'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateActionInitializer.tsx b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateActionInitializer.tsx index 917c9e641..83a7934bf 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicateActionInitializer.tsx @@ -1,4 +1,4 @@ -import { ActionInitializer } from '@nocobase/client'; +import { ActionInitializer } from '@tachybase/client'; import React from 'react'; export const DuplicateActionInitializer = (props) => { diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicatePluginProvider.tsx b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicatePluginProvider.tsx index 1d6f717ce..7d646975a 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicatePluginProvider.tsx +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/DuplicatePluginProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { DuplicateActionInitializer } from './DuplicateActionInitializer'; import { DuplicateAction } from './DuplicateAction'; diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaInitailizer.test.ts index a9d77f2d6..6ebd7073d 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaInitailizer.test.ts @@ -4,7 +4,7 @@ import { oneEmptyTableBlockWithActions, oneEmptyTableBlockWithCustomizeActions, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('TableActionColumnInitializers & DetailsActionInitializers & ReadPrettyFormActionInitializers should add duplication action', () => { test('duplication action in TableActionColumnInitializers', async ({ page, mockPage, mockRecords }) => { diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts index d74999e27..7d973a8fe 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneEmptyTableBlockWithDuplicateActions } from './utils'; test.describe('direct duplicate & copy into the form and continue to fill in', () => { diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts index 19c0498c1..4af2a05a9 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { CollectionSetting, PageConfig, general } from '@nocobase/test/e2e'; +import { CollectionSetting, PageConfig, general } from '@tachybase/test/e2e'; /** * 1. 创建一个名为 general 的 collection,其包含 时间、Percent 类型的字段 diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts index 264e405ad..492d4541c 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin, useCollection_deprecated } from '@nocobase/client'; +import { Plugin, useCollection_deprecated } from '@tachybase/client'; import { DuplicateAction } from './DuplicateAction'; import { deprecatedDuplicateActionSettings, duplicateActionSettings } from './DuplicateAction.Settings'; import { DuplicateActionInitializer } from './DuplicateActionInitializer'; diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/server/plugin.ts index 683a87443..70675cefd 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; export class PluginActionDuplicateServer extends Plugin { afterAdd() {} diff --git a/packages/plugins/@nocobase/plugin-action-print/package.json b/packages/plugins/@nocobase/plugin-action-print/package.json index dc071ec17..3dc612ee1 100644 --- a/packages/plugins/@nocobase/plugin-action-print/package.json +++ b/packages/plugins/@nocobase/plugin-action-print/package.json @@ -13,9 +13,9 @@ "react-to-print": "^2.14.7" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "调用浏览器的打印功能实现单条数据的打印。", "displayName.zh-CN": "操作:打印", diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx index b853efa5b..3702e94f0 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintAction.Settings.tsx @@ -5,7 +5,7 @@ import { SchemaSettingsLinkageRules, useCollection_deprecated, useSchemaToolbar, -} from '@nocobase/client'; +} from '@tachybase/client'; const schemaSettingsItems: SchemaSettingsItemType[] = [ { diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionInitializer.tsx b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionInitializer.tsx index 09f8fbd16..4ae290a36 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionInitializer.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { ActionInitializer } from '@nocobase/client'; +import { ActionInitializer } from '@tachybase/client'; export const PrintActionInitializer = (props) => { const schema = { diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionPluginProvider.tsx b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionPluginProvider.tsx index 0c9b8de49..c42d45a17 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionPluginProvider.tsx +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/PrintActionPluginProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { PrintActionInitializer } from './PrintActionInitializer'; import { useDetailPrintActionProps } from './utils'; diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/schemaInitailizer.test.ts index 16182a2ab..193585685 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/schemaInitailizer.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneCalenderWithViewAction, oneTableWithViewAction } from './utils'; test.describe('ReadPrettyFormActionInitializers & CalendarFormActionInitializers should add print action', () => { diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts index 84ab88f58..126bc38ac 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { CollectionSetting, PageConfig } from '@nocobase/test/e2e'; +import { CollectionSetting, PageConfig } from '@tachybase/test/e2e'; /** * 1. 创建一个名为 general 的 collection,其包含 时间、Percent 类型的字段 diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx b/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx index 645845abd..98e92f167 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { deprecatedPrintActionSettings, printActionSettings } from './PrintAction.Settings'; import { PrintActionPluginProvider } from './PrintActionPluginProvider'; export class PluginActionPrintClient extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/utils.ts b/packages/plugins/@nocobase/plugin-action-print/src/client/utils.ts index 1412c6f97..9f15aeb3e 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/utils.ts @@ -1,4 +1,4 @@ -import { useDetailsBlockContext } from '@nocobase/client'; +import { useDetailsBlockContext } from '@tachybase/client'; import { useReactToPrint } from 'react-to-print'; export const useDetailPrintActionProps = () => { diff --git a/packages/plugins/@nocobase/plugin-action-print/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-action-print/src/server/plugin.ts index e16415b66..8d00199b5 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-action-print/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; export class PluginActionPrintServer extends Plugin { afterAdd() {} diff --git a/packages/plugins/@nocobase/plugin-api-doc/package.json b/packages/plugins/@nocobase/plugin-api-doc/package.json index 15d8eae42..bc03841ef 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/package.json +++ b/packages/plugins/@nocobase/plugin-api-doc/package.json @@ -20,12 +20,12 @@ "swagger-ui-dist": "^5.3.1" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/sdk": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/sdk": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "NocoBase HTTP API 的 OpenAPI 文档生成器。", "displayName.zh-CN": "API 文档", diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx b/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx index 2110468d4..d5e36a457 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx +++ b/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx @@ -1,5 +1,5 @@ -import { css, useAPIClient, useApp, useRequest } from '@nocobase/client'; -import { getSubAppName } from '@nocobase/sdk'; +import { css, useAPIClient, useApp, useRequest } from '@tachybase/client'; +import { getSubAppName } from '@tachybase/sdk'; import { Select, Space, Spin, Typography } from 'antd'; import React, { useEffect, useRef, useState } from 'react'; import SwaggerUIBundle from 'swagger-ui-dist/swagger-ui-bundle'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx b/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx index bc8779b50..cd8be6cae 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx @@ -1,5 +1,5 @@ import { RightOutlined } from '@ant-design/icons'; -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { Button, Tooltip } from 'antd'; import { createStyles } from 'antd-style'; import React, { lazy } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/locale/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/locale/index.ts index c5ea2761f..7d4b5754d 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation as useT } from 'react-i18next'; export const NAMESPACE = 'api-doc'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/server.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/server.ts index a052885f5..388ac40c5 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/server.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { Plugin } from '@nocobase/server'; +import { Context } from '@tachybase/actions'; +import { Plugin } from '@tachybase/server'; import { SwaggerManager } from './swagger'; export class PluginAPIDocServer extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/field-type-map.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/field-type-map.ts index 86cf7bb72..cbd0a2529 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/field-type-map.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/field-type-map.ts @@ -1,4 +1,4 @@ -import { Field } from '@nocobase/database'; +import { Field } from '@tachybase/database'; const fieldTypeMap = { bigint: { diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/index.ts index 056b9a404..c3ffe1ac5 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/index.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/index.ts @@ -1,4 +1,4 @@ -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; import schemas from './schemas'; import parameters from './parameters'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/parameters.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/parameters.ts index 5fb37c8e1..769ef32fd 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/parameters.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/parameters.ts @@ -1,4 +1,4 @@ -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; import { getTypeByField } from './field-type-map'; export default (collection: Collection) => { diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/schemas.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/schemas.ts index eed1b7af5..cf823be2b 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/schemas.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/schemas.ts @@ -1,4 +1,4 @@ -import { Collection, Field, RelationField } from '@nocobase/database'; +import { Collection, Field, RelationField } from '@tachybase/database'; import { getTypeByField } from './field-type-map'; import { associationFields } from '../paths/associations'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/index.ts index e873888dd..df2946553 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/index.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/index.ts @@ -1,4 +1,4 @@ -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; import paths from './paths'; import components from './components'; import tags from './tags'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/index.ts index 763ed8565..8cf082e43 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/index.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/index.ts @@ -5,7 +5,7 @@ import { HasManyField, HasOneField, RelationField, -} from '@nocobase/database'; +} from '@tachybase/database'; import multipleAssociation from './multiple-association'; import singleAssociation from './single-association'; import { isViewCollection } from '..'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts index dc01c79ec..08e01bb16 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts @@ -1,4 +1,4 @@ -import { BelongsToManyField, Collection, HasManyField } from '@nocobase/database'; +import { BelongsToManyField, Collection, HasManyField } from '@tachybase/database'; import { CreateActionTemplate, DestroyActionTemplate, diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/single-association.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/single-association.ts index 0c6f25ea3..6c8702985 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/single-association.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/single-association.ts @@ -1,4 +1,4 @@ -import { BelongsToField, Collection, HasOneField } from '@nocobase/database'; +import { BelongsToField, Collection, HasOneField } from '@tachybase/database'; import { appendCollectionIndexParams } from './multiple-association'; import { CreateActionTemplate, DestroyActionTemplate, GetActionTemplate, UpdateActionTemplate } from '../collection'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/collection.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/collection.ts index 487da1c50..13557f66a 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/collection.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/collection.ts @@ -1,4 +1,4 @@ -import { Collection, RelationField } from '@nocobase/database'; +import { Collection, RelationField } from '@tachybase/database'; import { hasSortField, readOnlyCollection } from './index'; type TemplateOptions = { diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/index.ts index 39e66bf7d..43dfd4f2e 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/index.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/index.ts @@ -1,4 +1,4 @@ -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; import list from './collection'; import associations from './associations'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/tags/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/tags/index.ts index 32adcf5ac..ca3cd2303 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/tags/index.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/tags/index.ts @@ -1,4 +1,4 @@ -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; import { associationFields } from '../paths/associations'; import { relationTypeToString } from '../paths/collection'; diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/index.ts index 3f56f4daf..e4186735c 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/index.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/index.ts @@ -23,7 +23,7 @@ export class SwaggerManager { async generateSwagger(options: { plugins?: string[] } = {}) { const base = await this.getBaseSwagger(); - const core = options.plugins ? {} : await loadSwagger('@nocobase/server'); + const core = options.plugins ? {} : await loadSwagger('@tachybase/server'); const plugins = await this.loadSwaggers(options.plugins); return merge(merge(core, plugins), base); } @@ -78,7 +78,7 @@ export class SwaggerManager { } async getCoreSwagger() { - return merge(await this.getBaseSwagger(), await loadSwagger('@nocobase/server')); + return merge(await this.getBaseSwagger(), await loadSwagger('@tachybase/server')); } getURL(pathname: string) { diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/loader.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/loader.ts index bb81d941d..8a17c5676 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/loader.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/loader.ts @@ -1,4 +1,4 @@ -import { requireModule } from '@nocobase/utils'; +import { requireModule } from '@tachybase/utils'; import { merge } from './merge'; export const loadSwagger = (packageName: string) => { diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/merge.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/merge.ts index 0aadb68ba..83bf84813 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/merge.ts +++ b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/merge.ts @@ -1,4 +1,4 @@ -import { merge as deepmerge } from '@nocobase/utils'; +import { merge as deepmerge } from '@tachybase/utils'; const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray.concat(destinationArray); diff --git a/packages/plugins/@nocobase/plugin-api-keys/package.json b/packages/plugins/@nocobase/plugin-api-keys/package.json index ca7e285cb..e26a23d9e 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/package.json +++ b/packages/plugins/@nocobase/plugin-api-keys/package.json @@ -20,13 +20,13 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API", "displayName.zh-CN": "认证:API 密钥", diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/ExpiresSelect.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/ExpiresSelect.tsx index 24bb495cd..25d358fd5 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/ExpiresSelect.tsx +++ b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/ExpiresSelect.tsx @@ -1,5 +1,5 @@ import { connect, mapProps, mapReadPretty } from '@tachybase/schema'; -import { css, useRecord } from '@nocobase/client'; +import { css, useRecord } from '@tachybase/client'; import { useBoolean } from 'ahooks'; import { DatePicker, Select, Space, Typography } from 'antd'; import dayjs from 'dayjs'; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/index.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/index.tsx index b36ef33b5..f3b8a5096 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/index.tsx +++ b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/index.tsx @@ -1,5 +1,5 @@ import { RecursionField } from '@tachybase/schema'; -import { SchemaComponentOptions, useCurrentRoles } from '@nocobase/client'; +import { SchemaComponentOptions, useCurrentRoles } from '@tachybase/client'; import React from 'react'; import { ExpiresSelect } from './ExpiresSelect'; import { configurationSchema } from './schema'; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/roles.ts b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/roles.ts index 00cb23733..6d60bab84 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/roles.ts +++ b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/roles.ts @@ -1,4 +1,4 @@ -import { useCurrentRoles } from '@nocobase/client'; +import { useCurrentRoles } from '@tachybase/client'; export const useCurrentRolesProps = () => { const options = useCurrentRoles(); diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/schema.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/schema.tsx index 27999bbf4..ae59731a6 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/schema.tsx +++ b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/schema.tsx @@ -1,6 +1,6 @@ import { ISchema, useForm } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { useActionContext, useBlockRequestContext, useRecord } from '@nocobase/client'; +import { useActionContext, useBlockRequestContext, useRecord } from '@tachybase/client'; import { Alert, Modal, Space, Typography } from 'antd'; import React from 'react'; import { generateNTemplate } from '../../locale'; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/client/index.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/index.tsx index c16d4168e..15522bc64 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-api-keys/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { NAMESPACE } from '../constants'; import { Configuration } from './Configuration'; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/client/locale/index.ts index 2b9163b19..9e1ac18ef 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-api-keys/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation as useT } from 'react-i18next'; import { NAMESPACE } from '../../constants'; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/collections/apiKeys.ts b/packages/plugins/@nocobase/plugin-api-keys/src/collections/apiKeys.ts index 2a75a757f..7655b84b2 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/collections/apiKeys.ts +++ b/packages/plugins/@nocobase/plugin-api-keys/src/collections/apiKeys.ts @@ -1,4 +1,4 @@ -import type { CollectionOptions } from '@nocobase/database'; +import type { CollectionOptions } from '@tachybase/database'; import { generateNTemplate } from '../locale'; export default { diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/__tests__/actions.test.ts index 88dcf192b..448252cb3 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-api-keys/src/server/__tests__/actions.test.ts @@ -1,5 +1,5 @@ -import Database, { Repository } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import Database, { Repository } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('actions', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/server/actions/api-keys.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/actions/api-keys.ts index 8bfe82639..05c18a59b 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/server/actions/api-keys.ts +++ b/packages/plugins/@nocobase/plugin-api-keys/src/server/actions/api-keys.ts @@ -1,5 +1,5 @@ -import actions, { Context, Next } from '@nocobase/actions'; -import { Repository } from '@nocobase/database'; +import actions, { Context, Next } from '@tachybase/actions'; +import { Repository } from '@tachybase/database'; export async function create(ctx: Context, next: Next) { const { values } = ctx.action.params; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/plugin.ts index 6314e8579..9858f3910 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-api-keys/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { create, destroy } from './actions/api-keys'; export class PluginAPIKeysServer extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-auth/README.md b/packages/plugins/@nocobase/plugin-auth/README.md index 7fb8535a6..8e4cefdd0 100644 --- a/packages/plugins/@nocobase/plugin-auth/README.md +++ b/packages/plugins/@nocobase/plugin-auth/README.md @@ -37,7 +37,7 @@ Nocobase内核提供了扩展登录方式的接入和管理。扩展登录插件 参考`core/auth/auth.ts` ```TypeScript -import { Auth } from '@nocobase/auth'; +import { Auth } from '@tachybase/auth'; class CustomAuth extends Auth { set user(user) {} @@ -51,7 +51,7 @@ class CustomAuth extends Auth { 多数情况下,扩展的用户登录方式也将沿用现有的jwt逻辑来生成用户访问API的凭证,插件也可以继承`BaseAuth`类以便复用部分逻辑代码,如`check`, `signIn`接口。 ```TypeScript -import { BaseAuth } from '@nocobase/auth'; +import { BaseAuth } from '@tachybase/auth'; class CustomAuth extends BaseAuth { constructor(config: AuthConfig) { diff --git a/packages/plugins/@nocobase/plugin-auth/package.json b/packages/plugins/@nocobase/plugin-auth/package.json index d51d5d473..b2f591664 100644 --- a/packages/plugins/@nocobase/plugin-auth/package.json +++ b/packages/plugins/@nocobase/plugin-auth/package.json @@ -20,14 +20,14 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/auth": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/auth": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "用户认证管理,包括基础的密码认证、短信认证、SSO 协议的认证等,可扩展。", "displayName.zh-CN": "用户认证", diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/AuthProvider.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/AuthProvider.tsx index e5597ac7e..e433d0f50 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/AuthProvider.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/AuthProvider.tsx @@ -1,4 +1,4 @@ -import { useAPIClient } from '@nocobase/client'; +import { useAPIClient } from '@tachybase/client'; import React, { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/__e2e__/auth.test.ts b/packages/plugins/@nocobase/plugin-auth/src/client/__e2e__/auth.test.ts index 6d25e9ff2..507d80198 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/__e2e__/auth.test.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/client/__e2e__/auth.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; test.describe('auth', () => { // 重置登录状态 diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/basic/Options.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/basic/Options.tsx index 93a99d0c6..fd25aafd0 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/basic/Options.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/basic/Options.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { useAuthTranslation } from '../locale'; import { Alert } from 'antd'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignInForm.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignInForm.tsx index 766c49dfb..372a47dfe 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignInForm.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignInForm.tsx @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { SchemaComponent, useAPIClient, useCurrentUserContext } from '@nocobase/client'; +import { SchemaComponent, useAPIClient, useCurrentUserContext } from '@tachybase/client'; import React, { useCallback } from 'react'; import { useAuthTranslation } from '../locale'; import { useNavigate, useSearchParams } from 'react-router-dom'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignUpForm.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignUpForm.tsx index f4ad4402a..3734cc9ce 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignUpForm.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignUpForm.tsx @@ -1,9 +1,9 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import React from 'react'; import { uid } from '@tachybase/schema'; import { useAuthTranslation } from '../locale'; -import { useAPIClient } from '@nocobase/client'; +import { useAPIClient } from '@tachybase/client'; import { useForm } from '@tachybase/schema'; import { useNavigate, Navigate } from 'react-router-dom'; import { message } from 'antd'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/index.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/index.tsx index bf5ec0971..c5a706e7f 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/index.tsx @@ -1,5 +1,5 @@ -import { Plugin } from '@nocobase/client'; -import { Registry } from '@nocobase/utils/client'; +import { Plugin } from '@tachybase/client'; +import { Registry } from '@tachybase/utils/client'; import { ComponentType } from 'react'; import { presetAuthType } from '../preset'; import { AuthProvider } from './AuthProvider'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/pages/AuthLayout.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/pages/AuthLayout.tsx index 096af3fd5..37fd23c08 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/pages/AuthLayout.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/pages/AuthLayout.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import React from 'react'; import { Outlet } from 'react-router-dom'; -import { useSystemSettings, PoweredByV2 as PoweredBy, useRequest, useAPIClient } from '@nocobase/client'; +import { useSystemSettings, PoweredByV2 as PoweredBy, useRequest, useAPIClient } from '@tachybase/client'; import { AuthenticatorsContext } from '../authenticator'; export function AuthLayout(props: any) { diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignInPage.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignInPage.tsx index 9ad740b69..84c416681 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignInPage.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignInPage.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { Space, Tabs } from 'antd'; import React, { createElement, useContext } from 'react'; -import { useCurrentDocumentTitle, usePlugin, useViewport } from '@nocobase/client'; +import { useCurrentDocumentTitle, usePlugin, useViewport } from '@tachybase/client'; import AuthPlugin, { AuthOptions } from '..'; import { Authenticator, AuthenticatorsContext } from '../authenticator'; import { useAuthTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignUpPage.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignUpPage.tsx index b95f54a41..96b9d8dd0 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignUpPage.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/pages/SignUpPage.tsx @@ -1,4 +1,4 @@ -import { useCurrentDocumentTitle, usePlugin, useViewport } from '@nocobase/client'; +import { useCurrentDocumentTitle, usePlugin, useViewport } from '@tachybase/client'; import React, { useContext, createContext, FunctionComponent, createElement } from 'react'; import { Navigate, useSearchParams } from 'react-router-dom'; import AuthPlugin, { AuthOptions } from '..'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/settings/Authenticator.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/settings/Authenticator.tsx index 4a613d05c..a0c6d50d8 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/settings/Authenticator.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/settings/Authenticator.tsx @@ -5,7 +5,7 @@ import { useActionContext, useAsyncData, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Card } from 'antd'; import React, { useState } from 'react'; import { authenticatorsSchema, createFormSchema } from './schemas/authenticators'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/settings/Options.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/settings/Options.tsx index 5b1780820..00fb2687c 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/settings/Options.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/settings/Options.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { observer, useForm } from '@tachybase/schema'; -import { useActionContext, usePlugin, useRecord, useRequest } from '@nocobase/client'; +import { useActionContext, usePlugin, useRecord, useRequest } from '@tachybase/client'; import { useEffect } from 'react'; import AuthPlugin from '..'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/settings/schemas/authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/client/settings/schemas/authenticators.ts index fe14caf1a..7276c0300 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/settings/schemas/authenticators.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/client/settings/schemas/authenticators.ts @@ -1,6 +1,6 @@ import { ISchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { i18n, useAPIClient, useActionContext, useRequest } from '@nocobase/client'; +import { i18n, useAPIClient, useActionContext, useRequest } from '@tachybase/client'; import { message } from 'antd'; import { useContext } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/actions.test.ts index ae8cf0d4d..2108669a4 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/actions.test.ts @@ -1,5 +1,5 @@ -import Database, { Repository } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import Database, { Repository } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('actions', () => { describe('authenticators', () => { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/auth.test.ts b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/auth.test.ts index d1fb37171..9d1daf7f7 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/auth.test.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/auth.test.ts @@ -1,6 +1,6 @@ -import { BaseAuth } from '@nocobase/auth'; -import { Database, Model } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { BaseAuth } from '@tachybase/auth'; +import { Database, Model } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; describe('auth', () => { let auth: BaseAuth; diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/storer.test.ts b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/storer.test.ts index 98500dbf2..8cc4eb50f 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/storer.test.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/storer.test.ts @@ -1,4 +1,4 @@ -import { Cache, CacheManager } from '@nocobase/cache'; +import { Cache, CacheManager } from '@tachybase/cache'; import { Storer } from '../storer'; class MockDB { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/token-blacklist.test.ts b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/token-blacklist.test.ts index a885cc1b0..fa21fc91a 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/token-blacklist.test.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/token-blacklist.test.ts @@ -1,6 +1,6 @@ -import { ITokenBlacklistService } from '@nocobase/auth'; -import Database, { Repository } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { ITokenBlacklistService } from '@tachybase/auth'; +import Database, { Repository } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; describe('token-blacklist', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/actions/auth.ts b/packages/plugins/@nocobase/plugin-auth/src/server/actions/auth.ts index ed204a5d9..62eb9b4e0 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/actions/auth.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/actions/auth.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; export default { lostPassword: async (ctx: Context, next: Next) => { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/actions/authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/server/actions/authenticators.ts index 7510b8008..2e54001e0 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/actions/authenticators.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/actions/authenticators.ts @@ -1,7 +1,7 @@ -import { Context, Next } from '@nocobase/actions'; -import { Model, Repository } from '@nocobase/database'; +import { Context, Next } from '@tachybase/actions'; +import { Model, Repository } from '@tachybase/database'; import { namespace } from '../../preset'; -import { AuthManager } from '@nocobase/auth'; +import { AuthManager } from '@tachybase/auth'; async function checkCount(repository: Repository, id: number[]) { // TODO(yangqia): This is a temporary solution, may cause concurrency problem. diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/basic-auth.ts b/packages/plugins/@nocobase/plugin-auth/src/server/basic-auth.ts index 053e20561..633517464 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/basic-auth.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/basic-auth.ts @@ -1,5 +1,5 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; -import { PasswordField } from '@nocobase/database'; +import { AuthConfig, BaseAuth } from '@tachybase/auth'; +import { PasswordField } from '@tachybase/database'; import crypto from 'crypto'; import { namespace } from '../preset'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/collections/authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/server/collections/authenticators.ts index e77e07e69..8109dcd8a 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/collections/authenticators.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/collections/authenticators.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; /** * Collection for extended authentication methods, diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/collections/token-blacklist.ts b/packages/plugins/@nocobase/plugin-auth/src/server/collections/token-blacklist.ts index d3bb3d866..af5abecf4 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/collections/token-blacklist.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/collections/token-blacklist.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/collections/users-authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/server/collections/users-authenticators.ts index 3111710a3..24b7249df 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/collections/users-authenticators.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/collections/users-authenticators.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; /** * Collection for user information of extended authentication methods, diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts index a9e7a4ce6..40fc874d6 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { presetAuthType, presetAuthenticator } from '../../preset'; export default class AddBasicAuthMigration extends Migration { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230607174500-update-basic.ts b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230607174500-update-basic.ts index e2a887cb6..00e4eefe1 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230607174500-update-basic.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230607174500-update-basic.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { presetAuthenticator } from '../../preset'; export default class UpdateBasicAuthMigration extends Migration { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20231218132032-fix-allow-signup.ts b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20231218132032-fix-allow-signup.ts index ecab69d83..198ba88c4 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20231218132032-fix-allow-signup.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20231218132032-fix-allow-signup.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { presetAuthType } from '../../preset'; export default class FixAllowSignUpMigration extends Migration { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/model/authenticator.ts b/packages/plugins/@nocobase/plugin-auth/src/server/model/authenticator.ts index 5c2c2ed1f..d5414a45d 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/model/authenticator.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/model/authenticator.ts @@ -1,5 +1,5 @@ -import { Authenticator } from '@nocobase/auth'; -import { Database, Model } from '@nocobase/database'; +import { Authenticator } from '@tachybase/auth'; +import { Database, Model } from '@tachybase/database'; export class AuthModel extends Model implements Authenticator { declare authType: string; diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-auth/src/server/plugin.ts index 5c42e737e..1d3725ac5 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/plugin.ts @@ -1,6 +1,6 @@ -import { Cache } from '@nocobase/cache'; -import { Model } from '@nocobase/database'; -import { InstallOptions, Plugin } from '@nocobase/server'; +import { Cache } from '@tachybase/cache'; +import { Model } from '@tachybase/database'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { namespace, presetAuthType, presetAuthenticator } from '../preset'; import authActions from './actions/auth'; @@ -55,8 +55,8 @@ export class PluginAuthServer extends Plugin { title: 'Password', }); // Register actions - Object.entries(authActions).forEach( - ([action, handler]) => this.app.resourcer.getResource('auth')?.addAction(action, handler), + Object.entries(authActions).forEach(([action, handler]) => + this.app.resourcer.getResource('auth')?.addAction(action, handler), ); Object.entries(authenticatorsActions).forEach(([action, handler]) => this.app.resourcer.registerAction(`authenticators:${action}`, handler), diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/storer.ts b/packages/plugins/@nocobase/plugin-auth/src/server/storer.ts index 3d1703a9e..9d273b383 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/storer.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/storer.ts @@ -1,6 +1,6 @@ -import { Storer as IStorer } from '@nocobase/auth'; -import { Cache } from '@nocobase/cache'; -import { Database, Model } from '@nocobase/database'; +import { Storer as IStorer } from '@tachybase/auth'; +import { Cache } from '@tachybase/cache'; +import { Database, Model } from '@tachybase/database'; import { AuthModel } from './model/authenticator'; export class Storer implements IStorer { diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/token-blacklist.ts b/packages/plugins/@nocobase/plugin-auth/src/server/token-blacklist.ts index 56b498003..168cf87f3 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/token-blacklist.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/token-blacklist.ts @@ -1,8 +1,8 @@ -import { ITokenBlacklistService } from '@nocobase/auth'; -import { Repository } from '@nocobase/database'; +import { ITokenBlacklistService } from '@tachybase/auth'; +import { Repository } from '@tachybase/database'; import { CronJob } from 'cron'; import AuthPlugin from './plugin'; -import { BloomFilter } from '@nocobase/cache'; +import { BloomFilter } from '@tachybase/cache'; export class TokenBlacklistService implements ITokenBlacklistService { repo: Repository; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/package.json b/packages/plugins/@nocobase/plugin-backup-restore/package.json index 405ce1fc4..407698f55 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/package.json +++ b/packages/plugins/@nocobase/plugin-backup-restore/package.json @@ -38,12 +38,12 @@ "tar": "^6.1.13" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。", "displayName.zh-CN": "应用的备份与还原", diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/client/Configuration.tsx b/packages/plugins/@nocobase/plugin-backup-restore/src/client/Configuration.tsx index e0113cc4e..b4e2c5bcf 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/client/Configuration.tsx +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/client/Configuration.tsx @@ -1,6 +1,6 @@ import { InboxOutlined, PlusOutlined, ReloadOutlined, UploadOutlined } from '@ant-design/icons'; import { FormItem } from '@tachybase/components'; -import { Checkbox, DatePicker, useAPIClient, useCompile } from '@nocobase/client'; +import { Checkbox, DatePicker, useAPIClient, useCompile } from '@tachybase/client'; import { Alert, App, Button, Card, Divider, Modal, Space, Spin, Table, Tabs, Upload, UploadProps, message } from 'antd'; import { saveAs } from 'file-saver'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/client/DuplicatorProvider.tsx b/packages/plugins/@nocobase/plugin-backup-restore/src/client/DuplicatorProvider.tsx index 4ea6cb9d1..e5f546b35 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/client/DuplicatorProvider.tsx +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/client/DuplicatorProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions, CurrentAppInfoProvider } from '@nocobase/client'; +import { SchemaComponentOptions, CurrentAppInfoProvider } from '@tachybase/client'; import React, { FC } from 'react'; export const DuplicatorProvider: FC = function (props) { diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/client/index.tsx b/packages/plugins/@nocobase/plugin-backup-restore/src/client/index.tsx index 8ea08dbb2..2d9c5888f 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { BackupAndRestoreList } from './Configuration'; import { DuplicatorProvider } from './DuplicatorProvider'; import { NAMESPACE } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/client/locale/index.ts index 8f2d42f15..fc15d6208 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'backup-restore'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/api.test.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/api.test.ts index 691a6584a..903aa8046 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/api.test.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/api.test.ts @@ -1,4 +1,4 @@ -import { MockServer, waitSecond } from '@nocobase/test'; +import { MockServer, waitSecond } from '@tachybase/test'; import { Dumper } from '../dumper'; import createApp from './index'; @@ -169,7 +169,7 @@ describe('backup files', () => { name: 'test', title: '测试', group: 'custom', - origin:'@nocobase/plugin-collection-manager', + origin: '@nocobase/plugin-collection-manager', }); }); }); diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts index 8cd0772af..e4ed5d28f 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; import fsPromises from 'fs/promises'; import * as os from 'os'; import path from 'path'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts index 4b3952ec2..e1c3f5c23 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import fs from 'fs'; import path from 'path'; import { Dumper } from '../dumper'; @@ -806,7 +806,7 @@ describe('dumper', () => { const dumpableCollections = await dumper.dumpableCollections(); const applicationPlugins = dumpableCollections.find(({ name }) => name === 'applicationPlugins'); - expect(applicationPlugins.origin).toBe('@nocobase/server'); + expect(applicationPlugins.origin).toBe('@tachybase/server'); }); it('should get custom collections group', async () => { diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/index.ts index 83672fccf..fc4247279 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/index.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/index.ts @@ -1,4 +1,4 @@ -import { createMockServer } from '@nocobase/test'; +import { createMockServer } from '@tachybase/test'; export default async function createApp() { const app = await createMockServer({ diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/on-dump.test.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/on-dump.test.ts index aace1da75..52529c571 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/on-dump.test.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/on-dump.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import { Collection, Database } from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import { Collection, Database } from '@tachybase/database'; import createApp from './index'; import { Dumper } from '../dumper'; import { Restorer } from '../restorer'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/app-migrator.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/app-migrator.ts index 49a1eacf1..291537802 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/app-migrator.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/app-migrator.ts @@ -1,5 +1,5 @@ -import { Application } from '@nocobase/server'; -import { applyMixins, AsyncEmitter } from '@nocobase/utils'; +import { Application } from '@tachybase/server'; +import { applyMixins, AsyncEmitter } from '@tachybase/utils'; import crypto from 'crypto'; import EventEmitter from 'events'; import fsPromises from 'fs/promises'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/collection-group-manager.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/collection-group-manager.ts index 40bda315f..f707ff704 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/collection-group-manager.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/collection-group-manager.ts @@ -1,4 +1,4 @@ -import { CollectionGroup } from '@nocobase/database'; +import { CollectionGroup } from '@tachybase/database'; export class CollectionGroupManager { static collectionGroups: CollectionGroup[] = []; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/commands/restore-command.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/commands/restore-command.ts index f8800d80f..e1e51bd20 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/commands/restore-command.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/commands/restore-command.ts @@ -1,6 +1,6 @@ -import { Application, AppSupervisor } from '@nocobase/server'; +import { Application, AppSupervisor } from '@tachybase/server'; import { Restorer } from '../restorer'; -import { DumpRulesGroupType } from '@nocobase/database'; +import { DumpRulesGroupType } from '@tachybase/database'; export default function addRestoreCommand(app: Application) { app diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts index dbcfd373d..2ba5feb75 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts @@ -1,4 +1,8 @@ -import { Collection, CollectionGroupManager as DBCollectionGroupManager, DumpRulesGroupType } from '@nocobase/database'; +import { + Collection, + CollectionGroupManager as DBCollectionGroupManager, + DumpRulesGroupType, +} from '@tachybase/database'; import archiver from 'archiver'; import dayjs from 'dayjs'; import fs from 'fs'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/field-value-writer.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/field-value-writer.ts index 946a679c7..bf5df6f1a 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/field-value-writer.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/field-value-writer.ts @@ -1,4 +1,4 @@ -import { DataTypes, Field } from '@nocobase/database'; +import { DataTypes, Field } from '@tachybase/database'; import lodash from 'lodash'; type WriterFunc = (val: any) => any; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/resourcers/backup-files.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/resourcers/backup-files.ts index e8f5a5bb7..4edfbeb4f 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/resourcers/backup-files.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/resourcers/backup-files.ts @@ -1,12 +1,12 @@ import { Dumper } from '../dumper'; -import { DumpRulesGroupType } from '@nocobase/database'; +import { DumpRulesGroupType } from '@tachybase/database'; import fs from 'fs'; -import { koaMulter as multer } from '@nocobase/utils'; +import { koaMulter as multer } from '@tachybase/utils'; import os from 'os'; import path from 'path'; import fsPromises from 'fs/promises'; import { Restorer } from '../restorer'; -import { DEFAULT_PAGE, DEFAULT_PER_PAGE } from '@nocobase/actions'; +import { DEFAULT_PAGE, DEFAULT_PER_PAGE } from '@tachybase/actions'; export default { name: 'backupFiles', diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/restorer.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/restorer.ts index c545d3600..94ebcf3ac 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/restorer.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/restorer.ts @@ -4,8 +4,8 @@ import fsPromises from 'fs/promises'; import path from 'path'; import { AppMigrator, AppMigratorOptions } from './app-migrator'; import { readLines } from './utils'; -import { Application } from '@nocobase/server'; -import { DataTypes, DumpRulesGroupType } from '@nocobase/database'; +import { Application } from '@tachybase/server'; +import { DataTypes, DumpRulesGroupType } from '@tachybase/database'; import lodash, { isPlainObject } from 'lodash'; import { FieldValueWriter } from './field-value-writer'; import * as Topo from '@hapi/topo'; diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts index 4b75c4908..359386707 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import backupFilesResourcer from './resourcers/backup-files'; export default class PluginBackupRestoreServer extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/utils.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/utils.ts index 4897b33ef..70fc59e84 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/utils.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/utils.ts @@ -1,5 +1,5 @@ import lodash from 'lodash'; -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; import fs from 'fs'; import readline from 'readline'; diff --git a/packages/plugins/@nocobase/plugin-calendar/package.json b/packages/plugins/@nocobase/plugin-calendar/package.json index 6fa7e52e8..ee1880f9b 100644 --- a/packages/plugins/@nocobase/plugin-calendar/package.json +++ b/packages/plugins/@nocobase/plugin-calendar/package.json @@ -32,10 +32,10 @@ "solarlunar-es": "^1.0.9" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "提供日历数据表模板和区块,用于管理日期数据,通常用于事件、约会、任务等与日期/时间相关的信息。", "displayName.zh-CN": "日历", diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/schemaInitializer.test.ts index 8a6f3143f..8851c62a1 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from '@nocobase/test/e2e'; +import { test, expect } from '@tachybase/test/e2e'; import { emptyPageWithCalendarCollection, oneTableWithCalendarCollection } from './templates'; test.describe('where can be added', () => { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/templates.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/templates.ts index 9198108de..6f38d19fd 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/templates.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/__e2e__/templates.ts @@ -1,4 +1,4 @@ -import { PageConfig } from '@nocobase/test/e2e'; +import { PageConfig } from '@tachybase/test/e2e'; const calendarCollection = { name: 'calendar', diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/__tests__/calendar.test.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/__tests__/calendar.test.tsx index ec2538f5e..af0b96d89 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/__tests__/calendar.test.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/__tests__/calendar.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, waitFor } from '@nocobase/test/client'; +import { render, screen, waitFor } from '@tachybase/test/client'; import dayjs from 'dayjs'; import React from 'react'; import App1 from '../calendar/demos/demo1'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.Designer.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.Designer.tsx index b48b97529..a233c8edb 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.Designer.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.Designer.tsx @@ -1,4 +1,4 @@ -import { GeneralSchemaDesigner, useCollection, useSchemaTemplate } from '@nocobase/client'; +import { GeneralSchemaDesigner, useCollection, useSchemaTemplate } from '@tachybase/client'; import React from 'react'; export const CalendarDesigner = () => { const { name, title } = useCollection(); diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.tsx index f9920e1d7..411750560 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calendar.tsx @@ -6,7 +6,7 @@ import { useCollectionParentRecordData, useProps, withDynamicSchemaProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { parseExpression } from 'cron-parser'; import type { Dayjs } from 'dayjs'; import dayjs from 'dayjs'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calender.Settings.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calender.Settings.tsx index 7c8e24f14..896c02ed6 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calender.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Calender.Settings.tsx @@ -14,7 +14,7 @@ import { removeNullCondition, SchemaSettingsTemplate, useCollectionManager_deprecated, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useTranslation } from '../../locale'; import { useCalendarBlockContext } from '../schema-initializer/CalendarBlockProvider'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/DeleteEvent.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/DeleteEvent.tsx index 927dc3b70..38b3a97a3 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/DeleteEvent.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/DeleteEvent.tsx @@ -5,7 +5,7 @@ import React, { useContext, useState } from 'react'; import { createPortal } from 'react-dom'; import { DeleteEventContext } from './Calendar'; import { formatDate } from './utils'; -import { useActionContext, useRecord, useFilterByTk, useBlockRequestContext } from '@nocobase/client'; +import { useActionContext, useRecord, useFilterByTk, useBlockRequestContext } from '@tachybase/client'; import { useTranslation } from '../../locale'; const { Text } = Typography; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Nav.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Nav.tsx index 57b537a41..cc8706ff0 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Nav.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Nav.tsx @@ -4,7 +4,7 @@ import { Button } from 'antd'; import React, { useContext } from 'react'; import { Navigate } from 'react-big-calendar/dist/react-big-calendar.esm'; import { CalendarToolbarContext } from './context'; -import { useDesignable } from '@nocobase/client'; +import { useDesignable } from '@tachybase/client'; export const Nav = observer( () => { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Title.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Title.tsx index c69988a51..f4c5a8815 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Title.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Title.tsx @@ -3,7 +3,7 @@ import { Button } from 'antd'; import React, { useContext, useMemo } from 'react'; import { CalendarToolbarContext } from './context'; import { getLunarDay } from './utils'; -import { useDesignable } from '@nocobase/client'; +import { useDesignable } from '@tachybase/client'; export const Title = observer( () => { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Today.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Today.tsx index 603bd81e4..9efa8fc06 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Today.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/Today.tsx @@ -3,7 +3,7 @@ import { Button } from 'antd'; import React, { useContext } from 'react'; import { Navigate } from 'react-big-calendar/dist/react-big-calendar.esm'; import { CalendarToolbarContext } from './context'; -import { useDesignable } from '@nocobase/client'; +import { useDesignable } from '@tachybase/client'; import { useTranslation } from '../../locale'; export const Today = observer( diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/ViewSelect.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/ViewSelect.tsx index c9cfe4bc0..ea1e7e78d 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/ViewSelect.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/ViewSelect.tsx @@ -2,7 +2,7 @@ import { observer } from '@tachybase/schema'; import { Select } from 'antd'; import React, { useContext } from 'react'; import { CalendarToolbarContext } from './context'; -import { useDesignable } from '@nocobase/client'; +import { useDesignable } from '@tachybase/client'; export const ViewSelect = observer( (props) => { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo1.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo1.tsx index 227650c1d..3a6e5c32b 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo1.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo1.tsx @@ -7,7 +7,7 @@ import { AntdSchemaComponentProvider, SchemaComponent, SchemaComponentProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import defaultValues from './defaultValues'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo2.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo2.tsx index 870548377..1ddb670ce 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo2.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/demos/demo2.tsx @@ -8,7 +8,7 @@ import { SchemaComponent, SchemaComponentProvider, ExtendCollectionsProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import MockAdapter from 'axios-mock-adapter'; import React from 'react'; import collections from './collections'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/index.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/index.ts index b5ddca3e5..85b13414c 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/index.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/index.ts @@ -1,4 +1,4 @@ -import { ActionBar } from '@nocobase/client'; +import { ActionBar } from '@tachybase/client'; import { Calendar } from './Calendar'; import { CalendarDesigner } from './Calendar.Designer'; import DeleteEvent from './DeleteEvent'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/style.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/style.ts index 26b950927..df553b72b 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/style.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/style.ts @@ -1,4 +1,4 @@ -import { genStyleHook } from '@nocobase/client'; +import { genStyleHook } from '@tachybase/client'; export default genStyleHook('nb-calendar', (token) => { const { componentCls } = token; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/collection-templates/calendar.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/collection-templates/calendar.tsx index fcf335499..be58c103e 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/collection-templates/calendar.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/collection-templates/calendar.tsx @@ -1,4 +1,4 @@ -import { CollectionTemplate, ICollectionTemplate, getConfigurableProperties } from '@nocobase/client'; +import { CollectionTemplate, ICollectionTemplate, getConfigurableProperties } from '@tachybase/client'; import { generateNTemplate } from '../../locale'; export const calendar: ICollectionTemplate = { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/hooks/useCalendarBlockDecoratorProps.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/hooks/useCalendarBlockDecoratorProps.ts index 7e29575ec..9e5de08c9 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/hooks/useCalendarBlockDecoratorProps.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/hooks/useCalendarBlockDecoratorProps.ts @@ -1,4 +1,4 @@ -import { useParentRecordCommon } from '@nocobase/client'; +import { useParentRecordCommon } from '@tachybase/client'; import { useCalendarBlockParams } from './useCalendarBlockParams'; export function useCalendarBlockDecoratorProps(props) { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/index.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/index.tsx index bf19d1cf5..8ede82f29 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { generateNTemplate } from '../locale'; import { CalendarV2 } from './calendar'; import { calendarBlockSettings } from './calendar/Calender.Settings'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/CalendarBlockProvider.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/CalendarBlockProvider.tsx index 095cb33b5..b41906d80 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/CalendarBlockProvider.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/CalendarBlockProvider.tsx @@ -6,7 +6,7 @@ import { useBlockRequestContext, useParsedFilter, withDynamicSchemaProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import _ from 'lodash'; import React, { createContext, useContext, useEffect, useMemo } from 'react'; import { useCalendarBlockParams } from '../hooks/useCalendarBlockParams'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarActionInitializers.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarActionInitializers.tsx index 23df1f694..11b1c46e7 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarActionInitializers.tsx @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, useCollection_deprecated } from '@nocobase/client'; +import { CompatibleSchemaInitializer, useCollection_deprecated } from '@tachybase/client'; import { generateNTemplate } from '../../../locale'; /** diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx index 631456477..5e179c1de 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializer, SchemaInitializerItemType, useCollection_deprecated } from '@nocobase/client'; +import { SchemaInitializer, SchemaInitializerItemType, useCollection_deprecated } from '@tachybase/client'; import { generateNTemplate } from '../../../locale'; export const deleteEventActionInitializer: SchemaInitializerItemType = { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/CalendarBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/CalendarBlockInitializer.tsx index 6f84e13cd..d037aabf0 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/CalendarBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/CalendarBlockInitializer.tsx @@ -12,7 +12,7 @@ import { useGlobalTheme, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useContext } from 'react'; import { createCalendarBlockUISchema } from '../createCalendarBlockUISchema'; import { useTranslation } from '../../../locale'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/RecordAssociationCalendarBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/RecordAssociationCalendarBlockInitializer.tsx index cd02d0cbb..a61435e2c 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/RecordAssociationCalendarBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/RecordAssociationCalendarBlockInitializer.tsx @@ -14,7 +14,7 @@ import { useSchemaInitializerItem, useSchemaInitializer, SchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { createCalendarBlockUISchema } from '../createCalendarBlockUISchema'; import { useTranslation } from '../../../locale'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/locale/index.ts b/packages/plugins/@nocobase/plugin-calendar/src/locale/index.ts index 863344e28..7f0d06d93 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation as useT } from 'react-i18next'; export const NAMESPACE = 'calendar'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/server/server.ts b/packages/plugins/@nocobase/plugin-calendar/src/server/server.ts index 907c44bc6..f2f0685cb 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/server/server.ts @@ -1,3 +1,3 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; export default class PluginCalendarServer extends Plugin {} diff --git a/packages/plugins/@nocobase/plugin-cas/package.json b/packages/plugins/@nocobase/plugin-cas/package.json index b5a5bace7..f38a6e20a 100644 --- a/packages/plugins/@nocobase/plugin-cas/package.json +++ b/packages/plugins/@nocobase/plugin-cas/package.json @@ -16,14 +16,14 @@ "react-router-dom": "6.x" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/auth": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-auth": "workspace:*", - "@nocobase/sdk": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/auth": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/sdk": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "通过 CAS 协议认证身份。", "displayName.zh-CN": "认证:CAS", diff --git a/packages/plugins/@nocobase/plugin-cas/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/Options.tsx index 5baf24705..975b21c80 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/client/Options.tsx +++ b/packages/plugins/@nocobase/plugin-cas/src/client/Options.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { Space } from 'antd'; import { useAuthTranslation, generateNTemplate } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-cas/src/client/SigninPage.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/SigninPage.tsx index d38aae335..e8f3b5b9e 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/client/SigninPage.tsx +++ b/packages/plugins/@nocobase/plugin-cas/src/client/SigninPage.tsx @@ -1,7 +1,7 @@ import { LoginOutlined } from '@ant-design/icons'; -import { useApp } from '@nocobase/client'; +import { useApp } from '@tachybase/client'; import { Authenticator } from '@nocobase/plugin-auth/client'; -import { getSubAppName } from '@nocobase/sdk'; +import { getSubAppName } from '@tachybase/sdk'; import { Button, Space, message } from 'antd'; import React, { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; diff --git a/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx index bf5cb1e8e..72a242a6f 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { SigninPage } from './SigninPage'; import { Options } from './Options'; import { authType } from '../constants'; diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts index d35df9ca2..98fcf924f 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts +++ b/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; import { CASAuth } from '../auth'; export const login = async (ctx: Context, next: Next) => { diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts index ae811ddb9..76e1ad571 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts +++ b/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { AppSupervisor } from '@nocobase/server'; +import { Context, Next } from '@tachybase/actions'; +import { AppSupervisor } from '@tachybase/server'; import { CASAuth } from '../auth'; export const service = async (ctx: Context, next: Next) => { diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts b/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts index 8beeef0b4..7b328d87d 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts +++ b/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts @@ -1,6 +1,6 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; +import { AuthConfig, BaseAuth } from '@tachybase/auth'; import { AuthModel } from '@nocobase/plugin-auth'; -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; import axios from 'axios'; export class CASAuth extends BaseAuth { diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts index 21fc26938..d87034d97 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { service } from './actions/service'; import { authType } from '../constants'; import { CASAuth } from './auth'; diff --git a/packages/plugins/@nocobase/plugin-china-region/build.config.ts b/packages/plugins/@nocobase/plugin-china-region/build.config.ts index 0191a008f..83f8f6f41 100644 --- a/packages/plugins/@nocobase/plugin-china-region/build.config.ts +++ b/packages/plugins/@nocobase/plugin-china-region/build.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from '@nocobase/build'; +import { defineConfig } from '@tachybase/build'; import fs from 'fs/promises'; import path from 'path'; diff --git a/packages/plugins/@nocobase/plugin-china-region/package.json b/packages/plugins/@nocobase/plugin-china-region/package.json index 6897971ed..7cd1cb24c 100644 --- a/packages/plugins/@nocobase/plugin-china-region/package.json +++ b/packages/plugins/@nocobase/plugin-china-region/package.json @@ -16,10 +16,10 @@ "cross-spawn": "^7.0.3" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "提供中国行政区划数据和字段类型。", "displayName.zh-CN": "中国行政区划", diff --git a/packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx b/packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx index 576977a4a..06e45db49 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx +++ b/packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx @@ -1,6 +1,6 @@ import { ArrayField } from '@tachybase/schema'; import { useField } from '@tachybase/schema'; -import { useAPIClient, useRequest } from '@nocobase/client'; +import { useAPIClient, useRequest } from '@tachybase/client'; export const useChinaRegionDataSource = (options) => { const field = useField(); diff --git a/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx b/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx index dfd369179..5f72dde29 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { useChinaRegionDataSource, useChinaRegionLoadData } from './ChinaRegionProvider'; export class ChinaRegionPlugin extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts index 8d01f1f6d..7083e737a 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts +++ b/packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; describe('actions test', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts b/packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts index d84ead5cc..edd88ff19 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts +++ b/packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'skipped', diff --git a/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts b/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts index 49cb059d7..c50efddb9 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { resolve } from 'path'; function getChinaDivisionData(key: string) { diff --git a/packages/plugins/@nocobase/plugin-client/build.config.ts b/packages/plugins/@nocobase/plugin-client/build.config.ts index 9eae7c54c..322d8cf79 100644 --- a/packages/plugins/@nocobase/plugin-client/build.config.ts +++ b/packages/plugins/@nocobase/plugin-client/build.config.ts @@ -1,10 +1,10 @@ import fs from 'fs/promises'; import path from 'path'; -import { defineConfig } from '@nocobase/build'; +import { defineConfig } from '@tachybase/build'; const existsSync = require('fs').existsSync; -const client = path.dirname(require.resolve('@nocobase/client/package.json')); +const client = path.dirname(require.resolve('@tachybase/client/package.json')); const antd = require.resolve('antd'); export default defineConfig({ diff --git a/packages/plugins/@nocobase/plugin-client/package.json b/packages/plugins/@nocobase/plugin-client/package.json index dfa528551..08a3650e5 100644 --- a/packages/plugins/@nocobase/plugin-client/package.json +++ b/packages/plugins/@nocobase/plugin-client/package.json @@ -12,11 +12,11 @@ "koa-static": "^5.0.0" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "为 NocoBase 服务端提供客户端界面", "displayName.zh-CN": "WEB 客户端", diff --git a/packages/plugins/@nocobase/plugin-client/src/client/index.ts b/packages/plugins/@nocobase/plugin-client/src/client/index.ts index 110db2de1..0be0a4acf 100644 --- a/packages/plugins/@nocobase/plugin-client/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-client/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; class ClientPlugin extends Plugin { async load() {} diff --git a/packages/plugins/@nocobase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts b/packages/plugins/@nocobase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts index d2207c772..042967a2c 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts @@ -1,4 +1,4 @@ -import { MockServer, createMockServer } from '@nocobase/test'; +import { MockServer, createMockServer } from '@tachybase/test'; import Migration from '../migrations/20231215215247-admin-menu-uid'; describe('nocobase-admin-menu', () => { diff --git a/packages/plugins/@nocobase/plugin-client/src/server/antd.ts b/packages/plugins/@nocobase/plugin-client/src/server/antd.ts index 190c249d5..09b74f978 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/antd.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/antd.ts @@ -1,4 +1,4 @@ -import { requireModule } from '@nocobase/utils'; +import { requireModule } from '@tachybase/utils'; import { resolve } from 'path'; export const getAntdLocale = (lang) => { diff --git a/packages/plugins/@nocobase/plugin-client/src/server/cron.ts b/packages/plugins/@nocobase/plugin-client/src/server/cron.ts index cf6fcd8f2..95ac4a2a5 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/cron.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/cron.ts @@ -1,11 +1,11 @@ -import { requireModule } from '@nocobase/utils'; +import { requireModule } from '@tachybase/utils'; import { resolve } from 'path'; export const getCronLocale = (lang: string) => { const lng = lang.replace('-', '_'); const files = [resolve(__dirname, `./../locale/cron/${lng}`)]; if (process.env.APP_ENV !== 'production') { - files.push(`@nocobase/client/src/locale/cron/${lng}`, `@nocobase/client/lib/locale/cron/${lng}`); + files.push(`@tachybase/client/src/locale/cron/${lng}`, `@tachybase/client/lib/locale/cron/${lng}`); } for (const file of files) { try { diff --git a/packages/plugins/@nocobase/plugin-client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts b/packages/plugins/@nocobase/plugin-client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts index 76dd9dbc3..3e8ec57cf 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts @@ -1,5 +1,5 @@ -import { Model } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Model } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.14.0-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts b/packages/plugins/@nocobase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts index 26fec6981..da08ad80a 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts @@ -1,5 +1,5 @@ -import { Model } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Model } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.17.0-alpha.8'; diff --git a/packages/plugins/@nocobase/plugin-client/src/server/server.ts b/packages/plugins/@nocobase/plugin-client/src/server/server.ts index e32c07126..d118e1d8f 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/server.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { getAntdLocale } from './antd'; import { getCronLocale } from './cron'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/package.json b/packages/plugins/@nocobase/plugin-collection-manager/package.json index da8d5795d..0102e1866 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-collection-manager/package.json @@ -18,13 +18,13 @@ "toposort": "^2.0.2" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-error-handler": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。", "displayName.zh-CN": "数据源:主数据库", diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/calendar.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/calendar.test.ts index 5b0450516..b6365da20 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/calendar.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/calendar.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { uid } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { uid } from '@tachybase/utils'; import { CollectionManagerPage } from '../utils'; test.describe('create collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts index 75aa786d6..9a94e680a 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts @@ -1,4 +1,4 @@ -import { test } from '@nocobase/test/e2e'; +import { test } from '@tachybase/test/e2e'; test.describe('create collection', () => {}); diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/expression.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/expression.test.ts index 293e483dc..40fbfd891 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/expression.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/expression.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { uid } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { uid } from '@tachybase/utils'; import { CollectionManagerPage } from '../utils'; test.describe('create collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/file.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/file.test.ts index ae08d7a93..9d19d5263 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/file.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/file.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { uid } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { uid } from '@tachybase/utils'; import { CollectionManagerPage } from '../utils'; test.describe('create collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts index f02855456..6f62a69a1 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { uid } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { uid } from '@tachybase/utils'; import { CollectionManagerPage, FieldInterface } from '../utils'; test.describe('create collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/sql.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/sql.test.ts index c39b99f6d..60f6af852 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/sql.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/sql.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { uid } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { uid } from '@tachybase/utils'; import { CollectionManagerPage } from '../utils'; test.describe('create collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/tree.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/tree.test.ts index 7e7220b83..c765175b1 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/tree.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/tree.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { uid } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { uid } from '@tachybase/utils'; import { CollectionManagerPage } from '../utils'; test.describe('create collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts index c5d23c6e1..a722707ac 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndMediaFields, test } from '@nocobase/test/e2e'; +import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndMediaFields, test } from '@tachybase/test/e2e'; test.describe('form item & create form', () => { test('configure fields', async ({ page, mockPage }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaSettings.test.ts index d6fc5b61e..73a11c612 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndMediaFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts index dd3f791ac..829010481 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts @@ -2,7 +2,7 @@ import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('form item & create form', () => { test('configure fields', async ({ page, mockPage, mockRecords }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts index 4441b392a..3302c2aec 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts @@ -5,7 +5,7 @@ import { oneFilterFormBlockWithAllAssociationFields, oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts index ab83df419..78d74c0bf 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts @@ -1,4 +1,8 @@ -import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, test } from '@nocobase/test/e2e'; +import { + expectInitializerMenu, + oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, + test, +} from '@tachybase/test/e2e'; test.describe('form item & create form', () => { test('configure fields', async ({ page, mockPage }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts index 9d78cd0f4..195e84b29 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts index 4e6be001e..7289f13bc 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts index d8714d745..d328741b2 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaInitializer.test.ts index 90ceb02b6..4660312e4 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaInitializer.test.ts @@ -2,7 +2,7 @@ import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('form item & create form', () => { test('configure fields', async ({ page, mockPage }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaSettings.test.ts index bc1c762e8..147deb5ab 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@nocobase/test/e2e'; +import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaInitializer.test.ts index 363c198af..17a8d3d68 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test } from '@nocobase/test/e2e'; +import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test } from '@tachybase/test/e2e'; test.describe('form item & create form', () => { test('configure fields', async ({ page, mockPage }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaSettings.test.ts index 5bbb8fa95..1ad087aa3 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { clickDeleteAndOk, createColumnItem, diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts index cc3df5e70..3e8cb8178 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts @@ -2,7 +2,7 @@ import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('form item & create form', () => { test('configure fields', async ({ page, mockPage }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts index 1cd598d64..4296362d9 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts index 5051d3650..9a968577f 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts index 1ef8819d9..bf145daf1 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts @@ -2,7 +2,7 @@ import { expectInitializerMenu, oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; test.describe('form item & create form', () => { test('configure fields', async ({ page, mockPage }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaSettings.test.ts index 03ab2303c..da729fd1f 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import dayjs from 'dayjs'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaSettings.test.ts index 09720079a..21171cd07 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaSettings.test.ts index 45c6d24ea..0809f1416 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@nocobase/test/e2e'; +import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts index 3a5ecb875..0951c0ce0 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts @@ -5,7 +5,7 @@ import { oneFilterFormBlockWithAllAssociationFields, oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaSettings.test.ts index 0249e9ee6..405624da5 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaSettings.test.ts index 8261228fe..287aa6732 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaSettings.test.ts index 340141b4c..f9851b09f 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaSettings.test.ts index 8f6d2d9f6..e03e591fe 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@nocobase/test/e2e'; +import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts index 15a97a8ae..7b679a59a 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts @@ -1,4 +1,8 @@ -import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, test } from '@nocobase/test/e2e'; +import { + expectSettingsMenu, + oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, + test, +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts index c6233df45..19b72315d 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaSettings.test.ts index 76af85435..7ab7ae86f 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings.test.ts index 87b53d701..fb96c3312 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings.test.ts @@ -5,7 +5,7 @@ import { oneFilterFormBlockWithAllAssociationFields, oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts index 88d118338..c68f9b364 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts @@ -5,7 +5,7 @@ import { oneFilterFormBlockWithAllAssociationFields, oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; import { T3377 } from './templatesOfBug'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts index 5e9fa3af1..bf1db3023 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts @@ -1,4 +1,4 @@ -import { PageConfig, generalWithAssociation } from '@nocobase/test/e2e'; +import { PageConfig, generalWithAssociation } from '@tachybase/test/e2e'; export const T3377: PageConfig = { collections: generalWithAssociation, diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaSettings.test.ts index 5380877c8..4cd9ce436 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaSettings.test.ts @@ -3,7 +3,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndMediaFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts index 009d77683..b1e676638 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaSettings.test.ts index 53e4f53a0..8c81f1712 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts index b162e858e..386590b2f 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts @@ -5,7 +5,7 @@ import { oneFilterFormBlockWithAllAssociationFields, oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaSettings.test.ts index 7ca0bc4d4..de92aef22 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaSettings.test.ts index 094dc8507..077e76785 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaSettings.test.ts index c28f32e6e..c43d482f0 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts index 564012ac8..db646883b 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaSettings.test.ts index d4293ce27..329966842 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaSettings.test.ts @@ -3,7 +3,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndMediaFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaSettings.test.ts index 29900fe72..f66ab6c2b 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@nocobase/test/e2e'; +import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields, test } from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts index 6a10e6b98..869ac9c1a 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts @@ -5,7 +5,7 @@ import { oneTableBlockWithAddNewAndViewAndEditAndBasicFields, oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern, testSetValidationRules } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts index a29de03af..1f0f8d067 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndChoicesFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts index 4c1c80b1c..3a17ec6f9 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaInitializer.test.ts index 2d3f41aef..e296a6d7a 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaInitializer.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaInitializer.test.ts @@ -1,4 +1,4 @@ -import { test } from '@nocobase/test/e2e'; +import { test } from '@tachybase/test/e2e'; test('form item & create form', async ({ page, mockPage }) => {}); diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaSettings.test.ts index 07c9b97bb..30514f734 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import dayjs from 'dayjs'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts index de10b8c27..cbceb323e 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts @@ -4,7 +4,7 @@ import { expectSettingsMenu, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, test, -} from '@nocobase/test/e2e'; +} from '@tachybase/test/e2e'; import { createColumnItem, showSettingsMenu, testDefaultValue, testPattern } from '../../utils'; test.describe('form item & create form', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/utils.ts index 97b646c26..1c5a42ea8 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { Page, expect } from '@nocobase/test/e2e'; +import { Page, expect } from '@tachybase/test/e2e'; export async function showSettingsMenu(page: Page, fieldName: string) { await page.getByRole('columnheader', { name: fieldName, exact: true }).hover(); diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts index 3913f2beb..cb9145281 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; class CollectionManagerPlugin extends Plugin { async load() {} diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts index cb636a32f..192fa3cbc 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { createApp } from '.'; describe('action test', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts index eaaf0004e..4aa20279c 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; describe('reference integrity check', () => { let db: Database; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts index 30542685c..825d01667 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '.'; describe('collections repository', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts index 90652520b..8d8173adb 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from './index'; describe('Collection categories', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-without-id-primary-field.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-without-id-primary-field.test.ts index b43d510f6..477ddf8c0 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-without-id-primary-field.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-without-id-primary-field.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from './index'; describe.skipIf(process.env['DB_DIALECT'] === 'sqlite')('collection without id primary key', function () { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts index ddc84a0fc..ffb79be46 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection, CollectionGroupManager, HasManyRepository } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection, CollectionGroupManager, HasManyRepository } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '.'; import CollectionManagerPlugin, { CollectionRepository } from '../index'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts index 1196a05a4..a350798d2 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts @@ -1,6 +1,6 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '..'; -import { Collection } from '@nocobase/database'; +import { Collection } from '@tachybase/database'; describe('field defaultValue', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts index 9cdeef2ea..e8d6e50ed 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '..'; describe('field indexes', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts index c90578855..f2d2bfa94 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection, StringFieldOptions } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection, StringFieldOptions } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '.'; describe('recreate field', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts index 8301bffe2..d01addc15 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '..'; describe('belongsToMany', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongsTo.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongsTo.test.ts index 049698a0d..2a773a4b5 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongsTo.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongsTo.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '..'; import { CollectionRepository } from '../../index'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts index c9aa7b4dd..0cdf7c643 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '..'; describe('destroy', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts index 8e2f75b9c..81ca26977 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '..'; describe('hasMany field options', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts index 9b31f5264..c080f47a7 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '..'; describe('hasOne field options', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts index 4a46119bf..71b5eb3c5 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { createApp } from '..'; describe('reverseField options', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts index d17e4c7db..25d64d451 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '..'; describe('uuid', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts index c257d7be0..cd4bc7fe1 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '..'; describe('collections repository', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts index d211541e0..f5686ade1 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '..'; describe('collections repository', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts index c1db34cf0..3935ade2d 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { createApp } from '../index'; describe('find with association', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/has-many.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/has-many.test.ts index 272506e2a..91e41ca44 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/has-many.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/has-many.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '../index'; describe('collections repository', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts index b4a367bcc..5cd25090c 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts @@ -1,4 +1,4 @@ -import { MockServer, pgOnly } from '@nocobase/test'; +import { MockServer, pgOnly } from '@tachybase/test'; import { createApp } from '..'; pgOnly()('Inherited Collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts index f1ffff2e9..b2f4e835c 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '../index'; describe('recreate field', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts index fd454d7c7..654c40b38 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import { Database } from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import { Database } from '@tachybase/database'; import { createApp } from '../index'; describe('tree', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts index d66f22cae..c61e2ae8a 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts @@ -1,6 +1,6 @@ -import { Database, DataTypes, Field, Repository } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; -import { uid } from '@nocobase/utils'; +import { Database, DataTypes, Field, Repository } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; +import { uid } from '@tachybase/utils'; import { createApp } from '../index'; describe('view collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts index e9ebbef2b..20bef098c 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts @@ -1,4 +1,4 @@ -import { createMockServer } from '@nocobase/test'; +import { createMockServer } from '@tachybase/test'; export async function createApp(options: any = {}) { const app = await createMockServer({ diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts index 6a98942f6..7af7aa77d 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts @@ -3,9 +3,9 @@ import Database, { BelongsToRepository, HasManyRepository, Repository, -} from '@nocobase/database'; -import Application from '@nocobase/server'; -import { pgOnly } from '@nocobase/test'; +} from '@tachybase/database'; +import Application from '@tachybase/server'; +import { pgOnly } from '@tachybase/test'; import { createApp } from '..'; pgOnly()('Inherited Collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts index ec3428428..eff8282a6 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts @@ -1,7 +1,7 @@ -import Database, { Repository } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Repository } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '..'; -import { pgOnly } from '@nocobase/test'; +import { pgOnly } from '@tachybase/test'; pgOnly()('Inherited Collection with schema options', () => { let db: Database; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts index 2cd757ce0..71ea51f1a 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts @@ -1,7 +1,7 @@ -import { Database, MigrationContext } from '@nocobase/database'; +import { Database, MigrationContext } from '@tachybase/database'; import UpdateCollectionsHiddenMigration from '../../migrations/20221104151410-update-collections-hidden'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '../index'; describe('migration 20221104151410-update-collections-hidden test', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts index c884c4429..3521f20f5 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts @@ -1,6 +1,6 @@ -import { Database, MigrationContext } from '@nocobase/database'; -import { Plugin } from '@nocobase/server'; -import { MockServer } from '@nocobase/test'; +import { Database, MigrationContext } from '@tachybase/database'; +import { Plugin } from '@tachybase/server'; +import { MockServer } from '@tachybase/test'; import Migrator from '../../migrations/20230225111112-drop-ui-schema-relation'; import { createApp } from '../index'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/set-collection-schema.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/set-collection-schema.test.ts index 6e7d361be..35142c21e 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/set-collection-schema.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/set-collection-schema.test.ts @@ -1,5 +1,5 @@ -import { Database, MigrationContext } from '@nocobase/database'; -import { MockServer, pgOnly } from '@nocobase/test'; +import { Database, MigrationContext } from '@tachybase/database'; +import { MockServer, pgOnly } from '@tachybase/test'; import Migrator from '../../migrations/20230918024546-set-collection-schema'; import { createApp } from '../index'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts index db1a29105..9cc2e3e0e 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts @@ -1,7 +1,7 @@ -import { Database, MigrationContext } from '@nocobase/database'; +import { Database, MigrationContext } from '@tachybase/database'; import lodash from 'lodash'; import Migrator from '../../migrations/20221121111113-update-id-to-bigint'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '../index'; const excludeSqlite = () => (process.env.DB_DIALECT != 'sqlite' ? describe.skip : describe.skip); diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/primary-key.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/primary-key.test.ts index 4984eefed..79472ef85 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/primary-key.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/primary-key.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { createApp } from './index'; describe('primary key test', function () { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts index 416360069..9a67b82c9 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from './index'; describe('reference integrity check', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts index a00f5af25..e42d64226 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '.'; describe('collections repository', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts index 9449c57e0..3ed7a5564 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts @@ -1,4 +1,4 @@ -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import { createApp } from '..'; describe('collections.fields', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts index cb1cd8da8..aa2734134 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts @@ -1,5 +1,5 @@ -import { HasManyRepository } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { HasManyRepository } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { createApp } from '..'; describe('collections', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts index b6152a922..ed7f11334 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import Application from '@nocobase/server'; +import Database from '@tachybase/database'; +import Application from '@tachybase/server'; import { createApp } from '.'; describe('sync collection', () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts index e1301412d..9f1f89922 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts @@ -1,4 +1,4 @@ -import { createMockServer, startMockServer } from '@nocobase/test'; +import { createMockServer, startMockServer } from '@tachybase/test'; describe('collections repository', () => { it('case 1', async () => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts index 223dad029..206496853 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts @@ -1,6 +1,6 @@ -import Database, { Repository, ViewCollection, ViewFieldInference } from '@nocobase/database'; -import Application from '@nocobase/server'; -import { uid } from '@nocobase/utils'; +import Database, { Repository, ViewCollection, ViewFieldInference } from '@tachybase/database'; +import Application from '@tachybase/server'; +import { uid } from '@tachybase/utils'; import { createApp } from '../index'; describe('view collection', function () { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts index 3f415cdb0..a4b35f7ee 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts index 9375202d3..2df74d749 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts index 4bf585ba7..a2c0e8ae9 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts index c2c69ce0b..8cfb02197 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts @@ -1,4 +1,4 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; export function afterCreateForForeignKeyField(db: Database) { function generateFkOptions(collectionName: string, foreignKey: string) { @@ -189,6 +189,8 @@ export function afterCreateForForeignKeyField(db: Database) { return async (model, options) => { try { await hook(model, options); - } catch (error) {} + } catch (error) { + /* empty */ + } }; } diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts index 61005a8fb..076da5ffa 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts @@ -1,4 +1,4 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; export function afterCreateForReverseField(db: Database) { return async (model, { transaction }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts index fb55d7b17..6077229c7 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts @@ -1,4 +1,4 @@ -import Database, { FindOneOptions, FindOptions, Model, Transaction } from '@nocobase/database'; +import Database, { FindOneOptions, FindOptions, Model, Transaction } from '@tachybase/database'; async function destroyFields(db: Database, transaction: Transaction, fieldRecords: Model[]) { const fieldsRepo = db.getRepository('fields'); diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts index b9258610d..cd6530aff 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts @@ -1,4 +1,4 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; export function beforeCreateForChildrenCollection(db: Database) { return async (model, { transaction, context }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts index cef3bb32f..152dcf73d 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts @@ -1,4 +1,4 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; export function beforeCreateForReverseField(db: Database) { return async (model, { transaction }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForValidateField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForValidateField.ts index f9f5a1080..32f4ab334 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForValidateField.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForValidateField.ts @@ -1,4 +1,4 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; export function beforeCreateForValidateField(db: Database) { return async (model, { transaction }) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts index 6cd094dc6..669d89da8 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts @@ -1,4 +1,4 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; export function beforeCreateForViewCollection(db: Database) { return async (model, { transaction, context }) => {}; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts index 7054a27bd..39e8defa0 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts @@ -1,4 +1,4 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; export function beforeDestroyForeignKey(db: Database) { return async (model, opts) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts index eaf68b111..fe9cc71c5 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts @@ -1,5 +1,5 @@ -import Database, { Model } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; +import Database, { Model } from '@tachybase/database'; +import { uid } from '@tachybase/utils'; import { Utils } from 'sequelize'; const setTargetKey = (db: Database, model: Model) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts index 179930bfd..d6d73b5e5 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<=0.7.0-alpha.83'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts index c2d92aa9b..907ca7818 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<=0.7.1-alpha.7'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts index 919801879..56c42bd07 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { afterCreateForForeignKeyField } from '../hooks/afterCreateForForeignKeyField'; export default class DropForeignKeysMigration extends Migration { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts index 23de58202..08c97fcfe 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class UpdateCollectionsHiddenMigration extends Migration { appVersion = '<0.8.0-alpha.11'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts index a484cf77d..edf0c3d10 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts @@ -1,5 +1,5 @@ -import { DataTypes } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { DataTypes } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class UpdateIdToBigIntMigrator extends Migration { appVersion = '<0.8.1-alpha.2'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts index 2e6d6c5b9..2ed909f07 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts @@ -1,5 +1,5 @@ -import { DataTypes } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { DataTypes } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class UpdateIdToBigIntMigrator extends Migration { appVersion = '<0.8.1-alpha.2'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts index 2f29b830d..ec03ff7f9 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.8.1-alpha.2'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts index 482417d1e..0d5f540a9 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts @@ -1,5 +1,5 @@ -import { Collection } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Collection } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; import { FieldModel } from '../models'; export default class extends Migration { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts index 6efbc3e93..4f7f2eb2e 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts @@ -1,5 +1,5 @@ -import { Collection } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Collection } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; import { FieldModel } from '../models'; export default class extends Migration { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts index f6b4cdce7..d121fcf6f 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts @@ -1,5 +1,5 @@ -import { Collection } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Collection } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; import { FieldModel } from '../models'; import _ from 'lodash'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts index 5136020ed..c64380044 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import _ from 'lodash'; export default class extends Migration { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230918024546-set-collection-schema.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230918024546-set-collection-schema.ts index b4165d675..90510c354 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230918024546-set-collection-schema.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230918024546-set-collection-schema.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.14.0-alpha.4'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240220153103-install-main-datasource.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240220153103-install-main-datasource.ts index 281368bc1..c38e07d14 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240220153103-install-main-datasource.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240220153103-install-main-datasource.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts index 9caf1c637..228399160 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts @@ -1,4 +1,4 @@ -import Database, { Collection, MagicAttributeModel, SyncOptions, Transactionable } from '@nocobase/database'; +import Database, { Collection, MagicAttributeModel, SyncOptions, Transactionable } from '@tachybase/database'; import lodash from 'lodash'; import { QueryInterfaceDropTableOptions } from 'sequelize'; import { FieldModel } from './field'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts index cae0b64b0..0ab4db324 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts @@ -1,4 +1,4 @@ -import Database, { Collection, MagicAttributeModel, SyncOptions, Transactionable } from '@nocobase/database'; +import Database, { Collection, MagicAttributeModel, SyncOptions, Transactionable } from '@tachybase/database'; interface LoadOptions extends Transactionable { // TODO diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts index 1ffcf0d5a..5a45965fc 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts @@ -1,6 +1,6 @@ -import { Repository } from '@nocobase/database'; -import { Application } from '@nocobase/server'; -import { CollectionsGraph } from '@nocobase/utils'; +import { Repository } from '@tachybase/database'; +import { Application } from '@tachybase/server'; +import { CollectionsGraph } from '@tachybase/utils'; import lodash from 'lodash'; import { CollectionModel } from '../models/collection'; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts index 67faa908e..bd571d927 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts @@ -1,4 +1,4 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; export default { async ['collections:setFields'](ctx, next) { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/sql.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/sql.ts index 8126bf63b..3e84d27a4 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/sql.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/sql.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { SQLModel, SqlCollection } from '@nocobase/database'; +import { Context, Next } from '@tachybase/actions'; +import { SQLModel, SqlCollection } from '@tachybase/database'; import { CollectionModel } from '../models'; const updateCollection = async (ctx: Context, transaction: any) => { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts index ea0294127..db115f87a 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts @@ -1,4 +1,4 @@ -import { Database, ViewFieldInference } from '@nocobase/database'; +import { Database, ViewFieldInference } from '@tachybase/database'; export default { name: 'dbViews', diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts index 2fea0b6ad..cd17c1e1e 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts @@ -1,6 +1,6 @@ -import { Filter, InheritedCollection, UniqueConstraintError } from '@nocobase/database'; +import { Filter, InheritedCollection, UniqueConstraintError } from '@tachybase/database'; import PluginErrorHandler from '@nocobase/plugin-error-handler'; -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { Mutex } from 'async-mutex'; import lodash from 'lodash'; import path from 'path'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/package.json b/packages/plugins/@nocobase/plugin-custom-request/package.json index b27eb1e32..e6ea89934 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/package.json +++ b/packages/plugins/@nocobase/plugin-custom-request/package.json @@ -18,15 +18,15 @@ "react-router-dom": "6.x" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/evaluators": "workspace:*", - "@nocobase/logger": "workspace:*", - "@nocobase/sdk": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/evaluators": "workspace:*", + "@tachybase/logger": "workspace:*", + "@tachybase/sdk": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "向任意 HTTP 服务发送请求,支持将上下文数据发送给目标服务。", "displayName.zh-CN": "操作:自定义请求", diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/__e2e__/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-custom-request/src/client/__e2e__/schemaSettings.test.ts index bb4a46bc2..2a1c07fa4 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/__e2e__/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { test, expect, oneEmptyTable } from '@nocobase/test/e2e'; +import { test, expect, oneEmptyTable } from '@tachybase/test/e2e'; test('edit button', async ({ page, mockPage, mockRecord }) => { await mockPage(oneEmptyTable).goto(); diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestAction.tsx b/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestAction.tsx index 9ffe98e7f..9b042cb68 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestAction.tsx +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestAction.tsx @@ -1,4 +1,4 @@ -import { Action, useAPIClient, useRequest } from '@nocobase/client'; +import { Action, useAPIClient, useRequest } from '@tachybase/client'; import React from 'react'; import { useFieldSchema } from '@tachybase/schema'; import { listByCurrentRoleUrl } from '../constants'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestActionDesigner.tsx b/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestActionDesigner.tsx index 1895de1c7..a889069cb 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestActionDesigner.tsx +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/components/CustomRequestActionDesigner.tsx @@ -7,7 +7,7 @@ import { actionSettingsItems, useCollection_deprecated, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import { App } from 'antd'; import React from 'react'; import { listByCurrentRoleUrl } from '../constants'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestVariableOptions.ts b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestVariableOptions.ts index 8cb279581..01782e973 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestVariableOptions.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestVariableOptions.ts @@ -1,4 +1,4 @@ -import { useCollection_deprecated, useCollectionFilterOptions, useCompile } from '@nocobase/client'; +import { useCollection_deprecated, useCollectionFilterOptions, useCompile } from '@tachybase/client'; import { useMemo } from 'react'; import { useTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestsResource.ts b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestsResource.ts index dc32bf0eb..864b95892 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestsResource.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomRequestsResource.ts @@ -1,5 +1,5 @@ -import { useAPIClient } from '@nocobase/client'; -export type { IResource } from '@nocobase/sdk'; +import { useAPIClient } from '@tachybase/client'; +export type { IResource } from '@tachybase/sdk'; export const useCustomRequestsResource = () => { const apiClient = useAPIClient(); diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts index e2e1ff011..92ef3b9fd 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts @@ -7,9 +7,9 @@ import { useCollection_deprecated, useCompile, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import { App } from 'antd'; -import { isURL } from '@nocobase/utils/client'; +import { isURL } from '@tachybase/utils/client'; import { useNavigate } from 'react-router-dom'; export const useCustomizeRequestActionProps = () => { diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useGetCustomRequest.ts b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useGetCustomRequest.ts index 612484f7f..10ae5eb02 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useGetCustomRequest.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/hooks/useGetCustomRequest.ts @@ -1,5 +1,5 @@ import { useFieldSchema } from '@tachybase/schema'; -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; export const useGetCustomRequest = () => { const fieldSchema = useFieldSchema(); diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx b/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx index c1c9817f8..451d8bfa0 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin, SchemaComponentOptions } from '@nocobase/client'; +import { Plugin, SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { CustomRequestAction } from './components'; import { customRequestActionSettings } from './components/CustomRequestActionDesigner'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/initializer/CustomRequestInitializer.tsx b/packages/plugins/@nocobase/plugin-custom-request/src/client/initializer/CustomRequestInitializer.tsx index 1d83e6363..fe3bd5ffe 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/initializer/CustomRequestInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/initializer/CustomRequestInitializer.tsx @@ -1,5 +1,5 @@ import { uid } from '@tachybase/schema'; -import { BlockInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { BlockInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; import { useCustomRequestsResource } from '../hooks/useCustomRequestsResource'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/locale.ts b/packages/plugins/@nocobase/plugin-custom-request/src/client/locale.ts index f33f10c4e..d49b60517 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/locale.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/locale.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation as useT } from 'react-i18next'; export const NAMESPACE = 'custom-request'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/schemaSettings.ts b/packages/plugins/@nocobase/plugin-custom-request/src/client/schemaSettings.ts index 6f38bda04..b47d0d8c6 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/schemaSettings.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/schemaSettings.ts @@ -7,7 +7,7 @@ import { SecondConFirm, useCollection, useSchemaToolbar, -} from '@nocobase/client'; +} from '@tachybase/client'; import { CustomRequestACL, CustomRequestSettingsItem } from './components/CustomRequestActionDesigner'; export const customizeCustomRequestActionSettings = new SchemaSettings({ diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts index 7e667fadd..0756d6f49 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/__tests__/actions.test.ts @@ -1,6 +1,6 @@ -import { Context } from '@nocobase/actions'; -import Database, { Repository } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { Context } from '@tachybase/actions'; +import Database, { Repository } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('actions', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/listByCurrentRole.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/listByCurrentRole.ts index 82b67d7bf..21b59e0fa 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/listByCurrentRole.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/listByCurrentRole.ts @@ -1,4 +1,4 @@ -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; export async function listByCurrentRole(ctx: Context) { const repo = ctx.db.getRepository('customRequests'); diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/send.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/send.ts index 9569dcbac..1f9c20cf6 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/send.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/actions/send.ts @@ -1,7 +1,7 @@ -import { Context, Next } from '@nocobase/actions'; -import { parse } from '@nocobase/utils'; +import { Context, Next } from '@tachybase/actions'; +import { parse } from '@tachybase/utils'; -import { appendArrayColumn } from '@nocobase/evaluators'; +import { appendArrayColumn } from '@tachybase/evaluators'; import axios from 'axios'; import CustomRequestPlugin from '../plugin'; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequest.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequest.ts index 3e14cd9df..362d2df7f 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequest.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequest.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequestsRoles.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequestsRoles.ts index e35b58a54..20646c3cd 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequestsRoles.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/collections/customRequestsRoles.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts index e73662c7b..693eaa86f 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts @@ -1,5 +1,5 @@ -import { Logger, LoggerOptions } from '@nocobase/logger'; -import { InstallOptions, Plugin } from '@nocobase/server'; +import { Logger, LoggerOptions } from '@tachybase/logger'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { listByCurrentRole } from './actions/listByCurrentRole'; import { send } from './actions/send'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-manager/package.json index c182a70b6..0c597c38a 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-manager/package.json @@ -24,12 +24,12 @@ "sequelize": "^6.26.0" }, "peerDependencies": { - "@nocobase/acl": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/acl": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "管理数据源,包括内置的 Master 数据库,外部的数据库、API。", "displayName.zh-CN": "数据源管理", diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/DatabaseConnectionProvider.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/DatabaseConnectionProvider.tsx index 389d9837f..f20259f64 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/DatabaseConnectionProvider.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/DatabaseConnectionProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React, { FC, useState, createContext } from 'react'; import * as hooks from './hooks'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/ThridDataSource.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/ThridDataSource.ts index 8609de1f9..4f8036f89 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/ThridDataSource.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/ThridDataSource.ts @@ -1,4 +1,4 @@ -import { DataSourceOptions, DataSource } from '@nocobase/client'; +import { DataSourceOptions, DataSource } from '@tachybase/client'; export class ThirdDataSource extends DataSource { async getDataSource() { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/BreadcumbTitle.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/BreadcumbTitle.tsx index 615f97b2c..ea73c2350 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/BreadcumbTitle.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/BreadcumbTitle.tsx @@ -1,5 +1,5 @@ import { RightOutlined } from '@ant-design/icons'; -import { useApp, useCompile, useDataSourceManager } from '@nocobase/client'; +import { useApp, useCompile, useDataSourceManager } from '@tachybase/client'; import { Breadcrumb, Space, Tag } from 'antd'; import React, { useContext, useMemo } from 'react'; import { Link, useParams } from 'react-router-dom'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx index 12161e724..c8e6f92d7 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx @@ -23,7 +23,7 @@ import { useAPIClient, useFieldInterfaceOptions, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ForeignKey } from './components'; const getSchema = (schema: IField, record: any, compile) => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/CollectionFields.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/CollectionFields.tsx index b88139c73..93d4a82dd 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/CollectionFields.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/CollectionFields.tsx @@ -16,7 +16,7 @@ import { Select, Collection, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { collection, fieldsTableSchema } from './schema/collectionFields'; import { TitleField } from './components/TitleField'; import { CollectionFieldInterfaceSelect } from './components/CollectionFieldInterfaceSelect'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx index 5e2072d26..3d7a4415d 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTable.tsx @@ -20,7 +20,7 @@ import { TemplateSummary, ResourceActionContext, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { message } from 'antd'; import { getCollectionSchema } from './schema/collections'; import { CollectionFields } from './CollectionFields'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTabs.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTabs.tsx index c80b50875..4e93de840 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTabs.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/ConfigurationTabs.tsx @@ -10,7 +10,7 @@ import { useCompile, useResourceActionContext, CollectionCategroriesContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { CollectionFields } from './CollectionFields'; import { CollectionName } from './components/CollectionName'; import { collectionTableSchema } from './schema/collections'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx index 00590ced2..89d849702 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditCollectionAction.tsx @@ -17,7 +17,7 @@ import { useResourceContext, useCancelAction, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import cloneDeep from 'lodash/cloneDeep'; import omit from 'lodash/omit'; import React, { useEffect, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditFieldAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditFieldAction.tsx index 7f56ffb40..fec177121 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditFieldAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/EditFieldAction.tsx @@ -23,7 +23,7 @@ import { useCurrentAppInfo, useCollectionParentRecordData, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useRemoteCollectionContext } from './CollectionFields'; const getSchema = ({ diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionFieldInterfaceSelect.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionFieldInterfaceSelect.tsx index d8a46297d..c2995da23 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionFieldInterfaceSelect.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionFieldInterfaceSelect.tsx @@ -1,7 +1,7 @@ import { observer, useForm, useField } from '@tachybase/schema'; import { Select, Tag } from 'antd'; import React, { useState } from 'react'; -import { useCompile, useCollectionManager_deprecated, useRecord, useFieldInterfaceOptions } from '@nocobase/client'; +import { useCompile, useCollectionManager_deprecated, useRecord, useFieldInterfaceOptions } from '@tachybase/client'; const getInterfaceOptions = (data, type) => { const interfaceOptions = []; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx index 1a322da1d..73f70a626 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx @@ -3,7 +3,7 @@ import { LoadingOutlined } from '@ant-design/icons'; import { connect, mapProps, mapReadPretty } from '@tachybase/schema'; import { Input as AntdInput } from 'antd'; import cls from 'classnames'; -import { useCollectionRecord } from '@nocobase/client'; +import { useCollectionRecord } from '@tachybase/client'; import { usePrefixCls } from '@tachybase/components'; const ReadPretty = (props) => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldTitleInput.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldTitleInput.tsx index a892f2450..cd0933bce 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldTitleInput.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldTitleInput.tsx @@ -2,7 +2,7 @@ import { observer } from '@tachybase/schema'; import { Input } from 'antd'; import { debounce } from 'lodash'; import React, { useState, useMemo, useEffect } from 'react'; -import { useRecord } from '@nocobase/client'; +import { useRecord } from '@tachybase/client'; export const FieldTitleInput = observer( (props: any) => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldType.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldType.tsx index 208f7307a..27fc32b87 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldType.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/FieldType.tsx @@ -1,5 +1,5 @@ import { observer } from '@tachybase/schema'; -import { useRecord } from '@nocobase/client'; +import { useRecord } from '@tachybase/client'; import { Select, Tag } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/TitleField.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/TitleField.tsx index 10788264b..e73be7224 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/TitleField.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/TitleField.tsx @@ -7,7 +7,7 @@ import { useAPIClient, withDynamicSchemaProps, useProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useRemoteCollectionContext } from '../CollectionFields'; export const TitleField = withDynamicSchemaProps( diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/UnSupportFields.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/UnSupportFields.tsx index 97f809514..052e6abfe 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/UnSupportFields.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/UnSupportFields.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Table, Divider } from 'antd'; import { useTranslation } from 'react-i18next'; -import { useRecord } from '@nocobase/client'; +import { useRecord } from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; export const UnSupportFields = () => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/index.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/index.tsx index c60118bbd..149f15b86 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/components/index.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Select } from 'antd'; import { observer, useForm, useField } from '@tachybase/schema'; import { useParams } from 'react-router-dom'; -import { useRecord, useCompile, useAPIClient, useCollectionManager_deprecated } from '@nocobase/client'; +import { useRecord, useCompile, useAPIClient, useCollectionManager_deprecated } from '@tachybase/client'; import { useRemoteCollectionContext } from '../CollectionFields'; const supportTypes = ['string', 'bigInt', 'integer', 'uuid', 'uid']; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/hooks.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/hooks.ts index f32827989..f2dee2e58 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/hooks.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/hooks.ts @@ -1,7 +1,7 @@ import { message } from 'antd'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; -import { useAPIClient, useRecord, useResourceActionContext, useActionContext } from '@nocobase/client'; +import { useAPIClient, useRecord, useResourceActionContext, useActionContext } from '@tachybase/client'; export const useDestroyAction = () => { const { refresh } = useResourceActionContext(); diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/index.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/index.tsx index 17a018e80..072e0f606 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/index.tsx @@ -21,7 +21,7 @@ import { DeleteCollection, DeleteCollectionAction, CollectionCategroriesProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ConfigurationTable } from './ConfigurationTable'; import { ConfigurationTabs } from './ConfigurationTabs'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collectionFields.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collectionFields.ts index 6eb4c4d40..5413ebd56 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collectionFields.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collectionFields.ts @@ -1,6 +1,6 @@ import { ISchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { CollectionOptions } from '@nocobase/client'; +import { CollectionOptions } from '@tachybase/client'; import { NAMESPACE } from '../../../locale'; export const collection: CollectionOptions = { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts index 24bd12d77..a82ee7807 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/schema/collections.ts @@ -2,7 +2,7 @@ import { ISchema, Schema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; import { message } from 'antd'; import { useTranslation } from 'react-i18next'; -import { useAPIClient, i18n, CollectionOptions } from '@nocobase/client'; +import { useAPIClient, i18n, CollectionOptions } from '@tachybase/client'; export const compile = (source) => { return Schema.compile(source, { t: i18n.t }); diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx index b261c041a..f56d0d5ed 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx @@ -1,6 +1,6 @@ import { DownOutlined, PlusOutlined } from '@ant-design/icons'; import { uid } from '@tachybase/schema'; -import { ActionContext, SchemaComponent, useAPIClient, useCompile, usePlugin } from '@nocobase/client'; +import { ActionContext, SchemaComponent, useAPIClient, useCompile, usePlugin } from '@tachybase/client'; import { Button, Dropdown, Empty } from 'antd'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/DatabaseConnectionManager.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/DatabaseConnectionManager.tsx index 8909f14af..1fa11ef1f 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/DatabaseConnectionManager.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/DatabaseConnectionManager.tsx @@ -6,7 +6,7 @@ import { useResourceContext, useRecord, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Card } from 'antd'; import _ from 'lodash'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/EditDatabaseConnectionAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/EditDatabaseConnectionAction.tsx index ebed1faeb..bf4c55472 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/EditDatabaseConnectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/EditDatabaseConnectionAction.tsx @@ -9,7 +9,7 @@ import { useResourceActionContext, useResourceContext, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import _ from 'lodash'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/AddCategoryAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/AddCategoryAction.tsx index 8999e8b1c..e98096b1e 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/AddCategoryAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/AddCategoryAction.tsx @@ -12,7 +12,7 @@ import { CollectionCategroriesContext, CollectionCategory, CollectionTemplateTag, -} from '@nocobase/client'; +} from '@tachybase/client'; import { collectionCategorySchema } from './schemas/collections'; const useCreateCategry = () => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx index 28d578b16..c74115c36 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFields.tsx @@ -27,7 +27,7 @@ import { useResourceActionContext, useResourceContext, ViewCollectionField, -} from '@nocobase/client'; +} from '@tachybase/client'; import { collection } from './schemas/collectionFields'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTable.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTable.tsx index 4f4268cc0..c01b835b6 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTable.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTable.tsx @@ -4,7 +4,7 @@ import { useAttach } from '@tachybase/schema'; import { Options, Result } from 'ahooks/es/useRequest/src/types'; import { TableProps } from 'antd'; import React, { useMemo } from 'react'; -import { AsyncDataProvider, useAsyncData, useRequest } from '@nocobase/client'; +import { AsyncDataProvider, useAsyncData, useRequest } from '@tachybase/client'; import { CollectionFieldsTableArray } from './CollectionFieldsTableArray'; type TableVoidProps = TableProps & { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx index e00ab4977..57dc9c824 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx @@ -10,7 +10,7 @@ import { useRecord, useRequest, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Table, TableColumnProps } from 'antd'; import { default as classNames } from 'classnames'; import { findIndex } from 'lodash'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTable.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTable.tsx index b3aef15c7..4010e8d29 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTable.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTable.tsx @@ -19,7 +19,7 @@ import { CollectionCategroriesContext, FieldSummary, TemplateSummary, -} from '@nocobase/client'; +} from '@tachybase/client'; import { CollectionFields } from './CollectionFields'; import { collectionSchema } from './schemas/collections'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTabs.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTabs.tsx index f82e0c771..c5d387373 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTabs.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/ConfigurationTabs.tsx @@ -22,7 +22,7 @@ import { useCompile, useResourceActionContext, CollectionCategroriesContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { CollectionFields } from './CollectionFields'; import { collectionTableSchema } from './schemas/collections'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/EditCategoryAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/EditCategoryAction.tsx index 2652984e7..93f8327c8 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/EditCategoryAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/EditCategoryAction.tsx @@ -13,7 +13,7 @@ import { useResourceActionContext, useCancelAction, CollectionCategroriesContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { collectionCategoryEditSchema } from './schemas/collections'; const useEditCategry = () => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/interfaces.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/interfaces.tsx index 8998fd8c9..03ab4d343 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/interfaces.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/interfaces.tsx @@ -1,4 +1,4 @@ -import { CollectionFieldInterface, useDataSourceManager } from '@nocobase/client'; +import { CollectionFieldInterface, useDataSourceManager } from '@tachybase/client'; import { useMemo } from 'react'; export const getOptions = ( diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collectionFields.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collectionFields.ts index 4b1159bbf..3f53935c7 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collectionFields.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collectionFields.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { CollectionFieldInterfaceTag, CollectionOptions } from '@nocobase/client'; +import { CollectionFieldInterfaceTag, CollectionOptions } from '@tachybase/client'; export const collection: CollectionOptions = { name: 'fields', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collections.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collections.ts index 6dccbc5a4..e8e9d4c6c 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collections.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/schemas/collections.ts @@ -2,9 +2,9 @@ import { ISchema, Schema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; import { message } from 'antd'; import { useTranslation } from 'react-i18next'; -import { useAPIClient, i18n } from '@nocobase/client'; -import { CollectionCategory, CollectionTemplateTag } from '@nocobase/client'; -import type { CollectionOptions } from '@nocobase/client'; +import { useAPIClient, i18n } from '@tachybase/client'; +import { CollectionCategory, CollectionTemplateTag } from '@tachybase/client'; +import type { CollectionOptions } from '@tachybase/client'; const compile = (source) => { return Schema.compile(source, { t: i18n.t }); diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/index.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/index.tsx index 9971f1635..0e9ab45a4 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/MainDataSourceManager/index.tsx @@ -21,7 +21,7 @@ import { DeleteCollection, DeleteCollectionAction, CollectionCategroriesProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import { AddCategory, AddCategoryAction, diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx index 8cdbdbcfb..9ecc372af 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx @@ -6,7 +6,7 @@ import { SchemaComponentContext, SettingCenterPermissionProvider, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import { dataSourceSchema } from './schemas/dataSourceTable'; import { PermissionProvider } from './PermisionProvider'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/PermisionProvider.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/PermisionProvider.tsx index dd09b1802..39adbfa2b 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/PermisionProvider.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/PermisionProvider.tsx @@ -1,7 +1,7 @@ import { message } from 'antd'; import React, { createContext, useContext, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { useAPIClient, useRecord, RecordContext_deprecated, SchemaComponentOptions } from '@nocobase/client'; +import { useAPIClient, useRecord, RecordContext_deprecated, SchemaComponentOptions } from '@tachybase/client'; import { CurrentRolesContext } from './'; export const SettingCenterPermissionProvider = (props) => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx index 9be55a510..e676ac465 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx @@ -1,7 +1,7 @@ import { onFieldChange } from '@tachybase/schema'; import React, { useContext } from 'react'; import { useTranslation } from 'react-i18next'; -import { useAPIClient, useRequest, SchemaComponent, useRecord } from '@nocobase/client'; +import { useAPIClient, useRequest, SchemaComponent, useRecord } from '@tachybase/client'; import { PermissionContext } from './PermisionProvider'; import { CurrentRolesContext } from './'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RolesResourcesActions.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RolesResourcesActions.tsx index 843e80b7f..5045ff66e 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RolesResourcesActions.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RolesResourcesActions.tsx @@ -5,7 +5,7 @@ import { Checkbox, Table, Tag } from 'antd'; import { isEmpty } from 'lodash'; import React, { createContext, useContext } from 'react'; import { useTranslation } from 'react-i18next'; -import { useCompile, useRecord } from '@nocobase/client'; +import { useCompile, useRecord } from '@tachybase/client'; import { useStyles } from './style'; import { useAvailableActions } from './DataSourceTable'; import { ScopeSelect } from './ScopeSelect'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/ScopeSelect.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/ScopeSelect.tsx index 8723cb6b3..8cb5dba19 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/ScopeSelect.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/ScopeSelect.tsx @@ -1,6 +1,6 @@ import { createForm } from '@tachybase/schema'; import React, { createContext, useContext, useMemo, useState } from 'react'; -import { FormProvider, SchemaComponent, useRecord } from '@nocobase/client'; +import { FormProvider, SchemaComponent, useRecord } from '@tachybase/client'; import { getScopesSchema } from './schemas/scopes'; const RolesResourcesScopesSelectedRowKeysContext = createContext(null); diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/StrategyActions.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/StrategyActions.tsx index bdd1c3db6..702199198 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/StrategyActions.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/StrategyActions.tsx @@ -3,7 +3,7 @@ import { connect, useField } from '@tachybase/schema'; import { Checkbox, Select, Table, Tag } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; -import { useCompile } from '@nocobase/client'; +import { useCompile } from '@tachybase/client'; import { useAvailableActions } from './DataSourceTable'; const toScopes = (value) => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/index.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/index.tsx index 99cb4fccc..07e3c935e 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/index.tsx @@ -8,7 +8,7 @@ import { SettingsCenterConfigure, SettingCenterProvider, ResourceActionProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import { DataSourceTable } from './DataSourceTable'; import { RoleConfigure } from './RoleConfigure'; import { StrategyActions } from './StrategyActions'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/scopes.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/scopes.ts index a542cd2c1..d871dd63c 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/scopes.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/scopes.ts @@ -1,6 +1,6 @@ import { ISchema } from '@tachybase/schema'; import { useContext, useEffect } from 'react'; -import { useFormBlockContext, VariableInput, useFilterFieldOptions } from '@nocobase/client'; +import { useFormBlockContext, VariableInput, useFilterFieldOptions } from '@tachybase/client'; import { RoleResourceCollectionContext } from '../RolesResourcesActions'; export const rolesResourcesScopesCollection = (dataSourceKey = 'main') => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useRoleResourceValues.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useRoleResourceValues.ts index 399738521..4b39323a8 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useRoleResourceValues.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useRoleResourceValues.ts @@ -1,5 +1,5 @@ import { useEffect, useContext } from 'react'; -import { useActionContext, useRecord, useRequest } from '@nocobase/client'; +import { useActionContext, useRecord, useRequest } from '@tachybase/client'; import { PermissionContext } from '../PermisionProvider'; export const useRoleResourceValues = (options) => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useSaveRoleResourceAction.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useSaveRoleResourceAction.ts index 047f63dd8..4d91452ae 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useSaveRoleResourceAction.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/schemas/useSaveRoleResourceAction.ts @@ -1,6 +1,6 @@ import { useForm } from '@tachybase/schema'; import { useContext } from 'react'; -import { useActionContext, useAPIClient, useRecord, useResourceActionContext } from '@nocobase/client'; +import { useActionContext, useAPIClient, useRecord, useResourceActionContext } from '@tachybase/client'; import { PermissionContext } from '../PermisionProvider'; export const useSaveRoleResourceAction = () => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/ViewDatabaseConnectionAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/ViewDatabaseConnectionAction.tsx index 164ba96f9..61e3376a9 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/ViewDatabaseConnectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/ViewDatabaseConnectionAction.tsx @@ -1,4 +1,4 @@ -import { useRecord } from '@nocobase/client'; +import { useRecord } from '@tachybase/client'; import React from 'react'; import { Button } from 'antd'; import { css } from '@emotion/css'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts index 79d1d96fe..bdd3638be 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts @@ -1,7 +1,7 @@ import { useForm, useField } from '@tachybase/schema'; import { message } from 'antd'; import { useTranslation } from 'react-i18next'; -import { useActionContext, useAPIClient } from '@nocobase/client'; +import { useActionContext, useAPIClient } from '@tachybase/client'; import { NAMESPACE } from '../locale'; export const useCreateDatabaseServer = (handleDataServerChange) => { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx index fd1030f2b..e7a6b57d2 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import React from 'react'; import { DatabaseConnectionProvider } from './DatabaseConnectionProvider'; import { ThirdDataSource } from './ThridDataSource'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/locale/index.ts index 57c92f1ed..fc47c25ca 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; export const NAMESPACE = 'data-source-manager'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts index b70f92921..2c686bc47 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts @@ -1,7 +1,7 @@ -import { createMockServer, MockServer } from '@nocobase/test'; -import { CollectionManager, DataSource, IRepository } from '@nocobase/data-source-manager'; +import { createMockServer, MockServer } from '@tachybase/test'; +import { CollectionManager, DataSource, IRepository } from '@tachybase/data-source-manager'; import { SuperAgentTest } from 'supertest'; -import { ICollectionManager, IModel } from '@nocobase/data-source-manager/src/types'; +import { ICollectionManager, IModel } from '@tachybase/data-source-manager/src/types'; describe('data source with acl', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts index 7c2fbd712..7566a3c66 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts @@ -1,5 +1,5 @@ -import { createMockServer, MockServer, waitSecond } from '@nocobase/test'; -import { CollectionManager, DataSource } from '@nocobase/data-source-manager'; +import { createMockServer, MockServer, waitSecond } from '@tachybase/test'; +import { CollectionManager, DataSource } from '@tachybase/data-source-manager'; describe('data source', async () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts index d4a54a93d..630e81879 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'dataSourcesCollections', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-fields.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-fields.ts index 040822e18..011169035 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-fields.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-fields.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'dataSourcesFields', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-actions.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-actions.ts index f32bfc9bc..b88afb15e 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-actions.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-actions.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-scopes.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-scopes.ts index 128a10243..c866e8ec2 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-scopes.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources-scopes.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources.ts index cbb9bdede..503e0d0ac 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles-resources.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles.ts index ecd3339e4..5a1edb007 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-roles.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'dataSourcesRoles', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources.ts index 8a4eb89e2..865bc7eef 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'dataSources', diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/migrations/20240301164024-migrate-acl-resources.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/migrations/20240301164024-migrate-acl-resources.ts index 2b23e58ed..68c4492cc 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/migrations/20240301164024-migrate-acl-resources.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/migrations/20240301164024-migrate-acl-resources.ts @@ -1,5 +1,5 @@ -import { Migration } from '@nocobase/server'; -import { uid } from '@nocobase/utils'; +import { Migration } from '@tachybase/server'; +import { uid } from '@tachybase/utils'; export default class extends Migration { on = 'afterSync'; // 'beforeLoad' or 'afterLoad' diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-source.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-source.ts index 8085dab76..983c9710a 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-source.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-source.ts @@ -1,8 +1,8 @@ -import { Model, Transaction } from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import { Model, Transaction } from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { LocalData } from '../services/database-introspector'; import { setCurrentRole } from '@nocobase/plugin-acl'; -import { ACL, AvailableActionOptions } from '@nocobase/acl'; +import { ACL, AvailableActionOptions } from '@tachybase/acl'; import { DataSourcesRolesModel } from './data-sources-roles-model'; import PluginDataSourceManagerServer from '../plugin'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-collection-model.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-collection-model.ts index 9ce40faa6..0a5608889 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-collection-model.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-collection-model.ts @@ -1,5 +1,5 @@ -import { MagicAttributeModel } from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import { MagicAttributeModel } from '@tachybase/database'; +import { Application } from '@tachybase/server'; export class DataSourcesCollectionModel extends MagicAttributeModel { load(loadOptions: { app: Application }) { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-field-model.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-field-model.ts index b2be5c746..96a6e3a4d 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-field-model.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-field-model.ts @@ -1,5 +1,5 @@ -import { MagicAttributeModel } from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import { MagicAttributeModel } from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { mergeOptions } from '../utils'; type LoadOptions = { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-roles-model.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-roles-model.ts index f6d1d03dd..453516b1c 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-roles-model.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/models/data-sources-roles-model.ts @@ -1,5 +1,5 @@ -import { Model } from '@nocobase/database'; -import { ACL } from '@nocobase/acl'; +import { Model } from '@tachybase/database'; +import { ACL } from '@tachybase/acl'; import { Transaction } from 'sequelize'; import { DataSourcesRolesResourcesModel } from './connections-roles-resources'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts index 8d0cbecf4..80fb1ac64 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Application, Plugin } from '@nocobase/server'; +import { Application, Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { DataSourcesCollectionModel } from './models/data-sources-collection-model'; import { DataSourcesFieldModel } from './models/data-sources-field-model'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/collection-manager.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/collection-manager.ts index 91b44f588..3333c730b 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/collection-manager.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/collection-manager.ts @@ -1,4 +1,4 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; export class CollectionManager { constructor(private db: Database) {} diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/database-introspector.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/database-introspector.ts index d26426dce..ada6adacd 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/database-introspector.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/database-introspector.ts @@ -1,4 +1,4 @@ -import { Database, ViewFieldInference } from '@nocobase/database'; +import { Database, ViewFieldInference } from '@tachybase/database'; import { ColumnsDescription } from 'sequelize'; import lodash from 'lodash'; import typeInterfaceMap from './type-interface-map'; diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/full-data-repository.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/full-data-repository.ts index 32c03ed98..f07a04b02 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/full-data-repository.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/services/full-data-repository.ts @@ -1,4 +1,4 @@ -import { CountOptions, FindOptions } from '@nocobase/database'; +import { CountOptions, FindOptions } from '@tachybase/database'; export class FullDataRepository { data: Array = []; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/package.json b/packages/plugins/@nocobase/plugin-data-visualization/package.json index edc00e02d..8f3975fc4 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/package.json +++ b/packages/plugins/@nocobase/plugin-data-visualization/package.json @@ -27,13 +27,13 @@ "sequelize": "^6.26.0" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供数据可视化功能,包含图表区块和图表筛选区块,支持折线图、面积图、柱状图等十几种图表,你也可以扩展更多图表类型。", "displayName.zh-CN": "数据可视化", diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/hooks.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/hooks.test.ts index 336f3fd25..69514317d 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/hooks.test.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/hooks.test.ts @@ -1,4 +1,4 @@ -import * as client from '@nocobase/client'; +import * as client from '@tachybase/client'; import { renderHook } from '@testing-library/react'; import { vi } from 'vitest'; import formatters from '../block/formatters'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlock.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlock.tsx index 11f04752e..14de79bd6 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlock.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlock.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions, SchemaInitializerContext, useSchemaInitializer } from '@nocobase/client'; +import { SchemaComponentOptions, SchemaInitializerContext, useSchemaInitializer } from '@tachybase/client'; import React, { useState } from 'react'; import { ChartConfigProvider } from '../configure'; import { ChartDataProvider } from './ChartDataProvider'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockDesigner.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockDesigner.tsx index 90697dbd4..79cc0c021 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockDesigner.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockDesigner.tsx @@ -3,7 +3,7 @@ import { SchemaSettingsBlockTitleItem, SchemaSettingsDivider, SchemaSettingsRemove, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { useChartsTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockInitializer.tsx index bd1c2ba67..43892761a 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockInitializer.tsx @@ -8,7 +8,7 @@ import { useACLRoleContext, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useCallback, useContext } from 'react'; import { ChartConfigContext } from '../configure'; import { FilterBlockInitializer } from '../filter'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts index e7edd266c..73db186f9 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts @@ -1,4 +1,4 @@ -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; import { RenderProps } from '../chart'; import { AntdChart } from './antd'; import { Table as AntdTable } from 'antd'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/group.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/group.ts index d947c4b80..2a3110675 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/group.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/group.ts @@ -1,4 +1,4 @@ -import { usePlugin } from '@nocobase/client'; +import { usePlugin } from '@tachybase/client'; import { ChartType } from './chart'; import DataVisualizationPlugin from '..'; import { lang } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigProvider.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigProvider.tsx index 115b0a723..a6d958664 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigProvider.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigProvider.tsx @@ -2,7 +2,7 @@ import { ISchema } from '@tachybase/schema'; import React, { createContext, useState } from 'react'; import { ChartRendererProvider } from '../renderer'; import { ChartConfigure } from './ChartConfigure'; -import { useDesignable } from '@nocobase/client'; +import { useDesignable } from '@tachybase/client'; import { css } from '@emotion/css'; import { theme } from 'antd'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx index db32a8890..d482611ae 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx @@ -2,7 +2,7 @@ import { RightSquareOutlined } from '@ant-design/icons'; import { ArrayItems, Editable, FormCollapse, FormItem, FormLayout, Switch } from '@tachybase/components'; import { Form as FormType, ObjectField, createForm, onFieldChange, onFormInit } from '@tachybase/schema'; import { FormConsumer, ISchema, Schema } from '@tachybase/schema'; -import { AutoComplete, FormProvider, SchemaComponent, gridRowColWrap, useDesignable } from '@nocobase/client'; +import { AutoComplete, FormProvider, SchemaComponent, gridRowColWrap, useDesignable } from '@tachybase/client'; import { Alert, App, Button, Card, Col, Modal, Row, Space, Table, Tabs, Typography } from 'antd'; import { cloneDeep, isEqual } from 'lodash'; import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/FilterDynamicComponent.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/FilterDynamicComponent.tsx index 26e519077..86cdd7fea 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/FilterDynamicComponent.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/FilterDynamicComponent.tsx @@ -1,4 +1,4 @@ -import { Variable } from '@nocobase/client'; +import { Variable } from '@tachybase/client'; import React from 'react'; import { useVariableOptions } from '../hooks'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/CollectionFieldInitializer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/CollectionFieldInitializer.tsx index 96b2c7d7b..558eed237 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/CollectionFieldInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/CollectionFieldInitializer.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { InitializerWithSwitch, useSchemaInitializerItem } from '@nocobase/client'; +import { InitializerWithSwitch, useSchemaInitializerItem } from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; export const CollectionFieldInitializer = () => { diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterActionInitializers.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterActionInitializers.tsx index 5568a6e05..48786ad96 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterActionInitializers.tsx @@ -7,7 +7,7 @@ import { GeneralSchemaDesigner, SchemaSettingsDivider, SchemaSettingsRemove, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useContext } from 'react'; import { useChartFilter } from '../hooks/filter'; import { useChartsTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockDesigner.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockDesigner.tsx index 3df5f6582..31f9d1fdb 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockDesigner.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockDesigner.tsx @@ -1,4 +1,4 @@ -import { GeneralSchemaDesigner, SchemaSettingsRemove } from '@nocobase/client'; +import { GeneralSchemaDesigner, SchemaSettingsRemove } from '@tachybase/client'; import React from 'react'; import { useChartsTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx index 7e5a78ed3..30e2cf15a 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx @@ -7,7 +7,7 @@ import { useCurrentSchema, SchemaInitializerSwitch, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { uid, merge } from '@tachybase/schema'; import { ChartFilterContext } from './FilterProvider'; import { css } from '@emotion/css'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockProvider.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockProvider.tsx index 5c882b92e..8e9e54578 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockProvider.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockProvider.tsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect } from 'react'; -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import { ChartFilterItemDesigner } from './FilterItemDesigner'; import { useChartFilterActionProps, diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterForm.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterForm.tsx index 24da24748..177ea21ef 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterForm.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterForm.tsx @@ -1,7 +1,7 @@ import React, { memo, useContext, useEffect, useMemo, useRef } from 'react'; import { createForm, onFieldInit, onFieldMount, onFieldUnmount } from '@tachybase/schema'; import { ChartFilterContext } from './FilterProvider'; -import { DEFAULT_DATA_SOURCE_KEY, FormV2, VariablesContext } from '@nocobase/client'; +import { DEFAULT_DATA_SOURCE_KEY, FormV2, VariablesContext } from '@tachybase/client'; import { setDefaultValue } from './utils'; import { useChartFilter } from '../hooks'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemDesigner.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemDesigner.tsx index 135c70f9e..22db4c775 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemDesigner.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemDesigner.tsx @@ -18,7 +18,7 @@ import { useFormBlockContext, removeNullCondition, useIsAssociationField, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useChartsTranslation } from '../locale'; import { Schema, useField, useFieldSchema } from '@tachybase/schema'; import { Field } from '@tachybase/schema'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemInitializers.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemInitializers.tsx index 69dda7ba3..c4cc7215a 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterItemInitializers.tsx @@ -23,7 +23,7 @@ import { useGlobalTheme, useSchemaInitializerItem, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; import { Alert, ConfigProvider, Typography } from 'antd'; import React, { memo, useCallback, useContext, useMemo } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterVariableInput.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterVariableInput.tsx index 22c0897e0..c5189f9c3 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterVariableInput.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterVariableInput.tsx @@ -9,7 +9,7 @@ import { getShouldChange, useCurrentUserVariable, useDatetimeVariable, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; import React, { useEffect, useMemo } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/utils.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/utils.ts index b23b6269a..42c683272 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/utils.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/utils.ts @@ -1,5 +1,5 @@ -import { DEFAULT_DATA_SOURCE_KEY } from '@nocobase/client'; -import { moment2str } from '@nocobase/utils/client'; +import { DEFAULT_DATA_SOURCE_KEY } from '@tachybase/client'; +import { moment2str } from '@tachybase/utils/client'; import dayjs from 'dayjs'; import { Schema } from '@tachybase/schema'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts index edb71819c..112868124 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts @@ -8,14 +8,14 @@ import { useActionContext, useCollectionManager_deprecated, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useCallback, useContext, useMemo } from 'react'; import { ChartDataContext } from '../block/ChartDataProvider'; import { Schema } from '@tachybase/schema'; import { useChartsTranslation } from '../locale'; import { ChartFilterContext } from '../filter/FilterProvider'; import { useMemoizedFn } from 'ahooks'; -import { parse } from '@nocobase/utils/client'; +import { parse } from '@tachybase/utils/client'; import lodash from 'lodash'; import { getFormulaComponent, getValuesByPath } from '../utils'; import deepmerge from 'deepmerge'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/query.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/query.ts index 2ef2abcfe..73377942a 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/query.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/query.ts @@ -8,7 +8,7 @@ import { useACLRoleContext, useCollectionManager_deprecated, useDataSourceManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useContext, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { ChartConfigContext } from '../configure'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useUserVariable.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useUserVariable.ts index 14c43c99b..2037bc433 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useUserVariable.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useUserVariable.ts @@ -1,7 +1,7 @@ import { useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { Schema } from '@tachybase/schema'; -import { useCollectionFieldsOptions } from '@nocobase/client'; +import { useCollectionFieldsOptions } from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; export const useUserVariable = ({ schema }: { schema: any }) => { diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useVariableOptions.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useVariableOptions.ts index b0c6d0f7d..c67b399d3 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useVariableOptions.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useVariableOptions.ts @@ -1,5 +1,5 @@ import { useField } from '@tachybase/schema'; -import { useCurrentUserVariable, useDatetimeVariable } from '@nocobase/client'; +import { useCurrentUserVariable, useDatetimeVariable } from '@tachybase/client'; import { useMemo } from 'react'; import { useFilterVariable } from './filter'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx index de374676f..72be3d666 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { ChartV2Block, ChartV2BlockDesigner, diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/locale/index.ts index 41d32c5da..b5f578140 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'data-visualization'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx index 8c92c3e27..1b8958e30 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx @@ -10,7 +10,7 @@ import { useCollection_deprecated, useDataSource, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Empty, Result, Spin, Typography } from 'antd'; import React, { useContext, useEffect, useRef } from 'react'; import { ErrorBoundary } from 'react-error-boundary'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx index a9c518a79..7c90abafe 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx @@ -6,7 +6,7 @@ import { useAPIClient, useDataSourceManager, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { createContext, useContext } from 'react'; import { parseField, removeUnparsableFilter } from '../utils'; import { ChartDataContext } from '../block/ChartDataProvider'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/api.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/api.test.ts index d95b966c1..4a5ae7493 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/api.test.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/api.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; import compose from 'koa-compose'; import { parseBuilder, parseFieldAndAssociations, queryData } from '../actions/query'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/query.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/query.test.ts index d6419884a..cb6adcec6 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/query.test.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/query.test.ts @@ -1,4 +1,4 @@ -import { MockServer, createMockServer } from '@nocobase/test'; +import { MockServer, createMockServer } from '@tachybase/test'; import compose from 'koa-compose'; import { vi } from 'vitest'; import { cacheMiddleware, parseBuilder, parseFieldAndAssociations } from '../actions/query'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts index be6171671..ded68fe3f 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts @@ -1,9 +1,9 @@ -import { Context, Next } from '@nocobase/actions'; -import { Field, FilterParser, snakeCase } from '@nocobase/database'; +import { Context, Next } from '@tachybase/actions'; +import { Field, FilterParser, snakeCase } from '@tachybase/database'; import { formatter } from './formatter'; import compose from 'koa-compose'; -import { parseFilter, getDateVars } from '@nocobase/utils'; -import { Cache } from '@nocobase/cache'; +import { parseFilter, getDateVars } from '@tachybase/utils'; +import { Cache } from '@tachybase/cache'; type MeasureProps = { field: string | string[]; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/server/migrations/20230926211750-rename-charttype.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/migrations/20230926211750-rename-charttype.ts index 0765b866a..c30813c0c 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/server/migrations/20230926211750-rename-charttype.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/server/migrations/20230926211750-rename-charttype.ts @@ -1,5 +1,5 @@ -import { Repository } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Repository } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class RenameChartTypeMigration extends Migration { appVersion = '<0.14.0-alpha.7'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts index 4c4bd08b4..9a29afc47 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts @@ -1,5 +1,5 @@ -import { Cache } from '@nocobase/cache'; -import { InstallOptions, Plugin } from '@nocobase/server'; +import { Cache } from '@tachybase/cache'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { query } from './actions/query'; import { resolve } from 'path'; diff --git a/packages/plugins/@nocobase/plugin-error-handler/package.json b/packages/plugins/@nocobase/plugin-error-handler/package.json index 5d357aa3a..c8255ce27 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/package.json +++ b/packages/plugins/@nocobase/plugin-error-handler/package.json @@ -16,11 +16,11 @@ "supertest": "^6.1.6" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "处理应用程序中的错误和异常。", "displayName.zh-CN": "错误处理器", diff --git a/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts b/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts index 057d6ad21..3d2c195d1 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; class ErrorHandlerPlugin extends Plugin { async load() {} diff --git a/packages/plugins/@nocobase/plugin-error-handler/src/server/__tests__/render-error.test.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/__tests__/render-error.test.ts index 65d5c3551..6eccb210b 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/src/server/__tests__/render-error.test.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/server/__tests__/render-error.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; describe('create with exception', () => { let app: MockServer; beforeEach(async () => { diff --git a/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts index d9b1ddae4..4a716ddc2 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts @@ -1,6 +1,6 @@ import { Schema } from '@formily/json-schema'; -import { BaseError } from '@nocobase/database'; -import { Plugin } from '@nocobase/server'; +import { BaseError } from '@tachybase/database'; +import { Plugin } from '@tachybase/server'; import lodash from 'lodash'; import { ErrorHandler } from './error-handler'; import enUS from './locale/en_US'; diff --git a/packages/plugins/@nocobase/plugin-export/package.json b/packages/plugins/@nocobase/plugin-export/package.json index 764ce3092..18a674ca1 100644 --- a/packages/plugins/@nocobase/plugin-export/package.json +++ b/packages/plugins/@nocobase/plugin-export/package.json @@ -20,12 +20,12 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。", "displayName.zh-CN": "操作:导出记录", diff --git a/packages/plugins/@nocobase/plugin-export/src/client/ExportActionInitializer.tsx b/packages/plugins/@nocobase/plugin-export/src/client/ExportActionInitializer.tsx index 4c645f97b..0c4182a96 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/ExportActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-export/src/client/ExportActionInitializer.tsx @@ -6,7 +6,7 @@ import { useDesignable, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { useFields } from './useFields'; diff --git a/packages/plugins/@nocobase/plugin-export/src/client/ExportDesigner.tsx b/packages/plugins/@nocobase/plugin-export/src/client/ExportDesigner.tsx index 6201a209d..e82931dde 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/ExportDesigner.tsx +++ b/packages/plugins/@nocobase/plugin-export/src/client/ExportDesigner.tsx @@ -8,7 +8,7 @@ import { SchemaSettingsModalItem, SchemaSettingsRemove, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useShared } from './useShared'; diff --git a/packages/plugins/@nocobase/plugin-export/src/client/ExportPluginProvider.tsx b/packages/plugins/@nocobase/plugin-export/src/client/ExportPluginProvider.tsx index 2a0043be3..3ff1877a1 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/ExportPluginProvider.tsx +++ b/packages/plugins/@nocobase/plugin-export/src/client/ExportPluginProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { ExportActionInitializer, ExportDesigner, useExportAction } from './'; diff --git a/packages/plugins/@nocobase/plugin-export/src/client/index.ts b/packages/plugins/@nocobase/plugin-export/src/client/index.ts index f503debb0..8caf2c433 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-export/src/client/index.ts @@ -2,7 +2,7 @@ export * from './ExportActionInitializer'; export * from './ExportDesigner'; export * from './ExportPluginProvider'; export * from './useExportAction'; -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { ExportPluginProvider } from './ExportPluginProvider'; import { exportActionSchemaSettings } from './schemaSettings'; diff --git a/packages/plugins/@nocobase/plugin-export/src/client/schemaSettings.ts b/packages/plugins/@nocobase/plugin-export/src/client/schemaSettings.ts index e17b14914..30fd28c46 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/schemaSettings.ts +++ b/packages/plugins/@nocobase/plugin-export/src/client/schemaSettings.ts @@ -1,6 +1,6 @@ import { ArrayItems } from '@tachybase/components'; import { ISchema, useField, useFieldSchema } from '@tachybase/schema'; -import { ButtonEditor, SchemaSettings, useDesignable, useSchemaToolbar } from '@nocobase/client'; +import { ButtonEditor, SchemaSettings, useDesignable, useSchemaToolbar } from '@tachybase/client'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useShared } from './useShared'; diff --git a/packages/plugins/@nocobase/plugin-export/src/client/useExportAction.ts b/packages/plugins/@nocobase/plugin-export/src/client/useExportAction.ts index 297188c75..0583049a1 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/useExportAction.ts +++ b/packages/plugins/@nocobase/plugin-export/src/client/useExportAction.ts @@ -5,7 +5,7 @@ import { useCollection_deprecated, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import lodash from 'lodash'; import { saveAs } from 'file-saver'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-export/src/client/useFields.ts b/packages/plugins/@nocobase/plugin-export/src/client/useFields.ts index 1ff01c13e..5fcca1ec4 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/useFields.ts +++ b/packages/plugins/@nocobase/plugin-export/src/client/useFields.ts @@ -1,5 +1,5 @@ import { useFieldSchema } from '@tachybase/schema'; -import { useCollectionManager_deprecated } from '@nocobase/client'; +import { useCollectionManager_deprecated } from '@tachybase/client'; export const useFields = (collectionName: string) => { const fieldSchema = useFieldSchema(); diff --git a/packages/plugins/@nocobase/plugin-export/src/client/useShared.ts b/packages/plugins/@nocobase/plugin-export/src/client/useShared.ts index bcca96477..4baab3533 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/useShared.ts +++ b/packages/plugins/@nocobase/plugin-export/src/client/useShared.ts @@ -1,4 +1,4 @@ -import { Cascader, css, useCollection_deprecated } from '@nocobase/client'; +import { Cascader, css, useCollection_deprecated } from '@tachybase/client'; import { useFields } from './useFields'; export const useShared = () => { diff --git a/packages/plugins/@nocobase/plugin-export/src/server/__tests__/utils/utils.test.ts b/packages/plugins/@nocobase/plugin-export/src/server/__tests__/utils/utils.test.ts index 8cb68302b..db1d0331b 100644 --- a/packages/plugins/@nocobase/plugin-export/src/server/__tests__/utils/utils.test.ts +++ b/packages/plugins/@nocobase/plugin-export/src/server/__tests__/utils/utils.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { mockServer, MockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { mockServer, MockServer } from '@tachybase/test'; describe('utils', () => { let columns = null; diff --git a/packages/plugins/@nocobase/plugin-export/src/server/actions/export-xlsx.ts b/packages/plugins/@nocobase/plugin-export/src/server/actions/export-xlsx.ts index 1fde6da6f..593faa8ec 100644 --- a/packages/plugins/@nocobase/plugin-export/src/server/actions/export-xlsx.ts +++ b/packages/plugins/@nocobase/plugin-export/src/server/actions/export-xlsx.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { Repository } from '@nocobase/database'; +import { Context, Next } from '@tachybase/actions'; +import { Repository } from '@tachybase/database'; import xlsx from 'node-xlsx'; import render from '../renders'; import { columns2Appends } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-export/src/server/index.ts b/packages/plugins/@nocobase/plugin-export/src/server/index.ts index 1e70d13ac..b64c42750 100644 --- a/packages/plugins/@nocobase/plugin-export/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-export/src/server/index.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { exportXlsx } from './actions'; export class ExportPlugin extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-export/src/server/renders/renders.ts b/packages/plugins/@nocobase/plugin-export/src/server/renders/renders.ts index 951d67d01..57ac8f0cb 100644 --- a/packages/plugins/@nocobase/plugin-export/src/server/renders/renders.ts +++ b/packages/plugins/@nocobase/plugin-export/src/server/renders/renders.ts @@ -1,4 +1,4 @@ -import { getDefaultFormat, str2moment, toFixedByStep } from '@nocobase/utils'; +import { getDefaultFormat, str2moment, toFixedByStep } from '@tachybase/utils'; export async function _(field, row, ctx, column?: any) { if (column?.dataIndex.length > 1) { @@ -12,7 +12,7 @@ export async function _(field, row, ctx, column?: any) { } else { if (Array.isArray(result?.[col])) { const subResults = []; - for (const r of result?.[col]) { + for (const r of result[col]) { subResults.push(r); } return subResults; diff --git a/packages/plugins/@nocobase/plugin-file-manager/package.json b/packages/plugins/@nocobase/plugin-file-manager/package.json index 70c4b2072..ed0b1bdfd 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/package.json +++ b/packages/plugins/@nocobase/plugin-file-manager/package.json @@ -33,12 +33,12 @@ "supertest": "^6.1.6" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供文件存储服务,并提供了文件表模板和附件字段。", "displayName.zh-CN": "文件管理器", diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/FileManagerProvider.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/FileManagerProvider.tsx index d08686221..30bd13f9c 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/FileManagerProvider.tsx +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/FileManagerProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React, { FC } from 'react'; import * as hooks from './hooks'; import { UploadActionInitializer } from './initializers'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/FileStorage.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/FileStorage.tsx index 4f3064f38..01a6f9bbc 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/FileStorage.tsx +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/FileStorage.tsx @@ -1,6 +1,6 @@ import { PlusOutlined, DownOutlined } from '@ant-design/icons'; import { uid } from '@tachybase/schema'; -import { ActionContext, SchemaComponent, useCompile, usePlugin, useRecord } from '@nocobase/client'; +import { ActionContext, SchemaComponent, useCompile, usePlugin, useRecord } from '@tachybase/client'; import { Button, Card, Dropdown } from 'antd'; import _ from 'lodash'; import React, { useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/createLocalStorage.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/createLocalStorage.test.ts index b3a73e704..fc5774ab7 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/createLocalStorage.test.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/createLocalStorage.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; import { CreateLocalStorage } from './pageobject/localStorage'; test.describe('file manager', () => { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/editLocalStorage.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/editLocalStorage.test.ts index 488d68638..883f82c3c 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/editLocalStorage.test.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/editLocalStorage.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; import { CreateLocalStorage, EditLocalStorage } from './pageobject/localStorage'; test.describe('File manager', () => { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/pageobject/localStorage.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/pageobject/localStorage.ts index cdb0fad13..3ab820eb6 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/pageobject/localStorage.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/pageobject/localStorage.ts @@ -1,4 +1,4 @@ -import type { Locator, Page } from '@nocobase/test/e2e'; +import type { Locator, Page } from '@tachybase/test/e2e'; export class CreateLocalStorage { readonly page: Page; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/useUploadFiles.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/useUploadFiles.ts index 0156f4fa8..1784049ab 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/useUploadFiles.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/useUploadFiles.ts @@ -4,7 +4,7 @@ import { useBlockRequestContext, useCollection, useSourceIdFromParentRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import { notification } from 'antd'; import { useContext, useMemo } from 'react'; import { useFmTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx index f8bbea241..0e5b2f9f1 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin, useCollection_deprecated } from '@nocobase/client'; +import { Plugin, useCollection_deprecated } from '@tachybase/client'; import { FileManagerProvider } from './FileManagerProvider'; import { FileStoragePane } from './FileStorage'; import { NAMESPACE } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/UploadActionInitializer.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/UploadActionInitializer.tsx index abac45943..cf5d4f4c2 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/UploadActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/UploadActionInitializer.tsx @@ -1,4 +1,4 @@ -import { ActionInitializer, useCollection_deprecated } from '@nocobase/client'; +import { ActionInitializer, useCollection_deprecated } from '@tachybase/client'; import React from 'react'; export const UploadActionInitializer = (props) => { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/interfaces/attachment.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/interfaces/attachment.ts index be9700445..14fdff797 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/interfaces/attachment.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/interfaces/attachment.ts @@ -1,6 +1,6 @@ import { ISchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { CollectionFieldInterface, interfacesProperties } from '@nocobase/client'; +import { CollectionFieldInterface, interfacesProperties } from '@tachybase/client'; import { NAMESPACE } from '../locale'; export class AttachmentFieldInterface extends CollectionFieldInterface { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts index efc374a05..ad87255fd 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts @@ -1,4 +1,4 @@ -import { CollectionTemplate, getConfigurableProperties } from '@nocobase/client'; +import { CollectionTemplate, getConfigurableProperties } from '@tachybase/client'; import { NAMESPACE } from '../locale'; export class FileCollectionTemplate extends CollectionTemplate { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts index c73090bdb..856fc9fa6 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts @@ -1,4 +1,4 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; export class FileModel extends Model { public toJSON() { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/index.ts index dcfc44024..ba10d4818 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/index.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/index.ts @@ -1,4 +1,4 @@ -import { MockServer, createMockServer } from '@nocobase/test'; +import { MockServer, createMockServer } from '@tachybase/test'; import send from 'koa-send'; import path from 'path'; import supertest from 'supertest'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts index 52b3ebaa3..b06c57705 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts @@ -1,9 +1,9 @@ import path from 'path'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import aliossStorage from '../../storages/ali-oss'; import { FILE_FIELD_NAME } from '../../constants'; import { getApp, requestFile } from '..'; -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; const itif = process.env.ALI_OSS_ACCESS_KEY_SECRET ? it : it.skip; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts index 4d2e29e85..7f6f61f69 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts @@ -1,9 +1,9 @@ import path from 'path'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import s3Storage from '../../storages/s3'; import { FILE_FIELD_NAME } from '../../constants'; import { getApp, requestFile } from '..'; -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; const itif = process.env.AWS_SECRET_ACCESS_KEY ? it : it.skip; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/tx-cos.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/tx-cos.test.ts index 5fd101570..e216c3891 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/tx-cos.test.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/tx-cos.test.ts @@ -1,9 +1,9 @@ import path from 'path'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import txStorage from '../../storages/tx-cos'; import { FILE_FIELD_NAME } from '../../constants'; import { getApp, requestFile } from '..'; -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; const itif = process.env.TX_COS_ACCESS_KEY_SECRET ? it : it.skip; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/tables/users.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/tables/users.ts index 67c6303d4..54558cfa0 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/tables/users.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/tables/users.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'users', diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts index 491c8a3a3..39e0fb492 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { koaMulter as multer } from '@nocobase/utils'; +import { Context, Next } from '@tachybase/actions'; +import { koaMulter as multer } from '@tachybase/utils'; import path from 'path'; import { DEFAULT_MAX_FILE_SIZE, FILE_FIELD_NAME, LIMIT_FILES } from '../constants'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/index.ts index f6f6fb137..7c0b308b5 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/index.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/index.ts @@ -1,4 +1,4 @@ -import actions from '@nocobase/actions'; +import actions from '@tachybase/actions'; import { createMiddleware, destroyMiddleware } from './attachments'; export default function ({ app }) { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/attachments.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/attachments.ts index d3887cb7c..76bfc9e8f 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/attachments.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/attachments.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/storages.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/storages.ts index d88b5aad3..7677ce56b 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/storages.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/storages.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts index d186249ab..677a0d8d6 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts @@ -1,5 +1,5 @@ -import { Op, Repository } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Op, Repository } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.13.0-alpha.5'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20231120142523-fix-storage.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20231120142523-fix-storage.ts index ae3ffb10b..440673c6c 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20231120142523-fix-storage.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20231120142523-fix-storage.ts @@ -1,5 +1,5 @@ -import { Repository } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Repository } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.16.0-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20240306223006-update-target.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20240306223006-update-target.ts index 08afc02b2..4797a9e0b 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20240306223006-update-target.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20240306223006-update-target.ts @@ -1,5 +1,5 @@ -import { Model, Repository } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Model, Repository } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class extends Migration { on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts index 8a56dd553..d2526297c 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { FileModel } from './FileModel'; import initActions from './actions'; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/index.ts index ee90f5a5a..b8f7d8a50 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/index.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/index.ts @@ -1,6 +1,6 @@ import { StorageEngine } from 'multer'; -import Application from '@nocobase/server'; -import { Registry } from '@nocobase/utils'; +import Application from '@tachybase/server'; +import { Registry } from '@tachybase/utils'; import local from './local'; import oss from './ali-oss'; diff --git a/packages/plugins/@nocobase/plugin-formula-field/package.json b/packages/plugins/@nocobase/plugin-formula-field/package.json index 978631f52..fbf24355c 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-formula-field/package.json @@ -16,12 +16,12 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/evaluators": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/evaluators": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎", "displayName.zh-CN": "数据表字段:公式", diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx index 613cd2766..1b6f5cdd2 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useCollectionManager_deprecated, useCompile, Variable } from '@nocobase/client'; +import { useCollectionManager_deprecated, useCompile, Variable } from '@tachybase/client'; export const Expression = (props) => { const { value = '', supports = [], useCurrentFields, onChange } = props; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx index de13245c7..76a561ded 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx @@ -1,7 +1,7 @@ import { onFormValuesChange } from '@tachybase/schema'; import { useField, useFieldSchema, useFormEffects } from '@tachybase/schema'; import { toJS } from '@tachybase/schema'; -import type { CollectionOptions } from '@nocobase/client'; +import type { CollectionOptions } from '@tachybase/client'; import { Checkbox, DatePicker, @@ -10,9 +10,9 @@ import { useCollection_deprecated, useCollectionManager_deprecated, useFormBlockContext, -} from '@nocobase/client'; -import { Evaluator, evaluators } from '@nocobase/evaluators/client'; -import { Registry, toFixedByStep } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { Evaluator, evaluators } from '@tachybase/evaluators/client'; +import { Registry, toFixedByStep } from '@tachybase/utils/client'; import React, { useEffect, useState } from 'react'; import { toDbType } from '../../../utils'; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx index dc9bfc7d3..3d1525dc1 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx @@ -2,7 +2,7 @@ * title: Formula */ import { connect } from '@tachybase/schema'; -import { Formula, SchemaComponent, SchemaComponentProvider } from '@nocobase/client'; +import { Formula, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; const Expression = connect(Formula.Expression); diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx index 229eac1b8..922169c0b 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { FormulaFieldInterface } from './interfaces/formula'; import { Formula } from './components'; import { renderExpressionDescription } from './scopes'; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx index ac2f9d9ef..83ca88612 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx @@ -1,6 +1,6 @@ -import { CollectionFieldInterface, i18n, interfacesProperties } from '@nocobase/client'; -import { Evaluator, evaluators } from '@nocobase/evaluators/client'; -import { lodash, Registry } from '@nocobase/utils/client'; +import { CollectionFieldInterface, i18n, interfacesProperties } from '@tachybase/client'; +import { Evaluator, evaluators } from '@tachybase/evaluators/client'; +import { lodash, Registry } from '@tachybase/utils/client'; import { NAMESPACE } from '../locale'; // const booleanReactions = [ diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts index a7757edfc..c22122d13 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'formula-field'; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/scopes.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/scopes.tsx index 06dacd7b3..89203630b 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/scopes.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/scopes.tsx @@ -1,6 +1,6 @@ -import { css, i18n } from '@nocobase/client'; -import { Evaluator, evaluators } from '@nocobase/evaluators/client'; -import { Registry } from '@nocobase/utils/client'; +import { css, i18n } from '@tachybase/client'; +import { Evaluator, evaluators } from '@tachybase/evaluators/client'; +import { Registry } from '@tachybase/utils/client'; import React from 'react'; import { NAMESPACE } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts index a65aca693..c2d5e4f83 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts +++ b/packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts @@ -1,4 +1,4 @@ -import { Database, mockDatabase } from '@nocobase/database'; +import { Database, mockDatabase } from '@tachybase/database'; import { FormulaField } from '../formula-field'; describe('formula field', () => { diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts index da7144e2d..38147abfa 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts +++ b/packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts @@ -1,5 +1,5 @@ -import { BaseFieldOptions, DataTypes, Field } from '@nocobase/database'; -import { evaluators } from '@nocobase/evaluators'; +import { BaseFieldOptions, DataTypes, Field } from '@tachybase/database'; +import { evaluators } from '@tachybase/evaluators'; import { toDbType } from '../utils'; export interface FormulaFieldOptions extends BaseFieldOptions { diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts index 2ea174586..4200b6af6 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts +++ b/packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<=0.9.0-alpha.3'; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts index 4d46c30f0..b23e210ca 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { FormulaField } from './formula-field'; diff --git a/packages/plugins/@nocobase/plugin-gantt/package.json b/packages/plugins/@nocobase/plugin-gantt/package.json index f51ba0318..c0cdfd3e2 100644 --- a/packages/plugins/@nocobase/plugin-gantt/package.json +++ b/packages/plugins/@nocobase/plugin-gantt/package.json @@ -21,10 +21,10 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供甘特图区块。", "displayName.zh-CN": "区块:甘特图", diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Designer.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Designer.tsx index 194575b26..819da7b58 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Designer.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Designer.tsx @@ -1,4 +1,4 @@ -import { GeneralSchemaDesigner, useCollection_deprecated, useSchemaTemplate } from '@nocobase/client'; +import { GeneralSchemaDesigner, useCollection_deprecated, useSchemaTemplate } from '@tachybase/client'; import React from 'react'; export const GanttDesigner = () => { const { name, title } = useCollection_deprecated(); diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Settings.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Settings.tsx index 21a7032d4..5d3e1a172 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/Gantt.Settings.tsx @@ -13,7 +13,7 @@ import { useDataLoadingMode, useDesignable, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useGanttBlockContext } from './GanttBlockProvider'; import { useGanttTranslation, useOptions } from './utils'; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/GanttActionInitializers.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/GanttActionInitializers.tsx index 8d0393f72..803841d50 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/GanttActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/GanttActionInitializers.tsx @@ -1,5 +1,5 @@ import { useFieldSchema } from '@tachybase/schema'; -import { CompatibleSchemaInitializer, useCollection_deprecated } from '@nocobase/client'; +import { CompatibleSchemaInitializer, useCollection_deprecated } from '@tachybase/client'; /** * @deprecated diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockInitializer.tsx index 34676a8f3..033aae485 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockInitializer.tsx @@ -13,7 +13,7 @@ import { SchemaComponent, DataBlockInitializer, SchemaComponentOptions, -} from '@nocobase/client'; +} from '@tachybase/client'; import { createGanttBlockUISchema } from './createGanttBlockUISchema'; export const GanttBlockInitializer = () => { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockProvider.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockProvider.tsx index a574bce5e..174ac7c5e 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockProvider.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/GanttBlockProvider.tsx @@ -6,7 +6,7 @@ import { BlockProvider, useBlockRequestContext, TableBlockProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; export const GanttBlockContext = createContext({}); GanttBlockContext.displayName = 'GanttBlockContext'; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/drag.test.ts b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/drag.test.ts index c054f0d15..1da70d78b 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/drag.test.ts +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/drag.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneEmptyGantt } from './utils'; test('drag and adjust start time, end time, and progress', async ({ page, mockPage, mockRecord }) => { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts index 5a5569ca4..8ca0d6ed4 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { generalWithDatetimeFields, oneEmptyGantt } from './utils'; test('BlockInitializers should add gantt block', async ({ page, mockPage, mockCollections }) => { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaSettings.test.ts index 8db3544ba..499c42a19 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { getYmd } from '../helpers/other-helper'; import { oneEmptyGantt } from './utils'; const mockData = { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts index de81821fd..5aa78f2b5 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { CollectionSetting, PageConfig } from '@nocobase/test/e2e'; +import { CollectionSetting, PageConfig } from '@tachybase/test/e2e'; /** * 1. 创建一个名为 general 的 collection,其包含 时间、Percent 类型的字段 diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx index f5a3eaa14..7e6e6c665 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx @@ -11,7 +11,7 @@ import { useToken, withDynamicSchemaProps, useProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { message } from 'antd'; import { debounce } from 'lodash'; import React, { SyntheticEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/style.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/style.tsx index 3b1492b4f..c5bd36478 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/style.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/style.tsx @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/grid-body.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/grid-body.tsx index f5f5cdec5..a9d1751a6 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/grid-body.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/grid-body.tsx @@ -1,5 +1,5 @@ import { cx } from '@emotion/css'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; import React, { ReactChild } from 'react'; import { addToDate } from '../../helpers/date-helper'; import { Task } from '../../types/public-types'; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/demos/demo1.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/demos/demo1.tsx index 1f70e9aaa..751113462 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/demos/demo1.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/demos/demo1.tsx @@ -1,4 +1,4 @@ -import { Gantt, SchemaComponent, SchemaComponentProvider, useGanttBlockProps } from '@nocobase/client'; +import { Gantt, SchemaComponent, SchemaComponentProvider, useGanttBlockProps } from '@tachybase/client'; import React from 'react'; const schema = { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx index c24339362..9f4537723 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx @@ -1,4 +1,4 @@ -import { ActionBar, CurrentAppInfoProvider, Plugin, SchemaComponentOptions } from '@nocobase/client'; +import { ActionBar, CurrentAppInfoProvider, Plugin, SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { GanttDesigner } from './Gantt.Designer'; import { ganttSettings, oldGanttSettings } from './Gantt.Settings'; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx index 43949db23..5301204c5 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx @@ -1,4 +1,4 @@ -import { useCollection_deprecated, useCompile } from '@nocobase/client'; +import { useCollection_deprecated, useCompile } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const useGanttTranslation = () => { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-gantt/src/server/plugin.ts index 57c95c577..e64b8deb8 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-gantt/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; export class PluginGanttServer extends Plugin { afterAdd() {} diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json index 878acce16..0a9059948 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json @@ -30,11 +30,11 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "类似 ER 图的工具,目前只支持主数据库。", "displayName.zh-CN": "可视化数据表管理", diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx index 5761e6970..e10b9b775 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx @@ -1,6 +1,6 @@ import { DeleteOutlined } from '@ant-design/icons'; import { uid } from '@tachybase/schema'; -import { css, SchemaComponent, useActionContext, useRequest } from '@nocobase/client'; +import { css, SchemaComponent, useActionContext, useRequest } from '@tachybase/client'; import React, { useEffect } from 'react'; import { useCreateActionAndRefreshCM } from './action-hooks'; import { GraphDrawPage } from './GraphDrawPage'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx index 0e7b1f7b1..43d870e24 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx @@ -25,7 +25,7 @@ import { useDataSourceManager, useDataSource, useGlobalTheme, -} from '@nocobase/client'; +} from '@tachybase/client'; import { App, Button, ConfigProvider, Layout, Spin, Switch, Tooltip } from 'antd'; import dagre from 'dagre'; import lodash from 'lodash'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/action-hooks.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/action-hooks.tsx index 0406e81e1..95af6e21b 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/action-hooks.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/action-hooks.tsx @@ -7,8 +7,8 @@ import { useCollectionManager_deprecated, useCompile, useRequest, -} from '@nocobase/client'; -import { error, lodash } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { error, lodash } from '@tachybase/utils/client'; import { Select, message } from 'antd'; import cloneDeep from 'lodash/cloneDeep'; import React, { useContext, useEffect } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddCollectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddCollectionAction.tsx index a94131ce2..fcf00a2e7 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddCollectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddCollectionAction.tsx @@ -1,5 +1,5 @@ import { PlusOutlined } from '@ant-design/icons'; -import { AddCollection } from '@nocobase/client'; +import { AddCollection } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; import { useCancelAction } from '../action-hooks'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddFieldAction.tsx index 6e5e93684..b7588ae80 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddFieldAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddFieldAction.tsx @@ -1,5 +1,5 @@ import { PlusOutlined } from '@ant-design/icons'; -import { AddFieldAction as AddCollectionFieldAction } from '@nocobase/client'; +import { AddFieldAction as AddCollectionFieldAction } from '@tachybase/client'; import React from 'react'; import { useCancelAction, useCreateAction } from '../action-hooks'; import { getPopupContainer } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectChildAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectChildAction.tsx index 7502bdd3f..96dad3a76 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectChildAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectChildAction.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Tooltip } from 'antd'; import { FallOutlined } from '@ant-design/icons'; -import { useCollectionManager_deprecated } from '@nocobase/client'; +import { useCollectionManager_deprecated } from '@tachybase/client'; import { getPopupContainer, useGCMTranslation } from '../utils'; export const ConnectChildAction = (props) => { diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectParentAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectParentAction.tsx index abb03126f..ed0ac9676 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectParentAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectParentAction.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Tooltip } from 'antd'; import { RiseOutlined } from '@ant-design/icons'; -import { useCollectionManager_deprecated } from '@nocobase/client'; +import { useCollectionManager_deprecated } from '@tachybase/client'; import { getPopupContainer, useGCMTranslation } from '../utils'; export const ConnectParentAction = (props) => { diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/DeleteCollectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/DeleteCollectionAction.tsx index 783b5878c..f06528d23 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/DeleteCollectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/DeleteCollectionAction.tsx @@ -1,5 +1,5 @@ import { DeleteOutlined } from '@ant-design/icons'; -import { DeleteCollection } from '@nocobase/client'; +import { DeleteCollection } from '@tachybase/client'; import React from 'react'; import { useCancelAction, useUpdateCollectionActionAndRefreshCM } from '../action-hooks'; import { getPopupContainer } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditCollectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditCollectionAction.tsx index d885b36b6..09cc1d2fc 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditCollectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditCollectionAction.tsx @@ -1,5 +1,5 @@ import { EditOutlined } from '@ant-design/icons'; -import { EditCollection } from '@nocobase/client'; +import { EditCollection } from '@tachybase/client'; import React from 'react'; import { useCancelAction, useUpdateCollectionActionAndRefreshCM } from '../action-hooks'; import { getPopupContainer } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditFieldAction.tsx index 19a9cf9cf..a646fca65 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditFieldAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditFieldAction.tsx @@ -1,5 +1,5 @@ import { EditOutlined } from '@ant-design/icons'; -import { EditFieldAction as EditCollectionFieldAction } from '@nocobase/client'; +import { EditFieldAction as EditCollectionFieldAction } from '@tachybase/client'; import React from 'react'; import { useCancelAction, useUpdateFieldAction } from '../action-hooks'; import { getPopupContainer } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx index 0014e553c..d52157e1e 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx @@ -13,7 +13,7 @@ import { useCompile, useCurrentAppInfo, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Badge, Tag } from 'antd'; import lodash from 'lodash'; import React, { useContext, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FieldSummary.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FieldSummary.tsx index e433be539..2ca827cf6 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FieldSummary.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FieldSummary.tsx @@ -1,5 +1,5 @@ import { observer } from '@tachybase/schema'; -import { css, useCollectionManager_deprecated, useCompile } from '@nocobase/client'; +import { css, useCollectionManager_deprecated, useCompile } from '@tachybase/client'; import { Tag } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/LocateCollectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/LocateCollectionAction.tsx index 8d75e9806..c0f9b0f4c 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/LocateCollectionAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/LocateCollectionAction.tsx @@ -2,7 +2,7 @@ import React, { useState, useContext } from 'react'; import { Input, Menu, Popover, Button } from 'antd'; import { css } from '@emotion/css'; import { MenuOutlined } from '@ant-design/icons'; -import { useCompile } from '@nocobase/client'; +import { useCompile } from '@tachybase/client'; import { getPopupContainer, useGCMTranslation } from '../utils'; import { CollapsedContext } from '../GraphDrawPage'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/OverrideFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/OverrideFieldAction.tsx index 7791debc0..ed96d0f49 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/OverrideFieldAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/OverrideFieldAction.tsx @@ -1,5 +1,5 @@ import { CopyOutlined } from '@ant-design/icons'; -import { OverridingFieldAction as OverridingCollectionFieldAction } from '@nocobase/client'; +import { OverridingFieldAction as OverridingCollectionFieldAction } from '@tachybase/client'; import React from 'react'; import { useCancelAction, useCreateAction } from '../action-hooks'; import { getPopupContainer } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/SelectCollectionsAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/SelectCollectionsAction.tsx index 37dbdc22d..fe4a4d5f8 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/SelectCollectionsAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/SelectCollectionsAction.tsx @@ -1,6 +1,6 @@ import React, { useContext, useMemo } from 'react'; import { CollapsedContext } from '../GraphDrawPage'; -import { Select, useCompile } from '@nocobase/client'; +import { Select, useCompile } from '@tachybase/client'; import { useSearchParams } from 'react-router-dom'; import { getPopupContainer } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewFieldAction.tsx index 3a3ee4906..d01ee7347 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewFieldAction.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewFieldAction.tsx @@ -1,5 +1,5 @@ import { EyeOutlined } from '@ant-design/icons'; -import { ViewFieldAction as ViewCollectionFieldAction } from '@nocobase/client'; +import { ViewFieldAction as ViewCollectionFieldAction } from '@tachybase/client'; import React from 'react'; import { getPopupContainer } from '../utils'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx index 869c5ccd6..e7a90acaa 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { GraphCollectionPane } from './GraphCollectionShortcut'; import { NAMESPACE } from './locale'; export class GraphCollectionPlugin extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx index cef2e842f..b71f8d59d 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/utils.tsx index 543ea816a..d4c274d0c 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/utils.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/utils.tsx @@ -1,6 +1,6 @@ import lodash from 'lodash'; import { useTranslation } from 'react-i18next'; -import { CollectionOptions } from '@nocobase/client'; +import { CollectionOptions } from '@tachybase/client'; const { groupBy, reduce, uniq, uniqBy } = lodash; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/graphPositions.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/graphPositions.ts index 4635d5fb9..9770b9deb 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/graphPositions.ts +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/graphPositions.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts index c6b2d2649..5e875606e 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import path from 'path'; export class GraphCollectionManagerPlugin extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-iframe-block/package.json b/packages/plugins/@nocobase/plugin-iframe-block/package.json index 5709b7bb2..20a6f8d64 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/package.json +++ b/packages/plugins/@nocobase/plugin-iframe-block/package.json @@ -18,11 +18,11 @@ "react-iframe": "~1.8.5" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。", "displayName.zh-CN": "区块:iframe", diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.Designer.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.Designer.tsx index 10ee7486c..4e5e352f8 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.Designer.tsx +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.Designer.tsx @@ -7,7 +7,7 @@ import { SchemaSettingsRemove, useAPIClient, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.tsx index f35f07f9d..3b68e98bd 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.tsx +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.tsx @@ -1,5 +1,5 @@ import { observer, useField } from '@tachybase/schema'; -import { useAPIClient, useApp } from '@nocobase/client'; +import { useAPIClient, useApp } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializer.tsx index 54705ed47..1f6d50cd6 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializer.tsx @@ -1,5 +1,5 @@ import { FormOutlined } from '@ant-design/icons'; -import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; export const IframeBlockInitializer = () => { diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockProvider.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockProvider.tsx index 746359bd4..8f779f8b8 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockProvider.tsx +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { Iframe } from './Iframe'; import { IframeBlockInitializer } from './IframeBlockInitializer'; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts index a30d4869d..3bd700a16 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { IframeBlockProvider } from './IframeBlockProvider'; import { iframeBlockSchemaSettings, iframeBlockSchemaSettings_deprecated } from './schemaSettings'; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/client/schemaSettings.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/client/schemaSettings.ts index d22374b1a..b5e98f16d 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/client/schemaSettings.ts +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/client/schemaSettings.ts @@ -1,6 +1,6 @@ import { ISchema, useField, useFieldSchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { SchemaSettings, useAPIClient, useDesignable } from '@nocobase/client'; +import { SchemaSettings, useAPIClient, useDesignable } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; /** diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/actions/index.ts index c16728ccf..11321e2d7 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/server/actions/index.ts +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/server/actions/index.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { Repository } from '@nocobase/database'; +import { Context, Next } from '@tachybase/actions'; +import { Repository } from '@tachybase/database'; export async function getHtml(ctx: Context, next: Next) { const { filterByTk } = ctx.action.params; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/iframe-html.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/iframe-html.ts index d2ee425c7..0146a8c9c 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/iframe-html.ts +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/iframe-html.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { namespace: 'iframe-block.iframe-html-storage', diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts index 5b7e19399..fd034195c 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import path from 'path'; import { getHtml } from './actions'; diff --git a/packages/plugins/@nocobase/plugin-import/README.md b/packages/plugins/@nocobase/plugin-import/README.md index 858ebdfe5..0d915185d 100644 --- a/packages/plugins/@nocobase/plugin-import/README.md +++ b/packages/plugins/@nocobase/plugin-import/README.md @@ -185,7 +185,7 @@ Excel 数据导入插件。 通过 `db.registerFieldValueParsers()` 方法注册自定义的 `ValueParser`,如: ```ts -import { BaseValueParser } from '@nocobase/database'; +import { BaseValueParser } from '@tachybase/database'; class PointValueParser extends BaseValueParser { async setValue(value) { diff --git a/packages/plugins/@nocobase/plugin-import/README.zh-CN.md b/packages/plugins/@nocobase/plugin-import/README.zh-CN.md index 68c6546c7..d3d4cc24b 100644 --- a/packages/plugins/@nocobase/plugin-import/README.zh-CN.md +++ b/packages/plugins/@nocobase/plugin-import/README.zh-CN.md @@ -185,7 +185,7 @@ Excel 数据导入插件。 通过 `db.registerFieldValueParsers()` 方法注册自定义的 `ValueParser`,如: ```ts -import { BaseValueParser } from '@nocobase/database'; +import { BaseValueParser } from '@tachybase/database'; class PointValueParser extends BaseValueParser { async setValue(value) { diff --git a/packages/plugins/@nocobase/plugin-import/package.json b/packages/plugins/@nocobase/plugin-import/package.json index af5522594..813129d41 100644 --- a/packages/plugins/@nocobase/plugin-import/package.json +++ b/packages/plugins/@nocobase/plugin-import/package.json @@ -26,12 +26,12 @@ "xlsx": "^0.17.0" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。", "displayName.zh-CN": "操作:导入记录", diff --git a/packages/plugins/@nocobase/plugin-import/src/client/ImportActionInitializer.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportActionInitializer.tsx index eec9046d1..5e84fc712 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/ImportActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-import/src/client/ImportActionInitializer.tsx @@ -8,7 +8,7 @@ import { useDesignable, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { NAMESPACE } from './constants'; import { useFields } from './useFields'; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/ImportDesigner.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportDesigner.tsx index 180076afd..d59c724af 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/ImportDesigner.tsx +++ b/packages/plugins/@nocobase/plugin-import/src/client/ImportDesigner.tsx @@ -8,7 +8,7 @@ import { SchemaSettingsModalItem, SchemaSettingsRemove, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useShared } from './useShared'; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/ImportModal.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportModal.tsx index f579d9e28..76ca1c668 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/ImportModal.tsx +++ b/packages/plugins/@nocobase/plugin-import/src/client/ImportModal.tsx @@ -1,5 +1,5 @@ import { ExclamationCircleFilled, LoadingOutlined } from '@ant-design/icons'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { Button, Modal, Space, Spin } from 'antd'; import { saveAs } from 'file-saver'; import React from 'react'; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/ImportPluginProvider.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportPluginProvider.tsx index 17e113318..6b53c2caf 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/ImportPluginProvider.tsx +++ b/packages/plugins/@nocobase/plugin-import/src/client/ImportPluginProvider.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React, { useState } from 'react'; import { createPortal } from 'react-dom'; import { ImportActionInitializer, ImportDesigner } from '.'; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/index.ts b/packages/plugins/@nocobase/plugin-import/src/client/index.ts index b1922c29a..48438e727 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-import/src/client/index.ts @@ -6,7 +6,7 @@ export * from './ImportDesigner'; export * from './ImportPluginProvider'; export * from './useImportAction'; -import { Plugin, useCollection_deprecated } from '@nocobase/client'; +import { Plugin, useCollection_deprecated } from '@tachybase/client'; import { ImportPluginProvider } from './ImportPluginProvider'; import { importActionSchemaSettings } from './schemaSettings'; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/schemaSettings.ts b/packages/plugins/@nocobase/plugin-import/src/client/schemaSettings.ts index 9652ed1f5..f999f8c9c 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/schemaSettings.ts +++ b/packages/plugins/@nocobase/plugin-import/src/client/schemaSettings.ts @@ -1,6 +1,6 @@ import { ArrayItems } from '@tachybase/components'; import { ISchema, useField, useFieldSchema } from '@tachybase/schema'; -import { ButtonEditor, SchemaSettings, useDesignable, useSchemaToolbar } from '@nocobase/client'; +import { ButtonEditor, SchemaSettings, useDesignable, useSchemaToolbar } from '@tachybase/client'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useShared } from './useShared'; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/useFields.ts b/packages/plugins/@nocobase/plugin-import/src/client/useFields.ts index c7a3c98b6..5114566d6 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/useFields.ts +++ b/packages/plugins/@nocobase/plugin-import/src/client/useFields.ts @@ -1,4 +1,4 @@ -import { useCollectionManager_deprecated } from '@nocobase/client'; +import { useCollectionManager_deprecated } from '@tachybase/client'; const EXCLUDE_INTERFACES = [ // 'icon', diff --git a/packages/plugins/@nocobase/plugin-import/src/client/useImportAction.ts b/packages/plugins/@nocobase/plugin-import/src/client/useImportAction.ts index 59a1363fe..20f8c7585 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/useImportAction.ts +++ b/packages/plugins/@nocobase/plugin-import/src/client/useImportAction.ts @@ -6,7 +6,7 @@ import { useCollection_deprecated, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import lodash from 'lodash'; import { saveAs } from 'file-saver'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/useShared.ts b/packages/plugins/@nocobase/plugin-import/src/client/useShared.ts index 1d5a7df66..018a17cc6 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/useShared.ts +++ b/packages/plugins/@nocobase/plugin-import/src/client/useShared.ts @@ -1,5 +1,5 @@ import type { VoidField } from '@tachybase/schema'; -import { Cascader, css, useCollection_deprecated } from '@nocobase/client'; +import { Cascader, css, useCollection_deprecated } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; import { NAMESPACE } from './constants'; import { useFields } from './useFields'; diff --git a/packages/plugins/@nocobase/plugin-import/src/server/actions/downloadXlsxTemplate.ts b/packages/plugins/@nocobase/plugin-import/src/server/actions/downloadXlsxTemplate.ts index b01709b3d..c3899a07d 100644 --- a/packages/plugins/@nocobase/plugin-import/src/server/actions/downloadXlsxTemplate.ts +++ b/packages/plugins/@nocobase/plugin-import/src/server/actions/downloadXlsxTemplate.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; import xlsx from 'node-xlsx'; export async function downloadXlsxTemplate(ctx: Context, next: Next) { diff --git a/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts b/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts index 00ec5b62e..6d0b9ea24 100644 --- a/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts +++ b/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts @@ -1,6 +1,6 @@ -import { Context, Next } from '@nocobase/actions'; -import { Collection, Repository } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; +import { Context, Next } from '@tachybase/actions'; +import { Collection, Repository } from '@tachybase/database'; +import { uid } from '@tachybase/utils'; import xlsx from 'node-xlsx'; import XLSX from 'xlsx'; import { namespace } from '../../'; diff --git a/packages/plugins/@nocobase/plugin-import/src/server/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/index.ts index 0f455be11..19a474d1a 100644 --- a/packages/plugins/@nocobase/plugin-import/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-import/src/server/index.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { namespace } from '..'; import { downloadXlsxTemplate, importXlsx } from './actions'; import { enUS, zhCN } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-import/src/server/middleware/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/middleware/index.ts index 0be497f3d..b45e9f977 100644 --- a/packages/plugins/@nocobase/plugin-import/src/server/middleware/index.ts +++ b/packages/plugins/@nocobase/plugin-import/src/server/middleware/index.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { koaMulter as multer } from '@nocobase/utils'; +import { Context, Next } from '@tachybase/actions'; +import { koaMulter as multer } from '@tachybase/utils'; export async function importMiddleware(ctx: Context, next: Next) { if (ctx.action.actionName !== 'importXlsx') { diff --git a/packages/plugins/@nocobase/plugin-import/src/server/utils/transform.ts b/packages/plugins/@nocobase/plugin-import/src/server/utils/transform.ts index 1fe46e596..40dbdf8b0 100644 --- a/packages/plugins/@nocobase/plugin-import/src/server/utils/transform.ts +++ b/packages/plugins/@nocobase/plugin-import/src/server/utils/transform.ts @@ -1,4 +1,4 @@ -import { dayjs, str2moment } from '@nocobase/utils'; +import { dayjs, str2moment } from '@tachybase/utils'; import * as math from 'mathjs'; import { namespace } from '../../'; diff --git a/packages/plugins/@nocobase/plugin-kanban/package.json b/packages/plugins/@nocobase/plugin-kanban/package.json index 2467a6932..0e19527c9 100644 --- a/packages/plugins/@nocobase/plugin-kanban/package.json +++ b/packages/plugins/@nocobase/plugin-kanban/package.json @@ -22,9 +22,9 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "提供看板区块。", "displayName.zh-CN": "区块:看板", diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/CreateAndSelectSort/index.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/CreateAndSelectSort/index.tsx index 03baec204..d1aa7b7fa 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/CreateAndSelectSort/index.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/CreateAndSelectSort/index.tsx @@ -8,7 +8,7 @@ import { useAPIClient, useCompile, useGlobalTheme, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Button, Space } from 'antd'; import React, { useContext } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.Designer.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.Designer.tsx index 27929a76d..1adaad24d 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.Designer.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.Designer.tsx @@ -11,7 +11,7 @@ import { useFormItemInitializerFields, useGetAriaLabelOfDesigner, useSchemaInitializerRender, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Space } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.tsx index 097f5b00a..bf1bd6e9f 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Card.tsx @@ -7,7 +7,7 @@ import { RecordProvider, SchemaComponentOptions, useCollectionParentRecordData, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Card } from 'antd'; import cls from 'classnames'; import React, { useContext, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Designer.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Designer.tsx index ee90ca3ce..6834e0caf 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Designer.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Designer.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useCollection_deprecated, GeneralSchemaDesigner, useSchemaTemplate } from '@nocobase/client'; +import { useCollection_deprecated, GeneralSchemaDesigner, useSchemaTemplate } from '@tachybase/client'; export const KanbanDesigner = () => { const { name, title } = useCollection_deprecated(); diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Settings.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Settings.tsx index c46d7c1b6..f00948ea7 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.Settings.tsx @@ -9,7 +9,7 @@ import { SchemaSettingsBlockTitleItem, removeNullCondition, SchemaSettingsTemplate, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useKanbanBlockContext } from './KanbanBlockProvider'; export const kanbanSettings = new SchemaSettings({ name: 'blockSettings:kanban', diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.tsx index 73ba5f85d..6c02fb80b 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/Kanban.tsx @@ -7,7 +7,7 @@ import { useCollectionParentRecordData, useProps, withDynamicSchemaProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Spin, Tag } from 'antd'; import React, { useContext, useMemo, useState } from 'react'; import { Board } from './board'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanActionInitializers.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanActionInitializers.tsx index 2864b7aca..3a7fce85b 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanActionInitializers.tsx @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, useCollection_deprecated } from '@nocobase/client'; +import { CompatibleSchemaInitializer, useCollection_deprecated } from '@tachybase/client'; /** * @deprecated diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockInitializer.tsx index e4fdb407a..6a03182d7 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockInitializer.tsx @@ -15,7 +15,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useAPIClient, -} from '@nocobase/client'; +} from '@tachybase/client'; import { createKanbanBlockUISchema } from './createKanbanBlockUISchema'; import { CreateAndSelectSort } from './CreateAndSelectSort'; import { NAMESPACE } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockProvider.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockProvider.tsx index 2fd09ce4d..812e911be 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockProvider.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/KanbanBlockProvider.tsx @@ -10,7 +10,7 @@ import { FixedBlockWrapper, BlockProvider, useBlockRequestContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { toColumns } from './Kanban'; export const KanbanBlockContext = createContext({}); diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts index aa79b8fd9..1efab3e96 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { generalWithSingleSelect, oneEmptyKanbanBlock } from './utils'; //在页面中可以创建看板区块 diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaSettings.test.ts index 97f332502..89fde40d5 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/schemaSettings.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; import { oneEmptyKanbanBlock } from './utils'; //看板的区块参数配置 diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts index 22dcb9ef3..08ed93b91 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts @@ -1,4 +1,4 @@ -import { CollectionSetting, PageConfig } from '@nocobase/test/e2e'; +import { CollectionSetting, PageConfig } from '@tachybase/test/e2e'; /** * 1. 创建一个名为 general 的 collection,其包含 single select 类型的字段 diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/board/demos/demo2.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/board/demos/demo2.tsx index a0e8d346f..c45fbf160 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/board/demos/demo2.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/board/demos/demo2.tsx @@ -1,4 +1,4 @@ -import { Board } from '@nocobase/client'; +import { Board } from '@tachybase/client'; import { Button, Card } from 'antd'; import React, { useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx index 1538f1aa3..59f3fdbfb 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Action, CurrentAppInfoProvider, Plugin, SchemaComponentOptions } from '@nocobase/client'; +import { Action, CurrentAppInfoProvider, Plugin, SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { Kanban } from './Kanban'; import { KanbanCard } from './Kanban.Card'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-kanban/src/client/locale/index.ts index 016d63abe..86c8eea71 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'kanban'; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/style.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/style.tsx index e487a498f..3faa017a4 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/style.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/style.tsx @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; export const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@nocobase/plugin-kanban/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-kanban/src/server/plugin.ts index ba3739ae8..7bf99b089 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; export class PluginKanbanServer extends Plugin { afterAdd() {} diff --git a/packages/plugins/@nocobase/plugin-localization-management/package.json b/packages/plugins/@nocobase/plugin-localization-management/package.json index 666f0881b..23adc3bee 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/package.json +++ b/packages/plugins/@nocobase/plugin-localization-management/package.json @@ -18,14 +18,14 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-client": "workspace:*", "@nocobase/plugin-ui-schema-storage": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "支持管理应用程序的本地化资源。", "displayName.zh-CN": "本地化", diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx b/packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx index d860f004f..114b293a1 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx +++ b/packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx @@ -14,7 +14,7 @@ import { useRecord, useResourceActionContext, useResourceContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; import { Input as AntdInput, Button, Card, Checkbox, Col, Divider, Row, Tag, Typography, message } from 'antd'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx b/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx index 6ab0e4eb4..619463c43 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { Localization } from './Localization'; import { NAMESPACE } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts index 4e7d963d6..240966e95 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts @@ -1,5 +1,5 @@ -import Database, { Repository } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import Database, { Repository } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('actions', () => { describe('localizations', () => { diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts index b83ff1dd3..c1c6f7000 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts @@ -1,4 +1,4 @@ -import { CacheManager } from '@nocobase/cache'; +import { CacheManager } from '@tachybase/cache'; import Resources from '../resources'; describe('resources', () => { diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts index 0d92d67ba..7997b9790 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { Database, Model, Op } from '@nocobase/database'; +import { Context, Next } from '@tachybase/actions'; +import { Database, Model, Op } from '@tachybase/database'; import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; import { NAMESPACE_COLLECTIONS, NAMESPACE_MENUS } from '../constans'; import LocalizationManagementPlugin from '../plugin'; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts index 191663c9d..1f4773546 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts @@ -1,7 +1,7 @@ -import { Context, Next, DEFAULT_PAGE, DEFAULT_PER_PAGE } from '@nocobase/actions'; -import { Cache } from '@nocobase/cache'; -import { Database, Model, Op } from '@nocobase/database'; -import { PluginManager } from '@nocobase/server'; +import { Context, Next, DEFAULT_PAGE, DEFAULT_PER_PAGE } from '@tachybase/actions'; +import { Cache } from '@tachybase/cache'; +import { Database, Model, Op } from '@tachybase/database'; +import { PluginManager } from '@tachybase/server'; import { EXTEND_MODULES } from '../constans'; const appendTranslations = async (db: Database, rows: Model[], locale: string): Promise => { diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts index 7dc016464..03d8b3de7 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts index 9495f6a3c..070869e83 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ namespace: 'localization.localization', diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts index cd8d6a599..80faeb7a8 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class AddTranslationToRoleTitleMigration extends Migration { appVersion = '<0.11.1-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20231206161851-fix-module.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20231206161851-fix-module.ts index 8e1aff81e..ae9e6c0f8 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20231206161851-fix-module.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20231206161851-fix-module.ts @@ -1,5 +1,5 @@ -import { Op } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Op } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; import { getTextsFromDB, getTextsFromMenu } from '../actions/localization'; import { NAMESPACE_COLLECTIONS, NAMESPACE_MENUS } from '../constans'; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts index 8e4adafe7..37366e31c 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts @@ -1,6 +1,6 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; import { UiSchemaStoragePlugin } from '@nocobase/plugin-ui-schema-storage'; -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import deepmerge from 'deepmerge'; import { resolve } from 'path'; import localization from './actions/localization'; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts index 7304277e6..4e7caf9e3 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts @@ -1,5 +1,5 @@ -import { Cache } from '@nocobase/cache'; -import { Database, Transaction } from '@nocobase/database'; +import { Cache } from '@tachybase/cache'; +import { Database, Transaction } from '@tachybase/database'; export default class Resources { cache: Cache; diff --git a/packages/plugins/@nocobase/plugin-logger/package.json b/packages/plugins/@nocobase/plugin-logger/package.json index fb6a4120f..1d4033eb0 100644 --- a/packages/plugins/@nocobase/plugin-logger/package.json +++ b/packages/plugins/@nocobase/plugin-logger/package.json @@ -18,11 +18,11 @@ "tar-fs": "^3.0.4" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/logger": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/logger": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。", "displayName.zh-CN": "日志", diff --git a/packages/plugins/@nocobase/plugin-logger/src/client/LogsDownloader.tsx b/packages/plugins/@nocobase/plugin-logger/src/client/LogsDownloader.tsx index a91c9718a..cd0c08814 100644 --- a/packages/plugins/@nocobase/plugin-logger/src/client/LogsDownloader.tsx +++ b/packages/plugins/@nocobase/plugin-logger/src/client/LogsDownloader.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useRequest } from '@nocobase/client'; +import { useAPIClient, useRequest } from '@tachybase/client'; import React, { useCallback, useMemo } from 'react'; import { Tree, Card, Alert, Typography, Input, Button, theme, Empty } from 'antd'; import type { DataNode } from 'antd/lib/tree'; diff --git a/packages/plugins/@nocobase/plugin-logger/src/client/index.tsx b/packages/plugins/@nocobase/plugin-logger/src/client/index.tsx index 67881a11d..1bf074bd8 100644 --- a/packages/plugins/@nocobase/plugin-logger/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-logger/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { lang } from './locale'; import { LogsDownloader } from './LogsDownloader'; diff --git a/packages/plugins/@nocobase/plugin-logger/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-logger/src/client/locale/index.ts index cf7e7243b..665155df6 100644 --- a/packages/plugins/@nocobase/plugin-logger/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-logger/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'logger'; diff --git a/packages/plugins/@nocobase/plugin-logger/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-logger/src/server/plugin.ts index a84918214..6d156409c 100644 --- a/packages/plugins/@nocobase/plugin-logger/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-logger/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import logger from './resourcer/logger'; export class PluginLoggerServer extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-logger/src/server/resourcer/logger.ts b/packages/plugins/@nocobase/plugin-logger/src/server/resourcer/logger.ts index cf1eea23d..06d024924 100644 --- a/packages/plugins/@nocobase/plugin-logger/src/server/resourcer/logger.ts +++ b/packages/plugins/@nocobase/plugin-logger/src/server/resourcer/logger.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { getLoggerFilePath } from '@nocobase/logger'; +import { Context, Next } from '@tachybase/actions'; +import { getLoggerFilePath } from '@tachybase/logger'; import { readdir } from 'fs/promises'; import { join } from 'path'; import stream from 'stream'; diff --git a/packages/plugins/@nocobase/plugin-map/package.json b/packages/plugins/@nocobase/plugin-map/package.json index bb7a9760c..156206210 100644 --- a/packages/plugins/@nocobase/plugin-map/package.json +++ b/packages/plugins/@nocobase/plugin-map/package.json @@ -28,12 +28,12 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。", "displayName.zh-CN": "区块:地图", diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/MapActionInitializers.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapActionInitializers.tsx index 16e645e56..44dffd138 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/MapActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/MapActionInitializers.tsx @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, useCollection_deprecated } from '@nocobase/client'; +import { CompatibleSchemaInitializer, useCollection_deprecated } from '@tachybase/client'; /** * @deprecated diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.Settings.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.Settings.tsx index c4802480d..789142c1a 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.Settings.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.Settings.tsx @@ -18,7 +18,7 @@ import { useCollectionManager_deprecated, setDataLoadingModeSettingsItem, useDataLoadingMode, -} from '@nocobase/client'; +} from '@tachybase/client'; import lodash from 'lodash'; import { useMapTranslation } from '../locale'; import { useMapBlockContext } from './MapBlockProvider'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.tsx index 8fdae6c83..f2b81fcc5 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.tsx @@ -3,7 +3,7 @@ import { useCollectionManager_deprecated, useProps, withDynamicSchemaProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useMemo } from 'react'; import { MapBlockComponent } from '../components'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockDesigner.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockDesigner.tsx index f1157b94e..8b189bbd6 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockDesigner.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockDesigner.tsx @@ -1,4 +1,4 @@ -import { GeneralSchemaDesigner, useCollection, useSchemaTemplate } from '@nocobase/client'; +import { GeneralSchemaDesigner, useCollection, useSchemaTemplate } from '@tachybase/client'; import React from 'react'; export const MapBlockDesigner = () => { const { name, title } = useCollection(); diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockInitializer.tsx index 670e04992..b6b1fbca0 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockInitializer.tsx @@ -10,7 +10,7 @@ import { useGlobalTheme, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useContext } from 'react'; import { useMapTranslation } from '../locale'; import { findNestedOption } from './utils'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockProvider.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockProvider.tsx index 6678eb68d..690a0cf7e 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockProvider.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockProvider.tsx @@ -1,5 +1,5 @@ import { useField, useFieldSchema } from '@tachybase/schema'; -import { BlockProvider, FixedBlockWrapper, SchemaComponentOptions, useBlockRequestContext } from '@nocobase/client'; +import { BlockProvider, FixedBlockWrapper, SchemaComponentOptions, useBlockRequestContext } from '@tachybase/client'; import React, { createContext, useContext, useState } from 'react'; export const MapBlockContext = createContext({}); diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/index.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/index.tsx index 250c32ccf..f9819977a 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/index.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/index.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { MapBlock } from './MapBlock'; import { MapBlockDesigner } from './MapBlockDesigner'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Block.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Block.tsx index f3380d56e..b185500b3 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Block.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Block.tsx @@ -10,7 +10,7 @@ import { useFilterAPI, useCollectionParentRecordData, useProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; import { Button, Space } from 'antd'; import React, { useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Map.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Map.tsx index 33b1b2618..26c8fc1bd 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Map.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Map.tsx @@ -2,7 +2,7 @@ import AMapLoader from '@amap/amap-jsapi-loader'; import '@amap/amap-jsapi-types'; import { SyncOutlined } from '@ant-design/icons'; import { useFieldSchema } from '@tachybase/schema'; -import { css, useApp, useCollection_deprecated } from '@nocobase/client'; +import { css, useApp, useCollection_deprecated } from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; import { Alert, App, Button, Spin } from 'antd'; import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Search.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Search.tsx index b063f4657..3f99eb72d 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Search.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Search.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { useDebounceFn } from 'ahooks'; import { message, Select } from 'antd'; import React, { useEffect, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/Configuration.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/Configuration.tsx index 6e5f868ec..551a52693 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/Configuration.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/Configuration.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useCompile } from '@nocobase/client'; +import { useAPIClient, useCompile } from '@tachybase/client'; import { useBoolean } from 'ahooks'; import { Button, Card, Form, Input, Tabs, message } from 'antd'; import React, { useEffect, useMemo } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/Designer.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/Designer.tsx index aafa890a1..272be8b03 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/Designer.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/Designer.tsx @@ -11,7 +11,7 @@ import { useCollectionManager_deprecated, useDesignable, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import lodash from 'lodash'; import React from 'react'; import { useMapTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Block.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Block.tsx index cb68846a6..ac202d058 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Block.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Block.tsx @@ -10,7 +10,7 @@ import { useFilterAPI, useCollectionParentRecordData, useProps, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; import { Button, Space } from 'antd'; import React, { useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Map.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Map.tsx index 8ea00a41f..f06e1b4bb 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Map.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Map.tsx @@ -1,7 +1,7 @@ import { SyncOutlined } from '@ant-design/icons'; import { useFieldSchema } from '@tachybase/schema'; import { Loader } from '@googlemaps/js-api-loader'; -import { css, useAPIClient, useApp, useCollection_deprecated } from '@nocobase/client'; +import { css, useAPIClient, useApp, useCollection_deprecated } from '@tachybase/client'; import { useMemoizedFn } from 'ahooks'; import { Alert, App, Button, Spin } from 'antd'; import React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Search.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Search.tsx index 28edced25..bb09a7d2c 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Search.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Search.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { useDebounceFn } from 'ahooks'; import { message, Select } from 'antd'; import React, { useEffect, useRef, useState } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/Map.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/Map.tsx index 41b3abc32..057ade971 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/Map.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/Map.tsx @@ -1,5 +1,5 @@ import { connect, mapReadPretty } from '@tachybase/schema'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import React from 'react'; import { AMapComponentProps } from './AMap'; import Designer from './Designer'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/components/ReadPretty.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/ReadPretty.tsx index 2941e91df..d739908f3 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/components/ReadPretty.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/components/ReadPretty.tsx @@ -1,5 +1,5 @@ import { useFieldSchema, useForm } from '@tachybase/schema'; -import { EllipsisWithTooltip, useCollection_deprecated, useFieldTitle } from '@nocobase/client'; +import { EllipsisWithTooltip, useCollection_deprecated, useFieldTitle } from '@tachybase/client'; import React from 'react'; import { MapComponent } from './MapComponent'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/fields/schema.ts b/packages/plugins/@nocobase/plugin-map/src/client/fields/schema.ts index 7feb6ee1d..5e78dacf3 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/fields/schema.ts +++ b/packages/plugins/@nocobase/plugin-map/src/client/fields/schema.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { CollectionFieldInterface, interfacesProperties } from '@nocobase/client'; +import { CollectionFieldInterface, interfacesProperties } from '@tachybase/client'; import { MapTypes } from '../constants'; import { generateNTemplate } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/hooks/useMapConfiguration.ts b/packages/plugins/@nocobase/plugin-map/src/client/hooks/useMapConfiguration.ts index b5784f92e..0ab688bac 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/hooks/useMapConfiguration.ts +++ b/packages/plugins/@nocobase/plugin-map/src/client/hooks/useMapConfiguration.ts @@ -1,4 +1,4 @@ -import { useRequest } from '@nocobase/client'; +import { useRequest } from '@tachybase/client'; import { useMemo } from 'react'; export const MapConfigurationResourceKey = 'map-configuration'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/index.tsx b/packages/plugins/@nocobase/plugin-map/src/client/index.tsx index 14a8e1a8e..392f43a06 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/index.tsx @@ -1,4 +1,4 @@ -import { CurrentAppInfoProvider, Plugin, SchemaComponentOptions } from '@nocobase/client'; +import { CurrentAppInfoProvider, Plugin, SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { MapBlockOptions } from './block'; import { mapActionInitializers, mapActionInitializers_deprecated } from './block/MapActionInitializers'; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-map/src/client/locale/index.ts index 402124841..24fa2825b 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-map/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'map'; diff --git a/packages/plugins/@nocobase/plugin-map/src/server/__tests__/fields.test.ts b/packages/plugins/@nocobase/plugin-map/src/server/__tests__/fields.test.ts index 985227d74..95bcb0f87 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/__tests__/fields.test.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/__tests__/fields.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { mockDatabase } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { mockDatabase } from '@tachybase/test'; import { CircleField, LineStringField, PointField, PolygonField } from '../fields'; const data = { diff --git a/packages/plugins/@nocobase/plugin-map/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-map/src/server/actions/index.ts index 4f78a0b20..adb363f92 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/actions/index.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/actions/index.ts @@ -1,4 +1,4 @@ -import { Context } from '@nocobase/actions'; +import { Context } from '@tachybase/actions'; import { MapConfigurationCollectionName } from '../constants'; export const getConfiguration = async (ctx: Context, next) => { diff --git a/packages/plugins/@nocobase/plugin-map/src/server/collections/mapConfiguration.ts b/packages/plugins/@nocobase/plugin-map/src/server/collections/mapConfiguration.ts index a9fc64a08..d1e3cffcb 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/collections/mapConfiguration.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/collections/mapConfiguration.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; import { MapConfigurationCollectionName } from '../constants'; export default defineCollection({ diff --git a/packages/plugins/@nocobase/plugin-map/src/server/fields/circle.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/circle.ts index 92ccb2aaa..54541d081 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/fields/circle.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/fields/circle.ts @@ -1,4 +1,4 @@ -import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database'; +import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@tachybase/database'; import { isPg, toValue } from '../helpers'; class Circle extends DataTypes.ABSTRACT { diff --git a/packages/plugins/@nocobase/plugin-map/src/server/fields/lineString.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/lineString.ts index c2439d37f..63ae3228b 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/fields/lineString.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/fields/lineString.ts @@ -1,4 +1,4 @@ -import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database'; +import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@tachybase/database'; import { isMysql, isPg, joinComma, toValue } from '../helpers'; class LineString extends DataTypes.ABSTRACT { diff --git a/packages/plugins/@nocobase/plugin-map/src/server/fields/point.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/point.ts index 25e42efe8..afa774c9b 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/fields/point.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/fields/point.ts @@ -1,4 +1,4 @@ -import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database'; +import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@tachybase/database'; import { isMysql, isPg, joinComma, toValue } from '../helpers'; class Point extends DataTypes.ABSTRACT { diff --git a/packages/plugins/@nocobase/plugin-map/src/server/fields/polygon.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/polygon.ts index b72fe536f..5834ae747 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/fields/polygon.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/fields/polygon.ts @@ -1,4 +1,4 @@ -import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database'; +import { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@tachybase/database'; import { isMysql, isPg, joinComma, toValue } from '../helpers'; class Polygon extends DataTypes.ABSTRACT { diff --git a/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts index e067b3c6e..46964ba4e 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import path from 'path'; import { getConfiguration, setConfiguration } from './actions'; import { CircleField, LineStringField, PointField, PolygonField } from './fields'; diff --git a/packages/plugins/@nocobase/plugin-map/src/server/value-parsers/index.ts b/packages/plugins/@nocobase/plugin-map/src/server/value-parsers/index.ts index 920dd8143..db24721b3 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/value-parsers/index.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/value-parsers/index.ts @@ -1,4 +1,4 @@ -import { BaseValueParser } from '@nocobase/database'; +import { BaseValueParser } from '@tachybase/database'; export class PointValueParser extends BaseValueParser { async setValue(value) { diff --git a/packages/plugins/@nocobase/plugin-mock-collections/package.json b/packages/plugins/@nocobase/plugin-mock-collections/package.json index 54a82ef82..3176e6ad3 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/package.json +++ b/packages/plugins/@nocobase/plugin-mock-collections/package.json @@ -11,12 +11,12 @@ "pg": "^8.11.3" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-error-handler": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/client/index.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/client/index.ts index 68b95abd4..193c727f5 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; export default class PluginMockCollectionsClient extends Plugin { async load() {} diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/association.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/association.ts index 423444bd9..466cae611 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/association.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/association.ts @@ -1,5 +1,5 @@ import { faker } from '@faker-js/faker'; -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; function reverseFieldHandle(defaults, { target, reverseField }) { if (!reverseField) { diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/attachment.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/attachment.ts index 6f23d0fb1..ef28bd37e 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/attachment.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/attachment.ts @@ -1,5 +1,5 @@ import { faker } from '@faker-js/faker'; -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; import _ from 'lodash'; export function mockAttachment() { diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/chinaRegion.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/chinaRegion.ts index 85ac97324..b5b83e4b8 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/chinaRegion.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/chinaRegion.ts @@ -1,4 +1,4 @@ -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; export const chinaRegion = { options: (options) => ({ diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/email.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/email.ts index f293994c3..b68256519 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/email.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/email.ts @@ -1,5 +1,5 @@ import { faker } from '@faker-js/faker'; -import { uid } from '@nocobase/utils'; +import { uid } from '@tachybase/utils'; export const email = { options: () => ({ diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/time.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/time.ts index 2b0b99950..3de376ed8 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/time.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/field-interfaces/time.ts @@ -1,5 +1,5 @@ import { faker } from '@faker-js/faker'; -import { dayjs } from '@nocobase/utils'; +import { dayjs } from '@tachybase/utils'; export const time = { options: () => ({ diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts index 597cda6f1..4800fe360 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts @@ -1,7 +1,7 @@ -import Database, { Collection, Repository } from '@nocobase/database'; +import Database, { Collection, Repository } from '@tachybase/database'; import { CollectionRepository } from '@nocobase/plugin-collection-manager'; -import { InstallOptions, Plugin } from '@nocobase/server'; -import { merge, uid } from '@nocobase/utils'; +import { InstallOptions, Plugin } from '@tachybase/server'; +import { merge, uid } from '@tachybase/utils'; import _ from 'lodash'; import collectionTemplates from './collection-templates'; import * as fieldInterfaces from './field-interfaces'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json index deb011f14..5ec2f717b 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json @@ -22,11 +22,11 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "无需单独部署即可动态创建多个应用。", "displayName.zh-CN": "多应用管理器", diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppManager.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppManager.tsx index e614705c3..46a8bee16 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppManager.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppManager.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent, useApp, useRecord } from '@nocobase/client'; +import { SchemaComponent, useApp, useRecord } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; import { schema } from './settings/schemas/applications'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppNameInput.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppNameInput.tsx index fe49f0ea1..29ebf47ef 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppNameInput.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppNameInput.tsx @@ -1,5 +1,5 @@ import { connect, mapReadPretty } from '@tachybase/schema'; -import { useApp } from '@nocobase/client'; +import { useApp } from '@tachybase/client'; import { Input as AntdInput } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.tsx index 162788b84..d9b99aa9a 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.tsx @@ -1,4 +1,4 @@ -import { Icon, PinnedPluginListProvider, SchemaComponentOptions, useApp, useRequest } from '@nocobase/client'; +import { Icon, PinnedPluginListProvider, SchemaComponentOptions, useApp, useRequest } from '@tachybase/client'; import { Button, Dropdown } from 'antd'; import React from 'react'; import { Link } from 'react-router-dom'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/Settings.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/Settings.tsx index 87e34371e..02d420a77 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/Settings.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/Settings.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts index bf4d7694c..c621fad0e 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { MultiAppManagerProvider } from './MultiAppManagerProvider'; import { AppManager } from './AppManager'; import { NAMESPACE } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/settings/schemas/applications.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/settings/schemas/applications.ts index 9bad2cade..fc4d992f5 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/settings/schemas/applications.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/settings/schemas/applications.ts @@ -8,7 +8,7 @@ import { useRequest, useResourceActionContext, useResourceContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { i18nText } from '../../utils'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/gateway.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/gateway.test.ts index 311cab8aa..b3ab13b61 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/gateway.test.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/gateway.test.ts @@ -1,6 +1,6 @@ -import { AppSupervisor, Gateway } from '@nocobase/server'; -import { MockServer, createMockServer, createWsClient, startServerWithRandomPort, waitSecond } from '@nocobase/test'; -import { uid } from '@nocobase/utils'; +import { AppSupervisor, Gateway } from '@tachybase/server'; +import { MockServer, createMockServer, createWsClient, startServerWithRandomPort, waitSecond } from '@tachybase/test'; +import { uid } from '@tachybase/utils'; describe('gateway with multiple apps', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/mock-get-schema.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/mock-get-schema.test.ts index 6c6e51dbf..15d496be4 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/mock-get-schema.test.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/mock-get-schema.test.ts @@ -1,6 +1,6 @@ -import { AppSupervisor, Plugin, PluginManager } from '@nocobase/server'; -import { createMockServer } from '@nocobase/test'; -import { uid } from '@nocobase/utils'; +import { AppSupervisor, Plugin, PluginManager } from '@tachybase/server'; +import { createMockServer } from '@tachybase/test'; +import { uid } from '@tachybase/utils'; import { vi } from 'vitest'; describe('test with start', () => { diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts index d18ef82de..252f2a887 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts @@ -1,7 +1,7 @@ -import { Database } from '@nocobase/database'; -import { AppSupervisor, Gateway } from '@nocobase/server'; -import { createMockServer, MockServer } from '@nocobase/test'; -import { uid } from '@nocobase/utils'; +import { Database } from '@tachybase/database'; +import { AppSupervisor, Gateway } from '@tachybase/server'; +import { createMockServer, MockServer } from '@tachybase/test'; +import { uid } from '@tachybase/utils'; import { vi } from 'vitest'; import { PluginMultiAppManager } from '../server'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/collections/applications.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/collections/applications.ts index 482175df2..c106bb006 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/collections/applications.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/collections/applications.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts index 27dc4983b..ac8120edf 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts @@ -1,7 +1,7 @@ -import { Model, Transactionable } from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import { Model, Transactionable } from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { AppOptionsFactory } from '../server'; -import { merge } from '@nocobase/utils'; +import { merge } from '@tachybase/utils'; export interface registerAppOptions extends Transactionable { skipInstall?: boolean; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts index bd0ad6ede..bf83d68bc 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts @@ -1,5 +1,5 @@ -import { Database, IDatabaseOptions, Transactionable } from '@nocobase/database'; -import Application, { AppSupervisor, Gateway, Plugin } from '@nocobase/server'; +import { Database, IDatabaseOptions, Transactionable } from '@tachybase/database'; +import Application, { AppSupervisor, Gateway, Plugin } from '@tachybase/server'; import lodash from 'lodash'; import path from 'path'; import { ApplicationModel } from '../server'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json index cc4b84587..e839dc91c 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json @@ -15,15 +15,15 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-collection-manager": "workspace:*", "@nocobase/plugin-error-handler": "workspace:*", "@nocobase/plugin-multi-app-manager": "workspace:*", "@nocobase/plugin-users": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "", "displayName.zh-CN": "多应用数据表共享", diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx index cc3151f6c..326e52755 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx @@ -1,5 +1,5 @@ import { useForm } from '@tachybase/schema'; -import { useActionContext, useAPIClient, useRecord } from '@nocobase/client'; +import { useActionContext, useAPIClient, useRecord } from '@tachybase/client'; import { tableActionColumnSchema } from '@nocobase/plugin-multi-app-manager/client'; import { message } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/TableTransfer.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/TableTransfer.tsx index 466df2564..40d79cbf8 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/TableTransfer.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/TableTransfer.tsx @@ -1,6 +1,6 @@ import { connect } from '@tachybase/schema'; -import { css, useCollectionManager_deprecated, useRecord, useRequest, useToken } from '@nocobase/client'; -import { CollectionsGraph, lodash } from '@nocobase/utils/client'; +import { css, useCollectionManager_deprecated, useRecord, useRequest, useToken } from '@tachybase/client'; +import { CollectionsGraph, lodash } from '@tachybase/utils/client'; import { App, Col, Input, Row, Select, Spin, Table, Tag } from 'antd'; import React, { useCallback, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx index 2763bf264..38e374b42 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { MultiAppShareCollectionProvider } from './MultiAppShareCollectionProvider'; export class MultiAppShareCollectionPlugin extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts index 1cfdef11b..d0b36d4f7 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts @@ -1,6 +1,6 @@ -import { BelongsToManyRepository, Database } from '@nocobase/database'; -import { AppSupervisor } from '@nocobase/server'; -import { MockServer, createMockServer, isPg } from '@nocobase/test'; +import { BelongsToManyRepository, Database } from '@tachybase/database'; +import { AppSupervisor } from '@tachybase/server'; +import { MockServer, createMockServer, isPg } from '@tachybase/test'; import * as process from 'process'; describe.runIf(isPg())('enable plugin', () => { diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts index 979ecb166..f386072f6 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts @@ -1,4 +1,4 @@ -import { createMockServer } from '@nocobase/test'; +import { createMockServer } from '@tachybase/test'; export async function createApp(options = {}) { const app = await createMockServer({ diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/applications.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/applications.ts index 69850d567..b64cc125f 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/applications.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/applications.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'applications', diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/collections.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/collections.ts index 69413f5ad..941e074c9 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/collections.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/collections.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'collections', diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts index 53cbb03ef..33116e406 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts @@ -1,5 +1,5 @@ -import { Migration } from '@nocobase/server'; -import { CollectionsGraph } from '@nocobase/utils'; +import { Migration } from '@tachybase/server'; +import { CollectionsGraph } from '@tachybase/utils'; export default class extends Migration { appVersion = '<0.9.3-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts index af5121e17..ec7e1aca8 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts @@ -1,6 +1,6 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import PluginMultiAppManager from '@nocobase/plugin-multi-app-manager'; -import { Application, AppSupervisor, Plugin } from '@nocobase/server'; +import { Application, AppSupervisor, Plugin } from '@tachybase/server'; import lodash from 'lodash'; import { resolve } from 'path'; diff --git a/packages/plugins/@nocobase/plugin-notifications/package.json b/packages/plugins/@nocobase/plugin-notifications/package.json index b1e4a0566..98a77c562 100644 --- a/packages/plugins/@nocobase/plugin-notifications/package.json +++ b/packages/plugins/@nocobase/plugin-notifications/package.json @@ -11,11 +11,11 @@ "nodemailer-mock": "^1.5.11" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts b/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts index ea8c0651c..c5b072e37 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; class NotificationPlugin extends Plugin { async load() {} diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/__tests__/notifications.test.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/__tests__/notifications.test.ts index f1f532077..fd430290a 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/__tests__/notifications.test.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/__tests__/notifications.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { createMockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { createMockServer } from '@tachybase/test'; import nodemailerMock from 'nodemailer-mock'; import { Notification, NotificationService } from '../models'; diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_logs.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_logs.ts index 6f517f779..89c8f66c7 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_logs.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_logs.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; import { NotificationLog } from '../models'; export default { diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_services.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_services.ts index d7fbedd76..678fdaa03 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_services.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_services.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; import { NotificationService } from '../models'; export default { diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notifications.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notifications.ts index b218c013c..fba847e96 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notifications.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notifications.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; import { Notification } from '../models'; export default { diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/models/Notification.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/models/Notification.ts index fe44dfd6a..d82705ae5 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/models/Notification.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/models/Notification.ts @@ -1,4 +1,4 @@ -import Database, { Model } from '@nocobase/database'; +import Database, { Model } from '@tachybase/database'; import lodash from 'lodash'; import { NotificationService } from './NotificationService'; diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationLog.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationLog.ts index 8e845dbc3..601ac1876 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationLog.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationLog.ts @@ -1,3 +1,3 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; export class NotificationLog extends Model {} diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationService.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationService.ts index db4de94ef..a2e8fb7ff 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationService.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationService.ts @@ -1,4 +1,4 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; import nodemailer from 'nodemailer'; export class NotificationService extends Model { diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts index 03a5943c4..2fc47b437 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import path from 'path'; export default class PluginNotifications extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-oidc/package.json b/packages/plugins/@nocobase/plugin-oidc/package.json index 7281c8531..8754edc17 100644 --- a/packages/plugins/@nocobase/plugin-oidc/package.json +++ b/packages/plugins/@nocobase/plugin-oidc/package.json @@ -22,13 +22,13 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/auth": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-auth": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/auth": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "通过 OIDC (OpenID Connect) 协议认证身份。", "displayName.zh-CN": "认证:OIDC", diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx index 1246d51ac..df3223844 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx +++ b/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx @@ -1,5 +1,5 @@ import { LoginOutlined } from '@ant-design/icons'; -import { css, useAPIClient } from '@nocobase/client'; +import { css, useAPIClient } from '@tachybase/client'; import { Button, Space, message } from 'antd'; import React, { useEffect } from 'react'; import { useOidcTranslation } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx index 39596be4d..dc8407185 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx +++ b/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx @@ -1,7 +1,7 @@ import { CopyOutlined } from '@ant-design/icons'; import { ArrayItems, FormTab } from '@tachybase/components'; import { observer } from '@tachybase/schema'; -import { FormItem, Input, SchemaComponent, useApp } from '@nocobase/client'; +import { FormItem, Input, SchemaComponent, useApp } from '@tachybase/client'; import { Card, Space, message } from 'antd'; import React, { useMemo } from 'react'; import { lang, useOidcTranslation } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx index ec108556b..9ce306b3f 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import AuthPlugin from '@nocobase/plugin-auth/client'; import { authType } from '../constants'; import { OIDCButton } from './OIDCButton'; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts index 4492ea69f..dc7d77e03 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'oidc'; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts index 3fec2e75b..ee2f0bebd 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; import { vi } from 'vitest'; import { authType } from '../../constants'; import { OIDCAuth } from '../oidc-auth'; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts index c96f6e25c..32037e873 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; import { OIDCAuth } from '../oidc-auth'; import { nanoid } from 'nanoid'; import { cookieName } from '../../constants'; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts index 40eb78767..52934c671 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { AppSupervisor } from '@nocobase/server'; +import { Context, Next } from '@tachybase/actions'; +import { AppSupervisor } from '@tachybase/server'; import { OIDCAuth } from '../oidc-auth'; export const redirect = async (ctx: Context, next: Next) => { diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts index 2590ff746..aafea6fe5 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { authType } from '../../constants'; export default class UpdateAutoSignupMigration extends Migration { diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts index 180aa4868..bb428273e 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts @@ -1,8 +1,8 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; +import { AuthConfig, BaseAuth } from '@tachybase/auth'; import { AuthModel } from '@nocobase/plugin-auth'; import { Issuer } from 'openid-client'; import { cookieName } from '../constants'; -export { Model } from '@nocobase/database'; +export { Model } from '@tachybase/database'; export class OIDCAuth extends BaseAuth { constructor(config: AuthConfig) { diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts index 4d4dba980..fd07caa72 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Gateway, InstallOptions, Plugin } from '@nocobase/server'; +import { Gateway, InstallOptions, Plugin } from '@tachybase/server'; import { getAuthUrl } from './actions/getAuthUrl'; import { redirect } from './actions/redirect'; import { authType } from '../constants'; diff --git a/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md b/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md index 1fa35a61e..9994cde94 100644 --- a/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md +++ b/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md @@ -4,7 +4,7 @@ ## 依赖 -- `@nocobase/auth` 认证插件,提供认证相关功能,表、模型、函数复用等。 +- `@tachybase/auth` 认证插件,提供认证相关功能,表、模型、函数复用等。 ## 使用方法 @@ -52,4 +52,4 @@ `nameID`为SAML协议携带,无需映射,将作为用户唯一标识保存。 -在有email或nameID为email的情况下,登录时将尝试匹配已有用户,否则创建新用户。 \ No newline at end of file +在有email或nameID为email的情况下,登录时将尝试匹配已有用户,否则创建新用户。 diff --git a/packages/plugins/@nocobase/plugin-saml/package.json b/packages/plugins/@nocobase/plugin-saml/package.json index bbdf5d93b..867fbdfe5 100644 --- a/packages/plugins/@nocobase/plugin-saml/package.json +++ b/packages/plugins/@nocobase/plugin-saml/package.json @@ -19,14 +19,14 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/auth": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-auth": "workspace:*", - "@nocobase/sdk": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/auth": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/sdk": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "通过 SAML 2.0 协议认证身份。", "displayName.zh-CN": "认证:SAML 2.0", diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx index 111504837..9bb0ca2ed 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx +++ b/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx @@ -1,7 +1,7 @@ import { CopyOutlined } from '@ant-design/icons'; import { observer, useForm } from '@tachybase/schema'; -import { FormItem, Input, SchemaComponent, useApp, useRecord } from '@nocobase/client'; -import { getSubAppName } from '@nocobase/sdk'; +import { FormItem, Input, SchemaComponent, useApp, useRecord } from '@tachybase/client'; +import { getSubAppName } from '@tachybase/sdk'; import { Card, message } from 'antd'; import React, { useMemo } from 'react'; import { lang, useSamlTranslation } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx index ad88a2e6a..07738860f 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx +++ b/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx @@ -1,5 +1,5 @@ import { LoginOutlined } from '@ant-design/icons'; -import { css, useAPIClient } from '@nocobase/client'; +import { css, useAPIClient } from '@tachybase/client'; import { Button, Space, message } from 'antd'; import React, { useEffect } from 'react'; import { useSamlTranslation } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx index 7aed83a9b..043fec28d 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import AuthPlugin from '@nocobase/plugin-auth/client'; import { authType } from '../constants'; import { SAMLButton } from './SAMLButton'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts index 5b802647b..d9e35926c 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'saml'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts b/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts index 96f647258..f1ed13506 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { useActionContext, useRequest } from '@nocobase/client'; +import { useActionContext, useRequest } from '@tachybase/client'; const collection = { name: 'samlProviders', diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts b/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts index 8d7c902ab..817c6ca0d 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; import { SAML } from '@node-saml/node-saml'; import { vi } from 'vitest'; import { authType } from '../../constants'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts index c3fad8eb3..58935de8b 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; import { SAML } from '@node-saml/node-saml'; import { SAMLAuth } from '../saml-auth'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/actions/metadata.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/metadata.ts index 1b4f1662f..a53ea3fa8 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/actions/metadata.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/actions/metadata.ts @@ -1,4 +1,4 @@ -import { Context, Next } from '@nocobase/actions'; +import { Context, Next } from '@tachybase/actions'; import { SAMLAuth } from '../saml-auth'; import { SAML } from '@node-saml/node-saml'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts index 8a1573b15..c6f377fc6 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts @@ -1,5 +1,5 @@ -import { Context, Next } from '@nocobase/actions'; -import { AppSupervisor } from '@nocobase/server'; +import { Context, Next } from '@tachybase/actions'; +import { AppSupervisor } from '@tachybase/server'; import { SAMLAuth } from '../saml-auth'; export const redirect = async (ctx: Context, next: Next) => { diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts b/packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts index 0d05aab40..9c0526a9f 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { authType } from '../../constants'; export default class UpdateAutoSignupMigration extends Migration { diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts index c33a18e55..45bce4b30 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { getAuthUrl } from './actions/getAuthUrl'; import { metadata } from './actions/metadata'; import { redirect } from './actions/redirect'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts b/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts index 6ee6f79d6..bc7674572 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts @@ -1,7 +1,7 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; +import { AuthConfig, BaseAuth } from '@tachybase/auth'; import { AuthModel } from '@nocobase/plugin-auth'; import { SAML, SamlConfig } from '@node-saml/node-saml'; -export { Model } from '@nocobase/database'; +export { Model } from '@tachybase/database'; interface SAMLOptions { ssoUrl?: string; diff --git a/packages/plugins/@nocobase/plugin-sample-hello/package.json b/packages/plugins/@nocobase/plugin-sample-hello/package.json index 0179e22e4..12e416b9d 100644 --- a/packages/plugins/@nocobase/plugin-sample-hello/package.json +++ b/packages/plugins/@nocobase/plugin-sample-hello/package.json @@ -12,9 +12,9 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "一个简单的 NocoBase 插件", "displayName.zh-CN": "Hello", diff --git a/packages/plugins/@nocobase/plugin-sample-hello/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-hello/src/client/index.tsx index 4e86e06b5..b01d2dcba 100644 --- a/packages/plugins/@nocobase/plugin-sample-hello/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sample-hello/src/client/index.tsx @@ -1,5 +1,5 @@ import { TableOutlined } from '@ant-design/icons'; -import { Plugin, SchemaInitializerItem, SchemaSettings, useSchemaInitializer } from '@nocobase/client'; +import { Plugin, SchemaInitializerItem, SchemaSettings, useSchemaInitializer } from '@tachybase/client'; import { Card } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-sample-hello/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-hello/src/server/index.ts index 8eae593ec..c2c5db5f8 100644 --- a/packages/plugins/@nocobase/plugin-sample-hello/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-sample-hello/src/server/index.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; export class HelloPlugin extends Plugin { beforeLoad() { diff --git a/packages/plugins/@nocobase/plugin-sequence-field/package.json b/packages/plugins/@nocobase/plugin-sequence-field/package.json index 3f84bbc2e..d9155417d 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/package.json +++ b/packages/plugins/@nocobase/plugin-sequence-field/package.json @@ -22,13 +22,13 @@ "react-js-cron": "^3.1.0" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-collection-manager": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。", "displayName.zh-CN": "数据表字段:自动编码", diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx b/packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx index 434e23575..d70568373 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import { RuleConfigForm } from './sequence'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx index 511c4a872..63f9de1e7 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { SequenceFieldProvider } from './SequenceFieldProvider'; import { SequenceFieldInterface } from './sequence'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts index 30422f938..df20d6d68 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'sequence-field'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx b/packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx index f20837dc0..34b68bd37 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx @@ -10,8 +10,8 @@ import { interfacesProperties, useCompile, useToken, -} from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { Button, Select } from 'antd'; import React, { useContext } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts index c11c29a53..1333163c5 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts @@ -2,8 +2,8 @@ import { randomInt } from 'crypto'; import path from 'path'; import { promisify } from 'util'; -import { Plugin } from '@nocobase/server'; -import { Registry } from '@nocobase/utils'; +import { Plugin } from '@tachybase/server'; +import { Registry } from '@tachybase/utils'; import { Pattern, SequenceField } from './fields/sequence-field'; const asyncRandomInt = promisify(randomInt); diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts index 21d1e94b1..309ce2f7f 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; import dayjs from 'dayjs'; import { SequenceField } from '..'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts index 6b2d3695b..b5c5ecb54 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts index 21f621403..0dd686a7e 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts @@ -7,8 +7,8 @@ import { Transactionable, ValidationError, ValidationErrorItem, -} from '@nocobase/database'; -import { Registry } from '@nocobase/utils'; +} from '@tachybase/database'; +import { Registry } from '@tachybase/utils'; import parser from 'cron-parser'; import dayjs from 'dayjs'; import lodash from 'lodash'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts index acb11116b..9dbe3f626 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.8.1-alpha.2'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/README.md b/packages/plugins/@nocobase/plugin-sms-auth/README.md index 16e8a088d..b3d39191e 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/README.md +++ b/packages/plugins/@nocobase/plugin-sms-auth/README.md @@ -4,7 +4,7 @@ ## 依赖 -- `@nocobase/auth` 认证插件,提供认证相关功能,表、模型、函数复用等。 +- `@tachybase/auth` 认证插件,提供认证相关功能,表、模型、函数复用等。 - `@nocobase/plugin-verification` 验证码插件,提供短信发送功能。 ## 使用方法 diff --git a/packages/plugins/@nocobase/plugin-sms-auth/package.json b/packages/plugins/@nocobase/plugin-sms-auth/package.json index 9db0eed6e..68ac1082a 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/package.json +++ b/packages/plugins/@nocobase/plugin-sms-auth/package.json @@ -16,14 +16,14 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/auth": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-auth": "workspace:*", "@nocobase/plugin-verification": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/auth": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "通过短信验证码认证身份。", "displayName.zh-CN": "认证:短信", diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/Options.tsx index 534b609f4..25659ef9a 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/client/Options.tsx +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/client/Options.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { useAuthTranslation } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/client/SigninPage.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/SigninPage.tsx index 3ecc47bca..c7d1a4509 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/client/SigninPage.tsx +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/client/SigninPage.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import React from 'react'; import VerificationCode from './VerificationCode'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/client/VerificationCode.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/VerificationCode.tsx index 6e81a6d76..10e1b38b8 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/client/VerificationCode.tsx +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/client/VerificationCode.tsx @@ -1,5 +1,5 @@ import { useForm } from '@tachybase/schema'; -import { css, useAPIClient } from '@nocobase/client'; +import { css, useAPIClient } from '@tachybase/client'; import { Button, Input, message } from 'antd'; import React, { useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx index 351b380fb..15093d297 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import AuthPlugin from '@nocobase/plugin-auth/client'; import { SigninPage } from './SigninPage'; import { Options } from './Options'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/server/__tests__/signin.test.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/__tests__/signin.test.ts index 7e95c91ec..310b111ff 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/server/__tests__/signin.test.ts +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/server/__tests__/signin.test.ts @@ -1,6 +1,6 @@ -import { Database, Model, ModelStatic } from '@nocobase/database'; +import { Database, Model, ModelStatic } from '@tachybase/database'; import VerificationPlugin from '@nocobase/plugin-verification'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { createMockServer, MockServer } from '@tachybase/test'; import { authType } from '../../constants'; class Provider { diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts index 0248e66df..c0031bd88 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import { authType } from '../../constants'; export default class AddBasicAuthMigration extends Migration { diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts index b58045dca..c05f921e3 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts @@ -1,5 +1,5 @@ import VerificationPlugin from '@nocobase/plugin-verification'; -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { authType } from '../constants'; import { SMSAuth } from './sms-auth'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/server/sms-auth.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/sms-auth.ts index 911548a78..a3b4a3ef2 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/server/sms-auth.ts +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/server/sms-auth.ts @@ -1,5 +1,5 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; -import { Model } from '@nocobase/database'; +import { AuthConfig, BaseAuth } from '@tachybase/auth'; +import { Model } from '@tachybase/database'; import { AuthModel } from '@nocobase/plugin-auth'; import VerificationPlugin from '@nocobase/plugin-verification'; import { namespace } from '../constants'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/package.json b/packages/plugins/@nocobase/plugin-snapshot-field/package.json index 7bde866d8..a0eb91d61 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/package.json +++ b/packages/plugins/@nocobase/plugin-snapshot-field/package.json @@ -19,11 +19,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "在添加数据时,为它的关系数据创建快照,并保存在当前的数据中。关系数据更新时,快照不会更新。", "displayName.zh-CN": "数据表字段:关系快照", diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/fieldsHistory.test.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/fieldsHistory.test.ts index ba6e68254..a34cc7a75 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/fieldsHistory.test.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/fieldsHistory.test.ts @@ -1,4 +1,4 @@ -import { createMockServer, MockServer } from '@nocobase/test'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('actions', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/snapshots.test.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/snapshots.test.ts index 49a054837..6c1e0c87c 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/snapshots.test.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/snapshots.test.ts @@ -1,4 +1,4 @@ -import { createMockServer, MockServer } from '@nocobase/test'; +import { createMockServer, MockServer } from '@tachybase/test'; import { field_linkto } from './data/field_linkto'; import { field_m2m } from './data/field_m2m'; import { field_o2m } from './data/field_o2m'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx index 5991c94e9..ecc85cf83 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, gridRowColWrap } from '@nocobase/client'; +import { CompatibleSchemaInitializer, gridRowColWrap } from '@tachybase/client'; import { NAMESPACE } from '../../locale'; /** diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx index 9fc6af448..f2d5790bf 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx @@ -9,7 +9,7 @@ import { useSchemaInitializer, SchemaInitializerItem, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx index 619ca0409..1f19af42b 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx @@ -14,7 +14,7 @@ import { useDesignable, useRecord, useResource, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Spin } from 'antd'; import React, { useMemo, useRef } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotFieldProvider.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotFieldProvider.tsx index f130498b5..c9f9a528d 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotFieldProvider.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotFieldProvider.tsx @@ -1,4 +1,4 @@ -import { CollectionHistoryProvider, SchemaComponentOptions } from '@nocobase/client'; +import { CollectionHistoryProvider, SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { SnapshotOwnerCollectionFieldsSelect } from './components/SnapshotOwnerCollectionFieldsSelect'; import { SnapshotBlockInitializersDetailItem } from './SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx index 465d53ad1..633211433 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx @@ -3,7 +3,7 @@ import { ExtendCollectionsProvider, useCollectionManager_deprecated, useHistoryCollectionsByNames, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; export const SnapshotHistoryCollectionProvider: React.FC<{ collectionName: string }> = (props) => { diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotRecordPicker.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotRecordPicker.tsx index 174dc84d6..018c7daba 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotRecordPicker.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotRecordPicker.tsx @@ -1,5 +1,5 @@ import { connect, mapReadPretty, useFieldSchema } from '@tachybase/schema'; -import { ReadPrettyRecordPicker, useCollection_deprecated } from '@nocobase/client'; +import { ReadPrettyRecordPicker, useCollection_deprecated } from '@tachybase/client'; import React from 'react'; import { SnapshotHistoryCollectionProvider } from './SnapshotHistoryCollectionProvider'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx index dd841427f..84297c3ef 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx @@ -1,4 +1,4 @@ -import { useCollectionManager_deprecated, useCompile } from '@nocobase/client'; +import { useCollectionManager_deprecated, useCompile } from '@tachybase/client'; import { Select, SelectProps } from 'antd'; import React from 'react'; import { useTopRecord } from '../interface'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx index 147849327..b21f1e322 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { SnapshotFieldProvider } from './SnapshotFieldProvider'; import { snapshotBlockInitializers, diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/interface.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/interface.ts index 8e312158a..46383ae59 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/interface.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/interface.ts @@ -5,7 +5,7 @@ import { interfacesProperties, useCollectionManager_deprecated, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import lodash from 'lodash'; import { NAMESPACE } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/locale/index.ts index 87cd97316..5ba58d81c 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'snapshot-field'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/collectionsHistory.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/collectionsHistory.ts index 5ddabde1f..47beb7b34 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/collectionsHistory.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/collectionsHistory.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/fieldsHistory.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/fieldsHistory.ts index 159ead8eb..dc96c69f7 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/fieldsHistory.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/fieldsHistory.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/fields/snapshot-field.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/fields/snapshot-field.ts index ff3432d64..ea7164697 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/fields/snapshot-field.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/fields/snapshot-field.ts @@ -1,4 +1,4 @@ -import { BaseColumnFieldOptions, CreateOptions, DataTypes, Field, Model } from '@nocobase/database'; +import { BaseColumnFieldOptions, CreateOptions, DataTypes, Field, Model } from '@tachybase/database'; export class SnapshotField extends Field { get dataType() { diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts index de6ce6e10..4d81a4396 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts @@ -1,5 +1,5 @@ -import { Model } from '@nocobase/database'; -import { InstallOptions, Plugin } from '@nocobase/server'; +import { Model } from '@tachybase/database'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { resolve } from 'path'; import { SnapshotField } from './fields/snapshot-field'; diff --git a/packages/plugins/@nocobase/plugin-system-settings/package.json b/packages/plugins/@nocobase/plugin-system-settings/package.json index 9d4df9665..e7078223f 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/package.json +++ b/packages/plugins/@nocobase/plugin-system-settings/package.json @@ -10,10 +10,10 @@ "license": "AGPL-3.0", "main": "./dist/server/index.js", "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "用于调整系统的标题、LOGO、语言等。", "displayName.zh-CN": "系统设置", diff --git a/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts b/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts index 64cc5c927..8b3bc6584 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; class SystemSettingPlugin extends Plugin { async load() {} diff --git a/packages/plugins/@nocobase/plugin-system-settings/src/server/collections/systemSettings.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/collections/systemSettings.ts index ccfaa744b..fe3a72391 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/src/server/collections/systemSettings.ts +++ b/packages/plugins/@nocobase/plugin-system-settings/src/server/collections/systemSettings.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts index d33d0bfe6..b013cd719 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts +++ b/packages/plugins/@nocobase/plugin-system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.7.3-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts index 428cce345..84d163ab1 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import { resolve } from 'path'; export class SystemSettingsPlugin extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-theme-editor/package.json b/packages/plugins/@nocobase/plugin-theme-editor/package.json index 38f8e28da..c78cd7c34 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/package.json +++ b/packages/plugins/@nocobase/plugin-theme-editor/package.json @@ -27,12 +27,12 @@ "vanilla-jsoneditor": "^0.17.8" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "自定义 UI 的颜色、尺寸等,并将结果保存为主题,可在多个主题间切换。", "displayName.zh-CN": "主题编辑器", diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/interface.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/interface.ts index eefa6dceb..4321bbec6 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/interface.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/interface.ts @@ -1,4 +1,4 @@ -import type { ThemeConfig } from '@nocobase/client'; +import type { ThemeConfig } from '@tachybase/client'; import type { ReactElement } from 'react'; export type Theme = { diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx index cff835901..428feb1bf 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx @@ -1,6 +1,6 @@ import { CaretRightOutlined, ExpandOutlined, QuestionCircleOutlined } from '@ant-design/icons'; -import type { ThemeConfig } from '@nocobase/client'; -import { StablePopover } from '@nocobase/client'; +import type { ThemeConfig } from '@tachybase/client'; +import { StablePopover } from '@tachybase/client'; import { Button, Checkbox, Collapse, ConfigProvider, Switch, Tooltip, Typography } from 'antd'; import seed from 'antd/es/theme/themes/seed'; import classNames from 'classnames'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/InitializeTheme.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/InitializeTheme.tsx index b8b503e52..873e2c692 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/InitializeTheme.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/InitializeTheme.tsx @@ -1,5 +1,5 @@ -import { defaultTheme as presetTheme, useAPIClient, useCurrentUserContext, useGlobalTheme } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { defaultTheme as presetTheme, useAPIClient, useCurrentUserContext, useGlobalTheme } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { Spin } from 'antd'; import React, { useEffect, useMemo, useRef } from 'react'; import { changeAlgorithmFromFunctionToString } from '../utils/changeAlgorithmFromFunctionToString'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeCard.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeCard.tsx index d333a85c3..0e6340658 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeCard.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeCard.tsx @@ -1,6 +1,6 @@ import { DeleteOutlined, EditOutlined, EllipsisOutlined } from '@ant-design/icons'; -import { compatOldTheme, useAPIClient, useCurrentUserContext, useGlobalTheme, useToken } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { compatOldTheme, useAPIClient, useCurrentUserContext, useGlobalTheme, useToken } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { App, Card, ConfigProvider, Dropdown, Space, Switch, Tag, message } from 'antd'; import React, { useCallback, useMemo } from 'react'; import { ThemeConfig, ThemeItem } from '../../types'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeList.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeList.tsx index 447883940..d1028881a 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeList.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeList.tsx @@ -1,5 +1,5 @@ -import { useToken } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { useToken } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { Space } from 'antd'; import React, { useCallback, useEffect } from 'react'; import ThemeCard from './ThemeCard'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeListProvider.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeListProvider.tsx index 8951840d0..047d87bc6 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeListProvider.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeListProvider.tsx @@ -1,5 +1,5 @@ -import { ReturnTypeOfUseRequest, useRequest } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { ReturnTypeOfUseRequest, useRequest } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import React, { createContext, useMemo } from 'react'; import { ThemeItem } from '../../types'; import { changeAlgorithmFromStringToFunction } from '../utils/changeAlgorithmFromStringToFunction'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ToEditTheme.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ToEditTheme.tsx index 36ddc1a5d..418b42fc9 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ToEditTheme.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ToEditTheme.tsx @@ -1,5 +1,5 @@ import { PlusOutlined } from '@ant-design/icons'; -import { compatOldTheme, defaultTheme, useGlobalTheme, useToken } from '@nocobase/client'; +import { compatOldTheme, defaultTheme, useGlobalTheme, useToken } from '@tachybase/client'; import { App, Button, Space } from 'antd'; import React, { useCallback } from 'react'; import { useTranslation } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/theme-editor/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/theme-editor/index.tsx index 75007bcdc..1605cc4c3 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/theme-editor/index.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/theme-editor/index.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; -import { createStyles, useAPIClient, useGlobalTheme } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { createStyles, useAPIClient, useGlobalTheme } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { Button, ConfigProvider, Input, Space, message } from 'antd'; import antdEnUs from 'antd/locale/en_US'; import antdZhCN from 'antd/locale/zh_CN'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useThemeSettings.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useThemeSettings.tsx index 7f565ab7a..bd363acd2 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useThemeSettings.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useThemeSettings.tsx @@ -1,5 +1,5 @@ -import { SelectWithTitle, useAPIClient, useCurrentUserContext, useSystemSettings } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { SelectWithTitle, useAPIClient, useCurrentUserContext, useSystemSettings } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { MenuProps } from 'antd'; import React, { useEffect, useMemo } from 'react'; import { useThemeId } from '../components/InitializeTheme'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx index d4113928a..2af1070a5 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx @@ -1,5 +1,5 @@ -import { useAPIClient, useCurrentUserContext, useSystemSettings } from '@nocobase/client'; -import { error } from '@nocobase/utils/client'; +import { useAPIClient, useCurrentUserContext, useSystemSettings } from '@tachybase/client'; +import { error } from '@tachybase/utils/client'; import { useCallback } from 'react'; export function useUpdateThemeSettings() { diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx index c7bb746fa..47fe44638 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin, createStyles, defaultTheme, useCurrentUserSettingsMenu, useGlobalTheme } from '@nocobase/client'; +import { Plugin, createStyles, defaultTheme, useCurrentUserSettingsMenu, useGlobalTheme } from '@tachybase/client'; import { ConfigProvider } from 'antd'; import _ from 'lodash'; import React, { useEffect, useMemo } from 'react'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/server/collections/theme-config.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/collections/theme-config.ts index 6e229d7be..338232f97 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/server/collections/theme-config.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/server/collections/theme-config.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'themeConfig', diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250853-theme-editor.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250853-theme-editor.ts index 446cdb0f7..faf5e4f43 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250853-theme-editor.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250853-theme-editor.ts @@ -1,6 +1,6 @@ -import { Model } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; -import { uid } from '@nocobase/utils'; +import { Model } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; +import { uid } from '@tachybase/utils'; import { compact, compactDark, dark, defaultTheme } from '../builtinThemes'; export default class extends Migration { diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/20231210132610-add-default-field.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/20231210132610-add-default-field.ts index 1931db8b5..1ee6bdd68 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/20231210132610-add-default-field.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/20231210132610-add-default-field.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.17.0-alpha.5'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts index 8203f3b48..b820fe21a 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, Plugin } from '@tachybase/server'; import path, { resolve } from 'path'; import { compact, compactDark, dark, defaultTheme } from './builtinThemes'; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/types.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/types.ts index 0d4a752e6..ffe1190c0 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/types.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/types.ts @@ -1,4 +1,4 @@ -import type { ThemeConfig as Config } from '@nocobase/client'; +import type { ThemeConfig as Config } from '@tachybase/client'; import type { ReactElement } from 'react'; export type ThemeConfig = Config; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json index 8eb1c3568..238d93025 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json @@ -14,16 +14,16 @@ "lodash": "4.17.21" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-error-handler": "workspace:*", "@nocobase/plugin-users": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供中心化的 UI schema 存储服务。", "displayName.zh-CN": "UI schema 存储服务", diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts index 1104fdfc9..b03fe2995 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts @@ -1,7 +1,7 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; class UiSchemaStoragePlugin extends Plugin { - async load() { } + async load() {} } export default UiSchemaStoragePlugin; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/action.test.ts index fe35689c2..43f417b5b 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/action.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/action.test.ts @@ -1,5 +1,5 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; describe('action test', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts index 4adcd35f0..74d782185 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts @@ -1,7 +1,7 @@ import Migration from '../../migrations/20230330214649-filter-form-block'; -import { Database } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; import { UiSchemaRepository } from '../..'; describe.skip('migration-20230330214649-filter-form-block', () => { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts index 4bcfd988f..888594827 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts @@ -1,6 +1,6 @@ -import { BelongsToManyRepository, Database } from '@nocobase/database'; +import { BelongsToManyRepository, Database } from '@tachybase/database'; import UiSchemaStoragePlugin, { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('server hooks', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook.test.ts index 5443458a0..b196e2187 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook.test.ts @@ -1,6 +1,6 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; import UiSchemaStoragePlugin, { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { createMockServer, MockServer } from '@tachybase/test'; import { vi } from 'vitest'; describe('server hooks', () => { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts index 3ef246f16..56396b2c6 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts @@ -1,5 +1,5 @@ -import { Collection, Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Collection, Database } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; import { UiSchemaRepository } from '..'; describe('ui schema model', () => { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts index 6b085f366..557809cf3 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts @@ -1,6 +1,6 @@ -import { Cache } from '@nocobase/cache'; -import { Database } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { Cache } from '@tachybase/cache'; +import { Database } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; import UiSchemaRepository, { GetJsonSchemaOptions, GetPropertiesOptions } from '../repository'; describe('ui_schema repository with cache', () => { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts index 00a6aae25..6ea9749ec 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts @@ -1,5 +1,5 @@ -import { Collection, Database } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { Collection, Database } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; import { SchemaNode } from '../dao/ui_schema_node_dao'; import UiSchemaRepository from '../repository'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema.test.ts index 59478e813..9f5ff5812 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema.test.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema.test.ts @@ -1,6 +1,6 @@ import { ISchema } from '@formily/json-schema'; -import { Database } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { Database } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; import { UiSchemaRepository } from '..'; describe('ui-schema', () => { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/actions/ui-schema-action.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/actions/ui-schema-action.ts index 308a5a7b8..4e4d82ab5 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/actions/ui-schema-action.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/actions/ui-schema-action.ts @@ -1,5 +1,5 @@ -import { Context } from '@nocobase/actions'; -import { ActionParams } from '@nocobase/resourcer'; +import { Context } from '@tachybase/actions'; +import { ActionParams } from '@tachybase/resourcer'; import lodash from 'lodash'; import UiSchemaRepository, { GetJsonSchemaOptions, GetPropertiesOptions } from '../repository'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts index bac2cf370..c22e5925b 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTemplates.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTemplates.ts index be0500091..6a15dd50d 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTemplates.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTemplates.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTreePath.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTreePath.ts index 9504112fd..6d73fb289 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTreePath.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTreePath.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemas.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemas.ts index 723147a15..661a8b756 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemas.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemas.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: 'required', diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts index 747f32bc2..1152a7c77 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.9.1-alpha.3'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509221649-association-select.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509221649-association-select.ts index efa36dd74..48a251f00 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509221649-association-select.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509221649-association-select.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.9.3-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts index b575a0fc1..fedd06a6d 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.9.3-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230510235247-form-field.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230510235247-form-field.ts index 32ca49fde..aa2919649 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230510235247-form-field.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230510235247-form-field.ts @@ -1,6 +1,6 @@ import { Schema } from '@formily/json-schema'; -import { Migration } from '@nocobase/server'; -import { uid } from '@nocobase/utils'; +import { Migration } from '@tachybase/server'; +import { uid } from '@tachybase/utils'; import UiSchemaRepository from '../repository'; import _ from 'lodash'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230522231231-association-field.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230522231231-association-field.ts index 89231d766..7ebf90cd4 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230522231231-association-field.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230522231231-association-field.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; import UiSchemaRepository from '../repository'; export default class extends Migration { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.ts index 9fbb08c32..6f3553723 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.14.0-alpha.8'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/model.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/model.ts index 63f969730..160117acb 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/model.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/model.ts @@ -1,4 +1,4 @@ -import { MagicAttributeModel } from '@nocobase/database'; +import { MagicAttributeModel } from '@tachybase/database'; import { HookType } from './server-hooks'; class UiSchemaModel extends MagicAttributeModel { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/repository.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/repository.ts index 7b7f5cf71..3783a2afa 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/repository.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/repository.ts @@ -1,6 +1,6 @@ -import { Cache } from '@nocobase/cache'; -import { Repository, Transaction, Transactionable } from '@nocobase/database'; -import { uid } from '@nocobase/utils'; +import { Cache } from '@tachybase/cache'; +import { Repository, Transaction, Transactionable } from '@tachybase/database'; +import { uid } from '@tachybase/utils'; import lodash from 'lodash'; import { ChildOptions, SchemaNode, TargetPosition } from './dao/ui_schema_node_dao'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/index.ts index 0a5635e19..64c8590ae 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/index.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/index.ts @@ -1,4 +1,4 @@ -import { Database } from '@nocobase/database'; +import { Database } from '@tachybase/database'; import { hooks } from './hooks'; import { ServerHookModel } from './model'; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/model.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/model.ts index c95f4db13..3ac5f9012 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/model.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/model.ts @@ -1,3 +1,3 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; export class ServerHookModel extends Model {} diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts index 64fa4f372..0b6ed2131 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts @@ -1,6 +1,6 @@ -import { MagicAttributeModel } from '@nocobase/database'; -import { Plugin } from '@nocobase/server'; -import { uid } from '@nocobase/utils'; +import { MagicAttributeModel } from '@tachybase/database'; +import { Plugin } from '@tachybase/server'; +import { uid } from '@tachybase/utils'; import path, { resolve } from 'path'; import { uiSchemaActions } from './actions/ui-schema-action'; import { UiSchemaModel } from './model'; diff --git a/packages/plugins/@nocobase/plugin-users/package.json b/packages/plugins/@nocobase/plugin-users/package.json index 0c464acd2..b1fb0e1ad 100644 --- a/packages/plugins/@nocobase/plugin-users/package.json +++ b/packages/plugins/@nocobase/plugin-users/package.json @@ -17,16 +17,16 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/cache": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", "@nocobase/plugin-acl": "workspace:*", "@nocobase/plugin-auth": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/cache": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。", "displayName.zh-CN": "用户", diff --git a/packages/plugins/@nocobase/plugin-users/src/client/PasswordField.tsx b/packages/plugins/@nocobase/plugin-users/src/client/PasswordField.tsx index 61516738f..11992ca5d 100644 --- a/packages/plugins/@nocobase/plugin-users/src/client/PasswordField.tsx +++ b/packages/plugins/@nocobase/plugin-users/src/client/PasswordField.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import { Input, Row, Col, Button } from 'antd'; -import { Password, useActionContext } from '@nocobase/client'; +import { Password, useActionContext } from '@tachybase/client'; import { useField } from '@tachybase/schema'; import { Field } from '@tachybase/schema'; import { useUsersTranslation } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-users/src/client/RoleUsersManager.tsx b/packages/plugins/@nocobase/plugin-users/src/client/RoleUsersManager.tsx index db0b56876..ef39039e4 100644 --- a/packages/plugins/@nocobase/plugin-users/src/client/RoleUsersManager.tsx +++ b/packages/plugins/@nocobase/plugin-users/src/client/RoleUsersManager.tsx @@ -10,7 +10,7 @@ import { useRecord, useRequest, useResourceActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { RolesManagerContext } from '@nocobase/plugin-acl/client'; import { useUsersTranslation } from './locale'; import { getRoleUsersSchema, userCollection } from './schemas/users'; diff --git a/packages/plugins/@nocobase/plugin-users/src/client/UsersManagement.tsx b/packages/plugins/@nocobase/plugin-users/src/client/UsersManagement.tsx index b1876aa88..0d19a7fd3 100644 --- a/packages/plugins/@nocobase/plugin-users/src/client/UsersManagement.tsx +++ b/packages/plugins/@nocobase/plugin-users/src/client/UsersManagement.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent, SchemaComponentContext, useSchemaComponentContext } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentContext, useSchemaComponentContext } from '@tachybase/client'; import React from 'react'; import { usersSchema } from './schemas/users'; import { Card } from 'antd'; diff --git a/packages/plugins/@nocobase/plugin-users/src/client/hooks.ts b/packages/plugins/@nocobase/plugin-users/src/client/hooks.ts index 766fbec70..4f87f4ada 100644 --- a/packages/plugins/@nocobase/plugin-users/src/client/hooks.ts +++ b/packages/plugins/@nocobase/plugin-users/src/client/hooks.ts @@ -3,7 +3,7 @@ import { useFilterFieldOptions, useFilterFieldProps, useResourceActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useContext } from 'react'; export const useFilterActionProps = () => { diff --git a/packages/plugins/@nocobase/plugin-users/src/client/index.ts b/packages/plugins/@nocobase/plugin-users/src/client/index.ts index 9929c2247..a5db48bd2 100644 --- a/packages/plugins/@nocobase/plugin-users/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-users/src/client/index.ts @@ -1,4 +1,4 @@ -import { Plugin, tval } from '@nocobase/client'; +import { Plugin, tval } from '@tachybase/client'; import { UsersManagement } from './UsersManagement'; import ACLPlugin from '@nocobase/plugin-acl/client'; import { RoleUsersManager } from './RoleUsersManager'; diff --git a/packages/plugins/@nocobase/plugin-users/src/client/schemas/users.ts b/packages/plugins/@nocobase/plugin-users/src/client/schemas/users.ts index 49c66e37e..ea7bfc913 100644 --- a/packages/plugins/@nocobase/plugin-users/src/client/schemas/users.ts +++ b/packages/plugins/@nocobase/plugin-users/src/client/schemas/users.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { useActionContext, useCollectionRecord, useRecord, useRequest } from '@nocobase/client'; +import { useActionContext, useCollectionRecord, useRecord, useRequest } from '@tachybase/client'; import { useEffect } from 'react'; import { uid } from '@tachybase/schema'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/actions.test.ts index fe9630d3a..8f8335e0e 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/actions.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('actions', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts index 69255bb19..eff872b64 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts @@ -1,5 +1,5 @@ -import Database, { Collection as DBCollection } from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import Database, { Collection as DBCollection } from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; describe('createdBy/updatedBy', () => { let api: MockServer; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/model.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/model.test.ts index fb7317af9..6d5d5d6b2 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/model.test.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/model.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { createMockServer, MockServer } from '@tachybase/test'; import { UserModel } from '../models/UserModel'; describe('models', () => { diff --git a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/role-users.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/role-users.test.ts index 5bb0589ab..6691e47bb 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/role-users.test.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/role-users.test.ts @@ -1,5 +1,5 @@ -import { Database, Repository } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; +import { Database, Repository } from '@tachybase/database'; +import { MockServer, createMockServer } from '@tachybase/test'; describe('actions', () => { let app: MockServer; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts b/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts index a843ce57c..1c35e24ce 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts @@ -1,4 +1,4 @@ -import { Context, DEFAULT_PAGE, DEFAULT_PER_PAGE, Next } from '@nocobase/actions'; +import { Context, DEFAULT_PAGE, DEFAULT_PER_PAGE, Next } from '@tachybase/actions'; export async function updateProfile(ctx: Context, next: Next) { const { values } = ctx.action.params; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/collections/users.ts b/packages/plugins/@nocobase/plugin-users/src/server/collections/users.ts index 1f576adc6..38a5c0aab 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/collections/users.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/collections/users.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ origin: '@nocobase/plugin-users', diff --git a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone-constraint.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone-constraint.ts index 770306b74..86d64d894 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone-constraint.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone-constraint.ts @@ -1,5 +1,5 @@ -import { DataTypes } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { DataTypes } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class AddUsersPhoneMigration extends Migration { on = 'beforeLoad'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone.ts index 9eb68debd..89ba85efb 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class AddUsersPhoneMigration extends Migration { appVersion = '<0.7.5-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username-constraint.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username-constraint.ts index f5977d288..34bd8e816 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username-constraint.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username-constraint.ts @@ -1,5 +1,5 @@ -import { DataTypes } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { DataTypes } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class AddUserNameMigration extends Migration { on = 'beforeLoad'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username.ts index 4053d9753..1ac25001e 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class AddUserNameMigration extends Migration { appVersion = '<0.13.0-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802183100-update-username.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802183100-update-username.ts index 22db9bd39..c60769ddf 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802183100-update-username.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802183100-update-username.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class UpdateUserNameMigration extends Migration { appVersion = '<0.13.0-alpha.1'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230908164036-update-username-interface.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230908164036-update-username-interface.ts index 01ce9656e..971d8b226 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230908164036-update-username-interface.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230908164036-update-username-interface.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class UpdateUserNameInterfaceMigration extends Migration { appVersion = '<0.13.0-alpha.10'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/models/UserModel.ts b/packages/plugins/@nocobase/plugin-users/src/server/models/UserModel.ts index 93575c9dc..21f3a1534 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/models/UserModel.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/models/UserModel.ts @@ -1,4 +1,4 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; export class UserModel extends Model { desensitize() { diff --git a/packages/plugins/@nocobase/plugin-users/src/server/server.ts b/packages/plugins/@nocobase/plugin-users/src/server/server.ts index 402bfa288..5c3e06ba6 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/server.ts @@ -1,10 +1,10 @@ -import { Collection, Op } from '@nocobase/database'; -import { Plugin } from '@nocobase/server'; -import { parse } from '@nocobase/utils'; +import { Collection, Op } from '@tachybase/database'; +import { Plugin } from '@tachybase/server'; +import { parse } from '@tachybase/utils'; import { resolve } from 'path'; import * as actions from './actions/users'; -import { Cache } from '@nocobase/cache'; +import { Cache } from '@tachybase/cache'; import { UserModel } from './models/UserModel'; export default class PluginUsersServer extends Plugin { diff --git a/packages/plugins/@nocobase/plugin-verification/package.json b/packages/plugins/@nocobase/plugin-verification/package.json index 0a45d3320..66b2db0b5 100644 --- a/packages/plugins/@nocobase/plugin-verification/package.json +++ b/packages/plugins/@nocobase/plugin-verification/package.json @@ -22,13 +22,13 @@ "tencentcloud-sdk-nodejs": "^4.0.525" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "验证码配置。", "displayName.zh-CN": "验证码", diff --git a/packages/plugins/@nocobase/plugin-verification/src/client/VerificationProviders.tsx b/packages/plugins/@nocobase/plugin-verification/src/client/VerificationProviders.tsx index 7c3690efa..c119111d7 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/client/VerificationProviders.tsx +++ b/packages/plugins/@nocobase/plugin-verification/src/client/VerificationProviders.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent } from '@nocobase/client'; +import { SchemaComponent } from '@tachybase/client'; import React from 'react'; import { Card } from 'antd'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx b/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx index 87d4b8be9..c0b4738ef 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import { VerificationProviders } from './VerificationProviders'; import { NAMESPACE } from './locale'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-verification/src/client/locale/index.ts index 7a79087b8..8e4502007 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'verification'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/index.ts b/packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/index.ts index ee2fa7347..694362238 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/index.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/index.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { Registry } from '@nocobase/utils/client'; +import { Registry } from '@tachybase/utils/client'; import SMSAliyun from './sms-aliyun'; import SMSTencent from './sms-tencent'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/client/schemas/providers.ts b/packages/plugins/@nocobase/plugin-verification/src/client/schemas/providers.ts index 305dd9830..e2b9c0d3d 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/client/schemas/providers.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/client/schemas/providers.ts @@ -1,5 +1,5 @@ import { uid } from '@tachybase/schema'; -import { useActionContext, useRequest } from '@nocobase/client'; +import { useActionContext, useRequest } from '@tachybase/client'; import { NAMESPACE } from '../locale'; const collection = { diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts index f80b0f837..69adfaaa2 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts @@ -1,10 +1,10 @@ import path from 'path'; -import { Context } from '@nocobase/actions'; -import { Op } from '@nocobase/database'; -import { HandlerType } from '@nocobase/resourcer'; -import { Plugin } from '@nocobase/server'; -import { Registry } from '@nocobase/utils'; +import { Context } from '@tachybase/actions'; +import { Op } from '@tachybase/database'; +import { HandlerType } from '@tachybase/resourcer'; +import { Plugin } from '@tachybase/server'; +import { Registry } from '@tachybase/utils'; import { Provider, namespace } from '.'; import initActions from './actions'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/Plugin.test.ts b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/Plugin.test.ts index f99f7675d..b6a30ac8b 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/Plugin.test.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/Plugin.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import Plugin, { Provider } from '..'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/collections/authors.ts b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/collections/authors.ts index ab6dbdb8f..e80fdc2ad 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/collections/authors.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/collections/authors.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'authors', diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/index.ts index f2e469a9c..f6c92923f 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/index.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/index.ts @@ -1,7 +1,7 @@ -import { MockServer, createMockServer } from '@nocobase/test'; +import { MockServer, createMockServer } from '@tachybase/test'; import path from 'path'; -import { ApplicationOptions } from '@nocobase/server'; +import { ApplicationOptions } from '@tachybase/server'; export function sleep(ms: number) { return new Promise((resolve) => { diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/actions/verifications.ts b/packages/plugins/@nocobase/plugin-verification/src/server/actions/verifications.ts index 816a7b813..5d4196429 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/actions/verifications.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/actions/verifications.ts @@ -1,5 +1,5 @@ -import actions, { Context, Next } from '@nocobase/actions'; -import { Op } from '@nocobase/database'; +import actions, { Context, Next } from '@tachybase/actions'; +import { Op } from '@tachybase/database'; import dayjs from 'dayjs'; import { randomInt, randomUUID } from 'crypto'; import { promisify } from 'util'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications.ts b/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications.ts index c5c14182a..ca9ead990 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications_providers.ts b/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications_providers.ts index 037503b4c..e6c6c64e8 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications_providers.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications_providers.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ dumpRules: { diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/build.config.ts b/packages/plugins/@tachybase/plugin-field-markdown-vditor/build.config.ts index 696749bed..2eacb1a5a 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/build.config.ts +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/build.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from '@nocobase/build'; +import { defineConfig } from '@tachybase/build'; import fs from 'fs/promises'; import path from 'path'; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/package.json b/packages/plugins/@tachybase/plugin-field-markdown-vditor/package.json index c517f2b97..8091e6245 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/package.json +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/package.json @@ -16,9 +16,10 @@ "vditor": "^3.10.3" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*" }, "description.zh-CN": "用于存储 Markdown,并使用 Vditor 编辑器渲染,支持常见 Markdown 语法,如列表,代码,引用等,并支持上传图片,录音等。同时可以做到即时渲染,所见即所得。", "displayName.zh-CN": "数据表字段:Markdown(Vditor)" diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Display.tsx b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Display.tsx index dd8b517ce..50f732a6c 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Display.tsx +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Display.tsx @@ -1,5 +1,5 @@ import { Field, useField } from '@tachybase/schema'; -import { withDynamicSchemaProps } from '@nocobase/client'; +import { withDynamicSchemaProps } from '@tachybase/client'; import { Popover } from 'antd'; import React, { CSSProperties, useCallback, useEffect, useRef, useState } from 'react'; import Vditor from 'vditor'; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Edit.tsx b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Edit.tsx index 7240f62f7..e6839b564 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Edit.tsx +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/Edit.tsx @@ -1,4 +1,4 @@ -import { useAPIClient, useApp, withDynamicSchemaProps } from '@nocobase/client'; +import { useAPIClient, useApp, withDynamicSchemaProps } from '@tachybase/client'; import React, { useEffect, useLayoutEffect, useRef } from 'react'; import Vditor from 'vditor'; import { defaultToolbar } from '../interfaces/markdown-vditor'; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/const.ts b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/const.ts index 0d02033e8..a5ee31c48 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/const.ts +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/const.ts @@ -1,4 +1,4 @@ -import { usePlugin } from '@nocobase/client'; +import { usePlugin } from '@tachybase/client'; import { PluginFieldMarkdownVditorClient } from '../'; export const useCDN = () => { diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/index.tsx b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/index.tsx index 3816fb0ff..586e57082 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/index.tsx +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/index.tsx @@ -1,5 +1,5 @@ import { connect, mapReadPretty } from '@tachybase/schema'; -import { withDynamicSchemaProps } from '@nocobase/client'; +import { withDynamicSchemaProps } from '@tachybase/client'; import { Display } from './Display'; import { Edit } from './Edit'; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/style.ts b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/style.ts index 6362855af..a65f24fcb 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/style.ts +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/components/style.ts @@ -1,4 +1,4 @@ -import { genStyleHook } from '@nocobase/client'; +import { genStyleHook } from '@tachybase/client'; export default genStyleHook('nb-field-markdown-vditor', (token) => { const { componentCls } = token; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/index.tsx b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/index.tsx index 974cc0ce8..0bd7631c6 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/index.tsx +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/index.tsx @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import 'vditor/dist/index.css'; import { MarkdownVditor } from './components'; import { MarkdownVditorFieldInterface } from './interfaces/markdown-vditor'; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/interfaces/markdown-vditor.tsx b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/interfaces/markdown-vditor.tsx index 0b37858ef..b55afca24 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/interfaces/markdown-vditor.tsx +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/interfaces/markdown-vditor.tsx @@ -1,4 +1,4 @@ -import { CollectionFieldInterface, interfacesProperties } from '@nocobase/client'; +import { CollectionFieldInterface, interfacesProperties } from '@tachybase/client'; import { generateNTemplate } from '../locale'; import { ISchema } from '@tachybase/schema'; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/locale/index.ts b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/locale/index.ts index 3527fecf3..65aeddf5d 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/locale/index.ts +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { tval } from '@nocobase/client'; +import { tval } from '@tachybase/client'; const NAMESPACE = 'field-markdown-vditor'; diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/markdown-vditor-field.ts b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/markdown-vditor-field.ts index c53ca9241..7a39d82f4 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/markdown-vditor-field.ts +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/markdown-vditor-field.ts @@ -1,4 +1,4 @@ -import { DataTypes, Field } from '@nocobase/database'; +import { DataTypes, Field } from '@tachybase/database'; export class MarkdownVditorField extends Field { get dataType() { diff --git a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/plugin.ts b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/plugin.ts index d6c05326c..d4ae9cb1b 100644 --- a/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/plugin.ts +++ b/packages/plugins/@tachybase/plugin-field-markdown-vditor/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; export class PluginFieldMarkdownVditorServer extends Plugin { async afterAdd() {} diff --git a/packages/plugins/@tachybase/plugin-mobile-client/package.json b/packages/plugins/@tachybase/plugin-mobile-client/package.json index 1af3c8867..bcd84cb71 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/package.json +++ b/packages/plugins/@tachybase/plugin-mobile-client/package.json @@ -24,11 +24,11 @@ "react-router-dom": "6.x" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供移动端页面配置的能力。", "displayName.zh-CN": "移动端" diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/configuration/App.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/configuration/App.tsx index 2e1b576e8..9022208bb 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/configuration/App.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/configuration/App.tsx @@ -1,4 +1,4 @@ -import { useApp } from '@nocobase/client'; +import { useApp } from '@tachybase/client'; import { Card, Form, Input } from 'antd'; import React, { useMemo } from 'react'; import { useTranslation } from '../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/assets/svg/index.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/assets/svg/index.tsx index f8900f6c8..a603503c7 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/assets/svg/index.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/assets/svg/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Icon } from '@nocobase/client'; +import { Icon } from '@tachybase/client'; import NoticeSvg from './notice.svg'; import SwiperSvg from './swiper.svg'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/index.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/index.tsx index cd9671b4f..aadb68c09 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/index.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/index.tsx @@ -1,4 +1,4 @@ -import { SchemaComponentOptions } from '@nocobase/client'; +import { SchemaComponentOptions } from '@tachybase/client'; import React from 'react'; import { MMenuBlockInitializer, diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.Designer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.Designer.tsx index 80462a073..6d000ee99 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.Designer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.Designer.tsx @@ -1,7 +1,7 @@ import { MenuOutlined } from '@ant-design/icons'; import { useField, useFieldSchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { SchemaSettingsDropdown, SchemaSettingsSwitchItem, useDesignable } from '@nocobase/client'; +import { SchemaSettingsDropdown, SchemaSettingsSwitchItem, useDesignable } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; import { useNavigate } from 'react-router-dom'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.tsx index 4e32eca97..86d12f679 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/Container.tsx @@ -1,5 +1,5 @@ import { useField, useFieldSchema } from '@tachybase/schema'; -import { cx, SchemaComponent, SortableItem, useDesigner, useToken } from '@nocobase/client'; +import { cx, SchemaComponent, SortableItem, useDesigner, useToken } from '@tachybase/client'; import React, { useEffect } from 'react'; import { Navigate, useLocation, useNavigate, useParams } from 'react-router-dom'; import { ContainerDesigner } from './Container.Designer'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts index e8db45b3c..ba1b4c3ad 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.Designer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.Designer.tsx index 477e201b6..e0f919a9e 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.Designer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.Designer.tsx @@ -1,6 +1,6 @@ import { Switch } from '@tachybase/components'; import { useField } from '@tachybase/schema'; -import { GeneralSchemaDesigner, SchemaSettingsModalItem } from '@nocobase/client'; +import { GeneralSchemaDesigner, SchemaSettingsModalItem } from '@tachybase/client'; import React from 'react'; import { useTranslation } from '../../../../locale'; import { useSchemaPatch } from '../../hooks'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.tsx index 30eaa6aa0..11d37d344 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/header/Header.tsx @@ -1,5 +1,5 @@ import { useField } from '@tachybase/schema'; -import { cx, SortableItem, useCompile, useDesigner, useDocumentTitle, useToken } from '@nocobase/client'; +import { cx, SortableItem, useCompile, useDesigner, useDocumentTitle, useToken } from '@tachybase/client'; import { NavBar, NavBarProps } from 'antd-mobile'; import React, { useEffect, useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.configure.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.configure.ts index 825f18d23..ad7dd8214 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.configure.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.configure.ts @@ -1,4 +1,4 @@ -import { SchemaInitializer, useCollection, useCollectionManager } from '@nocobase/client'; +import { SchemaInitializer, useCollection, useCollectionManager } from '@tachybase/client'; import { useIsMobile } from '../tab-search/components/field-item/hooks'; import { canBeOptionalField, canBeRelatedField } from '../tab-search/utils'; import { createSchemaImageSearchItem } from './search-item/ImageSearchItem.schema'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.initializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.initializer.tsx index 256d925da..11ac830c5 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.initializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.initializer.tsx @@ -1,4 +1,4 @@ -import { DataBlockInitializer, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { DataBlockInitializer, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; import React from 'react'; import { createSchemaImageSearchBlock } from './ImageSearch.schema'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.provider.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.provider.tsx index 10a9a0f83..6c832a2f9 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.provider.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.provider.tsx @@ -1,4 +1,4 @@ -import { DataBlockProvider } from '@nocobase/client'; +import { DataBlockProvider } from '@tachybase/client'; import React from 'react'; export const ImageSearchProvider = ({ collection, children }) => { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.schema.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.schema.ts index 8ae5dd1f4..5c038cd6f 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.schema.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.schema.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; interface OptionsType { collection: string; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.view.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.view.tsx index 7d2ee09eb..c8793bf49 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.view.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/ImageSearch.view.tsx @@ -1,4 +1,4 @@ -import { useDesigner, useSchemaInitializerRender } from '@nocobase/client'; +import { useDesigner, useSchemaInitializerRender } from '@tachybase/client'; import { RecursionField, useFieldSchema } from '@tachybase/schema'; import React from 'react'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useAction.ImageSearchItemView.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useAction.ImageSearchItemView.ts index a851d4cc0..716b6b1e6 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useAction.ImageSearchItemView.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useAction.ImageSearchItemView.ts @@ -1,4 +1,4 @@ -import { useCollection, useDesigner } from '@nocobase/client'; +import { useCollection, useDesigner } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import React from 'react'; import { useTranslation } from '../../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useSelect.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useSelect.ts index 878aaedaa..deb48a182 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useSelect.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/hooks/useSelect.ts @@ -1,4 +1,4 @@ -import { findFilterTargets, mergeFilter, useCollection, useFilterBlock } from '@nocobase/client'; +import { findFilterTargets, mergeFilter, useCollection, useFilterBlock } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; import { useMemo } from 'react'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.intializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.intializer.tsx index d78dffbce..4c9b7aad7 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.intializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.intializer.tsx @@ -3,7 +3,7 @@ import { useCurrentSchema, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { merge } from '@tachybase/schema'; import React from 'react'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.schema.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.schema.ts index 6ecdfd648..1ef5cc36c 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.schema.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.schema.ts @@ -1,4 +1,4 @@ -import { SchemaInitializerItemType } from '@nocobase/client'; +import { SchemaInitializerItemType } from '@tachybase/client'; interface OptionsType { label?: string; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.setting.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.setting.tsx index e317371c2..ce0b39d71 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.setting.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.setting.tsx @@ -6,7 +6,7 @@ import { useCompile, useDesignable, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useField, useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; import { useTranslation } from '../../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.toolbar.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.toolbar.tsx index 03f81c074..d9b5446d4 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.toolbar.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.toolbar.tsx @@ -1,4 +1,4 @@ -import { SchemaToolbar } from '@nocobase/client'; +import { SchemaToolbar } from '@tachybase/client'; import React from 'react'; export const ImageSearchItemToolbar = (props) => { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.view.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.view.tsx index a9f5c7bc8..cfe780825 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.view.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/ImageSearchItem.view.tsx @@ -1,4 +1,4 @@ -import { SortableItem, css, withDynamicSchemaProps } from '@nocobase/client'; +import { SortableItem, css, withDynamicSchemaProps } from '@tachybase/client'; import { Image, JumboTabs } from 'antd-mobile'; import React from 'react'; import { useActionImageSearchItemView } from '../hooks/useAction.ImageSearchItemView'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Optional.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Optional.ts index 7d9ffb01c..6f277b8ec 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Optional.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Optional.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { useCollection, useCollectionManager } from '@nocobase/client'; +import { useCollection, useCollectionManager } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; import { useTabSearchCollapsibleInputItem } from '../../tab-search/components/field-item/hooks'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Related.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Related.tsx index 81169d13e..962ba1dbc 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Related.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/image-search/search-item/useProps.Related.tsx @@ -1,5 +1,5 @@ // 关系字段类型 -import { useCollection, useCollectionManager, useDataSourceHeaders, useRequest } from '@nocobase/client'; +import { useCollection, useCollectionManager, useDataSourceHeaders, useRequest } from '@tachybase/client'; import { useField, useFieldSchema } from '@tachybase/schema'; import { useEffect, useMemo } from 'react'; import { canBeRelatedField } from '../../tab-search/utils'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx index 8be24989a..91547cd6d 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx @@ -1,6 +1,6 @@ import { MenuOutlined } from '@ant-design/icons'; import { useField, useFieldSchema } from '@tachybase/schema'; -import { SchemaSettingsDropdown, SchemaSettingsRemove, useDesignable } from '@nocobase/client'; +import { SchemaSettingsDropdown, SchemaSettingsRemove, useDesignable } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; import { useTranslation } from '../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx index cec81b366..1918e457f 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx @@ -9,7 +9,7 @@ import { cx, useCompile, useDesigner, -} from '@nocobase/client'; +} from '@tachybase/client'; import { List, ListItemProps } from 'antd-mobile'; import React from 'react'; import { useLocation, useNavigate, useParams } from 'react-router-dom'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.tsx index 0a35cf550..84eb3bbe0 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.tsx @@ -7,7 +7,7 @@ import { SortableItem, useDesignable, useDesigner, -} from '@nocobase/client'; +} from '@tachybase/client'; import { List } from 'antd-mobile'; import React from 'react'; import { useTranslation } from '../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx index 6e7b254a2..9aeeb1d91 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { MenuOutlined } from '@ant-design/icons'; -import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; export const MMenuBlockInitializer = () => { const itemConfig = useSchemaInitializerItem(); diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts index 4ba46e9b2..6d1c418d3 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-create/createGridCardBlockSchma.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-create/createGridCardBlockSchma.ts index d1fac8170..cfcdb672d 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-create/createGridCardBlockSchma.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-create/createGridCardBlockSchma.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; export const createGridCardBlockSchema = (options, componentName) => { const { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-initializer/NoticeBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-initializer/NoticeBlockInitializer.tsx index 74831abb4..ebb8ed9f9 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-initializer/NoticeBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/notice/schema-initializer/NoticeBlockInitializer.tsx @@ -5,7 +5,7 @@ import { useCollectionManager, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { NoticeBar } from 'antd-mobile'; import { createGridCardBlockSchema } from '../schema-create/createGridCardBlockSchma'; import { NoticeIcon } from '../../../../assets/svg'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx index 451549e67..7fe34dfdc 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx @@ -1,7 +1,7 @@ import { MenuOutlined } from '@ant-design/icons'; import { useField, useFieldSchema } from '@tachybase/schema'; import { uid } from '@tachybase/schema'; -import { SchemaSettingsDropdown, SchemaSettingsSwitchItem, useDesignable } from '@nocobase/client'; +import { SchemaSettingsDropdown, SchemaSettingsSwitchItem, useDesignable } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; import { generateNTemplate, useTranslation } from '../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx index e979e5791..e4de87916 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx @@ -7,7 +7,7 @@ import { css, cx, useDesigner, -} from '@nocobase/client'; +} from '@tachybase/client'; import { TabsProps } from 'antd'; import React, { useCallback } from 'react'; import { useSearchParams } from 'react-router-dom'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/style.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/style.ts index 6625d0654..9518ae7dc 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/style.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/style.ts @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx index f8f60cf82..0a01a4c10 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx @@ -1,4 +1,4 @@ -import { GeneralSchemaDesigner, SchemaSettingsRemove } from '@nocobase/client'; +import { GeneralSchemaDesigner, SchemaSettingsRemove } from '@tachybase/client'; import React from 'react'; import { useTranslation } from '../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx index 60ed61c11..4ce854248 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx @@ -1,4 +1,4 @@ -import { css, cx, SettingsMenu, SortableItem, useDesigner } from '@nocobase/client'; +import { css, cx, SettingsMenu, SortableItem, useDesigner } from '@tachybase/client'; import React from 'react'; import { SettingsDesigner } from './Settings.Designer'; export const InternalSettings = () => { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx index 668e985f5..207f844a6 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { SettingOutlined } from '@ant-design/icons'; -import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; export const MSettingsBlockInitializer = () => { const itemConfig = useSchemaInitializerItem(); diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlock.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlock.tsx index 5b48f938f..37cafd3e6 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlock.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlock.tsx @@ -1,4 +1,4 @@ -import { BlockItem, css, useDesignable, useRequest, withDynamicSchemaProps } from '@nocobase/client'; +import { BlockItem, css, useDesignable, useRequest, withDynamicSchemaProps } from '@tachybase/client'; import { Swiper } from 'antd-mobile'; import React from 'react'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlockInitializer.tsx index 47f08b4f8..9173a24e5 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperBlockInitializer.tsx @@ -4,7 +4,7 @@ import { useCollectionManager, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import React from 'react'; import { ISchema } from '@tachybase/schema'; import { Toast } from 'antd-mobile'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperFieldSettings.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperFieldSettings.tsx index 7f554f289..2014ea7d9 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperFieldSettings.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperFieldSettings.tsx @@ -5,7 +5,7 @@ import { useCompile, useDesignable, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useField, useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; import { useTranslation } from '../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperPage.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperPage.tsx index 98f444987..afed96093 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperPage.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/SwiperPage.tsx @@ -1,4 +1,4 @@ -import { CollectionRecordProvider, DataBlockProvider, RemoteSchemaComponent } from '@nocobase/client'; +import { CollectionRecordProvider, DataBlockProvider, RemoteSchemaComponent } from '@tachybase/client'; import React from 'react'; import { useParams } from 'react-router-dom'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/useSwiperBlockProps.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/useSwiperBlockProps.ts index 5a9d2b19a..6488c3c50 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/useSwiperBlockProps.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/swiper/useSwiperBlockProps.ts @@ -1,7 +1,7 @@ import { useFieldSchema } from '@tachybase/schema'; import { useNavigate } from 'react-router-dom'; import React, { useEffect } from 'react'; -import { useCollection, useDesignable, useRequest } from '@nocobase/client'; +import { useCollection, useDesignable, useRequest } from '@tachybase/client'; export const useSwiperBlockProps = () => { const fieldSchema = useFieldSchema(); diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx index 77756db1f..0168cef31 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx @@ -7,7 +7,7 @@ import { SchemaSettingsRemove, SortableItem, useDesigner, -} from '@nocobase/client'; +} from '@tachybase/client'; import { TabBarItemProps } from 'antd-mobile'; import React from 'react'; import { useTranslation } from '../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx index 3d874528e..36d969617 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx @@ -10,7 +10,7 @@ import { SortableItem, useCompile, useDesignable, -} from '@nocobase/client'; +} from '@tachybase/client'; import { TabBar } from 'antd-mobile'; import React, { useCallback } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/TabSearchAction.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/TabSearchAction.ts index 9ad958f33..2eba80036 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/TabSearchAction.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/TabSearchAction.ts @@ -1,4 +1,4 @@ -import { useDesigner, useSchemaInitializerRender } from '@nocobase/client'; +import { useDesigner, useSchemaInitializerRender } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import { isTabSearchCollapsibleInputItem } from '../utils'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItem.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItem.tsx index 67e5ad6ce..f1f933591 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItem.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItem.tsx @@ -1,4 +1,4 @@ -import { SortableItem, withDynamicSchemaProps } from '@nocobase/client'; +import { SortableItem, withDynamicSchemaProps } from '@tachybase/client'; import { ConfigProvider, Row } from 'antd'; import React from 'react'; import { IButton, IInput, ISelect } from './TabSearchCollapsibleInputItemChild'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItemAction.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItemAction.ts index f9b42c43c..b5f09104c 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItemAction.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItemAction.ts @@ -1,6 +1,6 @@ import { useMemo, useRef, useState } from 'react'; import { useFieldSchema } from '@tachybase/schema'; -import { useCollection, useCollectionManager, useDesignable, useDesigner } from '@nocobase/client'; +import { useCollection, useCollectionManager, useDesignable, useDesigner } from '@tachybase/client'; import { canBeCalculatedField, canBeDataField, @@ -9,7 +9,7 @@ import { isTabSearchCollapsibleInputItem, } from '../../utils'; import { useTabSearchCollapsibleInputItem } from './hooks'; -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; export const useTabSearchCollapsibleInputItemAction = (props) => { const { onSelected } = useTabSearchCollapsibleInputItem(); diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItem.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItem.tsx index 701677c83..7f784b758 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItem.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItem.tsx @@ -1,4 +1,4 @@ -import { SortableItem, css, withDynamicSchemaProps } from '@nocobase/client'; +import { SortableItem, css, withDynamicSchemaProps } from '@tachybase/client'; import { Checkbox, Grid, Switch } from 'antd-mobile'; import React from 'react'; import { useTabSearchCollapsibleInputItemAction } from './TabSearchCollapsibleInputItemAction'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItemChild.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItemChild.tsx index d22007359..e861a8e55 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItemChild.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItemChild.tsx @@ -4,7 +4,7 @@ import { Grid, Divider, Picker, Input, Space, ActionSheet, DatePicker, CalendarP import { DownOutline } from 'antd-mobile-icons'; import type { Action } from 'antd-mobile/es/components/action-sheet'; import { changFormat, convertFormat } from '../../utils'; -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; export const ISelect = (props) => { const { options, onChange, customLabelKey } = props; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItem.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItem.tsx index 8f17f0597..5b91430e1 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItem.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItem.tsx @@ -1,4 +1,4 @@ -import { SortableItem, withDynamicSchemaProps } from '@nocobase/client'; +import { SortableItem, withDynamicSchemaProps } from '@tachybase/client'; import { ConfigProvider, Menu } from 'antd'; import React from 'react'; import { useTabSearchFieldItemAction } from './TabSearchFieldItemAction'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemAction.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemAction.ts index cb77fef8c..dcab99ce4 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemAction.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemAction.ts @@ -1,6 +1,6 @@ import React from 'react'; import { MenuProps } from 'antd'; -import { useCollection, useDesigner } from '@nocobase/client'; +import { useCollection, useDesigner } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import { useTranslation } from '../../../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemProps.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemProps.ts index 3c7f2b829..1af9f2e51 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemProps.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldItemProps.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { useCollection, useCollectionManager } from '@nocobase/client'; +import { useCollection, useCollectionManager } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; import { useTabSearchCollapsibleInputItem } from './hooks'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldMItem.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldMItem.tsx index 3cddd521f..20cfa57ae 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldMItem.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSearchFieldMItem.tsx @@ -1,4 +1,4 @@ -import { SortableItem, withDynamicSchemaProps } from '@nocobase/client'; +import { SortableItem, withDynamicSchemaProps } from '@tachybase/client'; import React from 'react'; import { useTabSearchFieldItemAction } from './TabSearchFieldItemAction'; import { Tabs } from 'antd-mobile'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSerachFieldItemRelatedProps.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSerachFieldItemRelatedProps.tsx index 25f2aa99d..fe1798533 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSerachFieldItemRelatedProps.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/TabSerachFieldItemRelatedProps.tsx @@ -6,7 +6,7 @@ import { useDataSourceHeaders, useFilterBlock, useRequest, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useField, useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; import { useTabSearchCollapsibleInputItem } from './hooks'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/hooks.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/hooks.tsx index 6d77b9001..1822e817a 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/hooks.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/components/field-item/hooks.tsx @@ -1,4 +1,4 @@ -import { findFilterTargets, mergeFilter, useCollection, useFilterBlock } from '@nocobase/client'; +import { findFilterTargets, mergeFilter, useCollection, useFilterBlock } from '@tachybase/client'; import { useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/create/createTabSearchBlockSchema.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/create/createTabSearchBlockSchema.ts index bc8f4dfd3..f999218a4 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/create/createTabSearchBlockSchema.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/create/createTabSearchBlockSchema.ts @@ -1,5 +1,5 @@ import { ISchema } from '@tachybase/schema'; -import { uid } from '@nocobase/utils/client'; +import { uid } from '@tachybase/utils/client'; export const createTabSearchBlockSchema = (options: { collectionName: string; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchBlockInitializer.tsx index 08bebea8d..56bb1edf3 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchBlockInitializer.tsx @@ -1,6 +1,6 @@ import React from 'react'; import _ from 'lodash'; -import { DataBlockInitializer, Icon, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { DataBlockInitializer, Icon, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; import { createTabSearchBlockSchema } from '../create/createTabSearchBlockSchema'; export const TabSearchBlockInitializer = (props) => { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializer.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializer.tsx index a26db300e..4c6d42e0f 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializer.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializer, SchemaInitializerItemType, useCollection, useCollectionManager } from '@nocobase/client'; +import { SchemaInitializer, SchemaInitializerItemType, useCollection, useCollectionManager } from '@tachybase/client'; import _ from 'lodash'; import { canBeDataField, canBeOptionalField, canBeRelatedField, canBeSearchField } from '../utils'; import { createTabSearchItemSchema } from '../create/createTabSearchItemSchema'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializerGadget.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializerGadget.tsx index af5b90f76..2df5af17b 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializerGadget.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializerGadget.tsx @@ -3,7 +3,7 @@ import { useCurrentSchema, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { merge } from '@tachybase/schema'; import React from 'react'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/provider/TabSearchProvider.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/provider/TabSearchProvider.tsx index 9b75c2b4c..99b6803e4 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/provider/TabSearchProvider.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/provider/TabSearchProvider.tsx @@ -1,4 +1,4 @@ -import { DataBlockProvider } from '@nocobase/client'; +import { DataBlockProvider } from '@tachybase/client'; import React from 'react'; export const TabSearchProvider = (props) => { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/settings/TabSearchItemFieldSettings.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/settings/TabSearchItemFieldSettings.tsx index a1c2b7192..6ceacfeea 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/settings/TabSearchItemFieldSettings.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/settings/TabSearchItemFieldSettings.tsx @@ -6,7 +6,7 @@ import { useCompile, useDesignable, useFormBlockContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useTranslation } from '../../../../../locale'; import { useField, useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/utils.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/utils.ts index 9626782e3..7ce1ce444 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/utils.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/tab-search/utils.ts @@ -1,4 +1,4 @@ -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; const canBeOptionalFields = ['select', 'multipleSelect', 'radioGroup', 'checkboxGroup']; const canBeRelatedFields = ['oho', 'obo', 'o2m', 'm2o', 'm2m']; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts index 6f7a408f7..ea04ad7c8 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts @@ -1,5 +1,5 @@ import { useField, useFieldSchema } from '@tachybase/schema'; -import { useDesignable } from '@nocobase/client'; +import { useDesignable } from '@tachybase/client'; import lodash from 'lodash'; import { useMemoizedFn } from 'ahooks'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts index 3b2ac2155..94ed86365 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts @@ -1,4 +1,4 @@ -import { CompatibleSchemaInitializer, gridRowColWrap } from '@nocobase/client'; +import { CompatibleSchemaInitializer, gridRowColWrap } from '@tachybase/client'; import { generateNTemplate, tval } from '../../../locale'; /** diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts index e87973fa9..557e2749e 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { useInterfaceContext } from '../../../router/InterfaceProvider'; import { PaginationProps } from 'antd'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/iOS6.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/iOS6.tsx index e898f58b9..4c2e95dab 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/iOS6.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/iOS6.tsx @@ -1,4 +1,4 @@ -import { css, cx } from '@nocobase/client'; +import { css, cx } from '@tachybase/client'; import React from 'react'; const iOS6: React.FC<{ diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/index.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/index.tsx index 71bf3ad35..a6e71b27b 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/index.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/devices/index.tsx @@ -1,4 +1,4 @@ -import { css, cx } from '@nocobase/client'; +import { css, cx } from '@tachybase/client'; import React from 'react'; import { useLocation } from 'react-router-dom'; import Device from './iOS6'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/index.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/index.tsx index 6ad4c4b95..dfbdcb6f2 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/index.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/index.tsx @@ -1,4 +1,4 @@ -import { createRouterManager, Plugin, RouterManager, RouteSchemaComponent } from '@nocobase/client'; +import { createRouterManager, Plugin, RouterManager, RouteSchemaComponent } from '@tachybase/client'; import React from 'react'; import { Navigate, Outlet } from 'react-router-dom'; import { MobileClientProvider } from './MobileClientProvider'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts index 83610b094..b73516481 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import {tval as nTval, i18n } from '@nocobase/client'; +import {tval as nTval, i18n } from '@tachybase/client'; import { useTranslation as useT } from 'react-i18next'; export const NAMESPACE = 'mobile-client'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx index 08817e66c..6f92c3b1e 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx @@ -1,4 +1,4 @@ -import { ActionContextProvider, AdminProvider, css, cx, RemoteSchemaComponent, useViewport } from '@nocobase/client'; +import { ActionContextProvider, AdminProvider, css, cx, RemoteSchemaComponent, useViewport } from '@tachybase/client'; import { DrawerProps, ModalProps } from 'antd'; import React, { useMemo } from 'react'; import { Outlet, useParams } from 'react-router-dom'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx index bd4ec7bcc..e43871e8e 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx @@ -1,4 +1,4 @@ -import { css, usePlugin } from '@nocobase/client'; +import { css, usePlugin } from '@tachybase/client'; import React from 'react'; import { MobileClientPlugin } from '../index'; import { InterfaceProvider } from './InterfaceProvider'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx index 56b3d1b73..774f1c20b 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx @@ -1,5 +1,5 @@ import { LinkOutlined } from '@ant-design/icons'; -import { css, useApp } from '@nocobase/client'; +import { css, useApp } from '@tachybase/client'; import { Button } from 'antd'; import React from 'react'; import { useTranslation } from '../locale'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts index b01332afc..0b63945c0 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts @@ -1,5 +1,5 @@ -import { Model } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Model } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.14.0-alpha.1'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts index 650d542bd..2a678c62b 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts @@ -1,5 +1,5 @@ -import { Model } from '@nocobase/database'; -import { Migration } from '@nocobase/server'; +import { Model } from '@tachybase/database'; +import { Migration } from '@tachybase/server'; export default class extends Migration { appVersion = '<0.17.0-alpha.8'; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts index a895263ae..14a59684e 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { resolve } from 'path'; export class MobileClientPlugin extends Plugin { diff --git a/packages/plugins/@tachybase/plugin-workflow-test/package.json b/packages/plugins/@tachybase/plugin-workflow-test/package.json index a3f93ff7e..ed1601538 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/package.json +++ b/packages/plugins/@tachybase/plugin-workflow-test/package.json @@ -9,13 +9,13 @@ "lodash": "4.17.21" }, "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/data-source-manager": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" + "@tachybase/client": "workspace:*", + "@tachybase/data-source-manager": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "displayName.zh-CN": "工作流:测试工具包" } diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/client/index.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/client/index.ts index 30c93b8ab..a4ee09fa2 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/client/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/client/index.ts @@ -1,3 +1,3 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; export default class extends Plugin {} diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts index 687b64c8d..2e62c53d0 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts @@ -1,4 +1,4 @@ -import { dayjs } from '@nocobase/utils'; +import { dayjs } from '@tachybase/utils'; import { lowerCase } from 'lodash'; /** diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2ePageObjectModel.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2ePageObjectModel.ts index 8f744651a..150749e87 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2ePageObjectModel.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2ePageObjectModel.ts @@ -1,4 +1,4 @@ -import { Locator, Page } from '@nocobase/test/e2e'; +import { Locator, Page } from '@tachybase/test/e2e'; export class CreateWorkFlow { readonly page: Page; name: Locator; diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eUtils.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eUtils.ts index 4d39877eb..f5b70f122 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eUtils.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/e2e/e2eUtils.ts @@ -1,4 +1,4 @@ -import { request, Page } from '@nocobase/test/e2e'; +import { request, Page } from '@tachybase/test/e2e'; const PORT = process.env.APP_PORT || 20000; const APP_BASE_URL = process.env.APP_BASE_URL || `http://localhost:${PORT}`; diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/categories.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/categories.ts index 1c73e2e43..d2977193f 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/categories.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/categories.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'categories', diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/comments.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/comments.ts index 30494fae0..b5d172b97 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/comments.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/comments.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'comments', diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/posts.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/posts.ts index 7e8e98db5..4982e7529 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/posts.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/posts.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'posts', diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/tags.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/tags.ts index 433688e1b..7b41d4f33 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/tags.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/server/collections/tags.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'tags', diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/server/index.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/server/index.ts index 85116ef5b..435e2e5ed 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/server/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/server/index.ts @@ -1,14 +1,14 @@ import path from 'path'; -import { ApplicationOptions, Plugin } from '@nocobase/server'; -import { MockServer, createMockServer, mockDatabase } from '@nocobase/test'; +import { ApplicationOptions, Plugin } from '@tachybase/server'; +import { MockServer, createMockServer, mockDatabase } from '@tachybase/test'; import functions from './functions'; import triggers from './triggers'; import instructions from './instructions'; -import { Resourcer } from '@nocobase/resourcer'; -import { SequelizeDataSource } from '@nocobase/data-source-manager'; -import { uid } from '@nocobase/utils'; +import { Resourcer } from '@tachybase/resourcer'; +import { SequelizeDataSource } from '@tachybase/data-source-manager'; +import { uid } from '@tachybase/utils'; export interface MockServerOptions extends ApplicationOptions { collectionsPath?: string; diff --git a/packages/plugins/@tachybase/plugin-workflow-test/src/server/instructions.ts b/packages/plugins/@tachybase/plugin-workflow-test/src/server/instructions.ts index f92f07796..fd9057357 100644 --- a/packages/plugins/@tachybase/plugin-workflow-test/src/server/instructions.ts +++ b/packages/plugins/@tachybase/plugin-workflow-test/src/server/instructions.ts @@ -1,4 +1,4 @@ -import { lodash } from '@nocobase/utils'; +import { lodash } from '@tachybase/utils'; export default { echo: { diff --git a/packages/plugins/@tachybase/plugin-workflow/package.json b/packages/plugins/@tachybase/plugin-workflow/package.json index 2f7a04950..fdda9960c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/package.json +++ b/packages/plugins/@tachybase/plugin-workflow/package.json @@ -31,20 +31,20 @@ "sequelize": "^6.26.0" }, "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/data-source-manager": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/evaluators": "workspace:*", - "@nocobase/logger": "workspace:*", "@nocobase/plugin-collection-manager": "workspace:*", "@nocobase/plugin-error-handler": "workspace:*", "@nocobase/plugin-users": "workspace:*", - "@nocobase/resourcer": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*", - "@tachybase/schema": "workspace:*" + "@tachybase/actions": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/data-source-manager": "workspace:*", + "@tachybase/database": "workspace:*", + "@tachybase/evaluators": "workspace:*", + "@tachybase/logger": "workspace:*", + "@tachybase/resourcer": "workspace:*", + "@tachybase/schema": "workspace:*", + "@tachybase/server": "workspace:*", + "@tachybase/test": "workspace:*", + "@tachybase/utils": "workspace:*" }, "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。", "displayName.zh-CN": "工作流", diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/AddButton.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/AddButton.tsx index 410565939..516392ef7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/AddButton.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/AddButton.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useMemo } from 'react'; import { Button, Dropdown, MenuProps } from 'antd'; import { PlusOutlined } from '@ant-design/icons'; -import { css, useAPIClient, useCompile, usePlugin } from '@nocobase/client'; +import { css, useAPIClient, useCompile, usePlugin } from '@tachybase/client'; import WorkflowPlugin from '.'; import { useFlowContext } from './FlowContext'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/Branch.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/Branch.tsx index 4b1b488c2..bc79630ed 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/Branch.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/Branch.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { CloseOutlined } from '@ant-design/icons'; -import { css, cx } from '@nocobase/client'; +import { css, cx } from '@tachybase/client'; import { AddButton } from './AddButton'; import { useGetAriaLabelOfAddButton } from './hooks/useGetAriaLabelOfAddButton'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/CanvasContent.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/CanvasContent.tsx index 40974e384..b80834b42 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/CanvasContent.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/CanvasContent.tsx @@ -1,7 +1,7 @@ import { Alert, Slider } from 'antd'; import React from 'react'; -import { cx, css } from '@nocobase/client'; +import { cx, css } from '@tachybase/client'; import { Branch } from './Branch'; import { useFlowContext } from './FlowContext'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionCanvas.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionCanvas.tsx index 32941dee4..33370f7aa 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionCanvas.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionCanvas.tsx @@ -12,8 +12,8 @@ import { useDocumentTitle, usePlugin, useResourceActionContext, -} from '@nocobase/client'; -import { str2moment } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { str2moment } from '@tachybase/utils/client'; import WorkflowPlugin from '.'; import { CanvasContent } from './CanvasContent'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionContextProvider.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionContextProvider.tsx index c89274893..932acbe99 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionContextProvider.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionContextProvider.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { SchemaComponentOptions, usePlugin } from '@nocobase/client'; +import { SchemaComponentOptions, usePlugin } from '@tachybase/client'; import PluginWorkflowClient, { FlowContext } from '.'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionLink.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionLink.tsx index 922d804a5..a75c16fb0 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionLink.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionLink.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; -import { useActionContext, useRecord } from '@nocobase/client'; +import { useActionContext, useRecord } from '@tachybase/client'; import { getWorkflowExecutionsPath } from './utils'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionPage.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionPage.tsx index e49ee00ad..db361f2ac 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionPage.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionPage.tsx @@ -1,4 +1,4 @@ -import { cx, SchemaComponent } from '@nocobase/client'; +import { cx, SchemaComponent } from '@tachybase/client'; import React from 'react'; import { useParams } from 'react-router-dom'; import { ExecutionCanvas } from './ExecutionCanvas'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionResourceProvider.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionResourceProvider.tsx index 5bf24ad5b..232eae322 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionResourceProvider.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/ExecutionResourceProvider.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ResourceActionProvider, useRecord } from '@nocobase/client'; +import { ResourceActionProvider, useRecord } from '@tachybase/client'; export const ExecutionResourceProvider = ({ request, filter = {}, ...others }) => { const workflow = useRecord(); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowCanvas.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowCanvas.tsx index 2e826a5f3..f166bbe04 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowCanvas.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowCanvas.tsx @@ -8,8 +8,8 @@ import { useDocumentTitle, useResourceActionContext, useResourceContext, -} from '@nocobase/client'; -import { str2moment } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { str2moment } from '@tachybase/utils/client'; import { App, Breadcrumb, Button, Dropdown, Result, Spin, Switch, message } from 'antd'; import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowLink.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowLink.tsx index 16cb9e888..088aa1ce5 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowLink.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowLink.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; -import { useActionContext, useGetAriaLabelOfAction, useRecord } from '@nocobase/client'; +import { useActionContext, useGetAriaLabelOfAction, useRecord } from '@tachybase/client'; import { getWorkflowDetailPath } from './utils'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPage.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPage.tsx index 8def8f441..42ece7d44 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPage.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPage.tsx @@ -1,4 +1,4 @@ -import { cx, SchemaComponent } from '@nocobase/client'; +import { cx, SchemaComponent } from '@tachybase/client'; import React from 'react'; import { useParams } from 'react-router-dom'; import useStyles from './style'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPane.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPane.tsx index 7a13aef6d..0c10424f8 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPane.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/WorkflowPane.tsx @@ -1,4 +1,4 @@ -import { SchemaComponent, SchemaComponentContext, usePlugin, useRecord } from '@nocobase/client'; +import { SchemaComponent, SchemaComponentContext, usePlugin, useRecord } from '@tachybase/client'; import { Card } from 'antd'; import React, { useContext, useEffect } from 'react'; import { ExecutionLink } from './ExecutionLink'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/configuration.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/configuration.test.ts index ae21c08a0..85e98702d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/configuration.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/configuration.test.ts @@ -9,8 +9,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('Configuration page to configure the Trigger node', () => { test('Triggered one minute after the current time of the customized time', async ({ diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts index d624065cd..8dc6f736f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/ScheduleEventTrigger/workflowCRUD.test.ts @@ -5,7 +5,7 @@ import { apiCreateWorkflow, apiDeleteWorkflow, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; test.describe('Filter', () => { test('filter workflow name', async ({ page }) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/formulaEngine.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/formulaEngine.test.ts index 0afb05ccf..7c2318502 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/formulaEngine.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/formulaEngine.test.ts @@ -16,8 +16,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, get trigger node single line text variable', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/mathEngine.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/mathEngine.test.ts index 3a7c384f3..5bb8645f6 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/mathEngine.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/calculationNode/mathEngine.test.ts @@ -16,8 +16,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, get trigger node single line text variable', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/configuration.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/configuration.test.ts index 25482c5ce..3ef05aec7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/configuration.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/configuration.test.ts @@ -12,7 +12,7 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; test.describe('Configuration page to configure the Trigger node', () => { test('Add Data Trigger with No Filter', async ({ page, mockCollections, mockRecords }) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts index f68e13837..f4800d645 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/collectionEventTrigger/workflowCRUD.test.ts @@ -12,7 +12,7 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; test.describe('Filter', () => { test('filter workflow name', async ({ page }) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoBasicType.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoBasicType.test.ts index cd3062c37..5e20c83a9 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoBasicType.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoBasicType.test.ts @@ -14,8 +14,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, determines that the trigger node single line text field variable is equal to an equal constant, passes.', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoFormulaEngine.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoFormulaEngine.test.ts index 1980788f4..0bfd71c96 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoFormulaEngine.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoFormulaEngine.test.ts @@ -14,8 +14,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event Add Data Trigger, determines that the trigger node single line text field variable is equal to an equal constant, passes.', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoMathEngine.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoMathEngine.test.ts index 702cc97bc..e70b69e7e 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoMathEngine.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoMathEngine.test.ts @@ -15,8 +15,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, determine trigger node integer field variable is equal to an equal constant, pass.', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesBasicType.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesBasicType.test.ts index f92760617..2463b2d61 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesBasicType.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesBasicType.test.ts @@ -15,8 +15,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, determines that the trigger node single line text field variable is equal to an equal constant, passes.', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesFormulaEngine.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesFormulaEngine.test.ts index 0ca29b858..8a9f5bde7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesFormulaEngine.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesFormulaEngine.test.ts @@ -15,8 +15,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event Add Data Trigger, Formula engine, determines that the trigger node single line text field variable is equal to an equal constant, passes.', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesMathEngine.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesMathEngine.test.ts index 9f79f952e..8ff05323a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesMathEngine.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesMathEngine.test.ts @@ -15,8 +15,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, Math engine, determine trigger node integer field variable is equal to an equal constant, pass.', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/createRecordNode/CreateRecord.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/createRecordNode/CreateRecord.test.ts index 822459c9f..cfedb958d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/createRecordNode/CreateRecord.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/createRecordNode/CreateRecord.test.ts @@ -11,8 +11,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, single row text fields for common tables, set constant data', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/deleteRecordNode/DeleteRecord.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/deleteRecordNode/DeleteRecord.test.ts index 0f4a43df9..f3559adc3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/deleteRecordNode/DeleteRecord.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/deleteRecordNode/DeleteRecord.test.ts @@ -9,8 +9,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, filter single line text field not null, delete common table data', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/queryRecordNode/QueryRecord.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/queryRecordNode/QueryRecord.test.ts index bf5f38237..cd1c69bee 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/queryRecordNode/QueryRecord.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/queryRecordNode/QueryRecord.test.ts @@ -10,8 +10,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, no filter no sort query common table 1 record', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateInABatch.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateInABatch.test.ts index 4a9556839..4fe264072 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateInABatch.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateInABatch.test.ts @@ -11,8 +11,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, filter single line text field not empty, common table single line text field data, set single line text field constant data', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateOneByOne.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateOneByOne.test.ts index 949eaa9b0..ad7a1b4a4 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateOneByOne.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/__e2e__/updateRecordNode/updateOneByOne.test.ts @@ -11,8 +11,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('Collection event add data trigger, filter single line text field not empty, common table single line text field data, set single line text field constant data', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/CheckboxGroupWithTooltip.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/CheckboxGroupWithTooltip.tsx index 32af5ee7f..58e768313 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/CheckboxGroupWithTooltip.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/CheckboxGroupWithTooltip.tsx @@ -1,5 +1,5 @@ import { QuestionCircleOutlined } from '@ant-design/icons'; -import { css, useCompile } from '@nocobase/client'; +import { css, useCompile } from '@tachybase/client'; import { Checkbox, Space, Tooltip } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionBlockInitializer.tsx index 835d45783..428ec12fc 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionBlockInitializer.tsx @@ -11,7 +11,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaTemplateManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { traverseSchema } from '../utils'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionFieldset.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionFieldset.tsx index 29925b803..8a62be3bf 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionFieldset.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/CollectionFieldset.tsx @@ -10,7 +10,7 @@ import { useCollectionManager_deprecated, useCompile, useToken, -} from '@nocobase/client'; +} from '@tachybase/client'; import { Button, Dropdown, Form, Input, MenuProps } from 'antd'; import React, { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/DetailsBlockProvider.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/DetailsBlockProvider.tsx index ab4dd3718..a02f993a7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/DetailsBlockProvider.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/DetailsBlockProvider.tsx @@ -11,7 +11,7 @@ import { useAPIClient, useAssociationNames, useBlockRequestContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useFlowContext } from '../FlowContext'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerDescription.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerDescription.tsx index 23aa425f6..736a1dcdd 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerDescription.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerDescription.tsx @@ -1,4 +1,4 @@ -import { createStyles, cx } from '@nocobase/client'; +import { createStyles, cx } from '@tachybase/client'; import { Tag } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerForm.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerForm.tsx index 6215921c8..4cf4065e1 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerForm.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/DrawerForm.tsx @@ -3,7 +3,7 @@ import { cloneDeep } from 'lodash'; import { createForm } from '@tachybase/schema'; import { useForm } from '@tachybase/schema'; -import { ActionContextProvider, FormProvider } from '@nocobase/client'; +import { ActionContextProvider, FormProvider } from '@tachybase/client'; export function useFormProviderProps() { return { form: useForm() }; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/ExecutionStatus.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/ExecutionStatus.tsx index 148e10ffc..e3bc8cf58 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/ExecutionStatus.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/ExecutionStatus.tsx @@ -3,7 +3,7 @@ import { Button, Modal, Select, Tag, Tooltip, message } from 'antd'; import { ExclamationCircleFilled, StopOutlined } from '@ant-design/icons'; import { useTranslation } from 'react-i18next'; -import { Action, css, useCompile, useRecord, useResourceActionContext, useResourceContext } from '@nocobase/client'; +import { Action, css, useCompile, useRecord, useResourceActionContext, useResourceContext } from '@tachybase/client'; import { EXECUTION_STATUS, ExecutionStatusOptions, ExecutionStatusOptionsMap } from '../constants'; import { lang } from '../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/FieldsSelect.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/FieldsSelect.tsx index ee62ca82b..57a75f1bb 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/FieldsSelect.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/FieldsSelect.tsx @@ -2,7 +2,7 @@ import { observer, useForm } from '@tachybase/schema'; import { Select } from 'antd'; import React from 'react'; -import { parseCollectionName, useCollectionManager_deprecated, useCompile } from '@nocobase/client'; +import { parseCollectionName, useCollectionManager_deprecated, useCompile } from '@tachybase/client'; function defaultFilter() { return true; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/FilterDynamicComponent.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/FilterDynamicComponent.tsx index 5706f27d4..7d13d0ffa 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/FilterDynamicComponent.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/FilterDynamicComponent.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Variable } from '@nocobase/client'; +import { Variable } from '@tachybase/client'; import { useWorkflowVariableOptions } from '../variable'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/OpenDrawer.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/OpenDrawer.tsx index 553b05e5e..cdf954b7c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/OpenDrawer.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/OpenDrawer.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { useFieldSchema } from '@tachybase/schema'; -import { ActionContextProvider, SchemaComponent } from '@nocobase/client'; +import { ActionContextProvider, SchemaComponent } from '@tachybase/client'; export default function ({ component = 'div', children, ...props }) { const [visible, setVisible] = useState(false); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/RadioWithTooltip.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/RadioWithTooltip.tsx index 9663d1328..c04c18342 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/RadioWithTooltip.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/RadioWithTooltip.tsx @@ -1,5 +1,5 @@ import { QuestionCircleOutlined } from '@ant-design/icons'; -import { css, useCompile } from '@nocobase/client'; +import { css, useCompile } from '@tachybase/client'; import { Radio, Space, Tooltip } from 'antd'; import React from 'react'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/SimpleDesigner.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/SimpleDesigner.tsx index 0cf6a417d..219fca06c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/SimpleDesigner.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/SimpleDesigner.tsx @@ -7,7 +7,7 @@ import { SchemaSettingsDivider, SchemaSettingsRemove, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; export function SimpleDesigner() { const schema = useFieldSchema(); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/StatusButton.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/StatusButton.tsx index 1651f367f..3aa29826a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/StatusButton.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/StatusButton.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Button, Tag } from 'antd'; import classnames from 'classnames'; -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ css, token }) => ({ statusButtonClass: css` diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/ValueBlock.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/ValueBlock.tsx index e18ae86d0..958663da0 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/ValueBlock.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/ValueBlock.tsx @@ -1,6 +1,6 @@ import { useFieldSchema } from '@tachybase/schema'; -import { css, SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; -import { parse } from '@nocobase/utils/client'; +import { css, SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; +import { parse } from '@tachybase/utils/client'; import React from 'react'; import { useFlowContext } from '../FlowContext'; import { SimpleDesigner } from './SimpleDesigner'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx index 351a8e3cd..3d0c61d82 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx @@ -1,5 +1,5 @@ -import { css, i18n } from '@nocobase/client'; -import { evaluators } from '@nocobase/evaluators/client'; +import { css, i18n } from '@tachybase/client'; +import { evaluators } from '@tachybase/evaluators/client'; import React from 'react'; export const renderEngineReference = (key: string) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/ActionTrigger.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/ActionTrigger.tsx index 91f17973e..5cd0f8c71 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/ActionTrigger.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/ActionTrigger.tsx @@ -5,7 +5,7 @@ import { useCollectionDataSource, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import { NAMESPACE, lang } from '../../locale'; import { Trigger } from '../../triggers'; import { CollectionBlockInitializer } from '../../components'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/configuration.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/configuration.test.ts index 90d31521f..c50cfe60c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/configuration.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/configuration.test.ts @@ -11,8 +11,8 @@ import { generalWithNoRelationalFields, apiGetDataSourceCount, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('Configuration page to configure the Trigger node', () => { test('Form Submit Button Binding Workflow Add Data Trigger', async ({ diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/workflowCRUD.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/workflowCRUD.test.ts index 4ec5a7442..5a1d49aed 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/workflowCRUD.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/__e2e__/workflowCRUD.test.ts @@ -12,8 +12,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('Filter', () => { test('filter workflow name', async ({ page }) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/index.ts index 18047b209..cf74bd1d2 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/action-trigger/index.ts @@ -1,4 +1,4 @@ -import { Plugin, SchemaInitializerItemType } from '@nocobase/client'; +import { Plugin, SchemaInitializerItemType } from '@tachybase/client'; import WorkflowPlugin, { useRecordTriggerWorkflowsActionProps, useTriggerWorkflowsActionProps } from '../..'; import { ActionTrigger } from './ActionTrigger'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/AggregateInstruction.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/AggregateInstruction.tsx index 2ac1a53d9..cd3698394 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/AggregateInstruction.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/AggregateInstruction.tsx @@ -12,7 +12,7 @@ import { useCollectionFilterOptions, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import { FieldsSelect, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/__e2e__/DataOfCollection.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/__e2e__/DataOfCollection.test.ts index c1d3ee916..647628912 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/__e2e__/DataOfCollection.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/__e2e__/DataOfCollection.test.ts @@ -10,8 +10,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('no filter', () => { test('Collection event add data trigger, normal table integer fields not de-emphasised COUNT', async ({ page, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/index.ts index 86f7aaee0..57394fe5d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/aggregate/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import AggregateInstruction from './AggregateInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/DelayInstruction.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/DelayInstruction.tsx index 32ab00e3f..e4142807d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/DelayInstruction.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/DelayInstruction.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { InputNumber, Select } from 'antd'; -import { css, useCompile, usePlugin } from '@nocobase/client'; +import { css, useCompile, usePlugin } from '@tachybase/client'; import WorkflowPlugin, { Instruction, JOB_STATUS } from '../..'; import { NAMESPACE } from '../../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/index.ts index 5453de5c8..a208883fd 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/delay/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import DelayInstruction from './DelayInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicCalculation.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicCalculation.tsx index f21e744dd..d24701427 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicCalculation.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicCalculation.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { SchemaInitializerItemType, Variable, useCollectionManager_deprecated } from '@nocobase/client'; +import { SchemaInitializerItemType, Variable, useCollectionManager_deprecated } from '@tachybase/client'; import { BaseTypeSets, Instruction, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicExpression.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicExpression.tsx index 8ed375bb0..02066d036 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicExpression.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/DynamicExpression.tsx @@ -4,7 +4,7 @@ import { Tag } from 'antd'; import React, { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { useCollectionManager_deprecated, useCompile, useRecord, Variable } from '@nocobase/client'; +import { useCollectionManager_deprecated, useCompile, useRecord, Variable } from '@tachybase/client'; import { getCollectionFieldOptions } from '../..'; import { NAMESPACE } from '../../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/expression.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/expression.tsx index 841ba5861..87d1c38a3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/expression.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/expression.tsx @@ -1,4 +1,4 @@ -import { CollectionFieldInterface, interfacesProperties } from '@nocobase/client'; +import { CollectionFieldInterface, interfacesProperties } from '@tachybase/client'; import { NAMESPACE } from '../../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/index.ts index 710fcfc8a..153a351d5 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/dynamic-calculation/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import DynamicCalculation from './DynamicCalculation'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/LoopInstruction.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/LoopInstruction.tsx index ec7e644fc..8fe860ca0 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/LoopInstruction.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/LoopInstruction.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { ArrowUpOutlined } from '@ant-design/icons'; -import { css, cx, useCompile } from '@nocobase/client'; +import { css, cx, useCompile } from '@tachybase/client'; import { NodeDefaultView, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/index.ts index a0d5bc769..c97cd7c27 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/loop/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import LoopInstruction from './LoopInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodo.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodo.tsx index d847c3620..a1ccb5927 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodo.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodo.tsx @@ -1,9 +1,9 @@ import { observer, useField, useFieldSchema, useForm } from '@tachybase/schema'; import { Space, Spin, Tag } from 'antd'; -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; import React, { createContext, useContext, useEffect, useState } from 'react'; -import { css, useCompile, usePlugin } from '@nocobase/client'; +import { css, useCompile, usePlugin } from '@tachybase/client'; import { SchemaComponent, @@ -16,7 +16,7 @@ import { useRecord, useTableBlockContext, ExtendCollectionsProvider, -} from '@nocobase/client'; +} from '@tachybase/client'; import WorkflowPlugin, { FlowContext, linkNodes, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodoBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodoBlockInitializer.tsx index 18f3bcc95..60fe9f562 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodoBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/WorkflowTodoBlockInitializer.tsx @@ -1,7 +1,7 @@ import { TableOutlined } from '@ant-design/icons'; import React, { FC } from 'react'; -import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; +import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@tachybase/client'; export const WorkflowTodoBlockInitializer: FC = () => { const itemConfig = useSchemaInitializerItem(); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/createRecordForm.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/createRecordForm.test.ts index b01b72917..0e153faa4 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/createRecordForm.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/createRecordForm.test.ts @@ -12,8 +12,8 @@ import { generalWithNoRelationalFields, apiGetDataSourceCount, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('block configuration', () => {}); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/customFormBlocks.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/customFormBlocks.test.ts index b620f3d7f..962ac9bf2 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/customFormBlocks.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/customFormBlocks.test.ts @@ -10,8 +10,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('block configuration', () => {}); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/datablocks.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/datablocks.test.ts index 91188962a..5b45007d8 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/datablocks.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/datablocks.test.ts @@ -17,8 +17,8 @@ import { appendJsonCollectionName, generalWithNoRelationalFields, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('field data', () => { test('Collection event to add a data trigger, get a single line of text data for the trigger node', async ({ diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/updateRecordForm.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/updateRecordForm.test.ts index 887be96fb..3a3731326 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/updateRecordForm.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/updateRecordForm.test.ts @@ -12,8 +12,8 @@ import { generalWithNoRelationalFields, apiGetDataSourceCount, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('block configuration', () => {}); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/workflowTodo.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/workflowTodo.test.ts index 5ede9a39a..3983e5f7f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/workflowTodo.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/__e2e__/workflowTodo.test.ts @@ -10,8 +10,8 @@ import { generalWithNoRelationalFields, apiGetDataSourceCount, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test('filter task node', async ({ page, mockPage, mockCollections, mockRecords }) => { //数据表后缀标识 diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/index.ts index 30c89a5c7..d9be73d87 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import Manual from './instruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/AssigneesSelect.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/AssigneesSelect.tsx index 4436f06d9..b67825d84 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/AssigneesSelect.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/AssigneesSelect.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { RemoteSelect, Variable } from '@nocobase/client'; +import { RemoteSelect, Variable } from '@tachybase/client'; import { useWorkflowVariableOptions } from '../../..'; function isUserKeyField(field) { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockInitializer.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockInitializer.tsx index cf8466d5e..b42054f24 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockInitializer.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockInitializer.tsx @@ -8,7 +8,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaTemplateManager, -} from '@nocobase/client'; +} from '@tachybase/client'; import { JOB_STATUS, traverseSchema } from '../../..'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockProvider.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockProvider.tsx index 542c10358..c67952f2f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockProvider.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/FormBlockProvider.tsx @@ -15,7 +15,7 @@ import { useDataSourceHeaders, useDesignable, useRecord, -} from '@nocobase/client'; +} from '@tachybase/client'; import React, { useMemo, useRef } from 'react'; export function FormBlockProvider(props) { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/ModeConfig.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/ModeConfig.tsx index e823b0f56..d7a708f0b 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/ModeConfig.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/ModeConfig.tsx @@ -3,7 +3,7 @@ import { FormLayout } from '@tachybase/components'; import { Form, Radio, Tooltip } from 'antd'; import React from 'react'; -import { css, FormItem } from '@nocobase/client'; +import { css, FormItem } from '@tachybase/client'; import { lang } from '../../../locale'; function parseMode(v) { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/SchemaConfig.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/SchemaConfig.tsx index 986ab6408..40ffe2772 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/SchemaConfig.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/SchemaConfig.tsx @@ -33,7 +33,7 @@ import { useSchemaInitializer, useSchemaInitializerItem, useSchemaOptionsContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import WorkflowPlugin, { SimpleDesigner, useAvailableUpstreams, @@ -44,7 +44,7 @@ import WorkflowPlugin, { } from '../../..'; import { JOB_STATUS } from '../../../constants'; -import { Registry, lodash } from '@nocobase/utils/client'; +import { Registry, lodash } from '@tachybase/utils/client'; import { NAMESPACE, lang } from '../../../locale'; import { FormBlockProvider } from './FormBlockProvider'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/createManualFormBlockUISchema.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/createManualFormBlockUISchema.ts index 98841991f..af3f1b284 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/createManualFormBlockUISchema.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/createManualFormBlockUISchema.ts @@ -1,4 +1,4 @@ -import { createFormBlockSchema } from '@nocobase/client'; +import { createFormBlockSchema } from '@tachybase/client'; export function createManualFormBlockUISchema(options) { return createFormBlockSchema(options); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/create.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/create.tsx index ba0c930e8..c9fec4b10 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/create.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/create.tsx @@ -10,7 +10,7 @@ import { useCollection_deprecated, useGetSchemaInitializerMenuItems, useMenuSearch, -} from '@nocobase/client'; +} from '@tachybase/client'; import _ from 'lodash'; import { NAMESPACE } from '../../../../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/custom.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/custom.tsx index cb64ba723..5775a9711 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/custom.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/custom.tsx @@ -21,9 +21,9 @@ import { useRecord, useSchemaInitializer, useSchemaInitializerItem, -} from '@nocobase/client'; +} from '@tachybase/client'; import { JOB_STATUS } from '../../../..'; -import { merge, uid } from '@nocobase/utils/client'; +import { merge, uid } from '@tachybase/utils/client'; import { NAMESPACE, lang } from '../../../../locale'; import { ManualFormType } from '../SchemaConfig'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/update.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/update.tsx index b4eea1b70..31369e438 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/update.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/forms/update.tsx @@ -14,7 +14,7 @@ import { useCollectionFilterOptions, useDesignable, useMenuSearch, -} from '@nocobase/client'; +} from '@tachybase/client'; import { NAMESPACE } from '../../../../locale'; import { FormBlockInitializer } from '../FormBlockInitializer'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/index.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/index.tsx index c7890717d..2534347db 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/index.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/manual/instruction/index.tsx @@ -1,4 +1,4 @@ -import { SchemaInitializerItemType, useCollectionManager_deprecated, useCompile, usePlugin } from '@nocobase/client'; +import { SchemaInitializerItemType, useCollectionManager_deprecated, useCompile, usePlugin } from '@tachybase/client'; import WorkflowPlugin, { defaultFieldNames, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/ParallelInstruction.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/ParallelInstruction.tsx index eb2f6250d..9340fa7c0 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/ParallelInstruction.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/ParallelInstruction.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { Button, Tooltip } from 'antd'; import { PlusOutlined } from '@ant-design/icons'; -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { NodeDefaultView, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/__e2e__/parallelBranch.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/__e2e__/parallelBranch.test.ts index 8de79fbd7..455404ce4 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/__e2e__/parallelBranch.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/__e2e__/parallelBranch.test.ts @@ -12,8 +12,8 @@ import { ClculationNode, apiGetWorkflowNodeExecutions, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('All succeeded', () => { test('All 3 branches were successful', async ({ page, mockCollections, mockRecords }) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/index.ts index d719db8eb..ab89c0d28 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/parallel/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import ParallelInstruction from './ParallelInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/request/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/request/index.ts index f4da44202..16bd33be5 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/request/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/request/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import RequestInstruction from './RequestInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/SQLInstruction.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/SQLInstruction.tsx index 97b769a04..3f174a2f9 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/SQLInstruction.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/SQLInstruction.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { Instruction, WorkflowVariableRawTextArea, defaultFieldNames } from '../..'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/__e2e__/dataCURD.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/__e2e__/dataCURD.test.ts index 879374aa8..984883436 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/__e2e__/dataCURD.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/__e2e__/dataCURD.test.ts @@ -16,8 +16,8 @@ import { SQLNode, apiGetRecord, } from '@tachybase/plugin-workflow-test/e2e'; -import { expect, test } from '@nocobase/test/e2e'; -import { dayjs } from '@nocobase/utils'; +import { expect, test } from '@tachybase/test/e2e'; +import { dayjs } from '@tachybase/utils'; test.describe('select data', () => { test('No variable SQL, select 1 record', async ({ page, mockCollections, mockRecords }) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/index.ts index ddc7a4ab1..329cfb53d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/sql/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/client'; +import { Plugin } from '@tachybase/client'; import WorkflowPlugin from '../..'; import SQLInstruction from './SQLInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/hooks/useTriggerWorkflowActionProps.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/hooks/useTriggerWorkflowActionProps.ts index be98fd166..111c62fca 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/hooks/useTriggerWorkflowActionProps.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/hooks/useTriggerWorkflowActionProps.ts @@ -9,8 +9,8 @@ import { useCollectValuesToSubmit, useCompile, useRecord, -} from '@nocobase/client'; -import { isURL } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { isURL } from '@tachybase/utils/client'; export function useTriggerWorkflowsActionProps() { const api = useAPIClient(); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/index.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/index.tsx index 58b63062c..90ddd6fd4 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/index.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { Plugin } from '@nocobase/client'; -import { Registry } from '@nocobase/utils/client'; +import { Plugin } from '@tachybase/client'; +import { Registry } from '@tachybase/utils/client'; import { ExecutionPage } from './ExecutionPage'; import { WorkflowPage } from './WorkflowPage'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/locale/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/locale/index.ts index 5e513037d..e7dd9888c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/locale/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/locale/index.ts @@ -1,4 +1,4 @@ -import { i18n } from '@nocobase/client'; +import { i18n } from '@tachybase/client'; import { useTranslation } from 'react-i18next'; export const NAMESPACE = 'workflow'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/calculation.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/calculation.tsx index 745832a52..1e1ea84fc 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/calculation.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/calculation.tsx @@ -1,5 +1,5 @@ -import { SchemaInitializerItemType } from '@nocobase/client'; -import { Evaluator, evaluators, getOptions } from '@nocobase/evaluators/client'; +import { SchemaInitializerItemType } from '@tachybase/client'; +import { Evaluator, evaluators, getOptions } from '@tachybase/evaluators/client'; import { RadioWithTooltip } from '../components/RadioWithTooltip'; import { ValueBlock } from '../components/ValueBlock'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/condition.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/condition.tsx index 97616a026..e29e18918 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/condition.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/condition.tsx @@ -1,7 +1,7 @@ import { CloseCircleOutlined } from '@ant-design/icons'; -import { css, cx, useCompile, Variable } from '@nocobase/client'; -import { evaluators } from '@nocobase/evaluators/client'; -import { Registry } from '@nocobase/utils/client'; +import { css, cx, useCompile, Variable } from '@tachybase/client'; +import { evaluators } from '@tachybase/evaluators/client'; +import { Registry } from '@tachybase/utils/client'; import { Button, Select } from 'antd'; import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/create.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/create.tsx index d3a0c0e28..46781f159 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/create.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/create.tsx @@ -3,7 +3,7 @@ import { useCollectionDataSource, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import { CollectionBlockInitializer } from '../components/CollectionBlockInitializer'; import CollectionFieldset from '../components/CollectionFieldset'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/destroy.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/destroy.tsx index 62c1c4dab..53b365a85 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/destroy.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/destroy.tsx @@ -1,4 +1,4 @@ -import { useCollectionDataSource } from '@nocobase/client'; +import { useCollectionDataSource } from '@tachybase/client'; import { FilterDynamicComponent } from '../components/FilterDynamicComponent'; import { collection, filter } from '../schemas/collection'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/index.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/index.tsx index 4ddbdc3d3..090f6be4d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/index.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/index.tsx @@ -18,8 +18,8 @@ import { useCompile, usePlugin, useResourceActionContext, -} from '@nocobase/client'; -import { parse, str2moment } from '@nocobase/utils/client'; +} from '@tachybase/client'; +import { parse, str2moment } from '@tachybase/utils/client'; import WorkflowPlugin from '..'; import { AddButton } from '../AddButton'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/query.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/query.tsx index ebea3cc45..bd42d6212 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/query.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/query.tsx @@ -6,7 +6,7 @@ import { useCollectionDataSource, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import { useForm } from '@tachybase/schema'; import { CollectionBlockInitializer } from '../components/CollectionBlockInitializer'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/update.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/update.tsx index b00034443..b99c64511 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/update.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/nodes/update.tsx @@ -1,7 +1,7 @@ import { useField, useForm } from '@tachybase/schema'; import React from 'react'; -import { useCollectionDataSource, useCollectionManager_deprecated } from '@nocobase/client'; +import { useCollectionDataSource, useCollectionManager_deprecated } from '@tachybase/client'; import CollectionFieldset from '../components/CollectionFieldset'; import { FilterDynamicComponent } from '../components/FilterDynamicComponent'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/collection.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/collection.ts index effedfcc2..a98864ba7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/collection.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/collection.ts @@ -1,5 +1,5 @@ import { useForm } from '@tachybase/schema'; -import { css, parseCollectionName, useCollectionFilterOptions } from '@nocobase/client'; +import { css, parseCollectionName, useCollectionFilterOptions } from '@tachybase/client'; import { NAMESPACE } from '../locale'; export const collection = { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/executions.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/executions.tsx index 903848a37..34ddf61f3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/executions.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/executions.tsx @@ -4,7 +4,7 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { message } from 'antd'; -import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@nocobase/client'; +import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@tachybase/client'; import { ExecutionStatusOptions } from '../constants'; import { NAMESPACE } from '../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/workflows.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/workflows.ts index 7dc414fd3..3efce74b3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/workflows.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/schemas/workflows.ts @@ -1,5 +1,5 @@ import { ISchema, useForm } from '@tachybase/schema'; -import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@nocobase/client'; +import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@tachybase/client'; import { message } from 'antd'; import { useTranslation } from 'react-i18next'; import { NAMESPACE } from '../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/settings/customizeSubmitToWorkflowActionSettings.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/settings/customizeSubmitToWorkflowActionSettings.tsx index ad60ef6c3..607d2fe1f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/settings/customizeSubmitToWorkflowActionSettings.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/settings/customizeSubmitToWorkflowActionSettings.tsx @@ -10,7 +10,7 @@ import { SkipValidation, WorkflowConfig, useSchemaToolbar, -} from '@nocobase/client'; +} from '@tachybase/client'; export const customizeSubmitToWorkflowActionSettings = new SchemaSettings({ name: 'actionSettings:submitToWorkflow', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx index c2ed96e9d..5717c0df4 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/style.tsx @@ -1,4 +1,4 @@ -import { createStyles } from '@nocobase/client'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ css, token }) => { return { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/collection.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/collection.tsx index 2658eb2d4..0eb313737 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/collection.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/collection.tsx @@ -3,7 +3,7 @@ import { useCollectionDataSource, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import { CollectionBlockInitializer } from '../components/CollectionBlockInitializer'; import { FieldsSelect } from '../components/FieldsSelect'; import { NAMESPACE, lang } from '../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/index.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/index.tsx index 10df762e7..5947de656 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/index.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/index.tsx @@ -18,7 +18,7 @@ import { useCompile, usePlugin, useResourceActionContext, -} from '@nocobase/client'; +} from '@tachybase/client'; import WorkflowPlugin from '..'; import { useFlowContext } from '../FlowContext'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/EndsByField.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/EndsByField.tsx index c9d78c289..af5c4bf0e 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/EndsByField.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/EndsByField.tsx @@ -1,6 +1,6 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { DatePicker, Select } from 'antd'; -import { dayjs } from '@nocobase/utils/client'; +import { dayjs } from '@tachybase/utils/client'; import React from 'react'; import { useWorkflowTranslation } from '../../locale'; import { OnField } from './OnField'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/OnField.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/OnField.tsx index 7ed5197c1..5406c364f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/OnField.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/OnField.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { InputNumber, Select } from 'antd'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/RepeatField.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/RepeatField.tsx index fabcbee5b..084796aa9 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/RepeatField.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/RepeatField.tsx @@ -1,4 +1,4 @@ -import { css } from '@nocobase/client'; +import { css } from '@tachybase/client'; import { InputNumber, Select } from 'antd'; import React from 'react'; import { Cron } from 'react-js-cron'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/ScheduleConfig.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/ScheduleConfig.tsx index 76e0acd43..86b5eb135 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/ScheduleConfig.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/ScheduleConfig.tsx @@ -1,6 +1,6 @@ import { onFieldValueChange } from '@tachybase/schema'; import { useForm, useFormEffects, ISchema } from '@tachybase/schema'; -import { css, SchemaComponent } from '@nocobase/client'; +import { css, SchemaComponent } from '@tachybase/client'; import React, { useState } from 'react'; import { NAMESPACE } from '../../locale'; import { appends, collection } from '../../schemas/collection'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/index.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/index.tsx index 32b34be00..451a00a40 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/index.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/triggers/schedule/index.tsx @@ -3,7 +3,7 @@ import { useCollectionDataSource, useCollectionManager_deprecated, useCompile, -} from '@nocobase/client'; +} from '@tachybase/client'; import { CollectionBlockInitializer } from '../../components/CollectionBlockInitializer'; import { NAMESPACE, lang } from '../../locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/variable.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/variable.tsx index db1abeeba..4098e9793 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/variable.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/variable.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Variable, parseCollectionName, useCompile, usePlugin } from '@nocobase/client'; +import { Variable, parseCollectionName, useCompile, usePlugin } from '@tachybase/client'; import { useFlowContext } from './FlowContext'; import { NAMESPACE, lang } from './locale'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/Plugin.ts index 2b48d5c54..8c8d1505f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/Plugin.ts @@ -2,11 +2,11 @@ import path from 'path'; import LRUCache from 'lru-cache'; -import { Op, Transactionable } from '@nocobase/database'; -import Application, { Plugin, PluginOptions } from '@nocobase/server'; -import { Registry } from '@nocobase/utils'; +import { Op, Transactionable } from '@tachybase/database'; +import Application, { Plugin, PluginOptions } from '@tachybase/server'; +import { Registry } from '@tachybase/utils'; -import { Logger, LoggerOptions } from '@nocobase/logger'; +import { Logger, LoggerOptions } from '@tachybase/logger'; import Processor from './Processor'; import initActions from './actions'; import { EXECUTION_STATUS } from './constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/Processor.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/Processor.ts index 798dce40c..898e9eaf3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/Processor.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/Processor.ts @@ -1,7 +1,7 @@ -import { Model, Transaction, Transactionable } from '@nocobase/database'; -import { appendArrayColumn } from '@nocobase/evaluators'; -import { Logger } from '@nocobase/logger'; -import { parse } from '@nocobase/utils'; +import { Model, Transaction, Transactionable } from '@tachybase/database'; +import { appendArrayColumn } from '@tachybase/evaluators'; +import { Logger } from '@tachybase/logger'; +import { parse } from '@tachybase/utils'; import type Plugin from './Plugin'; import { EXECUTION_STATUS, JOB_STATUS } from './constants'; import { Runner } from './instructions'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Plugin.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Plugin.test.ts index f1f7f214e..eecb0aed9 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Plugin.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Plugin.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import Database from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import Plugin from '..'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Processor.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Processor.test.ts index e0b109ab0..ce8cbbf70 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Processor.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/Processor.test.ts @@ -1,5 +1,5 @@ -import { MockDatabase } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { MockDatabase } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import { EXECUTION_STATUS, JOB_STATUS } from '../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/executions.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/executions.test.ts index a8733a488..d9b902f58 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/executions.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/executions.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import Database from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import { EXECUTION_STATUS } from '../../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/nodes.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/nodes.test.ts index 397b95b83..f16746b7a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/nodes.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/nodes.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import Database from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; describe('workflow > actions > workflows', () => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/workflows.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/workflows.test.ts index 5511959fe..ce2b38f91 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/workflows.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/actions/workflows.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import Database from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; describe('workflow > actions > workflows', () => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/calculation.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/calculation.test.ts index dc9e67a0f..543b507cb 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/calculation.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/calculation.test.ts @@ -1,5 +1,5 @@ -import { Application } from '@nocobase/server'; -import Database from '@nocobase/database'; +import { Application } from '@tachybase/server'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import { JOB_STATUS } from '../../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/condition.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/condition.test.ts index 1865e697d..3183f5a4d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/condition.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/condition.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import Database from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import { EXECUTION_STATUS, JOB_STATUS } from '../../constants'; import { BRANCH_INDEX } from '../../instructions/ConditionInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/create.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/create.test.ts index 46e0c94ec..48eec188e 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/create.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/create.test.ts @@ -1,5 +1,5 @@ -import { Application } from '@nocobase/server'; -import Database from '@nocobase/database'; +import { Application } from '@tachybase/server'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; describe('workflow > instructions > create', () => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/destroy.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/destroy.test.ts index a21e672af..571080b72 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/destroy.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/destroy.test.ts @@ -1,5 +1,5 @@ -import { Application } from '@nocobase/server'; -import Database from '@nocobase/database'; +import { Application } from '@tachybase/server'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; describe('workflow > instructions > destroy', () => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/end.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/end.test.ts index 89d66e45d..8b6523ae2 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/end.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/end.test.ts @@ -1,5 +1,5 @@ -import { Application } from '@nocobase/server'; -import Database from '@nocobase/database'; +import { Application } from '@tachybase/server'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import WorkflowPlugin from '../..'; import { EXECUTION_STATUS, JOB_STATUS } from '../../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/query.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/query.test.ts index be35c0e04..3042d7048 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/query.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/query.test.ts @@ -1,5 +1,5 @@ -import { Application } from '@nocobase/server'; -import Database from '@nocobase/database'; +import { Application } from '@tachybase/server'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import { EXECUTION_STATUS, JOB_STATUS } from '../../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/update.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/update.test.ts index 07a6bea06..e0d953d9f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/update.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/instructions/update.test.ts @@ -1,6 +1,6 @@ -import { MockDatabase } from '@nocobase/database'; +import { MockDatabase } from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import type { WorkflowModel as WorkflowModelType } from '../../types'; import { EXECUTION_STATUS } from '../../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts index 0a54f95b0..8256493a8 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts @@ -1,5 +1,5 @@ -import { MockDatabase } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import { MockDatabase } from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import { EXECUTION_STATUS } from '../../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-date-field.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-date-field.test.ts index e79e8240c..ed9890e56 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-date-field.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-date-field.test.ts @@ -1,5 +1,5 @@ -import { MockServer } from '@nocobase/test'; -import Database from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; async function sleepToEvenSecond() { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-static.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-static.test.ts index a57028ad2..9b9800dae 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-static.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/__tests__/triggers/schedule/mode-static.test.ts @@ -1,6 +1,6 @@ import { scryptSync } from 'crypto'; -import { MockServer } from '@nocobase/test'; -import Database from '@nocobase/database'; +import { MockServer } from '@tachybase/test'; +import Database from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; async function sleepToEvenSecond() { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/actions/executions.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/actions/executions.ts index 9ed81cb20..68a899bc7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/actions/executions.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/actions/executions.ts @@ -1,5 +1,5 @@ -import actions, { Context } from '@nocobase/actions'; -import { Op } from '@nocobase/database'; +import actions, { Context } from '@tachybase/actions'; +import { Op } from '@tachybase/database'; import { EXECUTION_STATUS, JOB_STATUS } from '../constants'; export async function destroy(context: Context, next) { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/actions/nodes.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/actions/nodes.ts index 82bb32122..1e153545f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/actions/nodes.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/actions/nodes.ts @@ -1,5 +1,5 @@ -import { Context, utils } from '@nocobase/actions'; -import { MultipleRelationRepository, Op, Repository } from '@nocobase/database'; +import { Context, utils } from '@tachybase/actions'; +import { MultipleRelationRepository, Op, Repository } from '@tachybase/database'; import type { WorkflowModel } from '../types'; export async function create(context: Context, next) { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/actions/workflows.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/actions/workflows.ts index dc7404d45..32ef25a97 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/actions/workflows.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/actions/workflows.ts @@ -1,5 +1,5 @@ -import actions, { Context, utils } from '@nocobase/actions'; -import { Op, Repository } from '@nocobase/database'; +import actions, { Context, utils } from '@tachybase/actions'; +import { Op, Repository } from '@tachybase/database'; import Plugin from '../Plugin'; import { WorkflowModel } from '../types'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/1-users_jobs.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/1-users_jobs.ts index be6fbee6c..a41c77c6f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/1-users_jobs.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/1-users_jobs.ts @@ -1,4 +1,4 @@ -import { defineCollection } from '@nocobase/database'; +import { defineCollection } from '@tachybase/database'; export default defineCollection({ name: 'users_jobs', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/2-jobs.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/2-jobs.ts index 4f8679316..59a5db15e 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/2-jobs.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/2-jobs.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'jobs', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/3-users.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/3-users.ts index 6e8c0362a..855bae8c1 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/3-users.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/3-users.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'users', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/executions.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/executions.ts index c46d0bfe2..caa28e946 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/executions.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/executions.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/flow_nodes.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/flow_nodes.ts index ffb70cf1d..0efd84d51 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/flow_nodes.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/flow_nodes.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: 'required', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/jobs.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/jobs.ts index bb2deeb5e..6067233d2 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/jobs.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/jobs.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { dumpRules: { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/workflows.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/workflows.ts index 64465ad95..8f0613f7d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/collections/workflows.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/collections/workflows.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default function () { return { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/ActionTrigger.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/ActionTrigger.ts index 271f1c258..dbea9a9fb 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/ActionTrigger.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/ActionTrigger.ts @@ -1,11 +1,11 @@ import { get } from 'lodash'; import { BelongsTo, HasOne } from 'sequelize'; -import { Model, modelAssociationByKey } from '@nocobase/database'; -import Application, { DefaultContext } from '@nocobase/server'; -import { Context as ActionContext, Next } from '@nocobase/actions'; +import { Model, modelAssociationByKey } from '@tachybase/database'; +import Application, { DefaultContext } from '@tachybase/server'; +import { Context as ActionContext, Next } from '@tachybase/actions'; import WorkflowPlugin, { Trigger, WorkflowModel, toJSON } from '../..'; -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { parseCollectionName } from '@tachybase/data-source-manager'; interface Context extends ActionContext, DefaultContext {} diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/Plugin.ts index 50196c20d..b2809a5e7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/Plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import WorkflowPlugin from '../..'; import ActionTrigger from './ActionTrigger'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/__tests__/trigger.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/__tests__/trigger.test.ts index 1b99a3742..ac62788a3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/__tests__/trigger.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/action-trigger/__tests__/trigger.test.ts @@ -1,7 +1,7 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import { EXECUTION_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import Plugin from '..'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/AggregateInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/AggregateInstruction.ts index 294433959..9025c993f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/AggregateInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/AggregateInstruction.ts @@ -1,5 +1,5 @@ -import { parseCollectionName } from '@nocobase/data-source-manager'; -import { DataTypes } from '@nocobase/database'; +import { parseCollectionName } from '@tachybase/data-source-manager'; +import { DataTypes } from '@tachybase/database'; import { Processor, Instruction, JOB_STATUS, FlowNodeModel } from '../..'; const aggregators = { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/Plugin.ts index 99f381445..b52b8f11a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/Plugin.ts @@ -1,5 +1,5 @@ import WorkflowPlugin from '../..'; -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import AggregateInstruction from './AggregateInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/__tests__/instruction.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/__tests__/instruction.test.ts index ae876e669..730f3789f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/__tests__/instruction.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/aggregate/__tests__/instruction.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import Database from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; import Plugin from '..'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/Plugin.ts index d9b3c49f5..bdae3d924 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/Plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import WorkflowPlugin from '../..'; import DelayInstruction from './DelayInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/__tests__/instruction.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/__tests__/instruction.test.ts index 896e38381..3f3548b5d 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/__tests__/instruction.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/delay/__tests__/instruction.test.ts @@ -1,7 +1,7 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; -import { Application } from '@nocobase/server'; +import { Application } from '@tachybase/server'; describe('workflow > instructions > delay', () => { let app: Application; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/DynamicCalculation.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/DynamicCalculation.ts index 5597f0327..455af7b70 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/DynamicCalculation.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/DynamicCalculation.ts @@ -1,6 +1,6 @@ -import { parse } from '@nocobase/utils'; +import { parse } from '@tachybase/utils'; import { FlowNodeModel, Instruction, JOB_STATUS, Processor } from '../..'; -import evaluators, { Evaluator } from '@nocobase/evaluators'; +import evaluators, { Evaluator } from '@tachybase/evaluators'; export class DynamicCalculation extends Instruction { async run(node: FlowNodeModel, prevJob, processor: Processor) { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/Plugin.ts index 6424921e8..22a869d8f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/Plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import WorkflowPlugin from '../..'; import { ExpressionField } from './expression-field'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/collections/categories.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/collections/categories.ts index 5368f7af2..45ffc22b3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/collections/categories.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/collections/categories.ts @@ -1,4 +1,4 @@ -import { extendCollection } from '@nocobase/database'; +import { extendCollection } from '@tachybase/database'; export default extendCollection({ name: 'categories', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/instruction.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/instruction.test.ts index 7e9a3f09b..36d7bdb3c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/instruction.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/__tests__/instruction.test.ts @@ -1,8 +1,8 @@ import path from 'path'; -import { MockDatabase } from '@nocobase/database'; +import { MockDatabase } from '@tachybase/database'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; import Plugin from '..'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/expression-field.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/expression-field.ts index 427dcbaeb..77dcaa143 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/expression-field.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/dynamic-calculation/expression-field.ts @@ -1,4 +1,4 @@ -import { BaseFieldOptions, DataTypes, Field } from '@nocobase/database'; +import { BaseFieldOptions, DataTypes, Field } from '@tachybase/database'; export interface ExpressionFieldOptions extends BaseFieldOptions { type: 'expression'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/Plugin.ts index 416dc8b6c..a5a91cd5a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/Plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import { default as WorkflowPlugin } from '../..'; import LoopInstruction from './LoopInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/__tests__/instruction.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/__tests__/instruction.test.ts index 90ac55457..7b2a438fb 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/__tests__/instruction.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/loop/__tests__/instruction.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import Database from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/ManualInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/ManualInstruction.ts index f23775852..773ba622f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/ManualInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/ManualInstruction.ts @@ -1,4 +1,4 @@ -import { Registry } from '@nocobase/utils'; +import { Registry } from '@tachybase/utils'; import WorkflowPlugin, { Processor, JOB_STATUS, Instruction } from '../..'; import initFormTypes, { FormHandler } from './forms'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/Plugin.ts index bda0a0e83..690201d40 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/Plugin.ts @@ -1,6 +1,6 @@ -import { Plugin } from '@nocobase/server'; -import actions from '@nocobase/actions'; -import { HandlerType } from '@nocobase/resourcer'; +import { Plugin } from '@tachybase/server'; +import actions from '@tachybase/actions'; +import { HandlerType } from '@tachybase/resourcer'; import WorkflowPlugin, { JOB_STATUS } from '../..'; import { submit } from './actions'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/categories.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/categories.ts index 1c73e2e43..d2977193f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/categories.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/categories.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'categories', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/comments.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/comments.ts index 30494fae0..b5d172b97 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/comments.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/comments.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'comments', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/posts.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/posts.ts index 7e8e98db5..4982e7529 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/posts.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/posts.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'posts', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/tags.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/tags.ts index 433688e1b..7b41d4f33 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/tags.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/collections/tags.ts @@ -1,4 +1,4 @@ -import { CollectionOptions } from '@nocobase/database'; +import { CollectionOptions } from '@tachybase/database'; export default { name: 'tags', diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/data-source.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/data-source.test.ts index 20235a644..2248b2513 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/data-source.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/data-source.test.ts @@ -1,7 +1,7 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; // NOTE: skipped because time is not stable on github ci, but should work in local describe('workflow > instructions > manual', () => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/form.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/form.test.ts index 97fd63401..6e1bf8e8a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/form.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/form.test.ts @@ -1,7 +1,7 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; // NOTE: skipped because time is not stable on github ci, but should work in local describe('workflow > instructions > manual', () => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/mode.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/mode.test.ts index 44d0069c9..bb425ef39 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/mode.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/__tests__/mode.test.ts @@ -1,7 +1,7 @@ -import Database from '@nocobase/database'; +import Database from '@tachybase/database'; import { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; -import { MockServer } from '@nocobase/test'; +import { MockServer } from '@tachybase/test'; // NOTE: skipped because time is not stable on github ci, but should work in local describe('workflow > instructions > manual', () => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/actions.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/actions.ts index 0f863d1b3..60ae333b8 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/actions.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/manual/actions.ts @@ -1,4 +1,4 @@ -import { Context, utils } from '@nocobase/actions'; +import { Context, utils } from '@tachybase/actions'; import WorkflowPlugin, { EXECUTION_STATUS, JOB_STATUS } from '../..'; import ManualInstruction from './ManualInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/Plugin.ts index b4610cd18..ad3b2ac28 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/Plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import WorkflowPlugin from '../..'; import ParallelInstruction from './ParallelInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/__tests__/instruction.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/__tests__/instruction.test.ts index 8c84457f4..d2a32e8d7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/__tests__/instruction.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/parallel/__tests__/instruction.test.ts @@ -1,5 +1,5 @@ -import Database from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import Database from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/Plugin.ts index d1d545855..8f18ba14f 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/Plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import WorkflowPlugin from '../..'; import RequestInstruction from './RequestInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/__tests__/instruction.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/__tests__/instruction.test.ts index 03f07aeb6..3f6fd2c10 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/__tests__/instruction.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/request/__tests__/instruction.test.ts @@ -3,8 +3,8 @@ import jwt from 'jsonwebtoken'; import Koa from 'koa'; import bodyParser from 'koa-bodyparser'; -import Database from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; +import Database from '@tachybase/database'; +import { MockServer } from '@tachybase/test'; import PluginWorkflow, { Processor, EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/Plugin.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/Plugin.ts index 2cb700c27..d7a879c07 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/Plugin.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/Plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin } from '@tachybase/server'; import WorkflowPlugin from '../..'; import SQLInstruction from './SQLInstruction'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/__tests__/instruction.test.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/__tests__/instruction.test.ts index 057b8b53d..07c17f4e7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/__tests__/instruction.test.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/sql/__tests__/instruction.test.ts @@ -1,5 +1,5 @@ -import Database, { fn } from '@nocobase/database'; -import { Application } from '@nocobase/server'; +import Database, { fn } from '@tachybase/database'; +import { Application } from '@tachybase/server'; import { EXECUTION_STATUS, JOB_STATUS } from '@tachybase/plugin-workflow'; import { getApp, sleep } from '@tachybase/plugin-workflow-test'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CalculationInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CalculationInstruction.ts index ee875a890..363cc0962 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CalculationInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CalculationInstruction.ts @@ -1,5 +1,5 @@ -import { Evaluator, evaluators } from '@nocobase/evaluators'; -import { parse } from '@nocobase/utils'; +import { Evaluator, evaluators } from '@tachybase/evaluators'; +import { parse } from '@tachybase/utils'; import { Instruction } from '.'; import type Processor from '../Processor'; import { JOB_STATUS } from '../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/ConditionInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/ConditionInstruction.ts index fb84f92e0..1de6c457c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/ConditionInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/ConditionInstruction.ts @@ -1,5 +1,5 @@ -import { evaluators } from '@nocobase/evaluators'; -import { Registry } from '@nocobase/utils'; +import { evaluators } from '@tachybase/evaluators'; +import { Registry } from '@tachybase/utils'; import { Instruction } from '.'; import type Processor from '../Processor'; import { JOB_STATUS } from '../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CreateInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CreateInstruction.ts index 6173bb393..6e7b03cf4 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CreateInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/CreateInstruction.ts @@ -1,4 +1,4 @@ -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { parseCollectionName } from '@tachybase/data-source-manager'; import { JOB_STATUS } from '../constants'; import { toJSON } from '../utils'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/DestroyInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/DestroyInstruction.ts index a93e48617..dd85be8a5 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/DestroyInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/DestroyInstruction.ts @@ -1,4 +1,4 @@ -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { parseCollectionName } from '@tachybase/data-source-manager'; import { Instruction } from '.'; import type Processor from '../Processor'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/QueryInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/QueryInstruction.ts index 332aceb1e..43e797221 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/QueryInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/QueryInstruction.ts @@ -1,5 +1,5 @@ -import { DEFAULT_PAGE, DEFAULT_PER_PAGE, utils } from '@nocobase/actions'; -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { DEFAULT_PAGE, DEFAULT_PER_PAGE, utils } from '@tachybase/actions'; +import { parseCollectionName } from '@tachybase/data-source-manager'; import type Processor from '../Processor'; import { JOB_STATUS } from '../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/UpdateInstruction.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/UpdateInstruction.ts index 95e352d3d..e4988916a 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/UpdateInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/UpdateInstruction.ts @@ -1,4 +1,4 @@ -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { parseCollectionName } from '@tachybase/data-source-manager'; import type Processor from '../Processor'; import { JOB_STATUS } from '../constants'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/index.ts index b8a08c97d..4a45ca695 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/instructions/index.ts @@ -1,4 +1,4 @@ -import { Transactionable } from '@nocobase/database'; +import { Transactionable } from '@tachybase/database'; import type Plugin from '../Plugin'; import type Processor from '../Processor'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/CollectionTrigger.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/CollectionTrigger.ts index 1bec73ee8..ce12c7a7b 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/CollectionTrigger.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/CollectionTrigger.ts @@ -1,8 +1,8 @@ -import { Model, Transactionable } from '@nocobase/database'; +import { Model, Transactionable } from '@tachybase/database'; import Trigger from '.'; import { toJSON } from '../utils'; import type { WorkflowModel } from '../types'; -import { parseCollectionName, ICollection } from '@nocobase/data-source-manager'; +import { parseCollectionName, ICollection } from '@tachybase/data-source-manager'; export interface CollectionChangeTriggerConfig { collection: string; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.ts index 1340ce269..9d9aff2fd 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.ts @@ -1,9 +1,9 @@ -import { fn, literal, Op, Transactionable, where } from '@nocobase/database'; +import { fn, literal, Op, Transactionable, where } from '@tachybase/database'; import parser from 'cron-parser'; import type Plugin from '../../Plugin'; import type { WorkflowModel } from '../../types'; import { parseDateWithoutMs, SCHEDULE_MODE } from './utils'; -import { parseCollectionName } from '@nocobase/data-source-manager'; +import { parseCollectionName } from '@tachybase/data-source-manager'; export type ScheduleOnField = { field: string; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/index.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/index.ts index 1737c3c90..eaee27700 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/index.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/triggers/index.ts @@ -1,4 +1,4 @@ -import { Transactionable } from '@nocobase/database'; +import { Transactionable } from '@tachybase/database'; import type Plugin from '../Plugin'; import type { WorkflowModel } from '../types'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/types/Execution.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/types/Execution.ts index 52db181e0..45926fa54 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/types/Execution.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/types/Execution.ts @@ -1,4 +1,4 @@ -import { BelongsToGetAssociationMixin, Database, HasManyGetAssociationsMixin, Model } from '@nocobase/database'; +import { BelongsToGetAssociationMixin, Database, HasManyGetAssociationsMixin, Model } from '@tachybase/database'; import JobModel from './Job'; import WorkflowModel from './Workflow'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/types/FlowNode.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/types/FlowNode.ts index dc080baf4..df99ed9e4 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/types/FlowNode.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/types/FlowNode.ts @@ -1,4 +1,4 @@ -import { BelongsToGetAssociationMixin, Database, Model } from '@nocobase/database'; +import { BelongsToGetAssociationMixin, Database, Model } from '@tachybase/database'; import WorkflowModel from './Workflow'; export default class FlowNodeModel extends Model { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/types/Job.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/types/Job.ts index f97380a73..e1d941ce1 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/types/Job.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/types/Job.ts @@ -1,4 +1,4 @@ -import { BelongsToGetAssociationMixin, Model } from '@nocobase/database'; +import { BelongsToGetAssociationMixin, Model } from '@tachybase/database'; import FlowNodeModel from './FlowNode'; export default class JobModel extends Model { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/types/Workflow.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/types/Workflow.ts index 2171779e4..d2abe68d7 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/types/Workflow.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/types/Workflow.ts @@ -4,7 +4,7 @@ import { HasManyCreateAssociationMixin, HasManyGetAssociationsMixin, Model, -} from '@nocobase/database'; +} from '@tachybase/database'; import ExecutionModel from './Execution'; import FlowNodeModel from './FlowNode'; diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/utils.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/utils.ts index aa41be557..3dcf1a2b1 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/utils.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/utils.ts @@ -1,4 +1,4 @@ -import { Model } from '@nocobase/database'; +import { Model } from '@tachybase/database'; export function toJSON(data: any): any { if (Array.isArray(data)) { diff --git a/packages/presets/tachybase/.npmignore b/packages/presets/base/.npmignore similarity index 100% rename from packages/presets/tachybase/.npmignore rename to packages/presets/base/.npmignore diff --git a/packages/presets/tachybase/client.d.ts b/packages/presets/base/client.d.ts similarity index 100% rename from packages/presets/tachybase/client.d.ts rename to packages/presets/base/client.d.ts diff --git a/packages/presets/tachybase/client.js b/packages/presets/base/client.js similarity index 100% rename from packages/presets/tachybase/client.js rename to packages/presets/base/client.js diff --git a/packages/presets/tachybase/package.json b/packages/presets/base/package.json similarity index 97% rename from packages/presets/tachybase/package.json rename to packages/presets/base/package.json index c17a7d6cc..9b88ab224 100644 --- a/packages/presets/tachybase/package.json +++ b/packages/presets/base/package.json @@ -6,7 +6,6 @@ "dependencies": { "@hera/plugin-approval": "workspace:*", "@hera/plugin-audit-logs": "workspace:*", - "@nocobase/client": "workspace:*", "@nocobase/plugin-acl": "workspace:*", "@nocobase/plugin-action-bulk-edit": "workspace:*", "@nocobase/plugin-action-bulk-update": "workspace:*", @@ -49,10 +48,11 @@ "@nocobase/plugin-ui-schema-storage": "workspace:*", "@nocobase/plugin-users": "workspace:*", "@nocobase/plugin-verification": "workspace:*", - "@nocobase/server": "workspace:*", + "@tachybase/client": "workspace:*", "@tachybase/plugin-mobile-client": "workspace:*", "@tachybase/plugin-workflow": "workspace:*", "@tachybase/schema": "workspace:*", + "@tachybase/server": "workspace:*", "cronstrue": "^2.11.0", "lodash": "4.17.21" }, diff --git a/packages/presets/tachybase/server.d.ts b/packages/presets/base/server.d.ts similarity index 100% rename from packages/presets/tachybase/server.d.ts rename to packages/presets/base/server.d.ts diff --git a/packages/presets/tachybase/server.js b/packages/presets/base/server.js similarity index 100% rename from packages/presets/tachybase/server.js rename to packages/presets/base/server.js diff --git a/packages/presets/tachybase/src/client/index.ts b/packages/presets/base/src/client/index.ts similarity index 87% rename from packages/presets/tachybase/src/client/index.ts rename to packages/presets/base/src/client/index.ts index ef84a4673..93aa40cf6 100644 --- a/packages/presets/tachybase/src/client/index.ts +++ b/packages/presets/base/src/client/index.ts @@ -1,4 +1,4 @@ -import { Application, NocoBaseBuildInPlugin, Plugin } from '@nocobase/client'; +import { Application, NocoBaseBuildInPlugin, Plugin } from '@tachybase/client'; const getCurrentTimezone = () => { const timezoneOffset = new Date().getTimezoneOffset() / -60; @@ -25,3 +25,5 @@ export class TachyBaseClientPresetPlugin extends Plugin { await this.app.pm.add(NocoBaseBuildInPlugin); } } + +export default TachyBaseClientPresetPlugin; diff --git a/packages/presets/tachybase/src/index.ts b/packages/presets/base/src/index.ts similarity index 100% rename from packages/presets/tachybase/src/index.ts rename to packages/presets/base/src/index.ts diff --git a/packages/presets/tachybase/src/server/index.ts b/packages/presets/base/src/server/index.ts similarity index 95% rename from packages/presets/tachybase/src/server/index.ts rename to packages/presets/base/src/server/index.ts index cc08120de..5a235d7f6 100644 --- a/packages/presets/tachybase/src/server/index.ts +++ b/packages/presets/base/src/server/index.ts @@ -1,8 +1,8 @@ -import { Plugin, PluginManager } from '@nocobase/server'; +import { Plugin, PluginManager } from '@tachybase/server'; import _ from 'lodash'; export class PresetTachyBase extends Plugin { - builtInPlugins = [ + #builtInPlugins = [ // required plugins 'data-source-manager', 'error-handler', @@ -40,7 +40,11 @@ export class PresetTachyBase extends Plugin { 'approval', ]; - localPlugins = [ + get builtInPlugins() { + return this.#builtInPlugins; + } + + #localPlugins = [ // optional plugins, default disabled 'api-doc>=0.13.0-alpha.1', 'api-keys>=0.10.1-alpha.1', @@ -58,6 +62,10 @@ export class PresetTachyBase extends Plugin { 'theme-editor>=0.11.1-alpha.1', ]; + get localPlugins() { + return this.#localPlugins; + } + splitNames(name: string) { return (name || '').split(',').filter(Boolean); } diff --git a/packages/presets/tachybase/src/server/migrations/.gitkeep b/packages/presets/base/src/server/migrations/.gitkeep similarity index 100% rename from packages/presets/tachybase/src/server/migrations/.gitkeep rename to packages/presets/base/src/server/migrations/.gitkeep diff --git a/packages/presets/tachybase/src/server/migrations/20240414160015-remove-audit-local.ts b/packages/presets/base/src/server/migrations/20240414160015-remove-audit-local.ts similarity index 84% rename from packages/presets/tachybase/src/server/migrations/20240414160015-remove-audit-local.ts rename to packages/presets/base/src/server/migrations/20240414160015-remove-audit-local.ts index 53e728975..8ef6d2b33 100644 --- a/packages/presets/tachybase/src/server/migrations/20240414160015-remove-audit-local.ts +++ b/packages/presets/base/src/server/migrations/20240414160015-remove-audit-local.ts @@ -1,4 +1,4 @@ -import { Migration } from '@nocobase/server'; +import { Migration } from '@tachybase/server'; export default class RemoveBuitInAuditLogsMigration extends Migration { on = 'beforeLoad'; diff --git a/packages/presets/hera-rental/.npmignore b/packages/presets/hera-rental/.npmignore new file mode 100644 index 000000000..c593fe9df --- /dev/null +++ b/packages/presets/hera-rental/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/presets/hera-rental/client.d.ts b/packages/presets/hera-rental/client.d.ts new file mode 100644 index 000000000..d515d1feb --- /dev/null +++ b/packages/presets/hera-rental/client.d.ts @@ -0,0 +1,3 @@ +export * from './src/client'; +export { default } from './src/client'; + diff --git a/packages/presets/hera-rental/client.js b/packages/presets/hera-rental/client.js new file mode 100644 index 000000000..3c39956ca --- /dev/null +++ b/packages/presets/hera-rental/client.js @@ -0,0 +1 @@ +module.exports = require('./lib/client/index.js'); diff --git a/packages/presets/hera-rental/package.json b/packages/presets/hera-rental/package.json new file mode 100644 index 000000000..37646d452 --- /dev/null +++ b/packages/presets/hera-rental/package.json @@ -0,0 +1,65 @@ +{ + "name": "@tachybase/preset-hera-rental", + "version": "0.21.18", + "license": "Apache-2.0", + "main": "./lib/server/index.js", + "dependencies": { + "@hera/plugin-approval": "workspace:*", + "@hera/plugin-audit-logs": "workspace:*", + "@hera/plugin-core": "workspace:*", + "@hera/plugin-rental": "workspace:*", + "@nocobase/plugin-acl": "workspace:*", + "@nocobase/plugin-action-bulk-edit": "workspace:*", + "@nocobase/plugin-action-bulk-update": "workspace:*", + "@nocobase/plugin-action-duplicate": "workspace:*", + "@nocobase/plugin-action-print": "workspace:*", + "@nocobase/plugin-api-doc": "workspace:*", + "@nocobase/plugin-api-keys": "workspace:*", + "@nocobase/plugin-auth": "workspace:*", + "@nocobase/plugin-backup-restore": "workspace:*", + "@nocobase/plugin-calendar": "workspace:*", + "@nocobase/plugin-cas": "workspace:*", + "@nocobase/plugin-china-region": "workspace:*", + "@nocobase/plugin-client": "workspace:*", + "@nocobase/plugin-collection-manager": "workspace:*", + "@nocobase/plugin-custom-request": "workspace:*", + "@nocobase/plugin-data-source-manager": "workspace:*", + "@nocobase/plugin-data-visualization": "workspace:*", + "@nocobase/plugin-error-handler": "workspace:*", + "@nocobase/plugin-export": "workspace:*", + "@nocobase/plugin-file-manager": "workspace:*", + "@nocobase/plugin-formula-field": "workspace:*", + "@nocobase/plugin-gantt": "workspace:*", + "@nocobase/plugin-graph-collection-manager": "workspace:*", + "@nocobase/plugin-iframe-block": "workspace:*", + "@nocobase/plugin-import": "workspace:*", + "@nocobase/plugin-kanban": "workspace:*", + "@nocobase/plugin-localization-management": "workspace:*", + "@nocobase/plugin-logger": "workspace:*", + "@nocobase/plugin-map": "workspace:*", + "@nocobase/plugin-mock-collections": "workspace:*", + "@nocobase/plugin-multi-app-manager": "workspace:*", + "@nocobase/plugin-multi-app-share-collection": "workspace:*", + "@nocobase/plugin-oidc": "workspace:*", + "@nocobase/plugin-saml": "workspace:*", + "@nocobase/plugin-sequence-field": "workspace:*", + "@nocobase/plugin-sms-auth": "workspace:*", + "@nocobase/plugin-snapshot-field": "workspace:*", + "@nocobase/plugin-system-settings": "workspace:*", + "@nocobase/plugin-theme-editor": "workspace:*", + "@nocobase/plugin-ui-schema-storage": "workspace:*", + "@nocobase/plugin-users": "workspace:*", + "@nocobase/plugin-verification": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/plugin-mobile-client": "workspace:*", + "@tachybase/plugin-workflow": "workspace:*", + "@tachybase/preset-tachybase": "workspace:*", + "@tachybase/schema": "workspace:*", + "@tachybase/server": "workspace:*", + "cronstrue": "^2.11.0", + "lodash": "4.17.21" + }, + "devDependencies": { + "@types/lodash": "^4.17.0" + } +} diff --git a/packages/presets/hera-rental/server.d.ts b/packages/presets/hera-rental/server.d.ts new file mode 100644 index 000000000..b55e6f70d --- /dev/null +++ b/packages/presets/hera-rental/server.d.ts @@ -0,0 +1,3 @@ +export * from './src/server'; +export { default } from './src/server'; + diff --git a/packages/presets/hera-rental/server.js b/packages/presets/hera-rental/server.js new file mode 100644 index 000000000..adcc9d90d --- /dev/null +++ b/packages/presets/hera-rental/server.js @@ -0,0 +1 @@ +module.exports = require('./lib/server/index.js'); diff --git a/packages/presets/hera-rental/src/client/index.ts b/packages/presets/hera-rental/src/client/index.ts new file mode 100644 index 000000000..182ea60d6 --- /dev/null +++ b/packages/presets/hera-rental/src/client/index.ts @@ -0,0 +1,3 @@ +import { TachyBaseClientPresetPlugin } from 'packages/presets/base/src/client'; + +export class PluginRental extends TachyBaseClientPresetPlugin {} diff --git a/packages/presets/hera-rental/src/index.ts b/packages/presets/hera-rental/src/index.ts new file mode 100644 index 000000000..7ddad5814 --- /dev/null +++ b/packages/presets/hera-rental/src/index.ts @@ -0,0 +1 @@ +export { default } from './server'; diff --git a/packages/presets/hera-rental/src/server/index.ts b/packages/presets/hera-rental/src/server/index.ts new file mode 100644 index 000000000..3c3743045 --- /dev/null +++ b/packages/presets/hera-rental/src/server/index.ts @@ -0,0 +1,12 @@ +import PresetTachyBase from 'packages/presets/base/src'; +import _ from 'lodash'; + +export class PluginRental extends PresetTachyBase { + #builtInPlugins = ['approval-mobile', 'core', 'rental', 'mobile-client']; + + get builtInPlugins() { + return super.builtInPlugins.concat(this.#builtInPlugins); + } +} + +export default PresetTachyBase; diff --git a/packages/presets/sancongtou/.npmignore b/packages/presets/sancongtou/.npmignore new file mode 100644 index 000000000..c593fe9df --- /dev/null +++ b/packages/presets/sancongtou/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/presets/sancongtou/client.d.ts b/packages/presets/sancongtou/client.d.ts new file mode 100644 index 000000000..d515d1feb --- /dev/null +++ b/packages/presets/sancongtou/client.d.ts @@ -0,0 +1,3 @@ +export * from './src/client'; +export { default } from './src/client'; + diff --git a/packages/presets/sancongtou/client.js b/packages/presets/sancongtou/client.js new file mode 100644 index 000000000..3c39956ca --- /dev/null +++ b/packages/presets/sancongtou/client.js @@ -0,0 +1 @@ +module.exports = require('./lib/client/index.js'); diff --git a/packages/presets/sancongtou/package.json b/packages/presets/sancongtou/package.json new file mode 100644 index 000000000..35afd582d --- /dev/null +++ b/packages/presets/sancongtou/package.json @@ -0,0 +1,67 @@ +{ + "name": "@tachybase/preset-sancongtou", + "version": "0.21.18", + "license": "Apache-2.0", + "main": "./lib/server/index.js", + "dependencies": { + "@hera/plugin-approval": "workspace:*", + "@hera/plugin-approval-mobile": "workspace:*", + "@hera/plugin-audit-logs": "workspace:*", + "@hera/plugin-core": "workspace:*", + "@hera/plugin-rental": "workspace:*", + "@hera/plugin-sancongtou": "workspace:*", + "@nocobase/plugin-acl": "workspace:*", + "@nocobase/plugin-action-bulk-edit": "workspace:*", + "@nocobase/plugin-action-bulk-update": "workspace:*", + "@nocobase/plugin-action-duplicate": "workspace:*", + "@nocobase/plugin-action-print": "workspace:*", + "@nocobase/plugin-api-doc": "workspace:*", + "@nocobase/plugin-api-keys": "workspace:*", + "@nocobase/plugin-auth": "workspace:*", + "@nocobase/plugin-backup-restore": "workspace:*", + "@nocobase/plugin-calendar": "workspace:*", + "@nocobase/plugin-cas": "workspace:*", + "@nocobase/plugin-china-region": "workspace:*", + "@nocobase/plugin-client": "workspace:*", + "@nocobase/plugin-collection-manager": "workspace:*", + "@nocobase/plugin-custom-request": "workspace:*", + "@nocobase/plugin-data-source-manager": "workspace:*", + "@nocobase/plugin-data-visualization": "workspace:*", + "@nocobase/plugin-error-handler": "workspace:*", + "@nocobase/plugin-export": "workspace:*", + "@nocobase/plugin-file-manager": "workspace:*", + "@nocobase/plugin-formula-field": "workspace:*", + "@nocobase/plugin-gantt": "workspace:*", + "@nocobase/plugin-graph-collection-manager": "workspace:*", + "@nocobase/plugin-iframe-block": "workspace:*", + "@nocobase/plugin-import": "workspace:*", + "@nocobase/plugin-kanban": "workspace:*", + "@nocobase/plugin-localization-management": "workspace:*", + "@nocobase/plugin-logger": "workspace:*", + "@nocobase/plugin-map": "workspace:*", + "@nocobase/plugin-mock-collections": "workspace:*", + "@nocobase/plugin-multi-app-manager": "workspace:*", + "@nocobase/plugin-multi-app-share-collection": "workspace:*", + "@nocobase/plugin-oidc": "workspace:*", + "@nocobase/plugin-saml": "workspace:*", + "@nocobase/plugin-sequence-field": "workspace:*", + "@nocobase/plugin-sms-auth": "workspace:*", + "@nocobase/plugin-snapshot-field": "workspace:*", + "@nocobase/plugin-system-settings": "workspace:*", + "@nocobase/plugin-theme-editor": "workspace:*", + "@nocobase/plugin-ui-schema-storage": "workspace:*", + "@nocobase/plugin-users": "workspace:*", + "@nocobase/plugin-verification": "workspace:*", + "@tachybase/client": "workspace:*", + "@tachybase/plugin-mobile-client": "workspace:*", + "@tachybase/plugin-workflow": "workspace:*", + "@tachybase/preset-tachybase": "workspace:*", + "@tachybase/schema": "workspace:*", + "@tachybase/server": "workspace:*", + "cronstrue": "^2.11.0", + "lodash": "4.17.21" + }, + "devDependencies": { + "@types/lodash": "^4.17.0" + } +} diff --git a/packages/presets/sancongtou/server.d.ts b/packages/presets/sancongtou/server.d.ts new file mode 100644 index 000000000..b55e6f70d --- /dev/null +++ b/packages/presets/sancongtou/server.d.ts @@ -0,0 +1,3 @@ +export * from './src/server'; +export { default } from './src/server'; + diff --git a/packages/presets/sancongtou/server.js b/packages/presets/sancongtou/server.js new file mode 100644 index 000000000..adcc9d90d --- /dev/null +++ b/packages/presets/sancongtou/server.js @@ -0,0 +1 @@ +module.exports = require('./lib/server/index.js'); diff --git a/packages/presets/sancongtou/src/client/index.ts b/packages/presets/sancongtou/src/client/index.ts new file mode 100644 index 000000000..182ea60d6 --- /dev/null +++ b/packages/presets/sancongtou/src/client/index.ts @@ -0,0 +1,3 @@ +import { TachyBaseClientPresetPlugin } from 'packages/presets/base/src/client'; + +export class PluginRental extends TachyBaseClientPresetPlugin {} diff --git a/packages/presets/sancongtou/src/index.ts b/packages/presets/sancongtou/src/index.ts new file mode 100644 index 000000000..7ddad5814 --- /dev/null +++ b/packages/presets/sancongtou/src/index.ts @@ -0,0 +1 @@ +export { default } from './server'; diff --git a/packages/presets/sancongtou/src/server/index.ts b/packages/presets/sancongtou/src/server/index.ts new file mode 100644 index 000000000..ee6a59247 --- /dev/null +++ b/packages/presets/sancongtou/src/server/index.ts @@ -0,0 +1,12 @@ +import PresetTachyBase from 'packages/presets/base/src'; +import _ from 'lodash'; + +export class PluginRental extends PresetTachyBase { + #builtInPlugins = ['approval-mobile', 'core', 'rental', 'mobile-client', 'sancongtou']; + + get builtInPlugins() { + return super.builtInPlugins.concat(this.#builtInPlugins); + } +} + +export default PresetTachyBase; diff --git a/packages/presets/tachybase/LICENSE b/packages/presets/tachybase/LICENSE deleted file mode 100644 index 0ad25db4b..000000000 --- a/packages/presets/tachybase/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0e1cb6090..d381667b4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -43,18 +43,21 @@ importers: '@commitlint/prompt-cli': specifier: ^16.3.0 version: 16.3.0 - '@nocobase/build': + '@tachybase/build': specifier: workspace:* version: link:packages/core/build - '@nocobase/test': - specifier: workspace:* - version: link:packages/core/test '@tachybase/cli': specifier: workspace:* version: link:packages/core/cli + '@tachybase/preset-hera-rental': + specifier: workspace:* + version: link:packages/presets/hera-rental '@tachybase/preset-tachybase': specifier: workspace:* - version: link:packages/presets/tachybase + version: link:packages/presets/base + '@tachybase/test': + specifier: workspace:* + version: link:packages/core/test '@types/react': specifier: ^18.2.79 version: 18.2.79 @@ -115,10 +118,10 @@ importers: packages/core/acl: dependencies: - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../resourcer - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils koa-compose: @@ -137,16 +140,16 @@ importers: packages/core/actions: dependencies: - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../cache - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../database - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../resourcer - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils koa: @@ -161,41 +164,47 @@ importers: packages/core/app: dependencies: - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../database - '@nocobase/server': + '@tachybase/preset-hera-rental': specifier: workspace:* - version: link:../server + version: link:../../presets/hera-rental + '@tachybase/preset-sancongtou': + specifier: workspace:* + version: link:../../presets/sancongtou '@tachybase/preset-tachybase': specifier: workspace:* - version: link:../../presets/tachybase + version: link:../../presets/base + '@tachybase/server': + specifier: workspace:* + version: link:../server devDependencies: - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../cache - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../client - '@nocobase/logger': + '@tachybase/logger': specifier: workspace:* version: link:../logger packages/core/auth: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../actions - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../cache - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../database - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../resourcer - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils '@types/jsonwebtoken': @@ -310,10 +319,10 @@ importers: packages/core/cli: dependencies: - '@nocobase/app': + '@tachybase/app': specifier: workspace:* version: link:../app - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils '@types/fs-extra': @@ -368,9 +377,6 @@ importers: specifier: ^4.7.2 version: 4.7.2 devDependencies: - '@nocobase/devtools': - specifier: workspace:* - version: link:../devtools '@rollup/plugin-commonjs': specifier: ^25.0.7 version: 25.0.7(rollup@4.14.1) @@ -380,6 +386,9 @@ importers: '@rollup/plugin-node-resolve': specifier: ^15.2.3 version: 15.2.3(rollup@4.14.1) + '@tachybase/devtools': + specifier: workspace:* + version: link:../devtools '@types/lodash': specifier: ^4.17.0 version: 4.17.0 @@ -443,24 +452,24 @@ importers: '@emotion/css': specifier: ^11.7.1 version: 11.11.2 - '@nocobase/database': - specifier: workspace:* - version: link:../database - '@nocobase/evaluators': - specifier: workspace:* - version: link:../evaluators - '@nocobase/sdk': - specifier: workspace:* - version: link:../sdk - '@nocobase/utils': - specifier: workspace:* - version: link:../utils '@tachybase/components': specifier: workspace:* version: link:../components + '@tachybase/database': + specifier: workspace:* + version: link:../database + '@tachybase/evaluators': + specifier: workspace:* + version: link:../evaluators '@tachybase/schema': specifier: workspace:* version: link:../schema + '@tachybase/sdk': + specifier: workspace:* + version: link:../sdk + '@tachybase/utils': + specifier: workspace:* + version: link:../utils ahooks: specifier: ^3.7.2 version: 3.7.8(react@18.2.0) @@ -675,22 +684,22 @@ importers: packages/core/data-source-manager: dependencies: - '@nocobase/acl': + '@tachybase/acl': specifier: workspace:* version: link:../acl - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../actions - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../cache - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../database - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../resourcer - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils '@types/jsonwebtoken': @@ -711,10 +720,10 @@ importers: packages/core/database: dependencies: - '@nocobase/logger': + '@tachybase/logger': specifier: workspace:* version: link:../logger - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils async-mutex: @@ -781,13 +790,13 @@ importers: packages/core/devtools: dependencies: - '@nocobase/build': + '@tachybase/build': specifier: workspace:* version: link:../build - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../client - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../test '@types/koa': @@ -901,7 +910,7 @@ importers: '@formulajs/formulajs': specifier: 4.2.0 version: 4.2.0 - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils lodash: @@ -937,7 +946,7 @@ importers: packages/core/resourcer: dependencies: - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../utils deepmerge: @@ -1019,45 +1028,45 @@ importers: '@koa/router': specifier: ^9.4.0 version: 9.4.0 - '@nocobase/acl': + '@tachybase/acl': specifier: workspace:* version: link:../acl - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../actions - '@nocobase/auth': + '@tachybase/auth': specifier: workspace:* version: link:../auth - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../cache - '@nocobase/data-source-manager': + '@tachybase/data-source-manager': specifier: workspace:* version: link:../data-source-manager - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../database - '@nocobase/evaluators': + '@tachybase/evaluators': specifier: workspace:* version: link:../evaluators - '@nocobase/logger': + '@tachybase/logger': specifier: workspace:* version: link:../logger - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../resourcer - '@nocobase/sdk': - specifier: workspace:* - version: link:../sdk - '@nocobase/telemetry': - specifier: workspace:* - version: link:../telemetry - '@nocobase/utils': - specifier: workspace:* - version: link:../utils '@tachybase/schema': specifier: workspace:* version: link:../schema + '@tachybase/sdk': + specifier: workspace:* + version: link:../sdk + '@tachybase/telemetry': + specifier: workspace:* + version: link:../telemetry + '@tachybase/utils': + specifier: workspace:* + version: link:../utils '@types/decompress': specifier: 4.2.4 version: 4.2.4 @@ -1188,9 +1197,6 @@ importers: packages/core/telemetry: dependencies: - '@nocobase/utils': - specifier: workspace:* - version: link:../utils '@opentelemetry/api': specifier: ^1.7.0 version: 1.7.0 @@ -1212,6 +1218,9 @@ importers: '@opentelemetry/semantic-conventions': specifier: ^1.19.0 version: 1.19.0 + '@tachybase/utils': + specifier: workspace:* + version: link:../utils packages/core/test: dependencies: @@ -1221,15 +1230,15 @@ importers: '@formily/shared': specifier: 2.2.27 version: 2.2.27 - '@nocobase/database': - specifier: workspace:* - version: link:../database - '@nocobase/server': - specifier: workspace:* - version: link:../server '@playwright/test': specifier: ^1.42.1 version: 1.42.1 + '@tachybase/database': + specifier: workspace:* + version: link:../database + '@tachybase/server': + specifier: workspace:* + version: link:../server '@testing-library/dom': specifier: ^9.3.3 version: 9.3.3 @@ -1345,43 +1354,43 @@ importers: packages/plugins/@hera/plugin-approval: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test '@tachybase/plugin-workflow': specifier: workspace:* version: link:../../@tachybase/plugin-workflow + '@tachybase/server': + specifier: workspace:* + version: link:../../../core/server + '@tachybase/test': + specifier: workspace:* + version: link:../../../core/test devDependencies: '@ant-design/icons': specifier: 5.x version: 5.3.6(react-dom@18.2.0)(react@18.2.0) - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/data-source-manager': - specifier: workspace:* - version: link:../../../core/data-source-manager - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-ui-schema-storage': specifier: workspace:* version: link:../../@nocobase/plugin-ui-schema-storage - '@nocobase/utils': + '@tachybase/actions': specifier: workspace:* - version: link:../../../core/utils + version: link:../../../core/actions '@tachybase/components': specifier: workspace:* version: link:../../../core/components + '@tachybase/data-source-manager': + specifier: workspace:* + version: link:../../../core/data-source-manager + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database '@tachybase/schema': specifier: workspace:* version: link:../../../core/schema + '@tachybase/utils': + specifier: workspace:* + version: link:../../../core/utils '@types/lodash': specifier: 4.17.0 version: 4.17.0 @@ -1403,16 +1412,16 @@ importers: packages/plugins/@hera/plugin-approval-mobile: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -1446,24 +1455,24 @@ importers: packages/plugins/@hera/plugin-audit-logs: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test - '@nocobase/utils': - specifier: workspace:* - version: link:../../../core/utils '@tachybase/schema': specifier: workspace:* version: link:../../../core/schema + '@tachybase/server': + specifier: workspace:* + version: link:../../../core/server + '@tachybase/test': + specifier: workspace:* + version: link:../../../core/test + '@tachybase/utils': + specifier: workspace:* + version: link:../../../core/utils devDependencies: '@ant-design/icons': specifier: ~5.3.6 @@ -1483,33 +1492,36 @@ importers: packages/plugins/@hera/plugin-core: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database - '@nocobase/evaluators': - specifier: workspace:* - version: link:../../../core/evaluators '@nocobase/plugin-acl': specifier: workspace:* version: link:../../@nocobase/plugin-acl - '@nocobase/server': + '@tachybase/actions': specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': + version: link:../../../core/actions + '@tachybase/client': specifier: workspace:* - version: link:../../../core/test - '@nocobase/utils': + version: link:../../../core/client + '@tachybase/data-source-manager': specifier: workspace:* - version: link:../../../core/utils + version: link:../../../core/data-source-manager + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/evaluators': + specifier: workspace:* + version: link:../../../core/evaluators '@tachybase/plugin-workflow': specifier: workspace:* version: link:../../@tachybase/plugin-workflow + '@tachybase/server': + specifier: workspace:* + version: link:../../../core/server + '@tachybase/test': + specifier: workspace:* + version: link:../../../core/test + '@tachybase/utils': + specifier: workspace:* + version: link:../../../core/utils devDependencies: '@ant-design/cssinjs': specifier: ^1.11.1 @@ -1613,16 +1625,19 @@ importers: packages/plugins/@hera/plugin-external-data-source: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/plugin-data-source-manager': + '@tachybase/data-source-manager': specifier: workspace:* - version: link:../../@nocobase/plugin-data-source-manager - '@nocobase/server': + version: link:../../../core/data-source-manager + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test antd: @@ -1647,31 +1662,31 @@ importers: '@hera/plugin-core': specifier: workspace:* version: link:../plugin-core - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/cache': - specifier: workspace:* - version: link:../../../core/cache - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-collection-manager': specifier: workspace:* version: link:../../@nocobase/plugin-collection-manager '@nocobase/plugin-data-visualization': specifier: workspace:* version: link:../../@nocobase/plugin-data-visualization - '@nocobase/server': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/cache': + specifier: workspace:* + version: link:../../../core/cache + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -1726,13 +1741,13 @@ importers: '@ant-design/icons': specifier: ^5.3.6 version: 5.3.6(react-dom@18.2.0)(react@18.2.0) - '@nocobase/client': + '@tachybase/client': specifier: 0.x version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: 0.x version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: 0.x version: link:../../../core/test antd-mobile: @@ -1741,28 +1756,28 @@ importers: packages/plugins/@nocobase/plugin-acl: dependencies: - '@nocobase/acl': + '@tachybase/acl': specifier: workspace:* version: link:../../../core/acl - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../../../core/cache - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -1808,16 +1823,16 @@ importers: packages/plugins/@nocobase/plugin-action-bulk-edit: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -1848,16 +1863,16 @@ importers: packages/plugins/@nocobase/plugin-action-bulk-update: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -1876,13 +1891,13 @@ importers: packages/plugins/@nocobase/plugin-action-duplicate: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -1904,13 +1919,13 @@ importers: packages/plugins/@nocobase/plugin-action-print: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -1920,22 +1935,22 @@ importers: packages/plugins/@nocobase/plugin-api-doc: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/sdk': + '@tachybase/sdk': specifier: workspace:* version: link:../../../core/sdk - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -1957,25 +1972,25 @@ importers: packages/plugins/@nocobase/plugin-api-keys: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../../../core/resourcer - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2006,28 +2021,28 @@ importers: packages/plugins/@nocobase/plugin-auth: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/auth': + '@tachybase/auth': specifier: workspace:* version: link:../../../core/auth - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../../../core/cache - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2061,22 +2076,22 @@ importers: packages/plugins/@nocobase/plugin-backup-restore: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2146,16 +2161,16 @@ importers: packages/plugins/@nocobase/plugin-calendar: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -2201,28 +2216,28 @@ importers: packages/plugins/@nocobase/plugin-cas: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/auth': - specifier: workspace:* - version: link:../../../core/auth - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-auth': specifier: workspace:* version: link:../plugin-auth - '@nocobase/sdk': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/auth': + specifier: workspace:* + version: link:../../../core/auth + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/sdk': specifier: workspace:* version: link:../../../core/sdk - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -2241,16 +2256,16 @@ importers: packages/plugins/@nocobase/plugin-china-region: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -2269,19 +2284,19 @@ importers: packages/plugins/@nocobase/plugin-client: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2300,25 +2315,25 @@ importers: packages/plugins/@nocobase/plugin-collection-manager: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-error-handler': specifier: workspace:* version: link:../plugin-error-handler - '@nocobase/server': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2343,31 +2358,31 @@ importers: packages/plugins/@nocobase/plugin-custom-request: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/evaluators': + '@tachybase/evaluators': specifier: workspace:* version: link:../../../core/evaluators - '@nocobase/logger': + '@tachybase/logger': specifier: workspace:* version: link:../../../core/logger - '@nocobase/sdk': + '@tachybase/sdk': specifier: workspace:* version: link:../../../core/sdk - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2392,22 +2407,22 @@ importers: packages/plugins/@nocobase/plugin-data-source-manager: dependencies: - '@nocobase/acl': + '@tachybase/acl': specifier: workspace:* version: link:../../../core/acl - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2453,25 +2468,25 @@ importers: packages/plugins/@nocobase/plugin-data-visualization: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/cache': + '@tachybase/cache': specifier: workspace:* version: link:../../../core/cache - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2526,19 +2541,19 @@ importers: packages/plugins/@nocobase/plugin-error-handler: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2554,22 +2569,22 @@ importers: packages/plugins/@nocobase/plugin-export: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2600,22 +2615,22 @@ importers: packages/plugins/@nocobase/plugin-file-manager: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2682,22 +2697,22 @@ importers: packages/plugins/@nocobase/plugin-formula-field: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/evaluators': + '@tachybase/evaluators': specifier: workspace:* version: link:../../../core/evaluators - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2725,24 +2740,24 @@ importers: '@emotion/css': specifier: ^11.7.1 version: 11.11.2 - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test - '@nocobase/utils': - specifier: workspace:* - version: link:../../../core/utils '@tachybase/components': specifier: workspace:* version: link:../../../core/components '@tachybase/schema': specifier: workspace:* version: link:../../../core/schema + '@tachybase/server': + specifier: workspace:* + version: link:../../../core/server + '@tachybase/test': + specifier: workspace:* + version: link:../../../core/test + '@tachybase/utils': + specifier: workspace:* + version: link:../../../core/utils antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) @@ -2758,19 +2773,19 @@ importers: packages/plugins/@nocobase/plugin-graph-collection-manager: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2831,19 +2846,19 @@ importers: packages/plugins/@nocobase/plugin-iframe-block: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -2868,22 +2883,22 @@ importers: packages/plugins/@nocobase/plugin-import: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -2932,13 +2947,13 @@ importers: packages/plugins/@nocobase/plugin-kanban: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -2975,28 +2990,28 @@ importers: packages/plugins/@nocobase/plugin-localization-management: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/cache': - specifier: workspace:* - version: link:../../../core/cache - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-client': specifier: workspace:* version: link:../plugin-client '@nocobase/plugin-ui-schema-storage': specifier: workspace:* version: link:../plugin-ui-schema-storage - '@nocobase/server': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/cache': + specifier: workspace:* + version: link:../../../core/cache + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -3021,19 +3036,19 @@ importers: packages/plugins/@nocobase/plugin-logger: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/logger': + '@tachybase/logger': specifier: workspace:* version: link:../../../core/logger - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -3058,22 +3073,22 @@ importers: packages/plugins/@nocobase/plugin-map: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3128,22 +3143,22 @@ importers: packages/plugins/@nocobase/plugin-mock-collections: dependencies: - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-error-handler': specifier: workspace:* version: link:../plugin-error-handler - '@nocobase/server': + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3159,19 +3174,19 @@ importers: packages/plugins/@nocobase/plugin-multi-app-manager: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3208,12 +3223,6 @@ importers: packages/plugins/@nocobase/plugin-multi-app-share-collection: dependencies: - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-collection-manager': specifier: workspace:* version: link:../plugin-collection-manager @@ -3226,13 +3235,19 @@ importers: '@nocobase/plugin-users': specifier: workspace:* version: link:../plugin-users - '@nocobase/server': + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3254,19 +3269,19 @@ importers: packages/plugins/@nocobase/plugin-notifications: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3285,25 +3300,25 @@ importers: packages/plugins/@nocobase/plugin-oidc: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/auth': - specifier: workspace:* - version: link:../../../core/auth - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-auth': specifier: workspace:* version: link:../plugin-auth - '@nocobase/server': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/auth': + specifier: workspace:* + version: link:../../../core/auth + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -3340,28 +3355,28 @@ importers: packages/plugins/@nocobase/plugin-saml: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/auth': - specifier: workspace:* - version: link:../../../core/auth - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-auth': specifier: workspace:* version: link:../plugin-auth - '@nocobase/sdk': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/auth': + specifier: workspace:* + version: link:../../../core/auth + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/sdk': specifier: workspace:* version: link:../../../core/sdk - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -3389,13 +3404,13 @@ importers: packages/plugins/@nocobase/plugin-sample-hello: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -3417,25 +3432,25 @@ importers: packages/plugins/@nocobase/plugin-sequence-field: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-collection-manager': specifier: workspace:* version: link:../plugin-collection-manager - '@nocobase/server': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3472,28 +3487,28 @@ importers: packages/plugins/@nocobase/plugin-sms-auth: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/auth': - specifier: workspace:* - version: link:../../../core/auth - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-auth': specifier: workspace:* version: link:../plugin-auth '@nocobase/plugin-verification': specifier: workspace:* version: link:../plugin-verification - '@nocobase/server': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/auth': + specifier: workspace:* + version: link:../../../core/auth + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -3512,19 +3527,19 @@ importers: packages/plugins/@nocobase/plugin-snapshot-field: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3552,37 +3567,37 @@ importers: packages/plugins/@nocobase/plugin-system-settings: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test packages/plugins/@nocobase/plugin-theme-editor: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3637,34 +3652,34 @@ importers: packages/plugins/@nocobase/plugin-ui-schema-storage: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/cache': - specifier: workspace:* - version: link:../../../core/cache - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-error-handler': specifier: workspace:* version: link:../plugin-error-handler '@nocobase/plugin-users': specifier: workspace:* version: link:../plugin-users - '@nocobase/resourcer': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/cache': + specifier: workspace:* + version: link:../../../core/cache + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/resourcer': specifier: workspace:* version: link:../../../core/resourcer - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3677,34 +3692,34 @@ importers: packages/plugins/@nocobase/plugin-users: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/cache': - specifier: workspace:* - version: link:../../../core/cache - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database '@nocobase/plugin-acl': specifier: workspace:* version: link:../plugin-acl '@nocobase/plugin-auth': specifier: workspace:* version: link:../plugin-auth - '@nocobase/resourcer': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/cache': + specifier: workspace:* + version: link:../../../core/cache + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/resourcer': specifier: workspace:* version: link:../../../core/resourcer - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3726,25 +3741,25 @@ importers: packages/plugins/@nocobase/plugin-verification: dependencies: - '@nocobase/actions': + '@tachybase/actions': specifier: workspace:* version: link:../../../core/actions - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../../../core/resourcer - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3781,13 +3796,16 @@ importers: packages/plugins/@tachybase/plugin-field-markdown-vditor: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/server': + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test devDependencies: @@ -3809,19 +3827,19 @@ importers: packages/plugins/@tachybase/plugin-mobile-client: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3876,24 +3894,6 @@ importers: packages/plugins/@tachybase/plugin-workflow: dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/data-source-manager': - specifier: workspace:* - version: link:../../../core/data-source-manager - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database - '@nocobase/evaluators': - specifier: workspace:* - version: link:../../../core/evaluators - '@nocobase/logger': - specifier: workspace:* - version: link:../../../core/logger '@nocobase/plugin-collection-manager': specifier: workspace:* version: link:../../@nocobase/plugin-collection-manager @@ -3903,21 +3903,39 @@ importers: '@nocobase/plugin-users': specifier: workspace:* version: link:../../@nocobase/plugin-users - '@nocobase/resourcer': + '@tachybase/actions': + specifier: workspace:* + version: link:../../../core/actions + '@tachybase/client': + specifier: workspace:* + version: link:../../../core/client + '@tachybase/data-source-manager': + specifier: workspace:* + version: link:../../../core/data-source-manager + '@tachybase/database': + specifier: workspace:* + version: link:../../../core/database + '@tachybase/evaluators': + specifier: workspace:* + version: link:../../../core/evaluators + '@tachybase/logger': + specifier: workspace:* + version: link:../../../core/logger + '@tachybase/resourcer': specifier: workspace:* version: link:../../../core/resourcer - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test - '@nocobase/utils': - specifier: workspace:* - version: link:../../../core/utils '@tachybase/schema': specifier: workspace:* version: link:../../../core/schema + '@tachybase/server': + specifier: workspace:* + version: link:../../../core/server + '@tachybase/test': + specifier: workspace:* + version: link:../../../core/test + '@tachybase/utils': + specifier: workspace:* + version: link:../../../core/utils devDependencies: '@ant-design/icons': specifier: ~5.3.6 @@ -3970,25 +3988,25 @@ importers: packages/plugins/@tachybase/plugin-workflow-test: dependencies: - '@nocobase/client': + '@tachybase/client': specifier: workspace:* version: link:../../../core/client - '@nocobase/data-source-manager': + '@tachybase/data-source-manager': specifier: workspace:* version: link:../../../core/data-source-manager - '@nocobase/database': + '@tachybase/database': specifier: workspace:* version: link:../../../core/database - '@nocobase/resourcer': + '@tachybase/resourcer': specifier: workspace:* version: link:../../../core/resourcer - '@nocobase/server': + '@tachybase/server': specifier: workspace:* version: link:../../../core/server - '@nocobase/test': + '@tachybase/test': specifier: workspace:* version: link:../../../core/test - '@nocobase/utils': + '@tachybase/utils': specifier: workspace:* version: link:../../../core/utils devDependencies: @@ -3996,7 +4014,7 @@ importers: specifier: 4.17.21 version: 4.17.21 - packages/presets/tachybase: + packages/presets/base: dependencies: '@hera/plugin-approval': specifier: workspace:* @@ -4004,9 +4022,6 @@ importers: '@hera/plugin-audit-logs': specifier: workspace:* version: link:../../plugins/@hera/plugin-audit-logs - '@nocobase/client': - specifier: workspace:* - version: link:../../core/client '@nocobase/plugin-acl': specifier: workspace:* version: link:../../plugins/@nocobase/plugin-acl @@ -4133,9 +4148,9 @@ importers: '@nocobase/plugin-verification': specifier: workspace:* version: link:../../plugins/@nocobase/plugin-verification - '@nocobase/server': + '@tachybase/client': specifier: workspace:* - version: link:../../core/server + version: link:../../core/client '@tachybase/plugin-mobile-client': specifier: workspace:* version: link:../../plugins/@tachybase/plugin-mobile-client @@ -4145,6 +4160,353 @@ importers: '@tachybase/schema': specifier: workspace:* version: link:../../core/schema + '@tachybase/server': + specifier: workspace:* + version: link:../../core/server + cronstrue: + specifier: ^2.11.0 + version: 2.47.0 + lodash: + specifier: 4.17.21 + version: 4.17.21 + devDependencies: + '@types/lodash': + specifier: ^4.17.0 + version: 4.17.0 + + packages/presets/hera-rental: + dependencies: + '@hera/plugin-approval': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-approval + '@hera/plugin-audit-logs': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-audit-logs + '@hera/plugin-core': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-core + '@hera/plugin-rental': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-rental + '@nocobase/plugin-acl': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-acl + '@nocobase/plugin-action-bulk-edit': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-bulk-edit + '@nocobase/plugin-action-bulk-update': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-bulk-update + '@nocobase/plugin-action-duplicate': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-duplicate + '@nocobase/plugin-action-print': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-print + '@nocobase/plugin-api-doc': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-api-doc + '@nocobase/plugin-api-keys': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-api-keys + '@nocobase/plugin-auth': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-auth + '@nocobase/plugin-backup-restore': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-backup-restore + '@nocobase/plugin-calendar': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-calendar + '@nocobase/plugin-cas': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-cas + '@nocobase/plugin-china-region': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-china-region + '@nocobase/plugin-client': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-client + '@nocobase/plugin-collection-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-collection-manager + '@nocobase/plugin-custom-request': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-custom-request + '@nocobase/plugin-data-source-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-data-source-manager + '@nocobase/plugin-data-visualization': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-data-visualization + '@nocobase/plugin-error-handler': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-error-handler + '@nocobase/plugin-export': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-export + '@nocobase/plugin-file-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-file-manager + '@nocobase/plugin-formula-field': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-formula-field + '@nocobase/plugin-gantt': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-gantt + '@nocobase/plugin-graph-collection-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-graph-collection-manager + '@nocobase/plugin-iframe-block': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-iframe-block + '@nocobase/plugin-import': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-import + '@nocobase/plugin-kanban': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-kanban + '@nocobase/plugin-localization-management': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-localization-management + '@nocobase/plugin-logger': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-logger + '@nocobase/plugin-map': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-map + '@nocobase/plugin-mock-collections': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-mock-collections + '@nocobase/plugin-multi-app-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-multi-app-manager + '@nocobase/plugin-multi-app-share-collection': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-multi-app-share-collection + '@nocobase/plugin-oidc': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-oidc + '@nocobase/plugin-saml': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-saml + '@nocobase/plugin-sequence-field': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-sequence-field + '@nocobase/plugin-sms-auth': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-sms-auth + '@nocobase/plugin-snapshot-field': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-snapshot-field + '@nocobase/plugin-system-settings': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-system-settings + '@nocobase/plugin-theme-editor': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-theme-editor + '@nocobase/plugin-ui-schema-storage': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-ui-schema-storage + '@nocobase/plugin-users': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-users + '@nocobase/plugin-verification': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-verification + '@tachybase/client': + specifier: workspace:* + version: link:../../core/client + '@tachybase/plugin-mobile-client': + specifier: workspace:* + version: link:../../plugins/@tachybase/plugin-mobile-client + '@tachybase/plugin-workflow': + specifier: workspace:* + version: link:../../plugins/@tachybase/plugin-workflow + '@tachybase/preset-tachybase': + specifier: workspace:* + version: link:../base + '@tachybase/schema': + specifier: workspace:* + version: link:../../core/schema + '@tachybase/server': + specifier: workspace:* + version: link:../../core/server + cronstrue: + specifier: ^2.11.0 + version: 2.47.0 + lodash: + specifier: 4.17.21 + version: 4.17.21 + devDependencies: + '@types/lodash': + specifier: ^4.17.0 + version: 4.17.0 + + packages/presets/sancongtou: + dependencies: + '@hera/plugin-approval': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-approval + '@hera/plugin-approval-mobile': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-approval-mobile + '@hera/plugin-audit-logs': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-audit-logs + '@hera/plugin-core': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-core + '@hera/plugin-rental': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-rental + '@hera/plugin-sancongtou': + specifier: workspace:* + version: link:../../plugins/@hera/plugin-sancongtou + '@nocobase/plugin-acl': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-acl + '@nocobase/plugin-action-bulk-edit': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-bulk-edit + '@nocobase/plugin-action-bulk-update': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-bulk-update + '@nocobase/plugin-action-duplicate': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-duplicate + '@nocobase/plugin-action-print': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-action-print + '@nocobase/plugin-api-doc': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-api-doc + '@nocobase/plugin-api-keys': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-api-keys + '@nocobase/plugin-auth': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-auth + '@nocobase/plugin-backup-restore': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-backup-restore + '@nocobase/plugin-calendar': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-calendar + '@nocobase/plugin-cas': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-cas + '@nocobase/plugin-china-region': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-china-region + '@nocobase/plugin-client': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-client + '@nocobase/plugin-collection-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-collection-manager + '@nocobase/plugin-custom-request': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-custom-request + '@nocobase/plugin-data-source-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-data-source-manager + '@nocobase/plugin-data-visualization': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-data-visualization + '@nocobase/plugin-error-handler': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-error-handler + '@nocobase/plugin-export': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-export + '@nocobase/plugin-file-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-file-manager + '@nocobase/plugin-formula-field': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-formula-field + '@nocobase/plugin-gantt': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-gantt + '@nocobase/plugin-graph-collection-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-graph-collection-manager + '@nocobase/plugin-iframe-block': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-iframe-block + '@nocobase/plugin-import': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-import + '@nocobase/plugin-kanban': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-kanban + '@nocobase/plugin-localization-management': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-localization-management + '@nocobase/plugin-logger': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-logger + '@nocobase/plugin-map': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-map + '@nocobase/plugin-mock-collections': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-mock-collections + '@nocobase/plugin-multi-app-manager': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-multi-app-manager + '@nocobase/plugin-multi-app-share-collection': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-multi-app-share-collection + '@nocobase/plugin-oidc': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-oidc + '@nocobase/plugin-saml': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-saml + '@nocobase/plugin-sequence-field': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-sequence-field + '@nocobase/plugin-sms-auth': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-sms-auth + '@nocobase/plugin-snapshot-field': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-snapshot-field + '@nocobase/plugin-system-settings': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-system-settings + '@nocobase/plugin-theme-editor': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-theme-editor + '@nocobase/plugin-ui-schema-storage': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-ui-schema-storage + '@nocobase/plugin-users': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-users + '@nocobase/plugin-verification': + specifier: workspace:* + version: link:../../plugins/@nocobase/plugin-verification + '@tachybase/client': + specifier: workspace:* + version: link:../../core/client + '@tachybase/plugin-mobile-client': + specifier: workspace:* + version: link:../../plugins/@tachybase/plugin-mobile-client + '@tachybase/plugin-workflow': + specifier: workspace:* + version: link:../../plugins/@tachybase/plugin-workflow + '@tachybase/preset-tachybase': + specifier: workspace:* + version: link:../base + '@tachybase/schema': + specifier: workspace:* + version: link:../../core/schema + '@tachybase/server': + specifier: workspace:* + version: link:../../core/server cronstrue: specifier: ^2.11.0 version: 2.47.0