mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-06 22:19:25 +08:00
* refactor(SchemaSettings): unify naming style * refactor(SchemaInitializers): unify naming stle * refactor: replace CreateFormBlockInitializers to blockInitializers:createForm * refactor: replace to blockInitializers:customizeCreateForm * refactor: replace block intializers name * refactor: replace action initializers name * refactor: replace field initializers name * style: fix hover style for column action (T-3297) * refactor: revert some codes * chore: update comment * chore: replace iframeBlockSchemaSettings to blockSettings:iframe * chore: delete pro-packages * feat: add CompatibleSchemaInitializer * test: add unit tests * chore: add @internal for CompatibleSchemaInitializer * chore: block * chore: field * chore: ations * fix: build * chore: typo * fix: fix unit tests * test: fix e2e * chore: remove igone * refactor: page:addBlock * refactor: popup:addNew:addBlock * fix: fix max call stack * refactor: popup:addRecord:addBlock * refactor: remove blockInitializers:recordForm * refactor: popup:tableSelector:addBlock * refactor: popup:view:addBlock * refactor: popup:bulkEdit:addBlock & charts:addBlock * refactor: mobilePage:addBlock * refactor: popup:snapshot:addBlock * refactor: popup:workflowManual:configureUserInterface:addBlock * fix: avoid crashing * chore: optimize * refactor: popup:common:addBlock * refactor: workflowManual:popup:configureUserInterface:addBlock * refactor: details:configureFields * refactor: form:configureFields * refactor: table:configureColumns * refactor: filterForm:configureFields * refactor: associationFilterInitializer * refactor: assignFieldValuesForm:configureFields * refactor: bulkEditForm:configureFields * refactor: auditLogsTable:configureColumns * refactor: chartFilterForm:configureFields * refactor: kanban:configureItemFields * refactor: workflowManual:customForm:configureFields * refactor: detailsWithPaging:configureActions * refactor: details:configureActions * refactor: createForm:configureActions * refactor: editForm:configureActions * refactor: gridCard:configureActions * refactor: gridCard:configureItemActions * refactor: list:configureActions * refactor: list:configureItemActions * refactor: table:configureItemActions * refactor: table:configureActions * refactor: filterForm:configureActions * refactor: subTable:configureActions * refactor: bulkEditForm:configureActions * refactor: auditLogsTable:configureItemActions * refactor: auditLogsTable:configureActions * refactor: calendar:configureActions * refactor: chartFilterForm:configureActions * refactor: gantt:configureActions * refactor: kanban:configureActions * refactor: map:configureActions * refactor: workflowManual:form:configureActions * feat: use 'createForm:configureActions' in page * feat: use 'details:configureActions' in Calendar * feat: register deleteEvent initializer in calendar plugin * fix: fix delete event action * test: fix e2e * test: fix e2e * chore: only run workflow's e2e * Revert "chore: only run workflow's e2e" This reverts commit 9e5b4af41e40e8d616007a5ab97291fb2370d88a. * fix: use isInitializersSame to fix some case
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
import { Plugin } from '@nocobase/client';
|
|
import WorkflowPlugin from '@nocobase/plugin-workflow/client';
|
|
|
|
import Manual from './instruction';
|
|
|
|
import { NAMESPACE } from '../locale';
|
|
import { WorkflowTodo } from './WorkflowTodo';
|
|
import { WorkflowTodoBlockInitializer } from './WorkflowTodoBlockInitializer';
|
|
import {
|
|
addActionButton,
|
|
addActionButton_deprecated,
|
|
addBlockButton,
|
|
addBlockButton_deprecated,
|
|
} from './instruction/SchemaConfig';
|
|
import { addCustomFormField, addCustomFormField_deprecated } from './instruction/forms/custom';
|
|
|
|
export default class extends Plugin {
|
|
async afterAdd() {
|
|
// await this.app.pm.add()
|
|
}
|
|
|
|
// You can get and modify the app instance here
|
|
async load() {
|
|
this.addComponents();
|
|
|
|
// this.app.addProvider(Provider);
|
|
const workflow = this.app.pm.get('workflow') as WorkflowPlugin;
|
|
workflow.registerInstruction('manual', Manual);
|
|
|
|
this.app.schemaInitializerManager.add(addBlockButton_deprecated);
|
|
this.app.schemaInitializerManager.add(addBlockButton);
|
|
this.app.schemaInitializerManager.add(addActionButton_deprecated);
|
|
this.app.schemaInitializerManager.add(addActionButton);
|
|
this.app.schemaInitializerManager.add(addCustomFormField_deprecated);
|
|
this.app.schemaInitializerManager.add(addCustomFormField);
|
|
|
|
const blockInitializers = this.app.schemaInitializerManager.get('page:addBlock');
|
|
blockInitializers.add('otherBlocks.workflowTodos', {
|
|
title: `{{t("Workflow todos", { ns: "${NAMESPACE}" })}}`,
|
|
Component: 'WorkflowTodoBlockInitializer',
|
|
icon: 'CheckSquareOutlined',
|
|
});
|
|
}
|
|
|
|
addComponents() {
|
|
this.app.addComponents({
|
|
WorkflowTodo,
|
|
WorkflowTodoBlockInitializer,
|
|
});
|
|
}
|
|
}
|