diff --git a/packages/core/client/src/collection-manager/interfaces/subTable.ts b/packages/core/client/src/collection-manager/interfaces/subTable.ts index e67cec4cc5..0dbb680bbd 100644 --- a/packages/core/client/src/collection-manager/interfaces/subTable.ts +++ b/packages/core/client/src/collection-manager/interfaces/subTable.ts @@ -42,7 +42,7 @@ export class SubTableFieldInterface extends CollectionFieldInterface { properties: { actions: { type: 'void', - 'x-initializer': 'SubTableActionInitializers', + 'x-initializer': 'actionInitializers:subTable', 'x-component': 'TableField.ActionBar', 'x-component-props': {}, }, diff --git a/packages/core/client/src/modules/actions/submit/updateSubmitActionSettings.tsx b/packages/core/client/src/modules/actions/submit/updateSubmitActionSettings.tsx index f10e286d6f..ec1862ab3f 100644 --- a/packages/core/client/src/modules/actions/submit/updateSubmitActionSettings.tsx +++ b/packages/core/client/src/modules/actions/submit/updateSubmitActionSettings.tsx @@ -76,7 +76,7 @@ export const submitActionSettings = new SchemaSettings({ const fieldSchema = useFieldSchema(); return ( fieldSchema['x-action'] === 'submit' && - fieldSchema.parent?.['x-initializer'] === 'CreateFormActionInitializers' + fieldSchema.parent?.['x-initializer'] === 'actionInitializers:createForm' ); }, }, diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.tsx b/packages/core/client/src/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.tsx index 42c0684a59..fa1fae930d 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.tsx @@ -23,7 +23,7 @@ export const DetailsBlockInitializer = () => { actionInitializers: (collection.template !== 'view' || collection?.writableView) && collection.template !== 'sql' && - 'DetailsActionInitializers', + 'actionInitializers:detailsMulti', settings: 'blockSettings:multiDataDetails', }); insert(schema); diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.tsx b/packages/core/client/src/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.tsx index 39eae34645..5acec03948 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.tsx @@ -26,7 +26,7 @@ export const RecordReadPrettyFormBlockInitializer = () => { const association = useBlockAssociationContext(); const { block } = useBlockRequestContext(); const actionInitializers = - block !== 'TableField' ? itemConfig.actionInitializers || 'ReadPrettyFormActionInitializers' : null; + block !== 'TableField' ? itemConfig.actionInitializers || 'actionInitializers:detailsSingle' : null; return ( { const s = await getTemplateSchemaByMode(item); if (item.template.componentName === 'FormItem') { const blockSchema = createFormBlockSchema({ - actionInitializers: 'CreateFormActionInitializers', + actionInitializers: 'actionInitializers:createForm', association, dataSource: collection.dataSource, collection: collection.name, @@ -41,7 +41,7 @@ export const CreateFormBlockInitializer = () => { } else { insert( createFormBlockSchema({ - actionInitializers: 'CreateFormActionInitializers', + actionInitializers: 'actionInitializers:createForm', association, dataSource: collection.dataSource, collection: collection.name, diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/RecordFormBlockInitializer.tsx b/packages/core/client/src/modules/blocks/data-blocks/form/RecordFormBlockInitializer.tsx index 245fb6c0c9..f9d638e209 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/RecordFormBlockInitializer.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/form/RecordFormBlockInitializer.tsx @@ -29,7 +29,7 @@ export const RecordFormBlockInitializer = () => { action: 'get', useSourceId: '{{ useSourceIdFromParentRecord }}', useParams: '{{ useParamsFromRecord }}', - actionInitializers: 'UpdateFormActionInitializers', + actionInitializers: 'actionInitializers:updateForm', template: s, settings: 'blockSettings:editForm', }); @@ -49,7 +49,7 @@ export const RecordFormBlockInitializer = () => { action: 'get', useSourceId: '{{ useSourceIdFromParentRecord }}', useParams: '{{ useParamsFromRecord }}', - actionInitializers: 'UpdateFormActionInitializers', + actionInitializers: 'actionInitializers:updateForm', settings: 'blockSettings:editForm', }), ); diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts index b3d753a6fd..b143f854e3 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts @@ -810,7 +810,7 @@ test.describe('creation form block schema settings', () => { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -919,7 +919,7 @@ test.describe('creation form block schema settings', () => { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -1033,7 +1033,7 @@ test.describe('creation form block schema settings', () => { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts index c086ff69b6..8e48b0ccb9 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts @@ -235,7 +235,7 @@ export const T2165 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -335,7 +335,7 @@ export const T2174 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -370,7 +370,7 @@ export const T2174 = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-index': 1, properties: { actions: { @@ -543,7 +543,8 @@ export const T2174 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': + 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -928,7 +929,7 @@ export const T2614: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -962,7 +963,7 @@ export const T2614: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -1070,7 +1071,7 @@ export const T2614: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -1581,7 +1582,8 @@ export const T2614: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -1768,7 +1770,7 @@ export const T2993: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -2136,7 +2138,7 @@ export const T2993: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -2221,7 +2223,7 @@ export const T2993: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-index': 1, properties: { actions: { @@ -2351,7 +2353,7 @@ export const T2615: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -2546,7 +2548,7 @@ export const T2615: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -2631,7 +2633,7 @@ export const T2615: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -2830,7 +2832,8 @@ export const T2615: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -2982,7 +2985,7 @@ export const T2615: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -3259,7 +3262,7 @@ export const T2845: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -3743,7 +3746,7 @@ export const T2845: PageConfig = { '2.0', type: 'void', 'x-initializer': - 'UpdateFormActionInitializers', + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': @@ -3824,7 +3827,7 @@ export const T2845: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -3900,7 +3903,7 @@ export const T2845: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-index': 1, properties: { actions: { @@ -4235,7 +4238,8 @@ export const T2845: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -4387,7 +4391,7 @@ export const T2845: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -4737,7 +4741,7 @@ export const T2200 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -4771,7 +4775,7 @@ export const T2200 = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -4926,7 +4930,8 @@ export const T2200 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -5187,7 +5192,7 @@ export const T3106: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -5448,7 +5453,7 @@ export const T3251: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts index e70b07605b..e1cb9f7c11 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts @@ -50,7 +50,7 @@ export const T2183 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -106,7 +106,7 @@ export const T2183 = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -209,7 +209,7 @@ export const T2186 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -265,7 +265,7 @@ export const T2186 = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -368,7 +368,7 @@ export const T2187 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -402,7 +402,7 @@ export const T2187 = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -573,7 +573,8 @@ export const T2187 = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': + 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', diff --git a/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts index 90da04c6df..a3b10362e4 100644 --- a/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts @@ -59,7 +59,7 @@ export const T2797: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -94,7 +94,7 @@ export const T2797: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-index': 1, properties: { actions: { @@ -223,7 +223,8 @@ export const T2797: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -382,7 +383,7 @@ export const T2797: PageConfig = { '2.0', type: 'void', 'x-initializer': - 'UpdateFormActionInitializers', + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': @@ -638,7 +639,7 @@ export const T2838: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -673,7 +674,7 @@ export const T2838: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-index': 1, properties: { actions: { @@ -792,7 +793,7 @@ export const T2838: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -935,7 +936,7 @@ export const T2838: PageConfig = { '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': @@ -1222,7 +1223,7 @@ export const T2838: PageConfig = { '2.0', type: 'void', 'x-initializer': - 'UpdateFormActionInitializers', + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': diff --git a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx index bff60c09e6..d0d47df0aa 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx @@ -671,7 +671,7 @@ export const actionSettingsItems: SchemaSettingOptions['items'] = [ const fieldSchema = useFieldSchema(); return ( fieldSchema['x-action'] === 'submit' && - fieldSchema.parent?.['x-initializer'] === 'CreateFormActionInitializers' + fieldSchema.parent?.['x-initializer'] === 'actionInitializers:createForm' ); }, }, diff --git a/packages/core/client/src/schema-initializer/items/RecordAssociationFormBlockInitializer.tsx b/packages/core/client/src/schema-initializer/items/RecordAssociationFormBlockInitializer.tsx index 0d22eec64c..2e8c686cac 100644 --- a/packages/core/client/src/schema-initializer/items/RecordAssociationFormBlockInitializer.tsx +++ b/packages/core/client/src/schema-initializer/items/RecordAssociationFormBlockInitializer.tsx @@ -23,8 +23,8 @@ export const RecordAssociationFormBlockInitializer = () => { onClick={async ({ item }) => { const action = ['hasOne', 'belongsTo'].includes(field.type) ? 'get' : null; const actionInitializers = ['hasOne', 'belongsTo'].includes(field.type) - ? 'UpdateFormActionInitializers' - : 'CreateFormActionInitializers'; + ? 'actionInitializers:updateForm' + : 'actionInitializers:createForm'; if (item.template) { const s = await getTemplateSchemaByMode(item); diff --git a/packages/core/client/src/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.tsx b/packages/core/client/src/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.tsx index 503c1c7b22..ccfc4bee43 100644 --- a/packages/core/client/src/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.tsx +++ b/packages/core/client/src/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.tsx @@ -20,7 +20,7 @@ export const RecordReadPrettyAssociationFormBlockInitializer = () => { const resource = `${field.collectionName}.${field.name}`; const { block } = useBlockRequestContext(); - const actionInitializers = block !== 'TableField' ? 'ReadPrettyFormActionInitializers' : null; + const actionInitializers = block !== 'TableField' ? 'actionInitializers:detailsSingle' : null; return ( { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-action-column': 'actions', properties: { [uid()]: { diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index 19bee2e573..b2129554d0 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -859,7 +859,7 @@ export const useCollectionDataSourceItems = ( export const createDetailsBlockSchema = (options) => { const { formItemInitializers = 'ReadPrettyFormItemInitializers', - actionInitializers = 'DetailsActionInitializers', + actionInitializers = 'actionInitializers:detailsMulti', collection, dataSource, association, @@ -932,8 +932,8 @@ export const createDetailsBlockSchema = (options) => { export const createListBlockSchema = (options) => { const { formItemInitializers = 'ReadPrettyFormItemInitializers', - actionInitializers = 'ListActionInitializers', - itemActionInitializers = 'ListItemActionInitializers', + actionInitializers = 'actionInitializers:list', + itemActionInitializers = 'actionInitializers:listItem', collection, dataSource, association, @@ -1022,8 +1022,8 @@ export const createListBlockSchema = (options) => { export const createGridCardBlockSchema = (options) => { const { formItemInitializers = 'ReadPrettyFormItemInitializers', - actionInitializers = 'GridCardActionInitializers', - itemActionInitializers = 'GridCardItemActionInitializers', + actionInitializers = 'actionInitializers:gridCard', + itemActionInitializers = 'actionInitializers:gridCardItem', collection, association, resource, @@ -1114,7 +1114,7 @@ export const createGridCardBlockSchema = (options) => { export const createFormBlockSchema = (options) => { const { formItemInitializers = 'FormItemInitializers', - actionInitializers = 'FormActionInitializers', + actionInitializers = 'actionInitializers:form', collection, resource, dataSource, @@ -1187,7 +1187,7 @@ export const createFormBlockSchema = (options) => { export const createFilterFormBlockSchema = (options) => { const { formItemInitializers = 'FilterFormItemInitializers', - actionInitializers = 'FilterFormActionInitializers', + actionInitializers = 'actionInitializers:filterForm', collection, resource, association, @@ -1252,7 +1252,7 @@ export const createFilterFormBlockSchema = (options) => { export const createReadPrettyFormBlockSchema = (options) => { const { formItemInitializers = 'ReadPrettyFormItemInitializers', - actionInitializers = 'ReadPrettyFormActionInitializers', + actionInitializers = 'actionInitializers:detailsSingle', collection, association, dataSource, @@ -1354,7 +1354,7 @@ export const createTableBlockSchema = (options) => { properties: { actions: { type: 'void', - 'x-initializer': tableActionInitializers ?? 'TableActionInitializers', + 'x-initializer': tableActionInitializers ?? 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -1382,7 +1382,7 @@ export const createTableBlockSchema = (options) => { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': tableActionColumnInitializers ?? 'TableActionColumnInitializers', + 'x-initializer': tableActionColumnInitializers ?? 'actionInitializers:tableColumnAction', properties: { [uid()]: { type: 'void', @@ -1458,7 +1458,7 @@ export const createTableSelectorSchema = (options) => { properties: { [uid()]: { type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { diff --git a/packages/core/test/src/e2e/templatesOfPage.ts b/packages/core/test/src/e2e/templatesOfPage.ts index d5873905fc..4dbc2ff55d 100644 --- a/packages/core/test/src/e2e/templatesOfPage.ts +++ b/packages/core/test/src/e2e/templatesOfPage.ts @@ -193,7 +193,7 @@ export const oneEmptyTable: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -227,7 +227,7 @@ export const oneEmptyTable: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -349,7 +349,7 @@ export const oneEmptyForm: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -459,7 +459,7 @@ export const oneEmptyFormWithActions: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -619,7 +619,7 @@ export const oneEmptyDetailsBlock: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'DetailsActionInitializers', + 'x-initializer': 'actionInitializers:detailsMulti', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -738,7 +738,7 @@ export const oneEmptyListBlock: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'ListActionInitializers', + 'x-initializer': 'actionInitializers:list', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -786,7 +786,7 @@ export const oneEmptyListBlock: PageConfig = { version: '2.0', type: 'void', 'x-align': 'left', - 'x-initializer': 'ListItemActionInitializers', + 'x-initializer': 'actionInitializers:listItem', 'x-component': 'ActionBar', 'x-component-props': { useProps: '{{ useListActionBarProps }}', @@ -890,7 +890,7 @@ export const oneEmptyGridCardBlock: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'GridCardActionInitializers', + 'x-initializer': 'actionInitializers:gridCard', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -938,7 +938,7 @@ export const oneEmptyGridCardBlock: PageConfig = { version: '2.0', type: 'void', 'x-align': 'left', - 'x-initializer': 'GridCardItemActionInitializers', + 'x-initializer': 'actionInitializers:gridCardItem', 'x-component': 'ActionBar', 'x-component-props': { useProps: '{{ useGridCardActionBarProps }}', @@ -1052,7 +1052,7 @@ export const oneEmptyFilterFormBlock: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FilterFormActionInitializers', + 'x-initializer': 'actionInitializers:filterForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -1237,7 +1237,7 @@ export const oneEmptyTableBlockWithActions: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -1487,7 +1487,7 @@ export const oneEmptyTableBlockWithActions: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -1844,7 +1844,7 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -1976,7 +1976,7 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -2182,7 +2182,7 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -2267,7 +2267,7 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -2373,7 +2373,7 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -2546,7 +2546,8 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -2703,7 +2704,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -2818,7 +2819,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -3044,7 +3045,7 @@ export const oneFormBlockWithRolesFieldBasedUsers: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -3673,7 +3674,7 @@ export const oneFormBlockWithAllAssociationFieldsAndSelectorMode: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -3780,7 +3781,7 @@ export const oneDetailBlockWithM2oFieldToGeneral: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'DetailsActionInitializers', + 'x-initializer': 'actionInitializers:detailsMulti', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -3942,7 +3943,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -4449,7 +4450,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -4556,7 +4557,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -4662,7 +4663,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -5713,7 +5714,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -5911,7 +5913,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: Pag _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -5945,7 +5947,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: Pag 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -6162,7 +6164,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: Pag _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -6320,7 +6323,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: PageConfig = _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -6661,7 +6664,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: PageConfig = _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -6768,7 +6771,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: PageConfig = 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -6876,7 +6879,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: PageConfig = version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -7577,7 +7580,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: PageConfig = _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -7757,7 +7761,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndMediaFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -7981,7 +7985,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndMediaFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -8088,7 +8092,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndMediaFields: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -8196,7 +8200,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndMediaFields: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -8669,7 +8673,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndMediaFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -8849,7 +8854,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: PageConfig _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -9036,7 +9041,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: PageConfig _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -9143,7 +9148,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: PageConfig 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -9251,7 +9256,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: PageConfig version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -9648,7 +9653,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: PageConfig _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -9828,7 +9834,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: PageConf _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -10122,7 +10128,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: PageConf _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -10229,7 +10235,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: PageConf 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -10337,7 +10343,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: PageConf version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -10950,7 +10956,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: PageConf _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -11349,7 +11356,7 @@ export const oneFilterFormBlockWithAllAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FilterFormActionInitializers', + 'x-initializer': 'actionInitializers:filterForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -11453,7 +11460,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: PageConfig _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -11717,7 +11724,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: PageConfig _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -11824,7 +11831,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: PageConfig 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -11932,7 +11939,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: PageConfig version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -12487,7 +12494,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: PageConfig _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -12667,7 +12675,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields: PageConfi _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -13113,7 +13121,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields: PageConfi _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -13220,7 +13228,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields: PageConfi 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -13328,7 +13336,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields: PageConfi version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -14279,7 +14287,8 @@ export const oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields: PageConfi _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -14452,7 +14461,7 @@ export const oneEmptyTableWithTreeCollection: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -14486,7 +14495,7 @@ export const oneEmptyTableWithTreeCollection: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -14735,7 +14744,7 @@ export const oneCollapseAndOneTableWithSameCollection: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -15015,7 +15024,7 @@ export const oneFormWithMultiLevelAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -15332,7 +15341,7 @@ export const oneSubformWithMultiLevelAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -15455,7 +15464,7 @@ export const oneTableSubformWithMultiLevelAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -15569,7 +15578,7 @@ export const oneTableSubformWithMultiLevelAssociationFields: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -15677,7 +15686,7 @@ export const oneTableSubformWithMultiLevelAssociationFields: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -16994,7 +17003,8 @@ export const oneTableSubformWithMultiLevelAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -17171,7 +17181,7 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -17285,7 +17295,7 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -17393,7 +17403,7 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = { version: '2.0', type: 'void', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -18008,7 +18018,8 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -18185,7 +18196,7 @@ export const formBlockDefaultValueTemplate: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -18375,7 +18386,7 @@ export const formBlockDefaultValueTemplate: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -18460,7 +18471,7 @@ export const formBlockDefaultValueTemplate: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -18732,7 +18743,7 @@ export const oneFormBlockBasedOnUsers: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FormActionInitializers', + 'x-initializer': 'actionInitializers:form', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -18882,7 +18893,7 @@ export const oneFormAndOneTableWithSameCollection: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'FilterFormActionInitializers', + 'x-initializer': 'actionInitializers:filterForm', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', @@ -18986,7 +18997,7 @@ export const oneFormAndOneTableWithSameCollection: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -19177,7 +19188,7 @@ export const twoTableWithSameCollection: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -19285,7 +19296,7 @@ export const twoTableWithSameCollection: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -19442,7 +19453,7 @@ export const twoTableWithAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -19549,7 +19560,7 @@ export const twoTableWithAssociationFields: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -19707,7 +19718,7 @@ export const oneEmptyTableBlockBasedOnUsers = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -19741,7 +19752,7 @@ export const oneEmptyTableBlockBasedOnUsers = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -19860,7 +19871,7 @@ export const checkboxForTableRow = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -19922,7 +19933,7 @@ export const checkboxForTableRow = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts index 61d15d9b99..bd37ad79b1 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/utils.ts @@ -56,7 +56,7 @@ export const oneTableBlock: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component-props': { style: { marginBottom: 'var(--nb-spacing)', @@ -435,7 +435,7 @@ export const oneTableBlock: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component-props': { style: { marginTop: 24, @@ -785,7 +785,7 @@ export const oneTableBlock: PageConfig = { 'x-designer': 'TableV2.ActionColumnDesigner', 'x-component': 'TableV2.Column', 'x-decorator': 'TableV2.Column.ActionBar', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-action-column': 'actions', 'x-component-props': { width: 400, @@ -1054,7 +1054,8 @@ export const oneTableBlock: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component-props': { style: { marginTop: 24, @@ -1739,7 +1740,8 @@ export const oneTableBlock: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'UpdateFormActionInitializers', + 'x-initializer': + 'actionInitializers:updateForm', 'x-component-props': { style: { marginTop: 24, @@ -1891,7 +1893,7 @@ export const oneTableBlock: PageConfig = { version: '2.0', 'x-component': 'ActionBar', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component-props': { style: { marginBottom: 24, diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx index 6dab740579..6347972c94 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/CreateFormBulkEditBlockInitializer.tsx @@ -27,7 +27,7 @@ export const CreateFormBulkEditBlockInitializer = () => { const s = await getTemplateSchemaByMode(item); if (item.template.componentName === 'FormItem') { const blockSchema = createFormBlockSchema({ - actionInitializers: 'CreateFormActionInitializers', + actionInitializers: 'actionInitializers:createForm', association, collection: collection.name, dataSource: collection.dataSource, @@ -44,7 +44,7 @@ export const CreateFormBulkEditBlockInitializer = () => { insert( createFormBlockSchema({ formItemInitializers: 'BulkEditFormItemInitializers', - actionInitializers: 'BulkEditFormActionInitializers', + actionInitializers: 'actionInitializers:blkEditForm', association, collection: collection.name, dataSource: collection.dataSource, diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts index 4b5a1728e9..391780ecc5 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts @@ -154,7 +154,7 @@ export const oneEmptyGantt: PageConfig = { marginBottom: 24, }, }, - 'x-initializer': 'GanttActionInitializers', + 'x-initializer': 'actionInitializers:gantt', 'x-uid': 'guwovmwt4c0', 'x-async': false, 'x-index': 1, @@ -190,7 +190,7 @@ export const oneEmptyGantt: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -368,7 +368,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -483,7 +483,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx index 7e4777088d..fb076f8805 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/index.tsx @@ -55,9 +55,9 @@ export class BulkEditPlugin extends Plugin { }, }; - this.app.schemaInitializerManager.addItem('TableActionInitializers', 'customize.bulkEdit', initializerData); - this.app.schemaInitializerManager.addItem('GanttActionInitializers', 'customize.bulkEdit', initializerData); - this.app.schemaInitializerManager.addItem('MapActionInitializers', 'customize.bulkEdit', initializerData); + this.app.schemaInitializerManager.addItem('actionInitializers:tableAction', 'customize.bulkEdit', initializerData); + this.app.schemaInitializerManager.addItem('actionInitializers:gantt', 'customize.bulkEdit', initializerData); + this.app.schemaInitializerManager.addItem('actionInitializers:map', 'customize.bulkEdit', initializerData); } } diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts index 43a065bffd..04822430af 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/utils.ts @@ -197,7 +197,7 @@ export const oneEmptyGantt: PageConfig = { marginBottom: 24, }, }, - 'x-initializer': 'GanttActionInitializers', + 'x-initializer': 'actionInitializers:gantt', 'x-uid': 'guwovmwt4c0', 'x-async': false, 'x-index': 1, @@ -233,7 +233,7 @@ export const oneEmptyGantt: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -408,7 +408,7 @@ export const oneEmptyTableBlockWithCustomizeUpdate: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component-props': { style: { marginBottom: 'var(--nb-spacing)', @@ -474,7 +474,7 @@ export const oneEmptyTableBlockWithCustomizeUpdate: PageConfig = { 'x-designer': 'TableV2.ActionColumnDesigner', 'x-component': 'TableV2.Column', 'x-decorator': 'TableV2.Column.ActionBar', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-action-column': 'actions', _isJSONSchemaObject: true, properties: { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx index 4340f6e908..bd85db5ac2 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/src/client/index.tsx @@ -25,9 +25,13 @@ export class PluginBulkUpdateClient extends Plugin { }, }; - this.app.schemaInitializerManager.addItem('TableActionInitializers', 'customize.bulkUpdate', initializerData); - this.app.schemaInitializerManager.addItem('GanttActionInitializers', 'customize.bulkUpdate', initializerData); - this.app.schemaInitializerManager.addItem('MapActionInitializers', 'customize.bulkUpdate', initializerData); + this.app.schemaInitializerManager.addItem( + 'actionInitializers:tableAction', + 'customize.bulkUpdate', + initializerData, + ); + this.app.schemaInitializerManager.addItem('actionInitializers:gantt', 'customize.bulkUpdate', initializerData); + this.app.schemaInitializerManager.addItem('actionInitializers:map', 'customize.bulkUpdate', initializerData); } } diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts index 815a4ee6f8..9811d3556a 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/utils.ts @@ -154,7 +154,7 @@ export const oneEmptyGantt: PageConfig = { marginBottom: 24, }, }, - 'x-initializer': 'GanttActionInitializers', + 'x-initializer': 'actionInitializers:gantt', 'x-uid': 'guwovmwt4c0', 'x-async': false, 'x-index': 1, @@ -190,7 +190,7 @@ export const oneEmptyGantt: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, @@ -368,7 +368,7 @@ export const oneEmptyTableBlockWithDuplicateActions: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component': 'ActionBar', 'x-component-props': { style: { @@ -403,7 +403,7 @@ export const oneEmptyTableBlockWithDuplicateActions: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts index 3a2abcf9cd..06606c1648 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/index.ts @@ -61,7 +61,7 @@ export class PluginDuplicateClient extends Plugin { }; this.app.schemaInitializerManager.addItem( - 'TableActionColumnInitializers', + 'actionInitializers:tableColumnAction', 'actions.duplicate', initializerTableData, ); diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts index 14f6800fbc..d2cf44b699 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/__e2e__/utils.ts @@ -137,7 +137,7 @@ export const oneTableWithViewAction: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'TableActionInitializers', + 'x-initializer': 'actionInitializers:tableAction', 'x-component-props': { style: { marginBottom: 'var(--nb-spacing)', @@ -169,7 +169,7 @@ export const oneTableWithViewAction: PageConfig = { 'x-designer': 'TableV2.ActionColumnDesigner', 'x-component': 'TableV2.Column', 'x-decorator': 'TableV2.Column.ActionBar', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', 'x-action-column': 'actions', _isJSONSchemaObject: true, properties: { @@ -277,7 +277,7 @@ export const oneTableWithViewAction: PageConfig = { version: '2.0', 'x-component': 'ActionBar', 'x-initializer': - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', 'x-component-props': { style: { marginBottom: 24, @@ -443,7 +443,7 @@ export const oneCalenderWithViewAction: PageConfig = { type: 'void', version: '2.0', 'x-component': 'CalendarV2.ActionBar', - 'x-initializer': 'CalendarActionInitializers', + 'x-initializer': 'actionInitializers:calendar', 'x-component-props': { style: { marginBottom: 24, @@ -668,7 +668,7 @@ export const oneCalenderWithViewAction: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'CreateFormActionInitializers', + 'x-initializer': 'actionInitializers:createForm', 'x-component-props': { style: { marginTop: 24, @@ -795,7 +795,7 @@ export const oneCalenderWithViewAction: PageConfig = { 'x-initializer': 'blockInitializers:record', _isJSONSchemaObject: true, 'x-initializer-props': { - actionInitializers: 'CalendarFormActionInitializers', + actionInitializers: 'actionInitializers:calendarForm', }, properties: { '0j7rb0bivys': { @@ -841,7 +841,7 @@ export const oneCalenderWithViewAction: PageConfig = { type: 'void', version: '2.0', 'x-component': 'ActionBar', - 'x-initializer': 'CalendarFormActionInitializers', + 'x-initializer': 'actionInitializers:calendarForm', 'x-component-props': { style: { marginBottom: 24, diff --git a/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx b/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx index 89e15fff0e..3f76d8dad3 100644 --- a/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-action-print/src/client/index.tsx @@ -19,11 +19,15 @@ export class PrintPlugin extends Plugin { }; this.app.schemaInitializerManager.addItem( - 'ReadPrettyFormActionInitializers', + 'actionInitializers:detailsSingle', + 'enableActions.print', + initializerData, + ); + this.app.schemaInitializerManager.addItem( + 'actionInitializers:calendarForm', 'enableActions.print', initializerData, ); - this.app.schemaInitializerManager.addItem('CalendarFormActionInitializers', 'enableActions.print', initializerData); } } diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx index 440a694f9a..99f3458eb8 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx @@ -17,9 +17,9 @@ export const AuditLogsBlockInitializer = () => { const schema = createTableBlockSchema({ collection: 'auditLogs', rowKey: 'id', - tableActionInitializers: 'AuditLogsTableActionInitializers', + tableActionInitializers: 'actionInitializers:auditLogsTable', tableColumnInitializers: 'AuditLogsTableColumnInitializers', - tableActionColumnInitializers: 'AuditLogsTableActionColumnInitializers', + tableActionColumnInitializers: 'actionInitializers:auditLogsTableColumn', tableBlockProvider: 'AuditLogsBlockProvider', disableTemplate: true, }); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx index 141c76c2bf..6e1fd9dd9d 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx +++ b/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx @@ -170,7 +170,7 @@ export const AuditLogs: any = () => { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { type: 'void', diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx index 5ec9f3719b..888d2d5841 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx @@ -8,7 +8,7 @@ export const AuditLogsTableActionColumnInitializer = () => { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'AuditLogsTableActionColumnInitializers', + 'x-initializer': 'actionInitializers:auditLogsTableColumn', 'x-action-column': 'actions', properties: { actions: { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/utils.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/utils.ts index c633b25ef3..33a2038b27 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/utils.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/utils.ts @@ -41,7 +41,7 @@ export const createCalendarBlockSchema = (options) => { marginBottom: 24, }, }, - 'x-initializer': 'CalendarActionInitializers', + 'x-initializer': 'actionInitializers:calendar', properties: {}, }, event: { @@ -76,7 +76,7 @@ export const createCalendarBlockSchema = (options) => { type: 'void', 'x-component': 'Grid', 'x-initializer-props': { - actionInitializers: 'CalendarFormActionInitializers', + actionInitializers: 'actionInitializers:calendarForm', }, 'x-initializer': 'blockInitializers:record', properties: {}, diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx index f85276afaa..64e976ddd8 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/filter/FilterBlockInitializer.tsx @@ -36,7 +36,7 @@ const createFilterSchema = () => { }, actions: { type: 'void', - 'x-initializer': 'ChartFilterActionInitializers', + 'x-initializer': 'actionInitializers:chartFilterAction', 'x-component': 'ActionBar', 'x-component-props': { layout: 'one-column', diff --git a/packages/plugins/@nocobase/plugin-export/src/client/index.ts b/packages/plugins/@nocobase/plugin-export/src/client/index.ts index 97ee42a6a8..c8997b3b12 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-export/src/client/index.ts @@ -22,9 +22,9 @@ export class ExportPlugin extends Plugin { }, }; - const tableActionInitializers = this.app.schemaInitializerManager.get('TableActionInitializers'); + const tableActionInitializers = this.app.schemaInitializerManager.get('actionInitializers:tableAction'); tableActionInitializers?.add('enableActions.export', initializerData); - this.app.schemaInitializerManager.addItem('GanttActionInitializers', 'enableActions.export', initializerData); + this.app.schemaInitializerManager.addItem('actionInitializers:gantt', 'enableActions.export', initializerData); this.app.schemaSettingsManager.add(exportActionSchemaSettings); } } diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx index dff9a349d3..7c8093af1a 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx @@ -24,7 +24,7 @@ export class FileManagerPlugin extends Plugin { this.registerStorageType(storageType.name, storageType); }); - const tableActionInitializers = this.app.schemaInitializerManager.get('TableActionInitializers'); + const tableActionInitializers = this.app.schemaInitializerManager.get('actionInitializers:tableAction'); tableActionInitializers?.add('enableActions.upload', { title: "{{t('Upload')}}", Component: 'UploadActionInitializer', diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts index f7dfdf4c7b..1df64ca9d9 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/__e2e__/utils.ts @@ -197,7 +197,7 @@ export const oneEmptyGantt: PageConfig = { marginBottom: 24, }, }, - 'x-initializer': 'GanttActionInitializers', + 'x-initializer': 'actionInitializers:gantt', 'x-uid': 'guwovmwt4c0', 'x-async': false, 'x-index': 1, @@ -233,7 +233,7 @@ export const oneEmptyGantt: PageConfig = { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { _isJSONSchemaObject: true, diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx index a07b5ed7f8..c802d74ee8 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/utils.tsx @@ -55,7 +55,7 @@ export const createGanttBlockSchema = (options) => { marginBottom: 24, }, }, - 'x-initializer': 'GanttActionInitializers', + 'x-initializer': 'actionInitializers:gantt', properties: {}, }, table: { @@ -86,7 +86,7 @@ export const createGanttBlockSchema = (options) => { 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'TableActionColumnInitializers', + 'x-initializer': 'actionInitializers:tableColumnAction', properties: { actions: { type: 'void', diff --git a/packages/plugins/@nocobase/plugin-import/src/client/index.ts b/packages/plugins/@nocobase/plugin-import/src/client/index.ts index eccd07d6e0..7070f02727 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-import/src/client/index.ts @@ -35,9 +35,9 @@ export class ImportPlugin extends Plugin { }, }; - const tableActionInitializers = this.app.schemaInitializerManager.get('TableActionInitializers'); + const tableActionInitializers = this.app.schemaInitializerManager.get('actionInitializers:tableAction'); tableActionInitializers?.add('enableActions.import', initializerData); - this.app.schemaInitializerManager.addItem('GanttActionInitializers', 'enableActions.import', initializerData); + this.app.schemaInitializerManager.addItem('actionInitializers:gantt', 'enableActions.import', initializerData); this.app.schemaSettingsManager.add(importActionSchemaSettings); } } diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts index dd186cd8c3..54d37f345d 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/__e2e__/utils.ts @@ -133,7 +133,7 @@ export const oneEmptyKanbanBlock: PageConfig = { _isJSONSchemaObject: true, version: '2.0', type: 'void', - 'x-initializer': 'KanbanActionInitializers', + 'x-initializer': 'actionInitializers:kanban', 'x-component': 'ActionBar', 'x-component-props': { style: { diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/utils.ts b/packages/plugins/@nocobase/plugin-kanban/src/client/utils.ts index d5860d5434..f50c74b067 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/utils.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/utils.ts @@ -23,7 +23,7 @@ export const createKanbanBlockSchema = (options) => { properties: { actions: { type: 'void', - 'x-initializer': 'KanbanActionInitializers', + 'x-initializer': 'actionInitializers:kanban', 'x-component': 'ActionBar', 'x-component-props': { style: { diff --git a/packages/plugins/@nocobase/plugin-map/src/client/block/utils.ts b/packages/plugins/@nocobase/plugin-map/src/client/block/utils.ts index 27cef6f97c..931237dc0e 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/block/utils.ts +++ b/packages/plugins/@nocobase/plugin-map/src/client/block/utils.ts @@ -25,7 +25,7 @@ export const createMapBlockSchema = (options) => { properties: { actions: { type: 'void', - 'x-initializer': 'MapActionInitializers', + 'x-initializer': 'actionInitializers:map', 'x-component': 'ActionBar', 'x-component-props': { style: { diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx index 7f28474822..f50413bf55 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx @@ -19,7 +19,7 @@ export const snapshotBlockInitializers_deprecated: SchemaInitializer = new Schem name: 'details', title: '{{t("Details")}}', Component: 'SnapshotBlockInitializersDetailItem', - actionInitializers: 'CalendarFormActionInitializers', + actionInitializers: 'actionInitializers:calendarForm', }, ], }, @@ -53,7 +53,7 @@ export const snapshotBlockInitializers: SchemaInitializer = new SchemaInitialize name: 'details', title: '{{t("Details")}}', Component: 'SnapshotBlockInitializersDetailItem', - actionInitializers: 'CalendarFormActionInitializers', + actionInitializers: 'actionInitializers:calendarForm', }, ], }, diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx index 244a2ac388..dd6f0eb732 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx @@ -16,7 +16,7 @@ import { uid } from '@formily/shared'; export const createSnapshotBlockSchema = (options) => { const { formItemInitializers = 'ReadPrettyFormItemInitializers', - actionInitializers = 'ReadPrettyFormActionInitializers', + actionInitializers = 'actionInitializers:detailsSingle', collection, association, resource, @@ -78,7 +78,7 @@ export const SnapshotBlockInitializersDetailItem = () => { const association = useBlockAssociationContext(); const { block } = useBlockRequestContext(); const actionInitializers = - block !== 'TableField' ? itemConfig.actionInitializers || 'ReadPrettyFormActionInitializers' : null; + block !== 'TableField' ? itemConfig.actionInitializers || 'actionInitializers:detailsSingle' : null; return (