mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:16:26 +00:00
refactor: table:configureColumns
This commit is contained in:
parent
bcab6c665d
commit
9146031398
@ -48,7 +48,7 @@ export class SubTableFieldInterface extends CollectionFieldInterface {
|
||||
},
|
||||
[field.name]: {
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowSelection: {
|
||||
|
@ -622,7 +622,7 @@ test.describe('creation form block schema settings', () => {
|
||||
.hover();
|
||||
await page.mouse.move(100, 0);
|
||||
|
||||
await page.getByLabel('schema-initializer-AssociationField.SubTable-fieldInitializers:tableColumn-users').hover();
|
||||
await page.getByLabel('schema-initializer-AssociationField.SubTable-table:configureColumns-users').hover();
|
||||
await page.getByRole('menuitem', { name: 'Nickname' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Username' }).click();
|
||||
|
||||
@ -1014,7 +1014,7 @@ test.describe('creation form block schema settings', () => {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -350,7 +350,7 @@ export const T2174 = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -944,7 +944,7 @@ export const T2614: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -2202,7 +2202,7 @@ export const T2993: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -2613,7 +2613,7 @@ export const T2615: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -3881,7 +3881,7 @@ export const T2845: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -4753,7 +4753,7 @@ export const T2200 = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -5125,7 +5125,7 @@ export const T3106: PageConfig = {
|
||||
version: '2.0',
|
||||
type: 'void',
|
||||
'x-component': 'AssociationField.SubTable',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-initializer-props': {
|
||||
action: false,
|
||||
},
|
||||
|
@ -99,6 +99,6 @@ test.describe('configure actions column', () => {
|
||||
});
|
||||
|
||||
async function createActionColumn(page: Page) {
|
||||
await page.getByLabel('schema-initializer-TableV2.Selector-fieldInitializers:tableColumn-users').hover();
|
||||
await page.getByLabel('schema-initializer-TableV2.Selector-table:configureColumns-users').hover();
|
||||
await page.getByRole('menuitem', { name: 'Action column' }).click();
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ export const tableColumnInitializers_deprecated = new CompatibleSchemaInitialize
|
||||
|
||||
export const tableColumnInitializers = new CompatibleSchemaInitializer(
|
||||
{
|
||||
name: 'fieldInitializers:tableColumn',
|
||||
name: 'table:configureColumns',
|
||||
insertPosition: 'beforeEnd',
|
||||
icon: 'SettingOutlined',
|
||||
title: '{{t("Configure columns")}}',
|
||||
|
@ -70,9 +70,7 @@ test.describe('configure columns', () => {
|
||||
test.describe.configure({ retries: process.env.CI ? 4 : 0 });
|
||||
test('action column & display collection fields & display association fields', async ({ page, mockPage }) => {
|
||||
await mockPage(oneEmptyTable).goto();
|
||||
const configureColumnButton = page.getByLabel(
|
||||
'schema-initializer-TableV2-fieldInitializers:tableColumn-t_unp4scqamw9',
|
||||
);
|
||||
const configureColumnButton = page.getByLabel('schema-initializer-TableV2-table:configureColumns-t_unp4scqamw9');
|
||||
|
||||
// Action column -------------------------------------------------------------
|
||||
// 1. 点击开关,可以开启和关闭 Action column
|
||||
|
@ -101,7 +101,7 @@ test.describe('table block schema settings', () => {
|
||||
).toBeChecked();
|
||||
await expect(page.getByRole('menuitem', { name: 'Set default sorting rules' })).toBeHidden();
|
||||
// 显示出来 email 和 ID
|
||||
await page.getByLabel('schema-initializer-TableV2-fieldInitializers:tableColumn-general').hover();
|
||||
await page.getByLabel('schema-initializer-TableV2-table:configureColumns-general').hover();
|
||||
await page.getByRole('menuitem', { name: 'email' }).click();
|
||||
await page.getByRole('menuitem', { name: 'ID', exact: true }).click();
|
||||
await page.getByLabel('schema-initializer-TableV2-').click();
|
||||
@ -141,7 +141,7 @@ test.describe('table block schema settings', () => {
|
||||
}
|
||||
|
||||
async function createColumnItem(page: Page, fieldName: string) {
|
||||
await page.getByLabel('schema-initializer-TableV2-fieldInitializers:tableColumn-general').hover();
|
||||
await page.getByLabel('schema-initializer-TableV2-table:configureColumns-general').hover();
|
||||
await page.getByRole('menuitem', { name: fieldName, exact: true }).click();
|
||||
await page.mouse.move(300, 0);
|
||||
}
|
||||
@ -213,7 +213,7 @@ test.describe('table block schema settings', () => {
|
||||
await page.getByRole('button', { name: 'OK', exact: true }).click();
|
||||
|
||||
// 显示出来 email 和 ID
|
||||
await page.getByLabel('schema-initializer-TableV2-fieldInitializers:tableColumn-general').hover();
|
||||
await page.getByLabel('schema-initializer-TableV2-table:configureColumns-general').hover();
|
||||
await page.getByRole('menuitem', { name: 'email' }).click();
|
||||
await page.getByRole('menuitem', { name: 'ID', exact: true }).click();
|
||||
await page.mouse.move(300, 0);
|
||||
|
@ -87,7 +87,7 @@ export const T2183 = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -246,7 +246,7 @@ export const T2186 = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -383,7 +383,7 @@ export const T2187 = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -74,7 +74,7 @@ export const T2797: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -654,7 +654,7 @@ export const T2838: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -122,7 +122,7 @@ export default {
|
||||
SubTable: {
|
||||
type: 'void',
|
||||
'x-component': 'AssociationField.SubTable',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-initializer-props': {
|
||||
action: false,
|
||||
},
|
||||
|
@ -1365,7 +1365,7 @@ export const createTableBlockSchema = (options) => {
|
||||
},
|
||||
[uid()]: {
|
||||
type: 'array',
|
||||
'x-initializer': tableColumnInitializers ?? 'fieldInitializers:tableColumn',
|
||||
'x-initializer': tableColumnInitializers ?? 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -1469,7 +1469,7 @@ export const createTableSelectorSchema = (options) => {
|
||||
},
|
||||
value: {
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2.Selector',
|
||||
'x-component-props': {
|
||||
rowSelection: {
|
||||
|
@ -208,7 +208,7 @@ export const oneEmptyTable: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -1468,7 +1468,7 @@ export const oneEmptyTableBlockWithActions: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -2248,7 +2248,7 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -2799,7 +2799,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -4537,7 +4537,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -5926,7 +5926,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: Pag
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -6090,7 +6090,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: Pag
|
||||
'x-component':
|
||||
'AssociationField.SubTable',
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-initializer-props': {
|
||||
action: false,
|
||||
},
|
||||
@ -6750,7 +6750,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: PageConfig =
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -8070,7 +8070,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndMediaFields: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -9125,7 +9125,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: PageConfig
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -10211,7 +10211,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: PageConf
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -11806,7 +11806,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: PageConfig
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -13202,7 +13202,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields: PageConfi
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -14468,7 +14468,7 @@ export const oneEmptyTableWithTreeCollection: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -14751,7 +14751,7 @@ export const oneCollapseAndOneTableWithSameCollection: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -15551,7 +15551,7 @@ export const oneTableSubformWithMultiLevelAssociationFields: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -17267,7 +17267,7 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -17557,7 +17557,7 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = {
|
||||
'x-component':
|
||||
'AssociationField.SubTable',
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-initializer-props': {
|
||||
action: false,
|
||||
},
|
||||
@ -17899,7 +17899,7 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = {
|
||||
'x-component':
|
||||
'AssociationField.SubTable',
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-initializer-props': {
|
||||
action: false,
|
||||
},
|
||||
@ -18442,7 +18442,7 @@ export const formBlockDefaultValueTemplate: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -19002,7 +19002,7 @@ export const oneFormAndOneTableWithSameCollection: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -19193,7 +19193,7 @@ export const twoTableWithSameCollection: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -19301,7 +19301,7 @@ export const twoTableWithSameCollection: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -19458,7 +19458,7 @@ export const twoTableWithAssociationFields: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -19565,7 +19565,7 @@ export const twoTableWithAssociationFields: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -19723,7 +19723,7 @@ export const oneEmptyTableBlockBasedOnUsers = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -19904,7 +19904,7 @@ export const checkboxForTableRow = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -767,7 +767,7 @@ export const oneTableBlock: PageConfig = {
|
||||
type: 'array',
|
||||
version: '2.0',
|
||||
'x-component': 'TableV2',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
useProps: '{{ useTableBlockProps }}',
|
||||
|
@ -170,7 +170,7 @@ export const oneEmptyGantt: PageConfig = {
|
||||
maxWidth: '35%',
|
||||
},
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -464,7 +464,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -213,7 +213,7 @@ export const oneEmptyGantt: PageConfig = {
|
||||
maxWidth: '35%',
|
||||
},
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -457,7 +457,7 @@ export const oneEmptyTableBlockWithCustomizeUpdate: PageConfig = {
|
||||
type: 'array',
|
||||
version: '2.0',
|
||||
'x-component': 'TableV2',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
useProps: '{{ useTableBlockProps }}',
|
||||
|
@ -170,7 +170,7 @@ export const oneEmptyGantt: PageConfig = {
|
||||
maxWidth: '35%',
|
||||
},
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
@ -384,7 +384,7 @@ export const oneEmptyTableBlockWithDuplicateActions: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -152,7 +152,7 @@ export const oneTableWithViewAction: PageConfig = {
|
||||
type: 'array',
|
||||
version: '2.0',
|
||||
'x-component': 'TableV2',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
useProps: '{{ useTableBlockProps }}',
|
||||
|
@ -260,7 +260,7 @@ test.describe('form item & create form', () => {
|
||||
await expect(
|
||||
page
|
||||
.getByLabel('block-item-CollectionField-general-form-general.manyToMany-manyToMany')
|
||||
.getByLabel('schema-initializer-AssociationField.SubTable-fieldInitializers:tableColumn-users'),
|
||||
.getByLabel('schema-initializer-AssociationField.SubTable-table:configureColumns-users'),
|
||||
).toBeVisible();
|
||||
|
||||
// 选择 Sub-form
|
||||
|
@ -6,7 +6,7 @@ export async function showSettingsMenu(page: Page, fieldName: string) {
|
||||
}
|
||||
|
||||
export async function createColumnItem(page: Page, fieldName: string) {
|
||||
await page.getByLabel('schema-initializer-TableV2-fieldInitializers:tableColumn-general').hover();
|
||||
await page.getByLabel('schema-initializer-TableV2-table:configureColumns-general').hover();
|
||||
await page.getByRole('menuitem', { name: fieldName, exact: true }).click();
|
||||
await page.mouse.move(300, 0);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ test('BlockInitializers should add gantt block', async ({ page, mockPage, mockCo
|
||||
test.describe('configure fields', () => {
|
||||
test('add field,then remove field in gantt block', async ({ page, mockPage, mockRecord }) => {
|
||||
await mockPage(oneEmptyGantt).goto();
|
||||
await page.getByLabel('schema-initializer-TableV2-fieldInitializers:tableColumn-general').hover();
|
||||
await page.getByLabel('schema-initializer-TableV2-table:configureColumns-general').hover();
|
||||
await page.getByRole('menuitem', { name: 'ID' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Single line text2' }).click();
|
||||
//添加字段
|
||||
@ -43,7 +43,7 @@ test.describe('configure fields', () => {
|
||||
test('add assciation field should appends association', async ({ page, mockPage, mockRecord }) => {
|
||||
await mockPage(oneEmptyGantt).goto();
|
||||
await mockRecord('general', { singleLineText: 'singleLineText', manyToOne: { id: 1 } });
|
||||
await page.getByLabel('schema-initializer-TableV2-fieldInitializers:tableColumn-general').hover();
|
||||
await page.getByLabel('schema-initializer-TableV2-table:configureColumns-general').hover();
|
||||
|
||||
//关系字段,断言请求的appends是否符合预期
|
||||
const [request] = await Promise.all([
|
||||
|
@ -213,7 +213,7 @@ export const oneEmptyGantt: PageConfig = {
|
||||
maxWidth: '35%',
|
||||
},
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -68,7 +68,7 @@ export const createGanttBlockSchema = (options) => {
|
||||
},
|
||||
},
|
||||
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component': 'TableV2',
|
||||
'x-component-props': {
|
||||
rowKey: 'id',
|
||||
|
@ -284,7 +284,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'nd7c9jym6f9',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -488,7 +488,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
properties: {
|
||||
gpysrsz6uw3: {
|
||||
_isJSONSchemaObject: true,
|
||||
@ -673,7 +673,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
properties: {
|
||||
ppttymwsr3d: {
|
||||
_isJSONSchemaObject: true,
|
||||
@ -901,7 +901,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
properties: {
|
||||
xfyrokl5xzu: {
|
||||
_isJSONSchemaObject: true,
|
||||
@ -1199,8 +1199,7 @@ export default {
|
||||
useDataSource:
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'n1svf2lkvqd',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -1391,8 +1390,7 @@ export default {
|
||||
useDataSource:
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'ymddh2e0ufc',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -1563,7 +1561,7 @@ export default {
|
||||
type: 'array',
|
||||
title: '{{t("Fields")}}',
|
||||
'x-component': 'Table.Array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component-props': {
|
||||
pagination: false,
|
||||
expandable: { childrenColumnName: '__nochildren__' },
|
||||
@ -1833,7 +1831,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': '0d2h3ova480',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -1997,7 +1995,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'z4rlx8hfjtq',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -2224,7 +2222,7 @@ export default {
|
||||
useAction: '{{cm.useMoveAction}}',
|
||||
useDataSource: '{{cm.useDataSourceFromRAC}}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
properties: {
|
||||
actions: {
|
||||
_isJSONSchemaObject: true,
|
||||
@ -2456,8 +2454,7 @@ export default {
|
||||
useDataSource:
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': '4ytlnx3h4r8',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -2677,8 +2674,7 @@ export default {
|
||||
useDataSource:
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'v25lnvhyzzf',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -2827,8 +2823,7 @@ export default {
|
||||
useDataSource:
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'zpvg0dqa6ah',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -3153,8 +3148,7 @@ export default {
|
||||
type: 'array',
|
||||
title: '{{t("Fields")}}',
|
||||
'x-component': 'Table.Array',
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component-props': {
|
||||
pagination: false,
|
||||
expandable: {
|
||||
@ -3287,7 +3281,7 @@ export default {
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-uid': 'cobw3nz2wb7',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -3691,7 +3685,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'je1aq3fa393',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -3895,7 +3889,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
properties: {
|
||||
cj30vjztnkq: {
|
||||
_isJSONSchemaObject: true,
|
||||
@ -4081,7 +4075,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
properties: {
|
||||
dvv0tf3p4o9: {
|
||||
_isJSONSchemaObject: true,
|
||||
@ -4309,7 +4303,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
properties: {
|
||||
dncah8wtscx: {
|
||||
_isJSONSchemaObject: true,
|
||||
@ -4613,7 +4607,7 @@ export default {
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-uid': 's8hao0uqg8g',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -4811,7 +4805,7 @@ export default {
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-uid': '0v1u8mu6z1p',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -4986,7 +4980,7 @@ export default {
|
||||
type: 'array',
|
||||
title: '{{t("Fields")}}',
|
||||
'x-component': 'Table.Array',
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-component-props': {
|
||||
pagination: false,
|
||||
expandable: { childrenColumnName: '__nochildren__' },
|
||||
@ -5148,7 +5142,7 @@ export default {
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-uid': '369iecwk6gw',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -5359,7 +5353,7 @@ export default {
|
||||
'{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer':
|
||||
'fieldInitializers:tableColumn',
|
||||
'table:configureColumns',
|
||||
'x-uid': 'jffadc6g4j0',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -5616,7 +5610,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'i9y89citemg',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -6002,7 +5996,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'v3abytn9e51',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
@ -6187,7 +6181,7 @@ export default {
|
||||
rowSelection: { type: 'checkbox' },
|
||||
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
||||
},
|
||||
'x-initializer': 'fieldInitializers:tableColumn',
|
||||
'x-initializer': 'table:configureColumns',
|
||||
'x-uid': 'p1tbjz52j84',
|
||||
'x-async': false,
|
||||
'x-index': 1,
|
||||
|
Loading…
Reference in New Issue
Block a user