fix: set visible with confirm (#361)

* chore(versions): 😊 publish v0.7.0-alpha.31

* fix: set visible with confirm

* chore(versions): 😊 publish v0.7.0-alpha.32
This commit is contained in:
chenos 2022-05-05 17:38:48 +08:00 committed by GitHub
parent 781fb0a999
commit 0a28df510d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 76 additions and 80 deletions

View File

@ -1,5 +1,5 @@
{
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": [

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/app-client",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"license": "MIT",
"scripts": {
"start": "umi dev",
@ -10,7 +10,7 @@
"test:coverage": "umi-test --coverage"
},
"devDependencies": {
"@nocobase/client": "0.7.0-alpha.30",
"@nocobase/client": "0.7.0-alpha.32",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@umijs/test": "^3.5.20",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/app-server",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"description": "",
"license": "MIT",
"main": "./lib/index.js",
@ -11,19 +11,19 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/database": "0.7.0-alpha.30",
"@nocobase/plugin-acl": "0.7.0-alpha.30",
"@nocobase/plugin-china-region": "0.7.0-alpha.30",
"@nocobase/plugin-client": "0.7.0-alpha.30",
"@nocobase/plugin-collection-manager": "0.7.0-alpha.30",
"@nocobase/plugin-error-handler": "0.7.0-alpha.30",
"@nocobase/plugin-file-manager": "0.7.0-alpha.30",
"@nocobase/plugin-system-settings": "0.7.0-alpha.30",
"@nocobase/plugin-ui-routes-storage": "0.7.0-alpha.30",
"@nocobase/plugin-ui-schema-storage": "0.7.0-alpha.30",
"@nocobase/plugin-users": "0.7.0-alpha.30",
"@nocobase/plugin-workflow": "0.7.0-alpha.30",
"@nocobase/server": "0.7.0-alpha.30"
"@nocobase/database": "0.7.0-alpha.32",
"@nocobase/plugin-acl": "0.7.0-alpha.32",
"@nocobase/plugin-china-region": "0.7.0-alpha.32",
"@nocobase/plugin-client": "0.7.0-alpha.32",
"@nocobase/plugin-collection-manager": "0.7.0-alpha.32",
"@nocobase/plugin-error-handler": "0.7.0-alpha.32",
"@nocobase/plugin-file-manager": "0.7.0-alpha.32",
"@nocobase/plugin-system-settings": "0.7.0-alpha.32",
"@nocobase/plugin-ui-routes-storage": "0.7.0-alpha.32",
"@nocobase/plugin-ui-schema-storage": "0.7.0-alpha.32",
"@nocobase/plugin-users": "0.7.0-alpha.32",
"@nocobase/plugin-workflow": "0.7.0-alpha.32",
"@nocobase/server": "0.7.0-alpha.32"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/acl",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -17,7 +17,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/resourcer": "0.7.0-alpha.30",
"@nocobase/resourcer": "0.7.0-alpha.32",
"json-templates": "^4.2.0"
},
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/actions",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -17,8 +17,8 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/database": "0.7.0-alpha.30",
"@nocobase/resourcer": "0.7.0-alpha.30"
"@nocobase/database": "0.7.0-alpha.32",
"@nocobase/resourcer": "0.7.0-alpha.32"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/client",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"license": "Apache-2.0",
"licenses": [
{
@ -29,7 +29,7 @@
"@formily/antd": "2.0.20",
"@formily/core": "2.0.20",
"@formily/react": "2.0.20",
"@nocobase/utils": "0.7.0-alpha.30",
"@nocobase/utils": "0.7.0-alpha.32",
"ahooks": "^3.0.5",
"antd": "~4.19.5",
"axios": "^0.24.0",

View File

@ -20,10 +20,6 @@ export const ActionDrawer: ComposedActionDrawer = observer((props) => {
}
return buf;
});
const closeHandler = () => {
setVisible(false);
};
return (
<>
{createPortal(
@ -38,7 +34,7 @@ export const ActionDrawer: ComposedActionDrawer = observer((props) => {
{...others}
destroyOnClose
visible={visible}
onClose={closeHandler}
onClose={() => setVisible(false, true)}
className={classNames(
others.className,
css`

View File

@ -32,7 +32,7 @@ export const ActionModal: ComposedActionDrawer = observer((props) => {
{...others}
destroyOnClose
visible={visible}
onCancel={() => setVisible(false)}
onCancel={() => setVisible(false, true)}
className={classNames(
others.className,
css`

View File

@ -16,10 +16,10 @@ export const useActionContext = () => {
return {
...ctx,
setVisible(visible: boolean) {
setVisible(visible: boolean, confirm = false) {
if (ctx?.openMode !== 'page') {
if (!visible) {
if (ctx.formValueChanged) {
if (confirm && ctx.formValueChanged) {
AntdModal.confirm({
title: t('Unsaved changes'),
content: t("Are you sure you don't want to save?"),

View File

@ -1,6 +1,6 @@
{
"name": "create-nocobase-app",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "src/index.js",
"license": "Apache-2.0",
"licenses": [

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/database",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"description": "",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@ -17,7 +17,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/utils": "0.7.0-alpha.30",
"@nocobase/utils": "0.7.0-alpha.32",
"async-mutex": "^0.3.2",
"deepmerge": "^4.2.2",
"flat": "^5.0.2",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/resourcer",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"description": "",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/server",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
"license": "Apache-2.0",
@ -18,10 +18,10 @@
"dependencies": {
"@koa/cors": "^3.1.0",
"@koa/router": "^9.4.0",
"@nocobase/acl": "0.7.0-alpha.30",
"@nocobase/actions": "0.7.0-alpha.30",
"@nocobase/database": "0.7.0-alpha.30",
"@nocobase/resourcer": "0.7.0-alpha.30",
"@nocobase/acl": "0.7.0-alpha.32",
"@nocobase/actions": "0.7.0-alpha.32",
"@nocobase/database": "0.7.0-alpha.32",
"@nocobase/resourcer": "0.7.0-alpha.32",
"chalk": "^4.1.1",
"commander": "^8.1.0",
"dotenv": "^8.2.0",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/test",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
"license": "Apache-2.0",
@ -16,7 +16,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/server": "0.7.0-alpha.30",
"@nocobase/server": "0.7.0-alpha.32",
"@types/supertest": "^2.0.11",
"mockjs": "^1.1.0",
"mysql2": "^2.1.0",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/utils",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
"license": "Apache-2.0",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-acl",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -17,9 +17,9 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/acl": "0.7.0-alpha.30",
"@nocobase/database": "0.7.0-alpha.30",
"@nocobase/server": "0.7.0-alpha.30"
"@nocobase/acl": "0.7.0-alpha.32",
"@nocobase/database": "0.7.0-alpha.32",
"@nocobase/server": "0.7.0-alpha.32"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-logs",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-china-region",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -18,7 +18,7 @@
"china-division": "^2.4.0"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-client",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,10 +15,10 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/server": "0.7.0-alpha.30"
"@nocobase/server": "0.7.0-alpha.32"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-collection-manager",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-error-handler",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -18,7 +18,7 @@
},
"dependencies": {
"@formily/json-schema": "^2.0.15",
"@nocobase/server": "0.7.0-alpha.30"
"@nocobase/server": "0.7.0-alpha.32"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-file-manager",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -16,7 +16,7 @@
},
"dependencies": {
"@koa/multer": "^3.0.0",
"@nocobase/server": "0.7.0-alpha.30",
"@nocobase/server": "0.7.0-alpha.32",
"aws-sdk": "^2.2.32",
"koa-static": "^5.0.0",
"mime-match": "^1.0.2",
@ -26,7 +26,7 @@
"multer-s3": "^2.10.0"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30",
"@nocobase/test": "0.7.0-alpha.32",
"@types/koa-multer": "^1.0.1",
"@types/multer": "^1.4.5"
},

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-multi-app-manager",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/server": "0.7.0-alpha.30"
"@nocobase/server": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-notifications",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -18,7 +18,7 @@
"nodemailer": "^6.6.1"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30",
"@nocobase/test": "0.7.0-alpha.32",
"@types/nodemailer": "6.4.4",
"nodemailer-mock": "^1.5.11"
},

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-system-settings",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-ui-routes-storage",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -18,7 +18,7 @@
"flat-to-nested": "^1.1.1"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-ui-schema-storage",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -16,7 +16,7 @@
},
"devDependencies": {
"@formily/json-schema": "2.0.20",
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-users",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -18,7 +18,7 @@
"jsonwebtoken": "^8.5.1"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30",
"@nocobase/test": "0.7.0-alpha.32",
"@types/jsonwebtoken": "^8.5.8"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-workflow",
"version": "0.7.0-alpha.30",
"version": "0.7.0-alpha.32",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,14 +15,14 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/actions": "0.7.0-alpha.30",
"@nocobase/database": "0.7.0-alpha.30",
"@nocobase/server": "0.7.0-alpha.30",
"@nocobase/utils": "0.7.0-alpha.30",
"@nocobase/actions": "0.7.0-alpha.32",
"@nocobase/database": "0.7.0-alpha.32",
"@nocobase/server": "0.7.0-alpha.32",
"@nocobase/utils": "0.7.0-alpha.32",
"json-templates": "^4.2.0"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.30"
"@nocobase/test": "0.7.0-alpha.32"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}