Action menu refactoring (#11454)
# Description Closes [#696](https://github.com/twentyhq/core-team-issues/issues/696) - `useAction` hooks have been removed for all actions - Every action can now declare a react component - Some standard action components have been introduced: `Action`, `ActionLink` and `ActionModal` - The `ActionDisplay` component uses the new `displayType` prop of the `ActionMenuContext` to render the right component for the action according to its container: `ActionButton`, `ActionDropdownItem` or `ActionListItem` - The `ActionDisplayer` wraps the action component inside a context which gives it all the information about the action -`actionMenuEntriesComponenState` has been removed and now all actions are computed directly using `useRegisteredAction` - This computation is done inside `ActionMenuContextProvider` and the actions are passed inside a context - `actionMenuType` gives information about the container of the action, so the action can know wether or not to close this container upon execution
This commit is contained in:
@ -232,12 +232,12 @@ msgstr "Actions"
|
||||
#: src/modules/settings/security/components/SSO/SettingsSecuritySSORowDropdownMenu.tsx
|
||||
#: src/modules/settings/data-model/object-details/components/SettingsObjectFieldDisabledActionDropdown.tsx
|
||||
#: src/modules/information-banner/components/billing/InformationBannerEndTrialPeriod.tsx
|
||||
#: src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.ts
|
||||
#: src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.tsx
|
||||
msgid "Activate"
|
||||
msgstr "Activer"
|
||||
|
||||
#. js-lingui-id: tu8A/k
|
||||
#: src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.ts
|
||||
#: src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.tsx
|
||||
msgid "Activate Workflow"
|
||||
msgstr "Activer le workflow"
|
||||
|
||||
@ -315,10 +315,10 @@ msgid "Add to Favorite"
|
||||
msgstr "Ajouter aux favoris"
|
||||
|
||||
#. js-lingui-id: pBsoKL
|
||||
#: src/modules/action-menu/components/__stories__/RecordIndexActionMenuDropdown.stories.tsx
|
||||
#: src/modules/action-menu/components/__stories__/CommandMenuActionMenuDropdown.stories.tsx
|
||||
#: src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.ts
|
||||
#: src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.ts
|
||||
#: src/modules/action-menu/mock/action-menu-actions.mock.tsx
|
||||
#: src/modules/action-menu/mock/action-menu-actions.mock.tsx
|
||||
#: src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx
|
||||
#: src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx
|
||||
msgid "Add to favorites"
|
||||
msgstr "Ajouter aux favoris"
|
||||
|
||||
@ -582,7 +582,7 @@ msgstr ""
|
||||
#~ msgstr "Are you sure you want to delete these records? They can be recovered from the Command menu ({osControlSymbol} + K)."
|
||||
|
||||
#. js-lingui-id: 2BZAqa
|
||||
#: src/modules/action-menu/actions/record-actions/multiple-records/hooks/useDeleteMultipleRecordsAction.tsx
|
||||
#: src/modules/action-menu/actions/record-actions/multiple-records/components/DeleteMultipleRecordsAction.tsx
|
||||
msgid "Are you sure you want to delete these records? They can be recovered from the Command menu."
|
||||
msgstr "Êtes-vous sûr de vouloir supprimer ces enregistrements ? Ils peuvent être récupérés depuis le menu Commande."
|
||||
|
||||
@ -592,7 +592,7 @@ msgstr "Êtes-vous sûr de vouloir supprimer ces enregistrements ? Ils peuvent
|
||||
#~ msgstr "Are you sure you want to delete this record? It can be recovered from the Command menu ({osControlSymbol} + K)."
|
||||
|
||||
#. js-lingui-id: yb2hF4
|
||||
#: src/modules/action-menu/actions/record-actions/single-record/hooks/useDeleteSingleRecordAction.tsx
|
||||
#: src/modules/action-menu/actions/record-actions/single-record/components/DeleteSingleRecordAction.tsx
|
||||
msgid "Are you sure you want to delete this record? It can be recovered from the Command menu."
|
||||
msgstr "Êtes-vous sûr de vouloir supprimer cet enregistrement | ||||