[COMMAND MENU ITEMS] Remove standard front components (#18581)
All standard command menu items will link to an engine component instead of standard front components.
This commit is contained in:
+76
-116
@@ -3,8 +3,6 @@ import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
|
||||
import { CommandMenuItemAvailabilityType } from 'src/engine/metadata-modules/command-menu-item/enums/command-menu-item-availability-type.enum';
|
||||
import { EngineComponentKey } from 'src/engine/metadata-modules/command-menu-item/enums/engine-component-key.enum';
|
||||
|
||||
import { STANDARD_FRONT_COMPONENTS } from './standard-front-component.constant';
|
||||
|
||||
export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
navigateToNextRecord: {
|
||||
universalIdentifier: '3db2457d-8e96-4b8e-94c9-ed95d3f95738',
|
||||
@@ -17,9 +15,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "RECORD_PAGE" and not isInSidePanel',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.navigateToNextRecord.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.NAVIGATE_TO_NEXT_RECORD,
|
||||
},
|
||||
navigateToPreviousRecord: {
|
||||
universalIdentifier: 'ec10f871-415b-420b-8150-7e09f6f04833',
|
||||
@@ -32,9 +29,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "RECORD_PAGE" and not isInSidePanel',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.navigateToPreviousRecord.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.NAVIGATE_TO_PREVIOUS_RECORD,
|
||||
},
|
||||
createNewRecord: {
|
||||
universalIdentifier: '08d255bf-58cd-47a5-bd82-78c5c58592f1',
|
||||
@@ -173,9 +169,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "RECORD_PAGE" and (objectMetadataItem.nameSingular == "note" or objectMetadataItem.nameSingular == "task") and someNonEmptyString(selectedRecords, "bodyV2.blocknote")',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.exportNoteToPdf.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.EXPORT_NOTE_TO_PDF,
|
||||
},
|
||||
exportFromRecordIndex: {
|
||||
universalIdentifier: 'a934ba8a-ac8f-487d-9cd9-06dfdaec1f49',
|
||||
@@ -187,9 +182,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression: 'pageType == "INDEX_PAGE"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.exportFromRecordIndex.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.EXPORT_FROM_RECORD_INDEX,
|
||||
},
|
||||
exportFromRecordShow: {
|
||||
universalIdentifier: 'ba339455-f3c2-4ed1-bf77-3e316d7d6a66',
|
||||
@@ -201,9 +195,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression: 'pageType == "RECORD_PAGE"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.exportFromRecordShow.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.EXPORT_FROM_RECORD_SHOW,
|
||||
},
|
||||
updateMultipleRecords: {
|
||||
universalIdentifier: '2e080651-f098-4a78-bea9-7a70002dc57c',
|
||||
@@ -216,9 +209,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'numberOfSelectedRecords >= 2 and objectPermissions.canUpdateObjectRecords',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.updateMultipleRecords.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.UPDATE_MULTIPLE_RECORDS,
|
||||
},
|
||||
mergeMultipleRecords: {
|
||||
universalIdentifier: '6c14eb04-8e7e-4d47-93c0-8ec4834e2e60',
|
||||
@@ -244,9 +236,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression: 'numberOfSelectedRecords >= 2',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.exportMultipleRecords.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.EXPORT_MULTIPLE_RECORDS,
|
||||
},
|
||||
importRecords: {
|
||||
universalIdentifier: 'a2dc9de7-4798-422e-bb55-bfad7b9bdbe8',
|
||||
@@ -258,9 +249,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'not hasAnySoftDeleteFilterOnView',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.importRecords.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.IMPORT_RECORDS,
|
||||
},
|
||||
exportView: {
|
||||
universalIdentifier: '80680f2a-c426-48b3-a839-c63a6183dc4b',
|
||||
@@ -272,9 +262,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.exportView.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.EXPORT_VIEW,
|
||||
},
|
||||
seeDeletedRecords: {
|
||||
universalIdentifier: 'd63c21c3-9785-4750-be87-5f36269b8e0d',
|
||||
@@ -286,9 +275,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'not hasAnySoftDeleteFilterOnView',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeDeletedRecords.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_DELETED_RECORDS,
|
||||
},
|
||||
createNewView: {
|
||||
universalIdentifier: '6ec7c339-e167-431d-bec6-d1c737df677c',
|
||||
@@ -300,9 +288,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'not hasAnySoftDeleteFilterOnView',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.createNewView.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.CREATE_NEW_VIEW,
|
||||
},
|
||||
hideDeletedRecords: {
|
||||
universalIdentifier: '1420db7f-0fba-49e2-b23e-4b7caa0fafa0',
|
||||
@@ -314,9 +301,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'hasAnySoftDeleteFilterOnView',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.hideDeletedRecords.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.HIDE_DELETED_RECORDS,
|
||||
},
|
||||
goToPeople: {
|
||||
universalIdentifier: 'dfe5fef8-d42c-40f0-941f-8e3b5eb01daa',
|
||||
@@ -328,9 +314,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'targetObjectReadPermissions.person',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToPeople.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_PEOPLE,
|
||||
},
|
||||
goToCompanies: {
|
||||
universalIdentifier: '196e4eec-bfdd-48a6-bcbb-6707ef11951a',
|
||||
@@ -342,9 +327,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'targetObjectReadPermissions.company',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToCompanies.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_COMPANIES,
|
||||
},
|
||||
goToDashboards: {
|
||||
universalIdentifier: '11dc07d1-21b2-4f86-af8c-6a664c02f00c',
|
||||
@@ -356,9 +340,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'targetObjectReadPermissions.dashboard',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToDashboards.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_DASHBOARDS,
|
||||
},
|
||||
goToOpportunities: {
|
||||
universalIdentifier: 'f04f5e00-a208-422f-acf2-ff189769510d',
|
||||
@@ -371,9 +354,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'targetObjectReadPermissions.opportunity',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToOpportunities.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_OPPORTUNITIES,
|
||||
},
|
||||
goToSettings: {
|
||||
universalIdentifier: 'ef9aba44-0068-453e-930a-f8c182af18ee',
|
||||
@@ -385,9 +367,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToSettings.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_SETTINGS,
|
||||
},
|
||||
goToTasks: {
|
||||
universalIdentifier: 'e8e3bd0b-5ce9-4577-bb61-588c0b1ad063',
|
||||
@@ -399,9 +380,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'targetObjectReadPermissions.task',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToTasks.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_TASKS,
|
||||
},
|
||||
goToNotes: {
|
||||
universalIdentifier: '08e0f0cc-ac2d-46cd-9bca-39a409b9addf',
|
||||
@@ -413,9 +393,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'targetObjectReadPermissions.note',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToNotes.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_NOTES,
|
||||
},
|
||||
editRecordPageLayout: {
|
||||
universalIdentifier: 'd9794c67-1799-424f-8871-5ea771dd4a6d',
|
||||
@@ -428,9 +407,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "RECORD_PAGE" and featureFlags.IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED and noneDefined(selectedRecords, "deletedAt") and objectPermissions.canUpdateObjectRecords and objectMetadataItem.nameSingular != "dashboard"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.editRecordPageLayout.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.EDIT_RECORD_PAGE_LAYOUT,
|
||||
},
|
||||
saveRecordPageLayout: {
|
||||
universalIdentifier: 'a3363589-e2a6-4451-a53c-b8c2710785e2',
|
||||
@@ -457,9 +435,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "RECORD_PAGE" and isPageInEditMode and featureFlags.IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED and noneDefined(selectedRecords, "deletedAt") and objectPermissions.canUpdateObjectRecords',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.cancelRecordPageLayout.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.CANCEL_RECORD_PAGE_LAYOUT,
|
||||
},
|
||||
editDashboardLayout: {
|
||||
universalIdentifier: 'b9b53bbc-3129-4eb9-8344-c3f9628ffa7d',
|
||||
@@ -473,9 +450,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'pageType == "RECORD_PAGE" and noneDefined(selectedRecords, "deletedAt") and everyDefined(selectedRecords, "pageLayoutId") and objectPermissions.canUpdateObjectRecords',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.dashboard.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.editDashboardLayout.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.EDIT_DASHBOARD_LAYOUT,
|
||||
},
|
||||
saveDashboardLayout: {
|
||||
universalIdentifier: '18b23908-f816-42ab-bc0a-eb5fae29c695',
|
||||
@@ -504,9 +480,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'pageType == "RECORD_PAGE" and isPageInEditMode and noneDefined(selectedRecords, "deletedAt") and everyDefined(selectedRecords, "pageLayoutId") and objectPermissions.canUpdateObjectRecords',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.dashboard.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.cancelDashboardLayout.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.CANCEL_DASHBOARD_LAYOUT,
|
||||
},
|
||||
duplicateDashboard: {
|
||||
universalIdentifier: '2ee07307-60ce-41ef-bfee-7c718f67557e',
|
||||
@@ -533,9 +508,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: 'targetObjectReadPermissions.workflow',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToWorkflows.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_WORKFLOWS,
|
||||
},
|
||||
activateWorkflow: {
|
||||
universalIdentifier: '44f19c85-0fd0-482f-a14e-da513c60b1b3',
|
||||
@@ -609,9 +583,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'includesEvery(selectedRecords, "statuses", "ACTIVE") and includesEvery(selectedRecords, "statuses", "DRAFT") and noneDefined(selectedRecords, "deletedAt")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflow.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeActiveVersionWorkflow.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_ACTIVE_VERSION_WORKFLOW,
|
||||
},
|
||||
seeRunsWorkflow: {
|
||||
universalIdentifier: 'e57efc2d-00a2-493a-b76c-f2dabd23a5eb',
|
||||
@@ -625,9 +598,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'noneDefined(selectedRecords, "deletedAt")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflow.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeRunsWorkflow.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_RUNS_WORKFLOW,
|
||||
},
|
||||
seeVersionsWorkflow: {
|
||||
universalIdentifier: '92781d24-b875-4282-8cdb-d127f04a5c7d',
|
||||
@@ -641,9 +613,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'noneDefined(selectedRecords, "deletedAt")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflow.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeVersionsWorkflow.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_VERSIONS_WORKFLOW,
|
||||
},
|
||||
addNodeWorkflow: {
|
||||
universalIdentifier: '818117fa-6cad-4ebc-83c1-40f4afc28d94',
|
||||
@@ -657,9 +628,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'pageType == "RECORD_PAGE" and everyDefined(selectedRecords, "currentVersion.trigger") and everyDefined(selectedRecords, "currentVersion.steps") and every(selectedRecords, "currentVersion.steps.length") and noneDefined(selectedRecords, "deletedAt")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflow.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.addNodeWorkflow.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.ADD_NODE_WORKFLOW,
|
||||
},
|
||||
tidyUpWorkflow: {
|
||||
universalIdentifier: '1f3a3cab-161a-4775-af47-11be4d0bf411',
|
||||
@@ -702,9 +672,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression:
|
||||
'not hasAnySoftDeleteFilterOnView and objectMetadataItem.nameSingular != "workflowRun" and objectMetadataItem.nameSingular != "workflowVersion" and objectMetadataItem.nameSingular != "workflow"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.goToRuns.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.GO_TO_RUNS,
|
||||
},
|
||||
seeVersionWorkflowRun: {
|
||||
universalIdentifier: 'cc3a065c-c89e-40ac-9449-4272c55b1bb8',
|
||||
@@ -717,9 +686,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflowRun.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeVersionWorkflowRun.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_VERSION_WORKFLOW_RUN,
|
||||
},
|
||||
seeWorkflowWorkflowRun: {
|
||||
universalIdentifier: '9d9cc62d-3543-45c3-93f3-23d2d8979f2b',
|
||||
@@ -732,9 +700,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflowRun.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeWorkflowWorkflowRun.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_WORKFLOW_WORKFLOW_RUN,
|
||||
},
|
||||
stopWorkflowRun: {
|
||||
universalIdentifier: '4c186606-9515-4561-a1eb-9a072b4f5e58',
|
||||
@@ -763,9 +730,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'everyDefined(selectedRecords, "workflow")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflowVersion.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeRunsWorkflowVersion.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_RUNS_WORKFLOW_VERSION,
|
||||
},
|
||||
seeWorkflowWorkflowVersion: {
|
||||
universalIdentifier: 'b43052db-023e-4083-9b63-2c2dfbfd1320',
|
||||
@@ -779,9 +745,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'everyDefined(selectedRecords, "workflow.id")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflowVersion.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeWorkflowWorkflowVersion.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_WORKFLOW_WORKFLOW_VERSION,
|
||||
},
|
||||
useAsDraftWorkflowVersion: {
|
||||
universalIdentifier: '483c0c1d-ea4d-4a4d-8a59-2dcf9f8e38f6',
|
||||
@@ -810,9 +775,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
'everyDefined(selectedRecords, "workflow")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.workflowVersion.universalIdentifier,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.seeVersionsWorkflowVersion.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEE_VERSIONS_WORKFLOW_VERSION,
|
||||
},
|
||||
searchRecords: {
|
||||
universalIdentifier: 'fa24e25e-68f8-4548-82ff-c7b5168b7c7d',
|
||||
@@ -824,9 +788,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.searchRecords.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEARCH_RECORDS,
|
||||
},
|
||||
searchRecordsFallback: {
|
||||
universalIdentifier: 'c659890c-7266-46c9-bfe1-75cefff8b6d0',
|
||||
@@ -838,9 +801,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.FALLBACK,
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.searchRecordsFallback.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEARCH_RECORDS_FALLBACK,
|
||||
},
|
||||
askAi: {
|
||||
universalIdentifier: 'ce5fb54d-2b19-4dd1-b7b4-9532a1761a41',
|
||||
@@ -852,9 +814,8 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.askAi.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.ASK_AI,
|
||||
},
|
||||
viewPreviousAiChats: {
|
||||
universalIdentifier: '3084c3c9-cc23-4dad-9e00-92025f5cba7a',
|
||||
@@ -866,8 +827,7 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
|
||||
conditionalAvailabilityExpression: null,
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier:
|
||||
STANDARD_FRONT_COMPONENTS.viewPreviousAiChats.universalIdentifier,
|
||||
engineComponentKey: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.VIEW_PREVIOUS_AI_CHATS,
|
||||
},
|
||||
} as const;
|
||||
|
||||
-517
@@ -1,517 +0,0 @@
|
||||
import { STANDARD_FRONT_COMPONENT_BUILD_MANIFEST } from 'twenty-standard-application';
|
||||
|
||||
export const STANDARD_FRONT_COMPONENTS = {
|
||||
navigateToNextRecord: {
|
||||
universalIdentifier: 'aec12b85-29df-465f-a329-1c72c81ed95c',
|
||||
name: 'Navigate to next record',
|
||||
componentName: 'NavigateToNextRecord',
|
||||
sourceComponentPath:
|
||||
'front-components/record/navigate-to-next-record.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.navigateToNextRecord
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.navigateToNextRecord
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
navigateToPreviousRecord: {
|
||||
universalIdentifier: 'b53c54b9-152a-4100-975c-1bc582bfb951',
|
||||
name: 'Navigate to previous record',
|
||||
componentName: 'NavigateToPreviousRecord',
|
||||
sourceComponentPath:
|
||||
'front-components/record/navigate-to-previous-record.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.navigateToPreviousRecord
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.navigateToPreviousRecord
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
exportNoteToPdf: {
|
||||
universalIdentifier: '980399e9-e530-4430-bf47-7f3f482434b4',
|
||||
name: 'Export note to PDF',
|
||||
componentName: 'ExportNoteToPdf',
|
||||
sourceComponentPath:
|
||||
'front-components/record/export-note-to-pdf.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportNoteToPdf
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportNoteToPdf
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
exportFromRecordIndex: {
|
||||
universalIdentifier: '6aca9ecc-b419-453d-8243-6d19faa8c8a7',
|
||||
name: 'Export from record index',
|
||||
componentName: 'ExportFromRecordIndex',
|
||||
sourceComponentPath:
|
||||
'front-components/record/export-from-record-index.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportFromRecordIndex
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportFromRecordIndex
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
exportFromRecordShow: {
|
||||
universalIdentifier: '74d8f880-1be1-432e-b475-8970deed809e',
|
||||
name: 'Export from record show',
|
||||
componentName: 'ExportFromRecordShow',
|
||||
sourceComponentPath:
|
||||
'front-components/record/export-from-record-show.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportFromRecordShow
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportFromRecordShow
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
updateMultipleRecords: {
|
||||
universalIdentifier: 'f89c3e6b-6d96-4103-8cfc-4de6017a75c0',
|
||||
name: 'Update multiple records',
|
||||
componentName: 'UpdateMultipleRecords',
|
||||
sourceComponentPath:
|
||||
'front-components/record/update-multiple-records.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.updateMultipleRecords
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.updateMultipleRecords
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
exportMultipleRecords: {
|
||||
universalIdentifier: '05381918-8c9c-421f-ab89-10e365a463f8',
|
||||
name: 'Export multiple records',
|
||||
componentName: 'ExportMultipleRecords',
|
||||
sourceComponentPath:
|
||||
'front-components/record/export-multiple-records.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportMultipleRecords
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportMultipleRecords
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
importRecords: {
|
||||
universalIdentifier: 'acfd8025-36d1-4a35-9508-a0422e53d380',
|
||||
name: 'Import records',
|
||||
componentName: 'ImportRecords',
|
||||
sourceComponentPath:
|
||||
'front-components/record/import-records.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.importRecords.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.importRecords
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
exportView: {
|
||||
universalIdentifier: '012dc64f-ad2b-419a-98ea-d0019ff3d56d',
|
||||
name: 'Export view',
|
||||
componentName: 'ExportView',
|
||||
sourceComponentPath:
|
||||
'front-components/record/export-view.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportView.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.exportView.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeDeletedRecords: {
|
||||
universalIdentifier: 'dad2327b-9020-4d13-a38c-14d1207e66fc',
|
||||
name: 'See deleted records',
|
||||
componentName: 'SeeDeletedRecords',
|
||||
sourceComponentPath:
|
||||
'front-components/record/see-deleted-records.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeDeletedRecords
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeDeletedRecords
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
createNewView: {
|
||||
universalIdentifier: 'd7bf58ad-e716-47c1-8c51-209c755c5f27',
|
||||
name: 'Create view',
|
||||
componentName: 'CreateNewView',
|
||||
sourceComponentPath:
|
||||
'front-components/record/create-new-view.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.createNewView.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.createNewView
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
hideDeletedRecords: {
|
||||
universalIdentifier: '75e93e21-effb-48ef-ba1c-588c358fd56f',
|
||||
name: 'Hide deleted records',
|
||||
componentName: 'HideDeletedRecords',
|
||||
sourceComponentPath:
|
||||
'front-components/record/hide-deleted-records.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.hideDeletedRecords
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.hideDeletedRecords
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToPeople: {
|
||||
universalIdentifier: '5a5c1e43-9fb5-49bf-bcde-355973f913b9',
|
||||
name: 'Go to People',
|
||||
componentName: 'GoToPeople',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-people.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToPeople.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToPeople.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToCompanies: {
|
||||
universalIdentifier: '22ac113b-fe7d-41de-b06f-d863964bc445',
|
||||
name: 'Go to Companies',
|
||||
componentName: 'GoToCompanies',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-companies.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToCompanies.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToCompanies
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToDashboards: {
|
||||
universalIdentifier: 'c71cc879-50af-4e20-9bdc-52f90c9862ed',
|
||||
name: 'Go to Dashboards',
|
||||
componentName: 'GoToDashboards',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-dashboards.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToDashboards.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToDashboards
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToOpportunities: {
|
||||
universalIdentifier: 'ebb4c2ca-6b70-4d2e-8919-79475a278273',
|
||||
name: 'Go to Opportunities',
|
||||
componentName: 'GoToOpportunities',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-opportunities.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToOpportunities
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToOpportunities
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToSettings: {
|
||||
universalIdentifier: '1fb7b785-b79a-42b7-aff2-e57fe1d74e35',
|
||||
name: 'Go to Settings',
|
||||
componentName: 'GoToSettings',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-settings.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToSettings.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToSettings
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToTasks: {
|
||||
universalIdentifier: 'c08ff958-141d-4892-8737-1faf6b630a2b',
|
||||
name: 'Go to Tasks',
|
||||
componentName: 'GoToTasks',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-tasks.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToTasks.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToTasks.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToNotes: {
|
||||
universalIdentifier: 'd32f7962-e8e1-46d6-856c-ccc71e71d50c',
|
||||
name: 'Go to Notes',
|
||||
componentName: 'GoToNotes',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-notes.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToNotes.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToNotes.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
editRecordPageLayout: {
|
||||
universalIdentifier: 'd1a8a4c5-2644-4d4b-b684-64625a700760',
|
||||
name: 'Edit record page layout',
|
||||
componentName: 'EditRecordPageLayout',
|
||||
sourceComponentPath:
|
||||
'front-components/page-layout/edit-record-page-layout.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.editRecordPageLayout
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.editRecordPageLayout
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
cancelRecordPageLayout: {
|
||||
universalIdentifier: 'd392762b-4c42-4471-9c45-c92e66728380',
|
||||
name: 'Cancel record page layout edition',
|
||||
componentName: 'CancelRecordPageLayout',
|
||||
sourceComponentPath:
|
||||
'front-components/page-layout/cancel-record-page-layout.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.cancelRecordPageLayout
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.cancelRecordPageLayout
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
editDashboardLayout: {
|
||||
universalIdentifier: '8a87b33b-f196-414c-a60a-16402aa0b57f',
|
||||
name: 'Edit dashboard layout',
|
||||
componentName: 'EditDashboardLayout',
|
||||
sourceComponentPath:
|
||||
'front-components/dashboard/edit-dashboard-layout.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.editDashboardLayout
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.editDashboardLayout
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
cancelDashboardLayout: {
|
||||
universalIdentifier: 'dac81512-3890-4ba5-8471-bd94738ab80a',
|
||||
name: 'Cancel dashboard layout edition',
|
||||
componentName: 'CancelDashboardLayout',
|
||||
sourceComponentPath:
|
||||
'front-components/dashboard/cancel-dashboard-layout.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.cancelDashboardLayout
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.cancelDashboardLayout
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToWorkflows: {
|
||||
universalIdentifier: '9d313f79-170f-47cc-b9c4-a2076a86232f',
|
||||
name: 'Go to Workflows',
|
||||
componentName: 'GoToWorkflows',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-workflows.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToWorkflows.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToWorkflows
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeActiveVersionWorkflow: {
|
||||
universalIdentifier: '6259a4a5-428e-41b9-a032-333c2d51e15f',
|
||||
name: 'See active version',
|
||||
componentName: 'SeeActiveVersionWorkflow',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow/see-active-version-workflow.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeActiveVersionWorkflow
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeActiveVersionWorkflow
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeRunsWorkflow: {
|
||||
universalIdentifier: 'b8fa3327-e5c4-43f4-a3ac-c17d26af0847',
|
||||
name: 'See runs',
|
||||
componentName: 'SeeRunsWorkflow',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow/see-runs-workflow.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeRunsWorkflow
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeRunsWorkflow
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeVersionsWorkflow: {
|
||||
universalIdentifier: '62f41c00-629f-400d-85f8-d532d76c7879',
|
||||
name: 'See versions history',
|
||||
componentName: 'SeeVersionsWorkflow',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow/see-versions-workflow.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeVersionsWorkflow
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeVersionsWorkflow
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
addNodeWorkflow: {
|
||||
universalIdentifier: 'da1e499c-1298-4ec4-9a7b-5f2276075888',
|
||||
name: 'Add a node',
|
||||
componentName: 'AddNodeWorkflow',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow/add-node-workflow.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.addNodeWorkflow
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.addNodeWorkflow
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
goToRuns: {
|
||||
universalIdentifier: '0bd0ccfc-1909-4d19-b694-610878f07a3a',
|
||||
name: 'Go to runs',
|
||||
componentName: 'GoToRuns',
|
||||
sourceComponentPath:
|
||||
'front-components/navigation/go-to-runs.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToRuns.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.goToRuns.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeVersionWorkflowRun: {
|
||||
universalIdentifier: '2e09d6b0-60c3-447c-8d5d-1af70a2d037b',
|
||||
name: 'See version (workflow run)',
|
||||
componentName: 'SeeVersionWorkflowRun',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow-run/see-version-workflow-run.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeVersionWorkflowRun
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeVersionWorkflowRun
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeWorkflowWorkflowRun: {
|
||||
universalIdentifier: '88a80460-6e2f-4587-8a04-a67d894fdf69',
|
||||
name: 'See workflow (workflow run)',
|
||||
componentName: 'SeeWorkflowWorkflowRun',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow-run/see-workflow-workflow-run.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeWorkflowWorkflowRun
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeWorkflowWorkflowRun
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeRunsWorkflowVersion: {
|
||||
universalIdentifier: '3d673f94-ecf9-4e38-8eac-684cf4cad617',
|
||||
name: 'See runs (workflow version)',
|
||||
componentName: 'SeeRunsWorkflowVersion',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow-version/see-runs-workflow-version.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeRunsWorkflowVersion
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeRunsWorkflowVersion
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeWorkflowWorkflowVersion: {
|
||||
universalIdentifier: 'aec002df-0fc1-45ed-8526-9600623ef5f6',
|
||||
name: 'See workflow (workflow version)',
|
||||
componentName: 'SeeWorkflowWorkflowVersion',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow-version/see-workflow-workflow-version.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeWorkflowWorkflowVersion
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeWorkflowWorkflowVersion
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
seeVersionsWorkflowVersion: {
|
||||
universalIdentifier: 'a93c9f09-7a7f-4665-982a-0709a652c5bd',
|
||||
name: 'See versions history (workflow version)',
|
||||
componentName: 'SeeVersionsWorkflowVersion',
|
||||
sourceComponentPath:
|
||||
'front-components/workflow-version/see-versions-workflow-version.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeVersionsWorkflowVersion
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.seeVersionsWorkflowVersion
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
searchRecords: {
|
||||
universalIdentifier: '7791c67a-e58d-4a2d-9cfd-58110a04cb8f',
|
||||
name: 'Search records',
|
||||
componentName: 'SearchRecords',
|
||||
sourceComponentPath:
|
||||
'front-components/side-panel/search-records.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.searchRecords.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.searchRecords
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
searchRecordsFallback: {
|
||||
universalIdentifier: '7f7fc9f2-0291-4264-a789-d21e8f1c774e',
|
||||
name: 'Search records fallback',
|
||||
componentName: 'SearchRecordsFallback',
|
||||
sourceComponentPath:
|
||||
'front-components/side-panel/search-records-fallback.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.searchRecordsFallback
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.searchRecordsFallback
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
askAi: {
|
||||
universalIdentifier: '75d8fed0-36d9-4798-afa5-1472ecac0884',
|
||||
name: 'Ask AI',
|
||||
componentName: 'AskAi',
|
||||
sourceComponentPath:
|
||||
'front-components/side-panel/ask-ai.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.askAi.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.askAi.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
viewPreviousAiChats: {
|
||||
universalIdentifier: '5e7876fa-7a9b-487f-8e05-1a1c7ce029d9',
|
||||
name: 'View previous AI chats',
|
||||
componentName: 'ViewPreviousAiChats',
|
||||
sourceComponentPath:
|
||||
'front-components/side-panel/view-previous-ai-chats.front-component.tsx',
|
||||
builtComponentPath:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.viewPreviousAiChats
|
||||
.builtComponentPath,
|
||||
builtComponentChecksum:
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST.viewPreviousAiChats
|
||||
.builtComponentChecksum,
|
||||
isHeadless: true,
|
||||
},
|
||||
} as const;
|
||||
-1
@@ -16,6 +16,5 @@ export const TWENTY_STANDARD_ALL_METADATA_NAME = [
|
||||
'pageLayout',
|
||||
'pageLayoutTab',
|
||||
'pageLayoutWidget',
|
||||
'frontComponent',
|
||||
'commandMenuItem',
|
||||
] as const satisfies AllMetadataName[];
|
||||
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import { FileFolder } from 'twenty-shared/types';
|
||||
import { STANDARD_FRONT_COMPONENT_BUILD_MANIFEST } from 'twenty-standard-application';
|
||||
|
||||
import { FileStorageService } from 'src/engine/core-modules/file-storage/file-storage.service';
|
||||
import { TWENTY_STANDARD_APPLICATION } from 'src/engine/workspace-manager/twenty-standard-application/constants/twenty-standard-applications';
|
||||
|
||||
const BUILT_FRONT_COMPONENTS_PATH = path.resolve(
|
||||
path.dirname(require.resolve('twenty-standard-application/package.json')),
|
||||
'src/build',
|
||||
);
|
||||
|
||||
@Injectable()
|
||||
export class StandardFrontComponentUploadService {
|
||||
private readonly logger = new Logger(
|
||||
StandardFrontComponentUploadService.name,
|
||||
);
|
||||
|
||||
constructor(private readonly fileStorageService: FileStorageService) {}
|
||||
|
||||
async uploadBuiltFrontComponents({
|
||||
workspaceId,
|
||||
}: {
|
||||
workspaceId: string;
|
||||
}): Promise<void> {
|
||||
const applicationUniversalIdentifier =
|
||||
TWENTY_STANDARD_APPLICATION.universalIdentifier;
|
||||
|
||||
const manifestEntries = Object.values(
|
||||
STANDARD_FRONT_COMPONENT_BUILD_MANIFEST,
|
||||
);
|
||||
|
||||
for (const entry of manifestEntries) {
|
||||
const localFilePath = path.join(
|
||||
BUILT_FRONT_COMPONENTS_PATH,
|
||||
entry.builtComponentPath,
|
||||
);
|
||||
|
||||
if (!fs.existsSync(localFilePath)) {
|
||||
this.logger.warn(
|
||||
`Built front component file not found: ${localFilePath}`,
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
const fileContent = fs.readFileSync(localFilePath);
|
||||
|
||||
await this.fileStorageService.writeFile({
|
||||
sourceFile: fileContent,
|
||||
mimeType: 'application/javascript',
|
||||
fileFolder: FileFolder.BuiltFrontComponent,
|
||||
applicationUniversalIdentifier,
|
||||
workspaceId,
|
||||
resourcePath: entry.builtComponentPath,
|
||||
settings: { isTemporaryFile: false, toDelete: false },
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
-6
@@ -14,7 +14,6 @@ import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspac
|
||||
import { buildSystemAuthContext } from 'src/engine/twenty-orm/utils/build-system-auth-context.util';
|
||||
import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
|
||||
import { TWENTY_STANDARD_ALL_METADATA_NAME } from 'src/engine/workspace-manager/twenty-standard-application/constants/twenty-standard-all-metadata-name.constant';
|
||||
import { StandardFrontComponentUploadService } from 'src/engine/workspace-manager/twenty-standard-application/services/standard-front-component-upload.service';
|
||||
import { computeTwentyStandardApplicationAllFlatEntityMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/twenty-standard-application-all-flat-entity-maps.constant';
|
||||
import { WorkspaceMigrationBuilderException } from 'src/engine/workspace-manager/workspace-migration/exceptions/workspace-migration-builder-exception';
|
||||
import { WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
|
||||
@@ -30,7 +29,6 @@ export class TwentyStandardApplicationService {
|
||||
private readonly workspaceMigrationValidateBuildAndRunService: WorkspaceMigrationValidateBuildAndRunService,
|
||||
private readonly workspaceCacheService: WorkspaceCacheService,
|
||||
private readonly globalWorkspaceOrmManager: GlobalWorkspaceOrmManager,
|
||||
private readonly standardFrontComponentUploadService: StandardFrontComponentUploadService,
|
||||
) {}
|
||||
|
||||
// Note: To remove and handle natively in validateBuildAndRun after favorite migration to metadata
|
||||
@@ -77,10 +75,6 @@ export class TwentyStandardApplicationService {
|
||||
'featureFlagsMap',
|
||||
]);
|
||||
|
||||
await this.standardFrontComponentUploadService.uploadBuiltFrontComponents({
|
||||
workspaceId,
|
||||
});
|
||||
|
||||
const shouldIncludeRecordPageLayouts = this.twentyConfigService.get(
|
||||
'SHOULD_SEED_STANDARD_RECORD_PAGE_LAYOUTS',
|
||||
);
|
||||
|
||||
+1
-5
@@ -7,14 +7,10 @@ import { GlobalWorkspaceDataSourceModule } from 'src/engine/twenty-orm/global-wo
|
||||
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
|
||||
import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration.module';
|
||||
|
||||
import { StandardFrontComponentUploadService } from './services/standard-front-component-upload.service';
|
||||
import { TwentyStandardApplicationService } from './services/twenty-standard-application.service';
|
||||
|
||||
@Module({
|
||||
providers: [
|
||||
TwentyStandardApplicationService,
|
||||
StandardFrontComponentUploadService,
|
||||
],
|
||||
providers: [TwentyStandardApplicationService],
|
||||
imports: [
|
||||
ApplicationModule,
|
||||
TwentyConfigModule,
|
||||
|
||||
+1
-4
@@ -3,7 +3,6 @@ import { v4 } from 'uuid';
|
||||
import { type FlatCommandMenuItemMaps } from 'src/engine/metadata-modules/flat-command-menu-item/types/flat-command-menu-item-maps.type';
|
||||
import { createEmptyFlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/constant/create-empty-flat-entity-maps.constant';
|
||||
import { type FlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/types/flat-entity-maps.type';
|
||||
import { type FlatFrontComponent } from 'src/engine/metadata-modules/flat-front-component/types/flat-front-component.type';
|
||||
import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
|
||||
import { STANDARD_COMMAND_MENU_ITEMS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant';
|
||||
import { createStandardCommandMenuItemFlatMetadata } from 'src/engine/workspace-manager/twenty-standard-application/utils/command-menu-item/create-standard-command-menu-item-flat-metadata.util';
|
||||
@@ -17,13 +16,12 @@ export const buildStandardFlatCommandMenuItemMaps = ({
|
||||
now,
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
dependencyFlatEntityMaps: { flatFrontComponentMaps, flatObjectMetadataMaps },
|
||||
dependencyFlatEntityMaps: { flatObjectMetadataMaps },
|
||||
}: {
|
||||
now: string;
|
||||
workspaceId: string;
|
||||
twentyStandardApplicationId: string;
|
||||
dependencyFlatEntityMaps: {
|
||||
flatFrontComponentMaps: FlatEntityMaps<FlatFrontComponent>;
|
||||
flatObjectMetadataMaps: FlatEntityMaps<FlatObjectMetadata>;
|
||||
};
|
||||
}): FlatCommandMenuItemMaps => {
|
||||
@@ -37,7 +35,6 @@ export const buildStandardFlatCommandMenuItemMaps = ({
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
dependencyFlatEntityMaps: {
|
||||
flatFrontComponentMaps,
|
||||
flatObjectMetadataMaps,
|
||||
},
|
||||
now,
|
||||
|
||||
+3
-26
@@ -3,7 +3,6 @@ import { isDefined } from 'twenty-shared/utils';
|
||||
import { type FlatCommandMenuItem } from 'src/engine/metadata-modules/flat-command-menu-item/types/flat-command-menu-item.type';
|
||||
import { type FlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/types/flat-entity-maps.type';
|
||||
import { findFlatEntityByUniversalIdentifier } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier.util';
|
||||
import { type FlatFrontComponent } from 'src/engine/metadata-modules/flat-front-component/types/flat-front-component.type';
|
||||
import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
|
||||
import { STANDARD_COMMAND_MENU_ITEMS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant';
|
||||
import { TWENTY_STANDARD_APPLICATION } from 'src/engine/workspace-manager/twenty-standard-application/constants/twenty-standard-applications';
|
||||
@@ -13,7 +12,7 @@ export const createStandardCommandMenuItemFlatMetadata = ({
|
||||
commandMenuItemId,
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
dependencyFlatEntityMaps: { flatFrontComponentMaps, flatObjectMetadataMaps },
|
||||
dependencyFlatEntityMaps: { flatObjectMetadataMaps },
|
||||
now,
|
||||
}: {
|
||||
commandMenuItemName: keyof typeof STANDARD_COMMAND_MENU_ITEMS;
|
||||
@@ -21,33 +20,12 @@ export const createStandardCommandMenuItemFlatMetadata = ({
|
||||
workspaceId: string;
|
||||
twentyStandardApplicationId: string;
|
||||
dependencyFlatEntityMaps: {
|
||||
flatFrontComponentMaps: FlatEntityMaps<FlatFrontComponent>;
|
||||
flatObjectMetadataMaps: FlatEntityMaps<FlatObjectMetadata>;
|
||||
};
|
||||
now: string;
|
||||
}): FlatCommandMenuItem => {
|
||||
const definition = STANDARD_COMMAND_MENU_ITEMS[commandMenuItemName];
|
||||
|
||||
let resolvedFrontComponentId: string | null = null;
|
||||
let resolvedFrontComponentUniversalIdentifier: string | null = null;
|
||||
|
||||
if (isDefined(definition.frontComponentUniversalIdentifier)) {
|
||||
const flatFrontComponent = findFlatEntityByUniversalIdentifier({
|
||||
flatEntityMaps: flatFrontComponentMaps,
|
||||
universalIdentifier: definition.frontComponentUniversalIdentifier,
|
||||
});
|
||||
|
||||
if (!isDefined(flatFrontComponent)) {
|
||||
throw new Error(
|
||||
`Front component not found for universal identifier ${definition.frontComponentUniversalIdentifier}`,
|
||||
);
|
||||
}
|
||||
|
||||
resolvedFrontComponentId = flatFrontComponent.id;
|
||||
resolvedFrontComponentUniversalIdentifier =
|
||||
flatFrontComponent.universalIdentifier;
|
||||
}
|
||||
|
||||
let resolvedObjectMetadataId: string | null = null;
|
||||
let resolvedObjectMetadataUniversalIdentifier: string | null = null;
|
||||
|
||||
@@ -84,9 +62,8 @@ export const createStandardCommandMenuItemFlatMetadata = ({
|
||||
availabilityType: definition.availabilityType,
|
||||
conditionalAvailabilityExpression:
|
||||
definition.conditionalAvailabilityExpression ?? null,
|
||||
frontComponentId: resolvedFrontComponentId,
|
||||
frontComponentUniversalIdentifier:
|
||||
resolvedFrontComponentUniversalIdentifier,
|
||||
frontComponentId: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: definition.engineComponentKey,
|
||||
workflowVersionId: null,
|
||||
availabilityObjectMetadataId: resolvedObjectMetadataId,
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { createEmptyFlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/constant/create-empty-flat-entity-maps.constant';
|
||||
import { type FlatFrontComponentMaps } from 'src/engine/metadata-modules/flat-front-component/types/flat-front-component-maps.type';
|
||||
import { addFlatEntityToFlatEntityMapsThroughMutationOrThrow } from 'src/engine/workspace-manager/workspace-migration/utils/add-flat-entity-to-flat-entity-maps-through-mutation-or-throw.util';
|
||||
import { STANDARD_FRONT_COMPONENTS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-front-component.constant';
|
||||
import { createStandardFrontComponentFlatMetadata } from 'src/engine/workspace-manager/twenty-standard-application/utils/front-component/create-standard-front-component-flat-metadata.util';
|
||||
|
||||
const STANDARD_FRONT_COMPONENT_NAMES = Object.keys(
|
||||
STANDARD_FRONT_COMPONENTS,
|
||||
) as Array<keyof typeof STANDARD_FRONT_COMPONENTS>;
|
||||
|
||||
export const buildStandardFlatFrontComponentMaps = ({
|
||||
now,
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
}: {
|
||||
now: string;
|
||||
workspaceId: string;
|
||||
twentyStandardApplicationId: string;
|
||||
dependencyFlatEntityMaps: undefined;
|
||||
}): FlatFrontComponentMaps => {
|
||||
const flatFrontComponentMaps: FlatFrontComponentMaps =
|
||||
createEmptyFlatEntityMaps();
|
||||
|
||||
for (const frontComponentName of STANDARD_FRONT_COMPONENT_NAMES) {
|
||||
const flatFrontComponent = createStandardFrontComponentFlatMetadata({
|
||||
frontComponentName,
|
||||
frontComponentId: v4(),
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
now,
|
||||
});
|
||||
|
||||
addFlatEntityToFlatEntityMapsThroughMutationOrThrow({
|
||||
flatEntity: flatFrontComponent,
|
||||
flatEntityMapsToMutate: flatFrontComponentMaps,
|
||||
});
|
||||
}
|
||||
|
||||
return flatFrontComponentMaps;
|
||||
};
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
import { type FlatFrontComponent } from 'src/engine/metadata-modules/flat-front-component/types/flat-front-component.type';
|
||||
import { STANDARD_FRONT_COMPONENTS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-front-component.constant';
|
||||
import { TWENTY_STANDARD_APPLICATION } from 'src/engine/workspace-manager/twenty-standard-application/constants/twenty-standard-applications';
|
||||
|
||||
export const createStandardFrontComponentFlatMetadata = ({
|
||||
frontComponentName,
|
||||
frontComponentId,
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
now,
|
||||
}: {
|
||||
frontComponentName: keyof typeof STANDARD_FRONT_COMPONENTS;
|
||||
frontComponentId: string;
|
||||
workspaceId: string;
|
||||
twentyStandardApplicationId: string;
|
||||
now: string;
|
||||
}): FlatFrontComponent => {
|
||||
const definition = STANDARD_FRONT_COMPONENTS[frontComponentName];
|
||||
|
||||
return {
|
||||
id: frontComponentId,
|
||||
universalIdentifier: definition.universalIdentifier,
|
||||
applicationId: twentyStandardApplicationId,
|
||||
applicationUniversalIdentifier:
|
||||
TWENTY_STANDARD_APPLICATION.universalIdentifier,
|
||||
workspaceId,
|
||||
name: definition.name,
|
||||
description: null,
|
||||
sourceComponentPath: definition.sourceComponentPath,
|
||||
builtComponentPath: definition.builtComponentPath,
|
||||
componentName: definition.componentName,
|
||||
builtComponentChecksum: definition.builtComponentChecksum,
|
||||
isHeadless: definition.isHeadless,
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
};
|
||||
};
|
||||
-10
@@ -10,7 +10,6 @@ import { getStandardObjectMetadataRelatedEntityIds } from 'src/engine/workspace-
|
||||
import { getStandardPageLayoutMetadataRelatedEntityIds } from 'src/engine/workspace-manager/twenty-standard-application/utils/get-standard-page-layout-metadata-related-entity-ids.util';
|
||||
import { buildStandardFlatIndexMetadataMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/build-standard-flat-index-metadata-maps.util';
|
||||
import { buildStandardFlatCommandMenuItemMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/command-menu-item/build-standard-flat-command-menu-item-maps.util';
|
||||
import { buildStandardFlatFrontComponentMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/front-component/build-standard-flat-front-component-maps.util';
|
||||
import { buildStandardFlatNavigationMenuItemMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/navigation-menu-item/build-standard-flat-navigation-menu-item-maps.util';
|
||||
import { buildStandardFlatObjectMetadataMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/build-standard-flat-object-metadata-maps.util';
|
||||
import { buildStandardFlatPageLayoutTabMetadataMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/page-layout-tab/build-standard-flat-page-layout-tab-metadata-maps.util';
|
||||
@@ -203,19 +202,11 @@ export const computeTwentyStandardApplicationAllFlatEntityMaps = ({
|
||||
},
|
||||
});
|
||||
|
||||
const flatFrontComponentMaps = buildStandardFlatFrontComponentMaps({
|
||||
now,
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
dependencyFlatEntityMaps: undefined,
|
||||
});
|
||||
|
||||
const flatCommandMenuItemMaps = buildStandardFlatCommandMenuItemMaps({
|
||||
now,
|
||||
workspaceId,
|
||||
twentyStandardApplicationId,
|
||||
dependencyFlatEntityMaps: {
|
||||
flatFrontComponentMaps,
|
||||
flatObjectMetadataMaps,
|
||||
},
|
||||
});
|
||||
@@ -236,7 +227,6 @@ export const computeTwentyStandardApplicationAllFlatEntityMaps = ({
|
||||
flatPageLayoutMaps,
|
||||
flatPageLayoutTabMaps,
|
||||
flatPageLayoutWidgetMaps,
|
||||
flatFrontComponentMaps,
|
||||
flatCommandMenuItemMaps,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user