refactor: migrate names (#1050)
Reviewed-on: daoyoucloud/tachybase#1050
This commit is contained in:
parent
95d2c2f1ee
commit
ccd799f85f
@ -6,10 +6,10 @@ DB_POSTGRES_PORT=10103
|
||||
VERDACCIO_PORT=10104
|
||||
# VERDACCIO_URL=http://host.docker.internal:10104/
|
||||
|
||||
################# NOCOBASE APPLICATION #################
|
||||
################# TACHYBASE APPLICATION #################
|
||||
|
||||
# !!! When `APP_ENV=production`, opening http://localhost:13000/ will show "Not Found".
|
||||
# !!! It is recommended to use nginx to proxy static files. For example https://github.com/nocobase/nocobase/blob/main/docker/nocobase/nocobase.conf
|
||||
# !!! It is recommended to use nginx to proxy static files. For example https://github.com/tachybase/tachybase/blob/main/docker/tachybase/tachybase.conf
|
||||
APP_ENV=development
|
||||
APP_PORT=20000
|
||||
APP_KEY=test-key-e2e
|
||||
@ -31,13 +31,13 @@ LOGGER_BASE_PATH=storage/e2e/logs
|
||||
################# DATABASE #################
|
||||
|
||||
DB_DIALECT=postgres
|
||||
DB_STORAGE=storage/e2e/db/nocobase.sqlite
|
||||
DB_STORAGE=storage/e2e/db/tachybase.sqlite
|
||||
DB_TABLE_PREFIX=
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_DATABASE=nocobase-e2e
|
||||
DB_USER=nocobase
|
||||
DB_PASSWORD=nocobase
|
||||
DB_DATABASE=tachybase-e2e
|
||||
DB_USER=tachybase
|
||||
DB_PASSWORD=tachybase
|
||||
# DB_LOGGING=on
|
||||
# DB_UNDERSCORED=false
|
||||
|
||||
@ -56,7 +56,7 @@ DB_PASSWORD=nocobase
|
||||
INIT_ROOT_EMAIL=admin@tachybase.com
|
||||
INIT_ROOT_PASSWORD=admin123
|
||||
INIT_ROOT_NICKNAME=Super Admin
|
||||
INIT_ROOT_USERNAME=nocobase
|
||||
INIT_ROOT_USERNAME=tachybase
|
||||
|
||||
# local or ali-oss
|
||||
DEFAULT_STORAGE_TYPE=local
|
||||
|
10
.env.example
10
.env.example
@ -6,10 +6,10 @@ DB_POSTGRES_PORT=10103
|
||||
VERDACCIO_PORT=10104
|
||||
# VERDACCIO_URL=http://host.docker.internal:10104/
|
||||
|
||||
################# NOCOBASE APPLICATION #################
|
||||
################# TACHYBASE APPLICATION #################
|
||||
|
||||
# !!! When `APP_ENV=production`, opening http://localhost:13000/ will show "Not Found".
|
||||
# !!! It is recommended to use nginx to proxy static files. For example https://github.com/nocobase/nocobase/blob/main/docker/nocobase/nocobase.conf
|
||||
# !!! It is recommended to use nginx to proxy static files. For example https://github.com/tachybase/tachybase/blob/main/docker/tachybase/tachybase.conf
|
||||
APP_ENV=development
|
||||
APP_PORT=13000
|
||||
APP_KEY=test-key
|
||||
@ -32,13 +32,13 @@ LOGGER_FORMAT=
|
||||
################# DATABASE #################
|
||||
|
||||
DB_DIALECT=sqlite
|
||||
DB_STORAGE=storage/db/nocobase.sqlite
|
||||
DB_STORAGE=storage/db/tachybase.sqlite
|
||||
DB_TABLE_PREFIX=
|
||||
# DB_HOST=localhost
|
||||
# DB_PORT=5432
|
||||
# DB_DATABASE=postgres
|
||||
# DB_USER=nocobase
|
||||
# DB_PASSWORD=nocobase
|
||||
# DB_USER=tachybase
|
||||
# DB_PASSWORD=tachybase
|
||||
# DB_LOGGING=on
|
||||
# DB_UNDERSCORED=false
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
################# NOCOBASE APPLICATION #################
|
||||
################# TACHYBASE APPLICATION #################
|
||||
|
||||
APP_ENV=development
|
||||
APP_PORT=13000
|
||||
@ -12,12 +12,12 @@ PROXY_TARGET_URL=
|
||||
################# DATABASE #################
|
||||
|
||||
DB_DIALECT=sqlite
|
||||
DB_STORAGE=storage/db/nocobase-test.sqlite
|
||||
DB_STORAGE=storage/db/tachybase-test.sqlite
|
||||
# DB_HOST=localhost
|
||||
# DB_PORT=5432
|
||||
# DB_DATABASE=nocobase-test
|
||||
# DB_USER=nocobase
|
||||
# DB_PASSWORD=nocobase
|
||||
# DB_DATABASE=tachybase-test
|
||||
# DB_USER=tachybase
|
||||
# DB_PASSWORD=tachybase
|
||||
# DB_LOGGING=on
|
||||
|
||||
################# CACHE #################
|
||||
@ -29,7 +29,7 @@ DB_STORAGE=storage/db/nocobase-test.sqlite
|
||||
INIT_ROOT_EMAIL=admin@tachybase.com
|
||||
INIT_ROOT_PASSWORD=admin123
|
||||
INIT_ROOT_NICKNAME=Super Admin
|
||||
INIT_ROOT_USERNAME=nocobase
|
||||
INIT_ROOT_USERNAME=tachybase
|
||||
|
||||
# local or ali-oss
|
||||
DEFAULT_STORAGE_TYPE=local
|
||||
|
22
Dockerfile
22
Dockerfile
@ -1,7 +1,7 @@
|
||||
FROM node:20-bullseye-slim as base
|
||||
RUN apt-get update && apt-get install -y nginx
|
||||
RUN rm -rf /etc/nginx/sites-enabled/default
|
||||
COPY ./docker/nocobase/nocobase.conf /etc/nginx/sites-enabled/nocobase.conf
|
||||
COPY ./docker/tachybase/tachybase.conf /etc/nginx/sites-enabled/tachybase.conf
|
||||
|
||||
FROM node:20-bullseye as build-template-app
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org/
|
||||
@ -12,25 +12,25 @@ ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
|
||||
WORKDIR /app
|
||||
RUN cd /app && npx --registry $NPM_REGISTRY create-tachybase-app@$TACHYBASE_VERSION my-nocobase-app -a -e APP_ENV=production
|
||||
RUN cd /app && npx --registry $NPM_REGISTRY create-tachybase-app@$TACHYBASE_VERSION my-tachybase-app -a -e APP_ENV=production
|
||||
RUN pnpm config set registry $NPM_REGISTRY
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store cd /app/my-nocobase-app && pnpm install --production
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store cd /app/my-tachybase-app && pnpm install --production
|
||||
|
||||
WORKDIR /app/my-nocobase-app
|
||||
WORKDIR /app/my-tachybase-app
|
||||
|
||||
RUN cd /app \
|
||||
&& rm -rf my-nocobase-app/packages/app/client/src/.umi \
|
||||
&& rm -rf nocobase.tar.gz \
|
||||
&& tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app .
|
||||
&& rm -rf my-tachybase-app/packages/app/client/src/.umi \
|
||||
&& rm -rf tachybase.tar.gz \
|
||||
&& tar -zcf ./tachybase.tar.gz -C /app/my-tachybase-app .
|
||||
|
||||
FROM base AS build-app
|
||||
COPY --from=build-template-app /app/nocobase.tar.gz /app/nocobase.tar.gz
|
||||
COPY --from=build-template-app /app/tachybase.tar.gz /app/tachybase.tar.gz
|
||||
|
||||
WORKDIR /app/nocobase
|
||||
WORKDIR /app/tachybase
|
||||
|
||||
RUN mkdir -p /app/nocobase/storage/uploads/ && echo "$COMMIT_HASH" >> /app/nocobase/storage/uploads/COMMIT_HASH
|
||||
RUN mkdir -p /app/tachybase/storage/uploads/ && echo "$COMMIT_HASH" >> /app/tachybase/storage/uploads/COMMIT_HASH
|
||||
|
||||
COPY ./docker/nocobase/docker-entrypoint.sh /app/
|
||||
COPY ./docker/tachybase/docker-entrypoint.sh /app/
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
TachyCode is a scalability-first, open-source no-code development platform.
|
||||
|
||||
It is based on the last Apache version fork of the open-source NocoBase.
|
||||
It is based on the last Apache version fork of the open-source TachyBase.
|
||||
|
@ -2,11 +2,6 @@
|
||||
"name": "@tachybase/actions",
|
||||
"version": "0.21.34",
|
||||
"description": "",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nocobase/nocobase.git",
|
||||
"directory": "packages/actions"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
@ -18,6 +13,5 @@
|
||||
"koa": "^2.13.4",
|
||||
"lodash": "4.17.21",
|
||||
"sequelize": "^6.26.0"
|
||||
},
|
||||
"gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1"
|
||||
}
|
||||
}
|
||||
|
@ -38,10 +38,10 @@ export default defineConfig({
|
||||
{
|
||||
content: isDevCmd ? '' : `
|
||||
window['__webpack_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
|
||||
window['__nocobase_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
|
||||
window['__nocobase_api_base_url__'] = '{{env.API_BASE_URL}}';
|
||||
window['__nocobase_ws_url__'] = '{{env.WS_URL}}';
|
||||
window['__nocobase_ws_path__'] = '{{env.WS_PATH}}';
|
||||
window['__tachybase_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
|
||||
window['__tachybase_api_base_url__'] = '{{env.API_BASE_URL}}';
|
||||
window['__tachybase_ws_url__'] = '{{env.WS_URL}}';
|
||||
window['__tachybase_ws_path__'] = '{{env.WS_PATH}}';
|
||||
`,
|
||||
},
|
||||
],
|
||||
@ -75,7 +75,7 @@ export default defineConfig({
|
||||
},
|
||||
chainWebpack(config, { env }) {
|
||||
if (env === 'production') {
|
||||
config.plugin('ignore nocobase plugins').use(require('webpack').IgnorePlugin, [
|
||||
config.plugin('ignore tachybase plugins').use(require('webpack').IgnorePlugin, [
|
||||
{
|
||||
resourceRegExp: new RegExp(pluginPrefix.join('|')),
|
||||
},
|
||||
|
@ -1,20 +1,21 @@
|
||||
import { Application } from '@tachybase/client';
|
||||
import { TachyBaseClientPresetPlugin } from '@tachybase/preset-tachybase/client';
|
||||
|
||||
import devDynamicImport from '../.plugins/index';
|
||||
|
||||
export const app = new Application({
|
||||
apiClient: {
|
||||
// @ts-ignore
|
||||
baseURL: window['__nocobase_api_base_url__'] || process.env.API_BASE_URL || '/api/',
|
||||
baseURL: window['__tachybase_api_base_url__'] || process.env.API_BASE_URL || '/api/',
|
||||
},
|
||||
// @ts-ignore
|
||||
publicPath: window['__nocobase_public_path__'] || process.env.APP_PUBLIC_PATH || '/',
|
||||
publicPath: window['__tachybase_public_path__'] || process.env.APP_PUBLIC_PATH || '/',
|
||||
plugins: [TachyBaseClientPresetPlugin],
|
||||
ws: {
|
||||
// @ts-ignore
|
||||
url: window['__nocobase_ws_url__'] || process.env.WEBSOCKET_URL || '',
|
||||
url: window['__tachybase_ws_url__'] || process.env.WEBSOCKET_URL || '',
|
||||
// @ts-ignore
|
||||
basename: window['__nocobase_ws_path__'] || process.env.WS_PATH || '/ws',
|
||||
basename: window['__tachybase_ws_path__'] || process.env.WS_PATH || '/ws',
|
||||
},
|
||||
loadRemotePlugins: true,
|
||||
devDynamicImport,
|
||||
|
@ -17,6 +17,5 @@
|
||||
"@tachybase/cache": "workspace:*",
|
||||
"@tachybase/client": "workspace:*",
|
||||
"@tachybase/logger": "workspace:*"
|
||||
},
|
||||
"gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1"
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { resolve } from 'path';
|
||||
import { mockDatabase } from '@tachybase/database';
|
||||
import { uid } from '@tachybase/utils';
|
||||
|
||||
import axios from 'axios';
|
||||
import execa from 'execa';
|
||||
import { resolve } from 'path';
|
||||
import { getPortPromise } from 'portfinder';
|
||||
|
||||
const delay = (timeout) => {
|
||||
@ -53,7 +54,7 @@ const run = (command, args, options) => {
|
||||
|
||||
const createDatabase = async () => {
|
||||
if (process.env.DB_DIALECT === 'sqlite') {
|
||||
return 'nocobase';
|
||||
return 'tachybase';
|
||||
}
|
||||
const db = mockDatabase();
|
||||
const name = `d_${uid()}`;
|
||||
@ -69,7 +70,7 @@ describe.skip('cli', () => {
|
||||
port: 13000,
|
||||
});
|
||||
console.log(process.env.DB_DIALECT, port);
|
||||
const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`;
|
||||
const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`;
|
||||
const env = {
|
||||
...process.env,
|
||||
APP_PORT: `${port}`,
|
||||
@ -78,15 +79,15 @@ describe.skip('cli', () => {
|
||||
SOCKET_PATH: `storage/tests/gateway-e2e-${uid()}.sock`,
|
||||
PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`),
|
||||
};
|
||||
const subprocess1 = await execa('pnpm', ['nocobase', 'install'], {
|
||||
const subprocess1 = await execa('pnpm', ['tachybase', 'install'], {
|
||||
env,
|
||||
});
|
||||
expect(subprocess1.stdout.includes('app installed successfully')).toBeTruthy();
|
||||
const subprocess2 = await execa('pnpm', ['nocobase', 'install'], {
|
||||
const subprocess2 = await execa('pnpm', ['tachybase', 'install'], {
|
||||
env,
|
||||
});
|
||||
expect(subprocess2.stdout.includes('app is installed')).toBeTruthy();
|
||||
const subprocess3 = await execa('pnpm', ['nocobase', 'install', '-f'], {
|
||||
const subprocess3 = await execa('pnpm', ['tachybase', 'install', '-f'], {
|
||||
env,
|
||||
});
|
||||
expect(subprocess3.stdout.includes('app reinstalled successfully')).toBeTruthy();
|
||||
@ -98,7 +99,7 @@ describe.skip('cli', () => {
|
||||
const port = await getPortPromise({
|
||||
port: 13000,
|
||||
});
|
||||
const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`;
|
||||
const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`;
|
||||
const env = {
|
||||
...process.env,
|
||||
APP_PORT: `${port}`,
|
||||
@ -107,13 +108,13 @@ describe.skip('cli', () => {
|
||||
SOCKET_PATH: `storage/tests/gateway-e2e-${uid()}.sock`,
|
||||
PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`),
|
||||
};
|
||||
const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server'], {
|
||||
const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server'], {
|
||||
env,
|
||||
});
|
||||
const code = await checkServer(port);
|
||||
console.log(code);
|
||||
expect(code).toBe('APP_NOT_INSTALLED_ERROR');
|
||||
execa('pnpm', ['nocobase', 'install'], {
|
||||
execa('pnpm', ['tachybase', 'install'], {
|
||||
env,
|
||||
});
|
||||
await delay(5000);
|
||||
@ -128,7 +129,7 @@ describe.skip('cli', () => {
|
||||
const port = await getPortPromise({
|
||||
port: 13000,
|
||||
});
|
||||
const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`;
|
||||
const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`;
|
||||
const env = {
|
||||
...process.env,
|
||||
APP_PORT: `${port}`,
|
||||
@ -137,10 +138,10 @@ describe.skip('cli', () => {
|
||||
SOCKET_PATH: `storage/tests/gateway-e2e-${uid()}.sock`,
|
||||
PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`),
|
||||
};
|
||||
await execa('pnpm', ['nocobase', 'install'], {
|
||||
await execa('pnpm', ['tachybase', 'install'], {
|
||||
env,
|
||||
});
|
||||
const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server'], {
|
||||
const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server'], {
|
||||
env,
|
||||
});
|
||||
const code = await checkServer(port);
|
||||
@ -154,7 +155,7 @@ describe.skip('cli', () => {
|
||||
const port = await getPortPromise({
|
||||
port: 13000,
|
||||
});
|
||||
const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`;
|
||||
const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`;
|
||||
const env = {
|
||||
...process.env,
|
||||
APP_PORT: `${port}`,
|
||||
@ -164,13 +165,13 @@ describe.skip('cli', () => {
|
||||
PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`),
|
||||
};
|
||||
console.log('DB_STORAGE:', dbFile);
|
||||
const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server', '--quickstart'], {
|
||||
const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server', '--quickstart'], {
|
||||
env,
|
||||
});
|
||||
const code = await checkServer(port);
|
||||
expect(code).toBe(true);
|
||||
subprocess1.cancel();
|
||||
const subprocess2 = execa('pnpm', ['nocobase', 'dev', '--server', '--quickstart'], {
|
||||
const subprocess2 = execa('pnpm', ['tachybase', 'dev', '--server', '--quickstart'], {
|
||||
env,
|
||||
});
|
||||
const code2 = await checkServer(port);
|
||||
@ -184,7 +185,7 @@ describe.skip('cli', () => {
|
||||
const port = await getPortPromise({
|
||||
port: 13000,
|
||||
});
|
||||
const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`;
|
||||
const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`;
|
||||
const env = {
|
||||
...process.env,
|
||||
APP_PORT: `${port}`,
|
||||
@ -194,13 +195,13 @@ describe.skip('cli', () => {
|
||||
PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`),
|
||||
};
|
||||
console.log('DB_STORAGE:', dbFile);
|
||||
await execa('pnpm', ['nocobase', 'install'], {
|
||||
await execa('pnpm', ['tachybase', 'install'], {
|
||||
env,
|
||||
});
|
||||
const subprocess2 = await execa('pnpm', ['nocobase', 'upgrade'], {
|
||||
const subprocess2 = await execa('pnpm', ['tachybase', 'upgrade'], {
|
||||
env,
|
||||
});
|
||||
expect(subprocess2.stdout.includes('NocoBase has been upgraded')).toBe(true);
|
||||
expect(subprocess2.stdout.includes('TachyBase has been upgraded')).toBe(true);
|
||||
});
|
||||
|
||||
test('quickstart + upgrade', async () => {
|
||||
@ -209,7 +210,7 @@ describe.skip('cli', () => {
|
||||
const port = await getPortPromise({
|
||||
port: 13000,
|
||||
});
|
||||
const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`;
|
||||
const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`;
|
||||
const env = {
|
||||
...process.env,
|
||||
APP_PORT: `${port}`,
|
||||
@ -219,12 +220,12 @@ describe.skip('cli', () => {
|
||||
PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`),
|
||||
};
|
||||
console.log('DB_STORAGE:', dbFile);
|
||||
const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server', '--quickstart'], {
|
||||
const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server', '--quickstart'], {
|
||||
env,
|
||||
});
|
||||
const code = await checkServer(port);
|
||||
expect(code).toBe(true);
|
||||
await execa('pnpm', ['nocobase', 'upgrade'], {
|
||||
await execa('pnpm', ['tachybase', 'upgrade'], {
|
||||
env,
|
||||
});
|
||||
await delay(5000);
|
||||
|
@ -2,11 +2,6 @@
|
||||
"name": "@tachybase/auth",
|
||||
"version": "0.21.34",
|
||||
"description": "",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nocobase/nocobase.git",
|
||||
"directory": "packages/auth"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
@ -18,6 +13,5 @@
|
||||
"@tachybase/utils": "workspace:*",
|
||||
"@types/jsonwebtoken": "^8.5.8",
|
||||
"jsonwebtoken": "^8.5.1"
|
||||
},
|
||||
"gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1"
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
"types": "./lib/index.d.ts",
|
||||
"typings": "./index.d.ts",
|
||||
"bin": {
|
||||
"nocobase-build": "./bin/nocobase-build.js"
|
||||
"tachybase-build": "./bin/tachybase-build.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
@ -40,6 +40,5 @@
|
||||
"vite-plugin-css-injected-by-js": "^3.2.1",
|
||||
"vite-plugin-lib-inject-css": "1.2.0",
|
||||
"yargs-parser": "13.1.2"
|
||||
},
|
||||
"gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1"
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ const clientGlobalFiles: string[] = ['src/**', '!src/server/**', ...globExcludeF
|
||||
const sourceGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx,mjs}', '!src/**/__tests__'];
|
||||
|
||||
const external = [
|
||||
// nocobase
|
||||
// tachybase
|
||||
'@tachybase/acl',
|
||||
'@tachybase/actions',
|
||||
'@tachybase/auth',
|
||||
@ -187,7 +187,7 @@ export async function buildServerDeps(cwd: string, serverFiles: string[], log: P
|
||||
if (excludePackages.length) {
|
||||
tips.push(`These packages ${chalk.yellow(excludePackages.join(', '))} will be ${chalk.italic('exclude')}.`);
|
||||
}
|
||||
tips.push(`For more information, please refer to: ${chalk.blue('https://docs.nocobase.com/development/deps')}.`);
|
||||
tips.push(`For more information, please refer to: ${chalk.blue('https://docs.tachybase.com/development/deps')}.`);
|
||||
log(tips.join(' '));
|
||||
|
||||
if (!includePackages.length) return;
|
||||
|
@ -103,7 +103,7 @@ export function checkDependencies(packageJson: Record<string, any>, log: Log) {
|
||||
chalk.yellow(packages.join(', ')),
|
||||
chalk.yellow('dependencies'),
|
||||
chalk.yellow('devDependencies'),
|
||||
chalk.blue(chalk.blue('https://docs.nocobase.com/development/deps')),
|
||||
chalk.blue(chalk.blue('https://docs.tachybase.com/development/deps')),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ export function getUserConfig(cwd: string) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const CACHE_DIR = path.join(NODE_MODULES, '.cache', 'nocobase');
|
||||
const CACHE_DIR = path.join(NODE_MODULES, '.cache', 'tachybase');
|
||||
export function writeToCache(key: string, data: Record<string, any>) {
|
||||
const cachePath = path.join(CACHE_DIR, `${key}.json`);
|
||||
fs.ensureDirSync(path.dirname(cachePath));
|
||||
|
3
packages/core/cache/package.json
vendored
3
packages/core/cache/package.json
vendored
@ -14,6 +14,5 @@
|
||||
"deepmerge": "^4.2.2",
|
||||
"lodash": "4.17.21",
|
||||
"redis": "^4.6.10"
|
||||
},
|
||||
"gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1"
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
"bin",
|
||||
"dist",
|
||||
"templates",
|
||||
"nocobase.conf.tpl"
|
||||
"tachybase.conf.tpl"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rimraf dist && rollup -c",
|
||||
|
@ -27,7 +27,7 @@ export default (cli: Command) => {
|
||||
}
|
||||
process.env['VITE_CJS_IGNORE_WARNING'] = 'true';
|
||||
|
||||
await run('nocobase-build', [
|
||||
await run('tachybase-build', [
|
||||
...pkgs,
|
||||
options.version ? '--version' : '',
|
||||
!options.dts ? '--no-dts' : '',
|
||||
|
@ -7,14 +7,14 @@ const __dirname = new URL('.', import.meta.url).pathname;
|
||||
|
||||
export default (cli: Command) => {
|
||||
cli.command('create-nginx-conf').action(async (name, options) => {
|
||||
const file = resolve(__dirname, '../../nocobase.conf.tpl');
|
||||
const file = resolve(__dirname, '../../tachybase.conf.tpl');
|
||||
const data = readFileSync(file, 'utf-8');
|
||||
const replaced = data
|
||||
.replace(/\{\{cwd\}\}/g, '/app/nocobase')
|
||||
.replace(/\{\{cwd\}\}/g, '/app/tachybase')
|
||||
.replace(/\{\{publicPath\}\}/g, process.env.APP_PUBLIC_PATH!)
|
||||
.replace(/\{\{apiPort\}\}/g, process.env.APP_PORT!);
|
||||
|
||||
const targetFile = resolve(process.cwd(), 'storage', 'nocobase.conf');
|
||||
const targetFile = resolve(process.cwd(), 'storage', 'tachybase.conf');
|
||||
writeFileSync(targetFile, replaced);
|
||||
});
|
||||
};
|
||||
|
@ -18,6 +18,6 @@ export default (cli: Command) => {
|
||||
});
|
||||
if (options.watch) return;
|
||||
}
|
||||
await run('nocobase-build', [...pkgs, '--only-tar', options.version ? '--version' : '']);
|
||||
await run('tachybase-build', [...pkgs, '--only-tar', options.version ? '--version' : '']);
|
||||
});
|
||||
};
|
||||
|
@ -40,7 +40,7 @@ export class PluginGenerator extends Generator {
|
||||
...this.context,
|
||||
packageName: name,
|
||||
packageVersion,
|
||||
nocobaseVersion: "0.0.1",
|
||||
tachybaseVersion: "0.0.1",
|
||||
pascalCaseName: capitalize(camelize(name.split('/').pop())),
|
||||
};
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ export function initEnv() {
|
||||
APP_PORT: 13000,
|
||||
API_BASE_PATH: '/api/',
|
||||
DB_DIALECT: 'sqlite',
|
||||
DB_STORAGE: 'storage/db/nocobase.sqlite',
|
||||
DB_STORAGE: 'storage/db/tachybase.sqlite',
|
||||
DB_TIMEZONE: '+00:00',
|
||||
DB_UNDERSCORED: parseEnv('DB_UNDERSCORED'),
|
||||
DEFAULT_STORAGE_TYPE: 'local',
|
||||
|
@ -18,7 +18,7 @@ server {
|
||||
root {{cwd}}/node_modules/@tachybase/app/dist/client;
|
||||
index index.html;
|
||||
client_max_body_size 1000M;
|
||||
access_log /var/log/nginx/nocobase.log apm;
|
||||
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;
|
@ -74,6 +74,5 @@
|
||||
"react": ">=18.0.0",
|
||||
"react-dom": ">=18.0.0",
|
||||
"react-is": ">=18.0.0"
|
||||
},
|
||||
"gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1"
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ const apiClient = new APIClient(instance);
|
||||
// 常规请求
|
||||
const response = await apiClient.request({ url });
|
||||
|
||||
// NocoBase 特有的资源操作
|
||||
// TachyBase 特有的资源操作
|
||||
const response = await apiClient.resource('posts').list();
|
||||
|
||||
// 请求共享
|
||||
@ -100,7 +100,7 @@ run({
|
||||
|
||||
<code src="./demos/demo2.tsx"></code>
|
||||
|
||||
或者是 NocoBase 的 resource & action 请求:
|
||||
或者是 TachyBase 的 resource & action 请求:
|
||||
|
||||
```ts
|
||||
const { data, run } = useRequest({
|
||||
@ -137,7 +137,7 @@ run(...params);
|
||||
function useResource(name: string, of?: string | number): IResource;
|
||||
```
|
||||
|
||||
资源是 NocoBase 的核心概念,包括:
|
||||
资源是 TachyBase 的核心概念,包括:
|
||||
|
||||
- 独立资源,如 `posts`
|
||||
- 关系资源,如 `posts.tags` `posts.user` `posts.comments`
|
||||
|
@ -1,13 +1,15 @@
|
||||
import { useLocalStorageState } from 'ahooks';
|
||||
import React from 'react';
|
||||
|
||||
import { useLocalStorageState } from 'ahooks';
|
||||
|
||||
import { SchemaComponentProvider } from '../schema-component/core';
|
||||
import { ISchemaComponentProvider } from '../schema-component/types';
|
||||
|
||||
const getKeyByName = (name) => {
|
||||
if (!name) {
|
||||
return 'nocobase_designable'.toUpperCase();
|
||||
return 'tachybase_designable'.toUpperCase();
|
||||
}
|
||||
return `nocobase_${name}_designable`.toUpperCase();
|
||||
return `tachybase_${name}_designable`.toUpperCase();
|
||||
};
|
||||
|
||||
const SchemaComponentProviderWithLocalStorageState: React.FC<ISchemaComponentProvider & { appName?: string }> = (
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { define, observable } from '@tachybase/schema';
|
||||
import { getSubAppName } from '@tachybase/sdk';
|
||||
|
||||
import { Application } from './Application';
|
||||
|
||||
export type WebSocketClientOptions = {
|
||||
@ -89,7 +90,7 @@ export class WebSocketClient {
|
||||
return;
|
||||
}
|
||||
if (this._reconnectTimes === 0) {
|
||||
console.log('[nocobase-ws]: connecting...');
|
||||
console.log('[tachybase-ws]: connecting...');
|
||||
}
|
||||
if (this._reconnectTimes >= this.reconnectAttempts) {
|
||||
return;
|
||||
@ -101,7 +102,7 @@ export class WebSocketClient {
|
||||
const ws = new WebSocket(this.getURL(), this.options.protocols);
|
||||
let pingIntervalTimer: any;
|
||||
ws.onopen = () => {
|
||||
console.log('[nocobase-ws]: connected.');
|
||||
console.log('[tachybase-ws]: connected.');
|
||||
this.serverDown = false;
|
||||
if (this._ws) {
|
||||
this.removeAllListeners();
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Application, Plugin } from '@tachybase/client';
|
||||
import React, { FC } from 'react';
|
||||
import { Application, Plugin } from '@tachybase/client';
|
||||
|
||||
import { Link, Outlet, useLocation } from 'react-router-dom';
|
||||
|
||||
const Root = () => {
|
||||
@ -52,7 +53,7 @@ class Test2Plugin extends Plugin {
|
||||
}
|
||||
}
|
||||
|
||||
class NocobasePresetPlugin extends Plugin {
|
||||
class TachybasePresetPlugin extends Plugin {
|
||||
async afterAdd() {
|
||||
// mock load remote plugin
|
||||
await this.addRemotePlugin();
|
||||
@ -82,7 +83,7 @@ const app = new Application({
|
||||
router: {
|
||||
type: 'hash',
|
||||
},
|
||||
plugins: [NocobasePresetPlugin],
|
||||
plugins: [TachybasePresetPlugin],
|
||||
components: { Root, Home, Team, About },
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Application, Plugin, RouterManager, useApp } from '@tachybase/client';
|
||||
import React, { useMemo } from 'react';
|
||||
import { Application, Plugin, RouterManager, useApp } from '@tachybase/client';
|
||||
|
||||
import { Link, Navigate, Outlet, useParams } from 'react-router-dom';
|
||||
|
||||
const Root = () => {
|
||||
@ -67,7 +68,7 @@ const AdminSetting = () => {
|
||||
);
|
||||
};
|
||||
|
||||
class NocobasePresetPlugin extends Plugin {
|
||||
class TachybasePresetPlugin extends Plugin {
|
||||
async load() {
|
||||
this.router.add('root', {
|
||||
path: '/',
|
||||
@ -90,7 +91,7 @@ class NocobasePresetPlugin extends Plugin {
|
||||
|
||||
const app = new Application({
|
||||
router: { type: 'hash' },
|
||||
plugins: [NocobasePresetPlugin],
|
||||
plugins: [TachybasePresetPlugin],
|
||||
});
|
||||
|
||||
export default app.getRootComponent();
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Application, NocoBaseBuildInPlugin } from '@tachybase/client';
|
||||
import { Application, BuildinPlugin } from '@tachybase/client';
|
||||
|
||||
export const app = new Application({
|
||||
apiClient: {
|
||||
baseURL: process.env.API_BASE_URL,
|
||||
},
|
||||
plugins: [NocoBaseBuildInPlugin],
|
||||
plugins: [BuildinPlugin],
|
||||
});
|
||||
|
||||
export default app.getRootComponent();
|
||||
|
@ -6,7 +6,7 @@ group:
|
||||
|
||||
# Application V2
|
||||
|
||||
<img src="https://nocobase.oss-cn-beijing.aliyuncs.com/5be7ebc2f47effef85be7a0c75cf76f9.png" style="max-width: 800px;" />
|
||||
<img src="https://tachybase.oss-cn-beijing.aliyuncs.com/5be7ebc2f47effef85be7a0c75cf76f9.png" style="max-width: 800px;" />
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { ButtonProps } from 'antd';
|
||||
import React, { FC, ReactNode, useCallback, useMemo } from 'react';
|
||||
|
||||
import { ButtonProps } from 'antd';
|
||||
|
||||
import { useCompile } from '../../../schema-component';
|
||||
import { useApp } from '../../hooks';
|
||||
import { SchemaInitializerChild, SchemaInitializerItems } from '../components';
|
||||
@ -148,7 +150,7 @@ export function useSchemaInitializerRender<P1 = ButtonProps, P2 = {}>(
|
||||
}
|
||||
|
||||
if (!initializer) {
|
||||
console.error(`[nocobase]: SchemaInitializer "${name}" not found`);
|
||||
console.error(`[tachybase]: SchemaInitializer "${name}" not found`);
|
||||
return {
|
||||
exists: false,
|
||||
render: () => null,
|
||||
|
@ -1,13 +1,12 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useApp } from '../../hooks';
|
||||
import { SchemaSettingOptions } from '../types';
|
||||
import React from 'react';
|
||||
import { SchemaSettingsWrapper } from '../components';
|
||||
import { SchemaSettingsProps } from '../../../schema-settings';
|
||||
import { Schema } from '@tachybase/schema';
|
||||
import { GeneralField } from '@tachybase/schema';
|
||||
import React, { useMemo } from 'react';
|
||||
import { GeneralField, Schema } from '@tachybase/schema';
|
||||
|
||||
import { Designable } from '../../../schema-component';
|
||||
import { SchemaSettingsProps } from '../../../schema-settings';
|
||||
import { useApp } from '../../hooks';
|
||||
import { SchemaSettingsWrapper } from '../components';
|
||||
import { defaultSettingItems } from '../SchemaSettingsDefaults';
|
||||
import { SchemaSettingOptions } from '../types';
|
||||
|
||||
type UseSchemaSettingsRenderOptions<T = {}> = Omit<SchemaSettingOptions<T>, 'name' | 'items'> &
|
||||
Omit<SchemaSettingsProps, 'title' | 'children'> & {
|
||||
@ -28,7 +27,7 @@ export function useSchemaSettingsRender<T = {}>(name: string, options?: UseSchem
|
||||
}
|
||||
|
||||
if (!schemaSetting) {
|
||||
console.error(`[nocobase]: SchemaSettings "${name}" not found`);
|
||||
console.error(`[tachybase]: SchemaSettings "${name}" not found`);
|
||||
return {
|
||||
exists: false,
|
||||
render: () => null,
|
||||
|
@ -1,11 +1,6 @@
|
||||
import * as antdCssinjs from '@ant-design/cssinjs';
|
||||
import * as antdIcons from '@ant-design/icons';
|
||||
import * as dndKitAccessibility from '@dnd-kit/accessibility';
|
||||
import * as dndKitCore from '@dnd-kit/core';
|
||||
import * as dndKitModifiers from '@dnd-kit/modifiers';
|
||||
import * as dndKitSortable from '@dnd-kit/sortable';
|
||||
import * as dndKitUtilities from '@dnd-kit/utilities';
|
||||
import * as emotionCss from '@emotion/css';
|
||||
import React from 'react';
|
||||
import * as tachybaseComponents from '@tachybase/components';
|
||||
import * as tachybaseEvaluators from '@tachybase/evaluators/client';
|
||||
import * as formilyCore from '@tachybase/schema';
|
||||
import * as formilyJsonSchema from '@tachybase/schema';
|
||||
import * as formilyPath from '@tachybase/schema';
|
||||
@ -14,26 +9,32 @@ 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 '@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 * as tachybaseSchema from '@tachybase/schema';
|
||||
import * as tachybaseSDK from '@tachybase/sdk';
|
||||
import * as tachybaseClientUtils from '@tachybase/utils/client';
|
||||
import { dayjs } from '@tachybase/utils/client';
|
||||
|
||||
import * as antdCssinjs from '@ant-design/cssinjs';
|
||||
import * as antdIcons from '@ant-design/icons';
|
||||
import * as dndKitAccessibility from '@dnd-kit/accessibility';
|
||||
import * as dndKitCore from '@dnd-kit/core';
|
||||
import * as dndKitModifiers from '@dnd-kit/modifiers';
|
||||
import * as dndKitSortable from '@dnd-kit/sortable';
|
||||
import * as dndKitUtilities from '@dnd-kit/utilities';
|
||||
import * as emotionCss from '@emotion/css';
|
||||
import * as ahooks from 'ahooks';
|
||||
import * as antd from 'antd';
|
||||
import * as antdStyle from 'antd-style';
|
||||
import axios from 'axios';
|
||||
import * as i18next from 'i18next';
|
||||
import lodash from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import * as reactI18next from 'react-i18next';
|
||||
import * as ReactRouter from 'react-router';
|
||||
import * as ReactRouterDom from 'react-router-dom';
|
||||
import jsxRuntime from 'react/jsx-runtime';
|
||||
import * as nocobaseClient from '../../index';
|
||||
|
||||
import * as tachybaseClient from '../../index';
|
||||
import type { RequireJS } from './requirejs';
|
||||
|
||||
/**
|
||||
@ -69,16 +70,16 @@ export function defineGlobalDeps(requirejs: RequireJS) {
|
||||
requirejs.define('@formily/validator', () => formilyValidator);
|
||||
requirejs.define('@formily/reactive-react', () => formilyReactiveReact);
|
||||
|
||||
// nocobase
|
||||
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);
|
||||
// tachybase
|
||||
requirejs.define('@tachybase/utils', () => tachybaseClientUtils);
|
||||
requirejs.define('@tachybase/utils/client', () => tachybaseClientUtils);
|
||||
requirejs.define('@tachybase/client', () => tachybaseClient);
|
||||
requirejs.define('@tachybase/client/client', () => tachybaseClient);
|
||||
requirejs.define('@tachybase/evaluators', () => tachybaseEvaluators);
|
||||
requirejs.define('@tachybase/evaluators/client', () => tachybaseEvaluators);
|
||||
requirejs.define('@tachybase/sdk', () => tachybaseSDK);
|
||||
requirejs.define('@tachybase/schema', () => tachybaseSchema);
|
||||
requirejs.define('@tachybase/components', () => tachybaseComponents);
|
||||
|
||||
// dnd-kit 相关
|
||||
requirejs.define('@dnd-kit/accessibility', () => dndKitAccessibility);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { DevDynamicImport } from '../Application';
|
||||
import type { Plugin } from '../Plugin';
|
||||
import type { PluginData } from '../PluginManager';
|
||||
import type { RequireJS } from './requirejs';
|
||||
import type { DevDynamicImport } from '../Application';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -63,7 +63,7 @@ export function processRemotePlugins(pluginData: PluginData[], resolve: (plugins
|
||||
|
||||
if (emptyPlugins.length > 0) {
|
||||
console.error(
|
||||
'[nocobase load plugin error]: These plugins do not have an `export.default` exported content or there is an error in the plugins. error plugins: \r\n%s',
|
||||
'[tachybase load plugin error]: These plugins do not have an `export.default` exported content or there is an error in the plugins. error plugins: \r\n%s',
|
||||
emptyPlugins.join(', \r\n'),
|
||||
);
|
||||
}
|
||||
|
@ -1313,7 +1313,7 @@ function getTargetField(obj) {
|
||||
|
||||
/**
|
||||
* 之所以不直接使用 form.reset() 是因为其无法将子表格重置为空
|
||||
* 主要用于修复这个问题:https://nocobase.height.app/T-3106
|
||||
* 主要用于修复这个问题:https://tachybase.height.app/T-3106
|
||||
* @param form
|
||||
*/
|
||||
async function resetFormCorrectly(form: Form) {
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
* 是需要从 recordData 还是 parentRecordData 中获取;解决方法是通过更改 schema,在不同类型的关系区块中
|
||||
* (`通过点击关系字段按钮打开的弹窗中创建的非关系字段区块`和`关系字段区块`)使用不同的 hook。
|
||||
*
|
||||
* 更新:上面所说的“需要更改 schema 才能解决的问题”已在这个任务中更改:https://nocobase.height.app/T-3848/description
|
||||
* 更新:上面所说的“需要更改 schema 才能解决的问题”已在这个任务中更改:https://tachybase.height.app/T-3848/description
|
||||
*
|
||||
* @param param0
|
||||
* @returns
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { observer } from '@tachybase/schema';
|
||||
import { getSubAppName } from '@tachybase/sdk';
|
||||
|
||||
@ -26,6 +26,11 @@ import { SystemSettingsPlugin } from '../system-settings';
|
||||
import { CurrentUserProvider, CurrentUserSettingsMenuProvider } from '../user';
|
||||
import { LocalePlugin } from './plugins/LocalePlugin';
|
||||
|
||||
interface AppStatusProps {
|
||||
error: Error;
|
||||
app: Application;
|
||||
}
|
||||
|
||||
const AppSpin = () => {
|
||||
return (
|
||||
<Spin style={{ position: 'fixed', top: '50%', left: '50%', fontSize: 72, transform: 'translate(-50%, -50%)' }} />
|
||||
@ -78,8 +83,8 @@ const useErrorProps = (app: Application, error: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
const AppError: FC<{ error: Error; app: Application }> = observer(
|
||||
({ app, error }) => {
|
||||
const AppError = observer(
|
||||
({ app, error }: AppStatusProps) => {
|
||||
const props = useErrorProps(app, error);
|
||||
const { styles } = useStyles();
|
||||
return (
|
||||
@ -207,8 +212,8 @@ const getProps = (app: Application) => {
|
||||
return {};
|
||||
};
|
||||
|
||||
const AppMaintaining: FC<{ app: Application; error: Error }> = observer(
|
||||
({ app }) => {
|
||||
const AppMaintaining = observer(
|
||||
({ app }: AppStatusProps) => {
|
||||
const { icon, status, title, subTitle } = getProps(app);
|
||||
const { styles } = useStyles();
|
||||
return (
|
||||
@ -231,8 +236,8 @@ const AppMaintaining: FC<{ app: Application; error: Error }> = observer(
|
||||
{ displayName: 'AppMaintaining' },
|
||||
);
|
||||
|
||||
const AppMaintainingDialog: FC<{ app: Application; error: Error }> = observer(
|
||||
({ app }) => {
|
||||
const AppMaintainingDialog = observer(
|
||||
({ app }: AppStatusProps) => {
|
||||
const { icon, status, title, subTitle } = getProps(app);
|
||||
return (
|
||||
<Modal open={true} footer={null} closable={false}>
|
||||
@ -259,7 +264,7 @@ const AppNotFound = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export class NocoBaseBuildInPlugin extends Plugin {
|
||||
export class BuildinPlugin extends Plugin {
|
||||
async afterAdd() {
|
||||
this.app.addComponents({
|
||||
AppSpin,
|
@ -1,6 +1,8 @@
|
||||
import { setValidateLanguage } from '@tachybase/schema';
|
||||
|
||||
import { App, ConfigProvider } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { loadConstrueLocale } from '../../antd-config-provider/loadConstrueLocale';
|
||||
import { Plugin } from '../../application/Plugin';
|
||||
import { dayjsLocale } from '../../locale';
|
@ -1,10 +1,12 @@
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import { useField, useForm } from '@tachybase/schema';
|
||||
|
||||
import { message } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import omit from 'lodash/omit';
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useCollection_deprecated, useCollectionManager_deprecated } from '.';
|
||||
import { useRequest } from '../api-client';
|
||||
import { useRecord } from '../record-provider';
|
||||
@ -585,7 +587,7 @@ export const useFilterActionProps = () => {
|
||||
const options = useFilterFieldOptions(collection.fields);
|
||||
const service = useResourceActionContext();
|
||||
return useFilterFieldProps({
|
||||
// 目前仅需要支持筛选 title 和 name,其它字段可能会报错。详见:https://nocobase.height.app/T-2745
|
||||
// 目前仅需要支持筛选 title 和 name,其它字段可能会报错。详见:https://tachybase.height.app/T-2745
|
||||
options: options.filter((option) => ['title', 'name'].includes(option.name)),
|
||||
params: service.state?.params?.[0] || service.params,
|
||||
service,
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { TinyColor } from '@ctrl/tinycolor';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
|
||||
import { TinyColor } from '@ctrl/tinycolor';
|
||||
|
||||
import { defaultTheme } from '../global-theme';
|
||||
import { useToken } from '../style';
|
||||
|
||||
@ -20,11 +22,11 @@ export const CSSVariableProvider = ({ children }) => {
|
||||
}, [token.colorBgElevated]);
|
||||
|
||||
useEffect(() => {
|
||||
document.body.style.setProperty('--nb-spacing', `${token.marginLG}px`);
|
||||
document.body.style.setProperty('--nb-designer-offset', `${token.marginXS}px`);
|
||||
document.body.style.setProperty('--nb-header-height', `${token.sizeXXL - 2}px`);
|
||||
document.body.style.setProperty('--nb-box-bg', token.colorBgLayout);
|
||||
document.body.style.setProperty('--nb-box-bg', token.colorBgLayout);
|
||||
document.body.style.setProperty('--tb-spacing', `${token.marginLG}px`);
|
||||
document.body.style.setProperty('--tb-designer-offset', `${token.marginXS}px`);
|
||||
document.body.style.setProperty('--tb-header-height', `${token.sizeXXL - 2}px`);
|
||||
document.body.style.setProperty('--tb-box-bg', token.colorBgLayout);
|
||||
document.body.style.setProperty('--tb-box-bg', token.colorBgLayout);
|
||||
document.body.style.setProperty('--controlHeightLG', `${token.controlHeightLG}px`);
|
||||
document.body.style.setProperty('--paddingContentVerticalSM', `${token.paddingContentVerticalSM}px`);
|
||||
document.body.style.setProperty('--marginSM', `${token.marginSM}px`);
|
||||
|
@ -1,13 +1,14 @@
|
||||
import { useDeepCompareEffect, useUpdateEffect } from 'ahooks';
|
||||
import React, { FC, createContext, useContext, useMemo } from 'react';
|
||||
import React, { createContext, FC, useContext, useMemo } from 'react';
|
||||
|
||||
import { UseRequestResult, useAPIClient, useRequest } from '../../api-client';
|
||||
import { CollectionRecordProvider, CollectionRecord } from '../collection-record';
|
||||
import { AllDataBlockProps, useDataBlockProps } from './DataBlockProvider';
|
||||
import { useDataBlockResource } from './DataBlockResourceProvider';
|
||||
import { useDataSourceHeaders } from '../utils';
|
||||
import { useDeepCompareEffect, useUpdateEffect } from 'ahooks';
|
||||
|
||||
import { useAPIClient, useRequest, UseRequestResult } from '../../api-client';
|
||||
import { useDataLoadingMode } from '../../modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem';
|
||||
import { useSourceKey } from '../../modules/blocks/useSourceKey';
|
||||
import { CollectionRecord, CollectionRecordProvider } from '../collection-record';
|
||||
import { useDataSourceHeaders } from '../utils';
|
||||
import { AllDataBlockProps, useDataBlockProps } from './DataBlockProvider';
|
||||
import { useDataBlockResource } from './DataBlockResourceProvider';
|
||||
|
||||
export const BlockRequestContext = createContext<UseRequestResult<any>>(null);
|
||||
BlockRequestContext.displayName = 'BlockRequestContext';
|
||||
@ -26,7 +27,7 @@ function useCurrentRequest<T>(options: Omit<AllDataBlockProps, 'type'>) {
|
||||
if (record) return Promise.resolve({ data: record });
|
||||
if (!action) {
|
||||
throw new Error(
|
||||
`[nocobase]: The 'action' parameter is missing in the 'DataBlockRequestProvider' component`,
|
||||
`[tachybase]: The 'action' parameter is missing in the 'DataBlockRequestProvider' component`,
|
||||
);
|
||||
}
|
||||
return resource[action]({ ...params, ...customParams }).then((res) => res.data);
|
||||
|
@ -9,7 +9,7 @@ group:
|
||||
## DocumentTitleProvider
|
||||
|
||||
```tsx | pure
|
||||
<DocumentTitleProvider addonBefore={'!!'} addonAfter={'NocoBase'}>
|
||||
<DocumentTitleProvider addonBefore={'!!'} addonAfter={'TachyBase'}>
|
||||
</DocumentTitleProvider>
|
||||
```
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
export const useAdminSchemaUid = () => {
|
||||
return 'nocobase-admin-menu';
|
||||
return 'default-admin-menu';
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
import i18next, { TFuncKey, TOptions } from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
import locale from '../locale';
|
||||
|
||||
export function tval(text: TFuncKey | TFuncKey[], options?: TOptions) {
|
||||
@ -21,7 +22,7 @@ i18n
|
||||
// .use(Backend)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
lng: localStorage.getItem('NOCOBASE_LOCALE') || 'en-US',
|
||||
lng: localStorage.getItem('TACHYBASE_LOCALE') || 'en-US',
|
||||
// debug: true,
|
||||
defaultNS: 'client',
|
||||
// fallbackNS: 'client',
|
||||
@ -40,5 +41,5 @@ i18n
|
||||
});
|
||||
|
||||
i18n.on('languageChanged', (lng) => {
|
||||
localStorage.setItem('NOCOBASE_LOCALE', lng);
|
||||
localStorage.setItem('TACHYBASE_LOCALE', lng);
|
||||
});
|
||||
|
@ -33,7 +33,7 @@ export * from './hooks';
|
||||
export * from './i18n';
|
||||
export * from './icon';
|
||||
export { default as locale } from './locale';
|
||||
export * from './nocobase-buildin-plugin';
|
||||
export * from './buildin-plugin';
|
||||
export * from './plugin-manager';
|
||||
export * from './pm';
|
||||
export * from './powered-by-v2';
|
||||
|
@ -80,7 +80,7 @@ export const disassociatePage: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'b678n93qa6y',
|
||||
@ -270,7 +270,7 @@ export const disassociatePage: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'oe1qrytmueq',
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { test, expect } from '@tachybase/test/e2e';
|
||||
import { expect, test } from '@tachybase/test/e2e';
|
||||
|
||||
import { T3529 } from './templatesOfBug';
|
||||
|
||||
test.describe('association form block', () => {
|
||||
// https://nocobase.height.app/T-3529
|
||||
// https://tachybase.height.app/T-3529
|
||||
test('should be created instead of updated', async ({ page, mockPage, mockRecord }) => {
|
||||
const nocoPage = await mockPage(T3529).waitForInit();
|
||||
await mockRecord('general');
|
||||
|
@ -6,6 +6,7 @@ import {
|
||||
oneTableSubtableWithMultiLevelAssociationFields,
|
||||
test,
|
||||
} from '@tachybase/test/e2e';
|
||||
|
||||
import { T2200, T2614, T2615, T2845, T2993 } from './templatesOfBug';
|
||||
|
||||
test.describe('display association fields', () => {
|
||||
@ -49,7 +50,7 @@ test.describe('display association fields', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-2615
|
||||
// https://tachybase.height.app/T-2615
|
||||
test('should load association data', async ({ page, mockPage, mockRecord }) => {
|
||||
const nocoPage = await mockPage(T2615).waitForInit();
|
||||
await mockRecord('T2615');
|
||||
@ -87,7 +88,7 @@ test.describe('display association fields', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-2845
|
||||
// https://tachybase.height.app/T-2845
|
||||
test('should load association data of subform', async ({ page, mockPage, mockRecord }) => {
|
||||
const nocoPage = await mockPage(T2845).waitForInit();
|
||||
// 和 T2615 使用一样的数据表结构
|
||||
@ -136,7 +137,7 @@ test.describe('display association fields', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-2614
|
||||
// https://tachybase.height.app/T-2614
|
||||
test('should load association data in subform', async ({ page, mockPage, mockRecord }) => {
|
||||
const nocoPage = await mockPage(T2614).waitForInit();
|
||||
await mockRecord('T2614');
|
||||
@ -164,7 +165,7 @@ test.describe('display association fields', () => {
|
||||
).toHaveText(`ID:1`);
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-2993
|
||||
// https://tachybase.height.app/T-2993
|
||||
test('should load association data of sub details', async ({ page, mockPage, mockRecord }) => {
|
||||
const nocoPage = await mockPage(T2993).waitForInit();
|
||||
const record = await mockRecord('T2993');
|
||||
@ -264,7 +265,7 @@ test.describe('association fields', () => {
|
||||
}
|
||||
});
|
||||
|
||||
// fix https://nocobase.height.app/T-2200
|
||||
// fix https://tachybase.height.app/T-2200
|
||||
test('should be possible to change the value of the association field normally', async ({ page, mockPage }) => {
|
||||
await mockPage(T2200).goto();
|
||||
|
||||
|
@ -19,7 +19,7 @@ test.describe('variables with default value', () => {
|
||||
.getByRole('textbox'),
|
||||
).toHaveValue('1');
|
||||
|
||||
// https://nocobase.height.app/T-2805 ----------------------------------------------------------------------
|
||||
// https://tachybase.height.app/T-2805 ----------------------------------------------------------------------
|
||||
await page
|
||||
.getByLabel('block-item-CollectionField-general-form-general.m2oField0-m2oField0')
|
||||
.getByTestId('select-object-single')
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { createBlockInPage, expect, oneEmptyForm, test } from '@tachybase/test/e2e';
|
||||
import { T3106, T3469 } from './templatesOfBug';
|
||||
import { uid } from '@tachybase/schema';
|
||||
import { createBlockInPage, expect, oneEmptyForm, test } from '@tachybase/test/e2e';
|
||||
|
||||
import { T3106, T3469 } from './templatesOfBug';
|
||||
|
||||
test.describe('where creation form block can be added', () => {
|
||||
test('page', async ({ page, mockPage }) => {
|
||||
@ -80,7 +81,7 @@ test.describe('configure actions', () => {
|
||||
await expect(page.getByRole('button', { name: 'Submit' })).not.toBeVisible();
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-3106
|
||||
// https://tachybase.height.app/T-3106
|
||||
test('subTable: should clear form value after submit', async ({ page, mockPage }) => {
|
||||
await mockPage(T3106).goto();
|
||||
|
||||
@ -102,7 +103,7 @@ test.describe('configure actions', () => {
|
||||
).toHaveValue('test name');
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-3469
|
||||
// https://tachybase.height.app/T-3469
|
||||
test('default values for fields should not be cleared after submission', async ({ page, mockPage }) => {
|
||||
await mockPage(T3469).goto();
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
Page,
|
||||
expect,
|
||||
expectSettingsMenu,
|
||||
oneEmptyForm,
|
||||
@ -7,8 +6,10 @@ import {
|
||||
oneTableBlockWithActionsAndFormBlocks,
|
||||
oneTableBlockWithAddNewAndViewAndEditAndAssociationFields,
|
||||
oneTableBlockWithAddNewAndViewAndEditAndBasicFields,
|
||||
Page,
|
||||
test,
|
||||
} from '@tachybase/test/e2e';
|
||||
|
||||
import { T2165, T2174, T3251, T3806 } from './templatesOfBug';
|
||||
|
||||
const clickOption = async (page: Page, optionName: string) => {
|
||||
@ -211,7 +212,7 @@ test.describe('creation form block schema settings', () => {
|
||||
).toHaveValue('123');
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-2165
|
||||
// https://tachybase.height.app/T-2165
|
||||
test('variable labels should be displayed normally', async ({ page, mockPage }) => {
|
||||
await mockPage(T2165).goto();
|
||||
|
||||
@ -223,7 +224,7 @@ test.describe('creation form block schema settings', () => {
|
||||
await expect(page.getByText('Current form / Phone')).toBeVisible();
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-3251
|
||||
// https://tachybase.height.app/T-3251
|
||||
test('nested conditions', async ({ page, mockPage }) => {
|
||||
await mockPage(T3251).goto();
|
||||
|
||||
@ -255,7 +256,7 @@ test.describe('creation form block schema settings', () => {
|
||||
).toBeEditable();
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-3806
|
||||
// https://tachybase.height.app/T-3806
|
||||
test('after save as block template', async ({ page, mockPage }) => {
|
||||
await mockPage(T3806).goto();
|
||||
|
||||
@ -731,7 +732,7 @@ test.describe('creation form block schema settings', () => {
|
||||
).toHaveValue('new value');
|
||||
});
|
||||
|
||||
// fix https://nocobase.height.app/T-2174
|
||||
// fix https://tachybase.height.app/T-2174
|
||||
test('should show default value option', async ({ page, mockPage, mockRecord }) => {
|
||||
const nocoPage = await mockPage(T2174).waitForInit();
|
||||
await mockRecord('test2174');
|
||||
@ -964,7 +965,7 @@ test.describe('creation form block schema settings', () => {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PageConfig, generalWithM2oSingleSelect, generalWithMultiLevelM2mFields } from '@tachybase/test/e2e';
|
||||
import { generalWithM2oSingleSelect, generalWithMultiLevelM2mFields, PageConfig } from '@tachybase/test/e2e';
|
||||
|
||||
export const T2165 = {
|
||||
pageSchema: {
|
||||
@ -339,7 +339,7 @@ export const T2174 = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-index': 1,
|
||||
@ -932,7 +932,7 @@ export const T2614: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'vq4vg5mpbxz',
|
||||
@ -1770,7 +1770,7 @@ export const T2993: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-index': 1,
|
||||
@ -2353,7 +2353,7 @@ export const T2615: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
@ -3259,7 +3259,7 @@ export const T2845: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-index': 1,
|
||||
@ -4735,7 +4735,7 @@ export const T2200 = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'farfrcvsydq',
|
||||
@ -5696,7 +5696,7 @@ export const T3469: PageConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
// https://nocobase.height.app/T-3529
|
||||
// https://tachybase.height.app/T-3529
|
||||
export const T3529: PageConfig = {
|
||||
collections: generalWithMultiLevelM2mFields,
|
||||
pageSchema: {
|
||||
@ -5756,7 +5756,7 @@ export const T3529: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'gcqzwfc98cz',
|
||||
|
@ -20,7 +20,7 @@ describe('createGridCardBlockSchema', () => {
|
||||
"x-component": "ActionBar",
|
||||
"x-component-props": {
|
||||
"style": {
|
||||
"marginBottom": "var(--nb-spacing)",
|
||||
"marginBottom": "var(--tb-spacing)",
|
||||
},
|
||||
},
|
||||
"x-initializer": "gridCard:configureActions",
|
||||
@ -96,7 +96,7 @@ describe('createGridCardBlockSchema', () => {
|
||||
"x-component": "ActionBar",
|
||||
"x-component-props": {
|
||||
"style": {
|
||||
"marginBottom": "var(--nb-spacing)",
|
||||
"marginBottom": "var(--tb-spacing)",
|
||||
},
|
||||
},
|
||||
"x-initializer": "gridCard:configureActions",
|
||||
|
@ -45,7 +45,7 @@ export const createGridCardBlockUISchema = (options: {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -30,7 +30,7 @@ describe('createListBlockSchema', () => {
|
||||
"x-component": "ActionBar",
|
||||
"x-component-props": {
|
||||
"style": {
|
||||
"marginBottom": "var(--nb-spacing)",
|
||||
"marginBottom": "var(--tb-spacing)",
|
||||
},
|
||||
},
|
||||
"x-initializer": "list:configureActions",
|
||||
|
@ -37,7 +37,7 @@ export const createListBlockUISchema = (options: {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -76,7 +76,7 @@ export const tableSelectorDataScopeVariable: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'vdvzzbfp53e',
|
||||
@ -341,7 +341,7 @@ export const tableSelectorDataScopeVariable: PageConfig = {
|
||||
{
|
||||
style: {
|
||||
marginBottom:
|
||||
'var(--nb-spacing)',
|
||||
'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid':
|
||||
|
@ -22,7 +22,7 @@ describe('createTableSelectorSchema', () => {
|
||||
"x-component": "ActionBar",
|
||||
"x-component-props": {
|
||||
"style": {
|
||||
"marginBottom": "var(--nb-spacing)",
|
||||
"marginBottom": "var(--tb-spacing)",
|
||||
},
|
||||
},
|
||||
"x-initializer": "table:configureActions",
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { ISchema } from '@tachybase/schema';
|
||||
import { uid } from '@tachybase/schema';
|
||||
import { ISchema, uid } from '@tachybase/schema';
|
||||
|
||||
export const createTableSelectorUISchema = (options: {
|
||||
collectionName: string;
|
||||
@ -36,7 +35,7 @@ export const createTableSelectorUISchema = (options: {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { expect, test } from '@tachybase/test/e2e';
|
||||
|
||||
import { T2187 } from '../templatesOfBug';
|
||||
|
||||
// fix https://nocobase.height.app/T-2187
|
||||
// fix https://tachybase.height.app/T-2187
|
||||
test('in the Duplicate mode, the Roles field should not have a value after clicking it because it is not selected', async ({
|
||||
page,
|
||||
mockPage,
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { expect, test } from '@tachybase/test/e2e';
|
||||
|
||||
import { T2183, T2186 } from '../templatesOfBug';
|
||||
|
||||
// fix https://nocobase.height.app/T-2183
|
||||
// fix https://tachybase.height.app/T-2183
|
||||
test('should save conditions', async ({ page, mockPage }) => {
|
||||
await mockPage(T2183).goto();
|
||||
await page.getByLabel('action-Filter.Action-Filter-filter-users-table').click();
|
||||
@ -18,7 +19,7 @@ test('should save conditions', async ({ page, mockPage }) => {
|
||||
await expect(page.getByTestId('select-filter-operator').getByText('is')).toBeVisible();
|
||||
});
|
||||
|
||||
// fix https://nocobase.height.app/T-2186
|
||||
// fix https://tachybase.height.app/T-2186
|
||||
test('the input box displayed should correspond to the field type', async ({ page, mockPage }) => {
|
||||
await mockPage(T2186).goto();
|
||||
|
||||
|
@ -56,7 +56,7 @@ export const T2183 = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
@ -215,7 +215,7 @@ export const T2186 = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
@ -374,7 +374,7 @@ export const T2187 = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 't2drja2eg9p',
|
||||
@ -771,7 +771,7 @@ export const T3686: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': '42xfns3215b',
|
||||
|
@ -20,7 +20,7 @@ describe('createTableBLockSchemaV2', () => {
|
||||
"x-component": "ActionBar",
|
||||
"x-component-props": {
|
||||
"style": {
|
||||
"marginBottom": "var(--nb-spacing)",
|
||||
"marginBottom": "var(--tb-spacing)",
|
||||
},
|
||||
},
|
||||
"x-initializer": "table:configureActions",
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { ISchema } from '@tachybase/schema';
|
||||
import { uid } from '@tachybase/schema';
|
||||
import { ISchema, uid } from '@tachybase/schema';
|
||||
|
||||
export const createTableBlockUISchema = (options: {
|
||||
dataSource: string;
|
||||
@ -41,7 +40,7 @@ export const createTableBlockUISchema = (options: {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
properties: {},
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PageConfig, generalWithMultiLevelM2oFields } from '@tachybase/test/e2e';
|
||||
import { generalWithMultiLevelM2oFields, PageConfig } from '@tachybase/test/e2e';
|
||||
|
||||
export const T2797: PageConfig = {
|
||||
pageSchema: {
|
||||
@ -63,7 +63,7 @@ export const T2797: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-index': 1,
|
||||
@ -642,7 +642,7 @@ export const T2838: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-index': 1,
|
||||
@ -1531,7 +1531,7 @@ export const tableWithRoles: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'w07zcu825vu',
|
||||
@ -1746,7 +1746,7 @@ export const tableWithUsers = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'e7ukdkylglc',
|
||||
@ -1992,7 +1992,7 @@ export const tableWithInherit = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': '6j0p8tmwey7',
|
||||
@ -2223,7 +2223,7 @@ export const tableWithInheritWithoutAssociation = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': '6j0p8tmwey7',
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { expect, test } from '@tachybase/test/e2e';
|
||||
|
||||
import { T2797, T2838 } from './templatesOfBug';
|
||||
|
||||
test.describe('z-index of dialog', () => {
|
||||
// https://nocobase.height.app/T-2797
|
||||
// https://tachybase.height.app/T-2797
|
||||
test('edit block title', async ({ page, mockPage }) => {
|
||||
await mockPage(T2797).goto();
|
||||
|
||||
@ -17,7 +18,7 @@ test.describe('z-index of dialog', () => {
|
||||
await expect(page.getByLabel('block-item-Input-users-Block')).not.toBeVisible();
|
||||
});
|
||||
|
||||
// https://nocobase.height.app/T-2838
|
||||
// https://tachybase.height.app/T-2838
|
||||
test('multilevel modal', async ({ page, mockPage, mockRecord }) => {
|
||||
const nocoPage = await mockPage(T2838).waitForInit();
|
||||
await mockRecord('general');
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { generalWithDatetime, PageConfig } from '@tachybase/test/e2e';
|
||||
|
||||
/**
|
||||
* 1. 一个 Table 区块
|
||||
* 5. 所有字段都是 datetime 字段
|
||||
@ -62,7 +63,7 @@ export const oneTableBlockWithDatetimeFields: PageConfig = {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
'x-uid': 'nd5jqapjy3w',
|
||||
|
@ -47,8 +47,8 @@ const useStyles = createStyles(({ css, token }) => {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: var(--nb-header-height);
|
||||
line-height: var(--nb-header-height);
|
||||
height: var(--tb-header-height);
|
||||
line-height: var(--tb-header-height);
|
||||
padding: 0;
|
||||
z-index: 100;
|
||||
background-color: ${token.colorBgHeader} !important;
|
||||
@ -114,10 +114,10 @@ const useStyles = createStyles(({ css, token }) => {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
z-index: 100;
|
||||
.ant-layout-sider-children {
|
||||
top: var(--nb-header-height);
|
||||
top: var(--tb-header-height);
|
||||
position: fixed;
|
||||
width: 200px;
|
||||
height: calc(100vh - var(--nb-header-height));
|
||||
height: calc(100vh - var(--tb-header-height));
|
||||
}
|
||||
`,
|
||||
main: css`
|
||||
@ -141,8 +141,8 @@ const useStyles = createStyles(({ css, token }) => {
|
||||
`,
|
||||
mainHeader: css`
|
||||
flex-shrink: 0;
|
||||
height: var(--nb-header-height);
|
||||
line-height: var(--nb-header-height);
|
||||
height: var(--tb-header-height);
|
||||
line-height: var(--tb-header-height);
|
||||
background: transparent;
|
||||
pointer-events: none;
|
||||
`,
|
||||
|
@ -18,7 +18,7 @@ const useStyles = createStyles(({ css }) => {
|
||||
}
|
||||
|
||||
.ant-modal-content {
|
||||
background: var(--nb-box-bg);
|
||||
background: var(--tb-box-bg);
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
@ -1,13 +1,16 @@
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { observer, RecursionField, useField, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
import { isPortalInBody } from '@tachybase/utils/client';
|
||||
|
||||
import { App, Button } from 'antd';
|
||||
import classnames from 'classnames';
|
||||
import { default as lodash } from 'lodash';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { StablePopover, useActionContext } from '../..';
|
||||
import { useDesignable } from '../../';
|
||||
import { useACLActionParamsContext } from '../../../acl';
|
||||
import { withDynamicSchemaProps } from '../../../application/hoc/withDynamicSchemaProps';
|
||||
import { Icon } from '../../../icon';
|
||||
import { RecordProvider, useRecord } from '../../../record-provider';
|
||||
import { useLocalVariables, useVariables } from '../../../variables';
|
||||
@ -26,7 +29,6 @@ import { useA } from './hooks';
|
||||
import { useGetAriaLabelOfAction } from './hooks/useGetAriaLabelOfAction';
|
||||
import { ComposedAction } from './types';
|
||||
import { linkageAction } from './utils';
|
||||
import { withDynamicSchemaProps } from '../../../application/hoc/withDynamicSchemaProps';
|
||||
|
||||
export const Action: ComposedAction = withDynamicSchemaProps(
|
||||
observer((props: any) => {
|
||||
@ -172,7 +174,7 @@ export const Action: ComposedAction = withDynamicSchemaProps(
|
||||
</ActionContextProvider>
|
||||
);
|
||||
|
||||
// fix https://nocobase.height.app/T-3235/description
|
||||
// fix https://tachybase.height.app/T-3235/description
|
||||
if (addChild) {
|
||||
return wrapSSR(
|
||||
<RecordProvider record={null} parent={record}>
|
||||
|
@ -45,7 +45,7 @@ group:
|
||||
|
||||
## API
|
||||
|
||||
基于 antd 的 [DatePicker](https://ant.design/components/date-picker/#API),新增了以下扩展属性,用于支持 NocoBase 的日期字段设置。
|
||||
基于 antd 的 [DatePicker](https://ant.design/components/date-picker/#API),新增了以下扩展属性,用于支持 TachyBase 的日期字段设置。
|
||||
|
||||
- `dateFormat` 设置日期格式
|
||||
- `timeFormat` 设置时间格式
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { render, screen } from '@tachybase/test/client';
|
||||
import React from 'react';
|
||||
import { render, screen } from '@tachybase/test/client';
|
||||
|
||||
import App1 from '../demos/demo1';
|
||||
|
||||
describe('ErrorFallback', () => {
|
||||
@ -7,7 +8,7 @@ describe('ErrorFallback', () => {
|
||||
render(<App1 />);
|
||||
|
||||
expect(screen.getByText(/render failed/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/this is likely a nocobase internals bug\. please open an issue at/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/this is likely a tachybase internals bug\. please open an issue at/i)).toBeInTheDocument();
|
||||
expect(screen.getByRole('link', { name: /feedback/i })).toBeInTheDocument();
|
||||
expect(screen.getByText(/try again/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/error: error message/i)).toBeInTheDocument();
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { render, screen, userEvent, waitFor, within } from '@tachybase/test/client';
|
||||
import React from 'react';
|
||||
import { render, screen, userEvent, waitFor, within } from '@tachybase/test/client';
|
||||
|
||||
import App2 from '../demos/demo2';
|
||||
import App3 from '../demos/demo3';
|
||||
import App4 from '../demos/demo4';
|
||||
@ -30,7 +31,7 @@ describe('Filter', () => {
|
||||
expect(inputs[0]).toHaveValue('aa');
|
||||
expect(inputs[1]).toHaveValue('aaa');
|
||||
|
||||
// 点击下拉框中的选项,Popover 不应该关闭。详见:https://nocobase.height.app/T-1508
|
||||
// 点击下拉框中的选项,Popover 不应该关闭。详见:https://tachybase.height.app/T-1508
|
||||
await userEvent.click(screen.getByText(/any/i));
|
||||
await userEvent.click(screen.getByText(/all/i));
|
||||
expect(tooltip).toBeInTheDocument();
|
||||
@ -96,7 +97,7 @@ describe('Filter', () => {
|
||||
expect(inputs[0]).toHaveValue('');
|
||||
expect(inputs[1]).toHaveValue('aaa');
|
||||
|
||||
// 点击下拉框中的选项,Popover 不应该关闭。详见:https://nocobase.height.app/T-1508
|
||||
// 点击下拉框中的选项,Popover 不应该关闭。详见:https://tachybase.height.app/T-1508
|
||||
await userEvent.click(screen.getByText(/any/i));
|
||||
await userEvent.click(screen.getByText(/all/i));
|
||||
expect(tooltip).toBeInTheDocument();
|
||||
|
@ -1,12 +1,26 @@
|
||||
import { createForm, Form, IFormProps } from '@tachybase/schema';
|
||||
import { FormProvider, Observer, observer, ReactFC } from '@tachybase/schema';
|
||||
import { toJS } from '@tachybase/schema';
|
||||
import { applyMiddleware, IMiddleware, isBool, isFn, isNum, isStr } from '@tachybase/schema';
|
||||
import { Modal, ModalProps, ThemeConfig } from 'antd';
|
||||
import React, { Fragment, useLayoutEffect, useRef, useState } from 'react';
|
||||
import {
|
||||
applyMiddleware,
|
||||
createForm,
|
||||
Form,
|
||||
FormProvider,
|
||||
IFormProps,
|
||||
IMiddleware,
|
||||
isBool,
|
||||
isFn,
|
||||
isNum,
|
||||
isStr,
|
||||
Observer,
|
||||
observer,
|
||||
ReactFC,
|
||||
toJS,
|
||||
} from '@tachybase/schema';
|
||||
|
||||
import { Modal, ModalProps, ThemeConfig } from 'antd';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { GlobalThemeProvider } from '../../../global-theme';
|
||||
|
||||
import { createPortalProvider, createPortalRoot, loading, usePrefixCls, useToken } from '../__builtins__';
|
||||
import { GlobalThemeProvider } from '../../../global-theme';
|
||||
|
||||
type FormDialogRenderer = React.ReactElement | ((form: Form) => React.ReactElement);
|
||||
|
||||
@ -96,8 +110,8 @@ export function FormDialog(title: any, id: any, renderer?: any, theme?: any): IF
|
||||
|
||||
return (
|
||||
<Modal
|
||||
// fix https://nocobase.height.app/T-2797
|
||||
// fix https://nocobase.height.app/T-2838
|
||||
// fix https://tachybase.height.app/T-2797
|
||||
// fix https://tachybase.height.app/T-2838
|
||||
zIndex={token.zIndexPopupBase + 1000}
|
||||
{...modal}
|
||||
open={open}
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { Field } from '@tachybase/schema';
|
||||
import { useField, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
import { nextTick } from '@tachybase/utils/client';
|
||||
import _ from 'lodash';
|
||||
import { useEffect, useMemo, useRef } from 'react';
|
||||
import { Field, useField, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
import { nextTick } from '@tachybase/utils/client';
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
import { useAssociationNames } from '../../../../block-provider/hooks';
|
||||
import { useCollectionManager_deprecated, useCollection_deprecated } from '../../../../collection-manager';
|
||||
import { useCollection_deprecated, useCollectionManager_deprecated } from '../../../../collection-manager';
|
||||
import { useCollectionRecordData } from '../../../../data-source/collection-record/CollectionRecordProvider';
|
||||
import { useFlag } from '../../../../flag-provider';
|
||||
import { useVariables } from '../../../../variables';
|
||||
@ -86,7 +87,7 @@ const useLazyLoadDisplayAssociationFieldsOfForm = () => {
|
||||
.then((value) => {
|
||||
nextTick(() => {
|
||||
const result = transformVariableValue(value, { targetCollectionField: collectionFieldRef.current });
|
||||
// fix https://nocobase.height.app/T-2608
|
||||
// fix https://tachybase.height.app/T-2608
|
||||
if (_.isEmpty(result) && !_.isNumber(result)) {
|
||||
field.value = null;
|
||||
} else {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Field } from '@tachybase/schema';
|
||||
import { useField, useFieldSchema } from '@tachybase/schema';
|
||||
import { reaction } from '@tachybase/schema';
|
||||
import { getValuesByPath } from '@tachybase/utils/client';
|
||||
import _ from 'lodash';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
import { Field, reaction, useField, useFieldSchema } from '@tachybase/schema';
|
||||
import { getValuesByPath } from '@tachybase/utils/client';
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
import { useRecordIndex } from '../../../../../src/record-provider';
|
||||
import { useCollection_deprecated } from '../../../../collection-manager';
|
||||
import { useCollectionRecord } from '../../../../data-source/collection-record/CollectionRecordProvider';
|
||||
@ -82,7 +82,7 @@ const useParseDefaultValue = () => {
|
||||
});
|
||||
|
||||
if (value == null || value === '') {
|
||||
// fix https://nocobase.height.app/T-2805
|
||||
// fix https://tachybase.height.app/T-2805
|
||||
field.setInitialValue(null);
|
||||
await field.reset({ forceClear: true });
|
||||
} else if (isSpecialCase()) {
|
||||
@ -122,7 +122,7 @@ const useParseDefaultValue = () => {
|
||||
const obj = { [variableName]: variable?.ctx || {} };
|
||||
const path = getPath(fieldSchema.default);
|
||||
const value = getValuesByPath(obj, path);
|
||||
// fix https://nocobase.height.app/T-2212
|
||||
// fix https://tachybase.height.app/T-2212
|
||||
if (value === undefined) {
|
||||
// 返回一个随机值,确保能触发 run 函数
|
||||
return Math.random();
|
||||
|
@ -1,14 +1,15 @@
|
||||
import { Field } from '@tachybase/schema';
|
||||
import { Schema, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
import _ from 'lodash';
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import { Field, Schema, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
import {
|
||||
CollectionFieldOptions_deprecated,
|
||||
useCollection_deprecated,
|
||||
useCollectionManager_deprecated,
|
||||
} from '../../../../collection-manager';
|
||||
import { isSubMode } from '../../association-field/util';
|
||||
import { markRecordAsNew } from '../../../../data-source/collection-record/isNewRecord';
|
||||
import { isSubMode } from '../../association-field/util';
|
||||
|
||||
/**
|
||||
* #### 处理 `子表单` 和 `子表格` 中的特殊情况
|
||||
@ -46,7 +47,7 @@ export const useSpecialCase = () => {
|
||||
return {
|
||||
/**
|
||||
* 特殊情况指的是:当前字段是 `对一` 字段且存在于 `对多` 字段的 `子表格` 或 `子表单` 中
|
||||
* 详细说明见:https://nocobase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc
|
||||
* 详细说明见:https://tachybase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc
|
||||
*/
|
||||
isSpecialCase,
|
||||
setDefaultValue,
|
||||
@ -71,7 +72,7 @@ export function getParentFieldSchema(fieldSchema: Schema) {
|
||||
|
||||
/**
|
||||
* 特殊情况指的是:当前字段是 `对一` 字段且存在于 `对多` 字段的 `子表格` 或 `子表单` 中
|
||||
* 详细说明见:https://nocobase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc
|
||||
* 详细说明见:https://tachybase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc
|
||||
* @returns
|
||||
*/
|
||||
export function isSpecialCaseField({
|
||||
|
@ -332,7 +332,7 @@ function getFieldValuesInCondition({ linkageRules, formValues }) {
|
||||
|
||||
return conditions
|
||||
.map((condition) => {
|
||||
// fix https://nocobase.height.app/T-3251
|
||||
// fix https://tachybase.height.app/T-3251
|
||||
if ('$and' in condition || '$or' in condition) {
|
||||
return run(condition);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { render, screen, sleep, userEvent, waitFor } from '@tachybase/test/client';
|
||||
import React from 'react';
|
||||
import { render, screen, sleep, userEvent, waitFor } from '@tachybase/test/client';
|
||||
|
||||
import App1 from '../demos/demo1';
|
||||
import App2 from '../demos/demo2';
|
||||
import App3 from '../demos/demo3';
|
||||
@ -145,7 +146,7 @@ describe('Form', () => {
|
||||
const closeBtn = screen.getByText('Close');
|
||||
|
||||
expect(input).toBeInTheDocument();
|
||||
expect(input).toHaveValue('hello nocobase');
|
||||
expect(input).toHaveValue('hello tachybase');
|
||||
expect(closeBtn).toBeInTheDocument();
|
||||
expect(screen.getByText(/drawer title/i)).toBeInTheDocument();
|
||||
});
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { FormItem } from '@tachybase/components';
|
||||
import { ISchema, observer } from '@tachybase/schema';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
Action,
|
||||
ActionContextProvider,
|
||||
@ -11,8 +10,10 @@ import {
|
||||
useCloseAction,
|
||||
useRequest,
|
||||
} from '@tachybase/client';
|
||||
import { FormItem } from '@tachybase/components';
|
||||
import { ISchema, observer } from '@tachybase/schema';
|
||||
|
||||
import { Button } from 'antd';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
const useValues = (options) => {
|
||||
const { visible } = useActionContext();
|
||||
@ -21,7 +22,7 @@ const useValues = (options) => {
|
||||
Promise.resolve({
|
||||
data: {
|
||||
id: 1,
|
||||
name: 'hello nocobase',
|
||||
name: 'hello tachybase',
|
||||
},
|
||||
}),
|
||||
{ ...options, manual: true },
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { fireEvent, render, screen, userEvent, waitFor } from '@tachybase/test/client';
|
||||
import React from 'react';
|
||||
import { fireEvent, render, screen, userEvent, waitFor } from '@tachybase/test/client';
|
||||
|
||||
import App1 from '../demos/input';
|
||||
import App4 from '../demos/json';
|
||||
import App2 from '../demos/textarea';
|
||||
@ -64,9 +65,9 @@ describe('Input.URL', () => {
|
||||
const { container } = render(<App3 />);
|
||||
|
||||
const input = container.querySelector('input') as HTMLInputElement;
|
||||
await userEvent.type(input, 'https://www.nocobase.com');
|
||||
expect(input.value).toBe('https://www.nocobase.com');
|
||||
expect(screen.getByText('https://www.nocobase.com')).toBeInTheDocument();
|
||||
await userEvent.type(input, 'https://www.tachybase.com');
|
||||
expect(input.value).toBe('https://www.tachybase.com');
|
||||
expect(screen.getByText('https://www.tachybase.com')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should display the error when the value is invalid', async () => {
|
||||
@ -98,15 +99,15 @@ describe('Input.JSON', () => {
|
||||
await waitFor(() => {
|
||||
const textarea = container.querySelector('textarea') as HTMLTextAreaElement;
|
||||
const pre = container.querySelector('pre') as HTMLPreElement;
|
||||
fireEvent.change(textarea, { target: { value: '{"name":"nocobase"}' } });
|
||||
fireEvent.blur(textarea, { target: { value: '{"name":"nocobase"}' } });
|
||||
expect(JSON.parse(textarea.value)).toEqual({ name: 'nocobase' });
|
||||
fireEvent.change(textarea, { target: { value: '{"name":"tachybase"}' } });
|
||||
fireEvent.blur(textarea, { target: { value: '{"name":"tachybase"}' } });
|
||||
expect(JSON.parse(textarea.value)).toEqual({ name: 'tachybase' });
|
||||
expect(pre).toMatchInlineSnapshot(`
|
||||
<pre
|
||||
class="ant-json css-4dta7v"
|
||||
>
|
||||
{
|
||||
"name": "nocobase"
|
||||
"name": "tachybase"
|
||||
}
|
||||
</pre>
|
||||
`);
|
||||
@ -118,8 +119,8 @@ describe('Input.JSON', () => {
|
||||
|
||||
await waitFor(() => {
|
||||
const textarea = container.querySelector('textarea') as HTMLTextAreaElement;
|
||||
fireEvent.change(textarea, { target: { value: '{"name":nocobase}' } });
|
||||
fireEvent.blur(textarea, { target: { value: '{"name":nocobase}' } });
|
||||
fireEvent.change(textarea, { target: { value: '{"name":tachybase}' } });
|
||||
fireEvent.blur(textarea, { target: { value: '{"name":tachybase}' } });
|
||||
expect(screen.getByText(/Unexpected token/)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
@ -136,7 +136,7 @@ const SideMenu = ({
|
||||
const { Component, getMenuItems } = useMenuItem();
|
||||
const { styles } = useStyles();
|
||||
|
||||
// fix https://nocobase.height.app/T-3331/description
|
||||
// fix https://tachybase.height.app/T-3331/description
|
||||
// 使用 ref 用来防止闭包问题
|
||||
const sideMenuSchemaRef = useRef(sideMenuSchema);
|
||||
sideMenuSchemaRef.current = sideMenuSchema;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { render, screen, waitFor } from '@tachybase/test/client';
|
||||
import React from 'react';
|
||||
import { render, screen, waitFor } from '@tachybase/test/client';
|
||||
|
||||
import App1 from '../demos/demo1';
|
||||
|
||||
describe('Page', () => {
|
||||
@ -13,7 +14,7 @@ describe('Page', () => {
|
||||
expect(screen.getByText(/page content/i)).toBeInTheDocument();
|
||||
});
|
||||
await waitFor(() => {
|
||||
expect(document.title).toBe('Page Title - NocoBase');
|
||||
expect(document.title).toBe('Page Title - TachyBase');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ISchema } from '@tachybase/schema';
|
||||
import { DocumentTitleProvider, Page, SchemaComponent, SchemaComponentProvider, Application } from '@tachybase/client';
|
||||
import React from 'react';
|
||||
import { Application, DocumentTitleProvider, Page, SchemaComponent, SchemaComponentProvider } from '@tachybase/client';
|
||||
import { ISchema } from '@tachybase/schema';
|
||||
|
||||
const schema: ISchema = {
|
||||
type: 'object',
|
||||
@ -23,7 +23,7 @@ const schema: ISchema = {
|
||||
const Root = () => {
|
||||
return (
|
||||
<SchemaComponentProvider components={{ Page }}>
|
||||
<DocumentTitleProvider addonAfter={'NocoBase'}>
|
||||
<DocumentTitleProvider addonAfter={'TachyBase'}>
|
||||
<SchemaComponent schema={schema} />
|
||||
</DocumentTitleProvider>
|
||||
</SchemaComponentProvider>
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { Popover as AntdPopover, PopoverProps } from 'antd';
|
||||
import React, { useCallback, useRef } from 'react';
|
||||
|
||||
import { Popover as AntdPopover, PopoverProps } from 'antd';
|
||||
|
||||
/**
|
||||
* 参见:https://github.com/ant-design/ant-design/issues/44119
|
||||
* fix https://nocobase.height.app/T-1508
|
||||
* fix https://tachybase.height.app/T-1508
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
|
@ -1,9 +1,10 @@
|
||||
/**
|
||||
* title: Preview
|
||||
*/
|
||||
import { FormItem } from '@tachybase/components';
|
||||
import { SchemaComponent, SchemaComponentProvider } from '@tachybase/client';
|
||||
import React from 'react';
|
||||
import { SchemaComponent, SchemaComponentProvider } from '@tachybase/client';
|
||||
import { FormItem } from '@tachybase/components';
|
||||
|
||||
import Preview from '../Preview';
|
||||
|
||||
const defaultValue = [
|
||||
@ -19,7 +20,7 @@ const defaultValue = [
|
||||
meta: {},
|
||||
status: 'uploading',
|
||||
percent: 60,
|
||||
url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg',
|
||||
url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg',
|
||||
created_at: '2021-08-13T15:00:17.423Z',
|
||||
updated_at: '2021-08-13T15:00:17.423Z',
|
||||
created_by_id: null,
|
||||
@ -35,7 +36,7 @@ const defaultValue = [
|
||||
mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
path: '',
|
||||
meta: {},
|
||||
url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx',
|
||||
url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx',
|
||||
created_at: '2021-09-12T01:22:06.229Z',
|
||||
updated_at: '2021-09-12T01:22:06.229Z',
|
||||
created_by_id: null,
|
||||
|
@ -119,7 +119,7 @@ const useTableColumns = () => {
|
||||
const index = field.value?.indexOf(record);
|
||||
return (
|
||||
<RecordIndexProvider index={index}>
|
||||
{/* fix https://nocobase.height.app/T-3232/description */}
|
||||
{/* fix https://tachybase.height.app/T-3232/description */}
|
||||
{/* 如果作为关系表格区块,则 parentRecordData 应该有值;如果作为普通表格使用(如数据源管理页面的表格)则应该使用 recordData,且 parentRecordData 为空 */}
|
||||
<RecordProvider record={record} parent={parentRecordData || recordData}>
|
||||
<RecursionField schema={s} name={record.__index || index} onlyRenderProperties />
|
||||
|
@ -21,7 +21,7 @@ mockRequest.onPost('/attachments:create').reply(async (config) => {
|
||||
extname: '.docx',
|
||||
path: '',
|
||||
size: null,
|
||||
url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/7edb55e4e3145e5ac59ea3a44ca840e9.docx',
|
||||
url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/7edb55e4e3145e5ac59ea3a44ca840e9.docx',
|
||||
mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
meta: {},
|
||||
storage_id: 2,
|
||||
|
@ -1,9 +1,10 @@
|
||||
/**
|
||||
* title: Upload
|
||||
*/
|
||||
import { FormItem } from '@tachybase/components';
|
||||
import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@tachybase/client';
|
||||
import React from 'react';
|
||||
import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@tachybase/client';
|
||||
import { FormItem } from '@tachybase/components';
|
||||
|
||||
import apiClient from './apiClient';
|
||||
|
||||
const schema = {
|
||||
@ -25,7 +26,7 @@ const schema = {
|
||||
meta: {},
|
||||
status: 'uploading',
|
||||
percent: 60,
|
||||
url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg',
|
||||
url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg',
|
||||
created_at: '2021-08-13T15:00:17.423Z',
|
||||
updated_at: '2021-08-13T15:00:17.423Z',
|
||||
created_by_id: null,
|
||||
@ -41,7 +42,7 @@ const schema = {
|
||||
mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
path: '',
|
||||
meta: {},
|
||||
url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx',
|
||||
url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx',
|
||||
created_at: '2021-09-12T01:22:06.229Z',
|
||||
updated_at: '2021-09-12T01:22:06.229Z',
|
||||
created_by_id: null,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import _, { every, findIndex, some } from 'lodash';
|
||||
|
||||
import { VariableOption, VariablesContextType } from '../../../variables/types';
|
||||
import { isVariable } from '../../../variables/utils/isVariable';
|
||||
import { transformVariableValue } from '../../../variables/utils/transformVariableValue';
|
||||
@ -78,7 +79,7 @@ export const conditionAnalyses = async ({
|
||||
const conditions = ruleGroup[type];
|
||||
|
||||
let results = conditions.map(async (condition) => {
|
||||
// fix https://nocobase.height.app/T-3152
|
||||
// fix https://tachybase.height.app/T-3152
|
||||
if ('$and' in condition || '$or' in condition) {
|
||||
return await conditionAnalyses({ ruleGroup: condition, variables, localVariables });
|
||||
}
|
||||
|
@ -1,12 +1,21 @@
|
||||
import { GeneralField, Query } from '@tachybase/schema';
|
||||
import { ISchema, Schema, SchemaOptionsContext, useField, useFieldSchema } from '@tachybase/schema';
|
||||
import { uid } from '@tachybase/schema';
|
||||
import React, { ComponentType, useCallback, useContext, useEffect, useMemo } from 'react';
|
||||
import {
|
||||
GeneralField,
|
||||
ISchema,
|
||||
Query,
|
||||
Schema,
|
||||
SchemaOptionsContext,
|
||||
uid,
|
||||
useField,
|
||||
useFieldSchema,
|
||||
} from '@tachybase/schema';
|
||||
|
||||
import { message } from 'antd';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import get from 'lodash/get';
|
||||
import set from 'lodash/set';
|
||||
import React, { ComponentType, useCallback, useContext, useEffect, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { APIClient, useAPIClient } from '../../api-client';
|
||||
import { SchemaComponentContext } from '../context';
|
||||
|
||||
@ -691,7 +700,7 @@ export function useFindComponent() {
|
||||
}
|
||||
const res = get(components, component);
|
||||
if (!res) {
|
||||
console.error(`[nocobase]: Component "${component}" not found`);
|
||||
console.error(`[tachybase]: Component "${component}" not found`);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
@ -1,11 +1,13 @@
|
||||
import { ISchema, useField, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
import React, { useMemo } from 'react';
|
||||
import { SchemaComponent, useAPIClient, useActionContext, useDesignable, useProps, useRecord } from '../..';
|
||||
import { SchemaInitializer } from '../../application/schema-initializer/SchemaInitializer';
|
||||
import { useGetAriaLabelOfSchemaInitializer } from '../hooks/useGetAriaLabelOfSchemaInitializer';
|
||||
import { ISchema, useField, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
|
||||
import { message } from 'antd';
|
||||
import { saveAs } from 'file-saver';
|
||||
|
||||
import { SchemaComponent, useActionContext, useAPIClient, useDesignable, useProps, useRecord } from '../..';
|
||||
import { SchemaInitializer } from '../../application/schema-initializer/SchemaInitializer';
|
||||
import { useGetAriaLabelOfSchemaInitializer } from '../hooks/useGetAriaLabelOfSchemaInitializer';
|
||||
|
||||
export const TabPaneInitializers = (props?: any) => {
|
||||
const { designable, insertBeforeEnd } = useDesignable();
|
||||
const fieldSchema = useFieldSchema();
|
||||
@ -120,7 +122,7 @@ export const TabPaneInitializers = (props?: any) => {
|
||||
style: {
|
||||
borderColor: 'var(--colorSettings)',
|
||||
color: 'var(--colorSettings)',
|
||||
marginRight: 'var(--nb-spacing)',
|
||||
marginRight: 'var(--tb-spacing)',
|
||||
},
|
||||
type: 'dashed',
|
||||
useAction: useDumpAction,
|
||||
@ -136,7 +138,7 @@ export const TabPaneInitializers = (props?: any) => {
|
||||
style: {
|
||||
borderColor: 'var(--colorSettings)',
|
||||
color: 'var(--colorSettings)',
|
||||
marginRight: 'var(--nb-spacing)',
|
||||
marginRight: 'var(--tb-spacing)',
|
||||
},
|
||||
type: 'dashed',
|
||||
'aria-label': getAriaLabel(),
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Field } from '@tachybase/schema';
|
||||
import { useField, useFieldSchema } from '@tachybase/schema';
|
||||
import { merge } from '@tachybase/schema';
|
||||
import _ from 'lodash';
|
||||
import React, { useCallback, useEffect, useMemo } from 'react';
|
||||
import { Field, merge, useField, useFieldSchema } from '@tachybase/schema';
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
import { useFormBlockContext } from '../../../block-provider';
|
||||
import {
|
||||
useCollection_deprecated,
|
||||
@ -10,13 +10,13 @@ import {
|
||||
useCollectionFilterOptions,
|
||||
useCollectionManager_deprecated,
|
||||
} from '../../../collection-manager';
|
||||
import { CollectionFieldProvider } from '../../../data-source';
|
||||
import { useRecord } from '../../../record-provider';
|
||||
import { useCompile, useComponent } from '../../../schema-component';
|
||||
import { VariableInput, getShouldChange } from '../../../schema-settings/VariableInput/VariableInput';
|
||||
import { Option } from '../../../schema-settings/VariableInput/type';
|
||||
import { formatVariableScop } from '../../../schema-settings/VariableInput/utils/formatVariableScop';
|
||||
import { getShouldChange, VariableInput } from '../../../schema-settings/VariableInput/VariableInput';
|
||||
import { useLocalVariables, useVariables } from '../../../variables';
|
||||
import { CollectionFieldProvider } from '../../../data-source';
|
||||
|
||||
interface AssignedFieldProps {
|
||||
value: any;
|
||||
@ -116,7 +116,7 @@ export const AssignedField = (props: AssignedFieldProps) => {
|
||||
const currentForm = scope.find((item) => item.value === '$nForm');
|
||||
const fields = getCollectionFields(name);
|
||||
|
||||
// fix https://nocobase.height.app/T-1355
|
||||
// fix https://tachybase.height.app/T-1355
|
||||
// 工作流人工节点的 `自定义表单` 区块,与其它表单区块不同,根据它的数据表名称,获取到的字段列表为空,所以需要在这里特殊处理一下
|
||||
if (!fields?.length && currentForm) {
|
||||
currentForm.children = formatVariableScop(currentFormFields);
|
||||
|
@ -46,7 +46,7 @@ group:
|
||||
|
||||
### Built Type
|
||||
|
||||
NocoBase 提供了几个内置的组件,可以直接使用。
|
||||
TachyBase 提供了几个内置的组件,可以直接使用。
|
||||
|
||||
<code src="./demos/build-type.tsx"></code>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Field, Form } from '@tachybase/schema';
|
||||
import { ISchema, Schema, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
import { uid } from '@tachybase/schema';
|
||||
import _ from 'lodash';
|
||||
import { useMemo } from 'react';
|
||||
import { Field, Form, ISchema, Schema, uid, useFieldSchema, useForm } from '@tachybase/schema';
|
||||
|
||||
import _ from 'lodash';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import {
|
||||
DataBlockInitializer,
|
||||
DataSource,
|
||||
@ -14,7 +14,7 @@ import {
|
||||
useFormActiveFields,
|
||||
useFormBlockContext,
|
||||
} from '../';
|
||||
import { FieldOptions, useCollectionManager_deprecated, useCollection_deprecated } from '../collection-manager';
|
||||
import { FieldOptions, useCollection_deprecated, useCollectionManager_deprecated } from '../collection-manager';
|
||||
import { Collection, CollectionFieldOptions } from '../data-source/collection/Collection';
|
||||
import { useDataSourceManager } from '../data-source/data-source/DataSourceManagerProvider';
|
||||
import { isAssocField } from '../filter-provider/utils';
|
||||
@ -890,7 +890,7 @@ export const useCollectionDataSourceItems = ({
|
||||
getTemplatesByCollection,
|
||||
t,
|
||||
}).sort((item) => {
|
||||
// fix https://nocobase.height.app/T-3551
|
||||
// fix https://tachybase.height.app/T-3551
|
||||
const inherits = _.toArray(collection?.inherits || []);
|
||||
if (item.name === collection?.name || inherits.some((inheritName) => inheritName === item.name)) return -1;
|
||||
}),
|
||||
@ -898,7 +898,7 @@ export const useCollectionDataSourceItems = ({
|
||||
}));
|
||||
}, [allCollections, collection?.inherits, collection?.name, componentName, getTemplatesByCollection, t]);
|
||||
|
||||
// https://nocobase.height.app/T-3821
|
||||
// https://tachybase.height.app/T-3821
|
||||
// showAssociationFields 的值是固定不变的,所以在 if 语句里使用 hooks 是安全的
|
||||
if (showAssociationFields) {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
@ -1178,7 +1178,7 @@ export const createFormBlockSchema = (options: {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
properties: actions,
|
||||
@ -1313,7 +1313,7 @@ export const createTableBlockSchema = (options) => {
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
marginBottom: 'var(--nb-spacing)',
|
||||
marginBottom: 'var(--tb-spacing)',
|
||||
},
|
||||
},
|
||||
properties: {},
|
||||
|
@ -81,7 +81,7 @@ export const SchemaSettingsDefaultValue = function DefaultValueConfigure(props:
|
||||
const currentForm = scope.find((item) => item.value === '$nForm');
|
||||
const fields = getCollectionFields(name);
|
||||
|
||||
// fix https://nocobase.height.app/T-1355
|
||||
// fix https://tachybase.height.app/T-1355
|
||||
// 工作流人工节点的 `自定义表单` 区块,与其它表单区块不同,根据它的数据表名称,获取到的字段列表为空,所以需要在这里特殊处理一下
|
||||
if (!fields?.length && currentForm) {
|
||||
currentForm.children = formatVariableScop(getFields());
|
||||
|
@ -1,11 +1,12 @@
|
||||
import { Form } from '@tachybase/schema';
|
||||
// @ts-ignore
|
||||
import { Schema } from '@tachybase/schema';
|
||||
import _ from 'lodash';
|
||||
import React, { useCallback } from 'react';
|
||||
// @ts-ignore
|
||||
import { Form, Schema } from '@tachybase/schema';
|
||||
|
||||
import _ from 'lodash';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { CollectionFieldOptions_deprecated } from '../../collection-manager';
|
||||
import { Variable, useVariableScope } from '../../schema-component';
|
||||
import { useVariableScope, Variable } from '../../schema-component';
|
||||
import { useValues } from '../../schema-component/antd/filter/useValues';
|
||||
import { VariableOption, VariablesContextType } from '../../variables/types';
|
||||
import { isVariable } from '../../variables/utils/isVariable';
|
||||
@ -160,7 +161,7 @@ export const getShouldChange = ({
|
||||
return true;
|
||||
}
|
||||
|
||||
// `json` 可以选择任意类型的变量,详见:https://nocobase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#FPLfdSRDEoXR65xW0mBcdfL5n0c
|
||||
// `json` 可以选择任意类型的变量,详见:https://tachybase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#FPLfdSRDEoXR65xW0mBcdfL5n0c
|
||||
if (collectionField.interface === 'json') {
|
||||
return true;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Form } from '@tachybase/schema';
|
||||
import { Schema } from '@tachybase/schema';
|
||||
import { Form, Schema } from '@tachybase/schema';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useFormBlockContext } from '../../../block-provider';
|
||||
import { CollectionFieldOptions_deprecated } from '../../../collection-manager';
|
||||
import { useBaseVariable } from './useBaseVariable';
|
||||
@ -36,7 +37,7 @@ export const useFormVariable = ({ collectionName, collectionField, schema, noDis
|
||||
collectionName: collectionName,
|
||||
noDisabled,
|
||||
returnFields: (fields, option) => {
|
||||
// fix https://nocobase.height.app/T-2277
|
||||
// fix https://tachybase.height.app/T-2277
|
||||
return fields;
|
||||
// const activeFieldsName = getActiveFieldsName?.('form') || [];
|
||||
|
||||
@ -76,7 +77,7 @@ export const useCurrentFormVariable = ({
|
||||
collectionName: collectionName,
|
||||
noDisabled,
|
||||
returnFields: (fields, option) => {
|
||||
// fix https://nocobase.height.app/T-2277
|
||||
// fix https://tachybase.height.app/T-2277
|
||||
return fields;
|
||||
// const activeFieldsName = getActiveFieldsName?.('form') || [];
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user