{"version":3,"file":"hooks.mjs","sources":["../../../admin/src/constants/hooks.ts"],"sourcesContent":["import type { Filters } from '@strapi/admin/strapi-admin';\nimport type { MessageDescriptor } from 'react-intl';\n\n/**\n * Shape of a filter passed through the `INJECT_LIST_VIEW_FILTERS` hook.\n *\n * Plugin-injected filters may use react-intl `MessageDescriptor` labels so\n * they carry their own translations. The list view consumer resolves them to\n * plain strings (which is what the underlying `Filters.Filter` contract\n * expects) before rendering.\n */\nexport type InjectableListViewFilter = Omit & {\n label: string | MessageDescriptor;\n operators?: Array<{ value: string; label: string | MessageDescriptor }>;\n};\n\nexport const HOOKS = {\n /**\n * Hook that allows to mutate the displayed headers of the list view table\n * @constant\n * @type {string}\n */\n INJECT_COLUMN_IN_TABLE: 'Admin/CM/pages/ListView/inject-column-in-table',\n\n /**\n * Hook that allows to mutate the displayed filters of the list view\n * @constant\n * @type {string}\n */\n INJECT_LIST_VIEW_FILTERS: 'Admin/CM/pages/ListView/inject-in-filters',\n\n /**\n * Hook that allows to mutate the CM's collection types links pre-set filters\n * @constant\n * @type {string}\n */\n MUTATE_COLLECTION_TYPES_LINKS: 'Admin/CM/pages/App/mutate-collection-types-links',\n\n /**\n * Hook that allows to mutate the CM's edit view layout\n * @constant\n * @type {string}\n */\n MUTATE_EDIT_VIEW_LAYOUT: 'Admin/CM/pages/EditView/mutate-edit-view-layout',\n\n /**\n * Hook that allows to mutate the CM's single types links pre-set filters\n * @constant\n * @type {string}\n */\n MUTATE_SINGLE_TYPES_LINKS: 'Admin/CM/pages/App/mutate-single-types-links',\n};\n"],"names":["HOOKS","INJECT_COLUMN_IN_TABLE","INJECT_LIST_VIEW_FILTERS","MUTATE_COLLECTION_TYPES_LINKS","MUTATE_EDIT_VIEW_LAYOUT","MUTATE_SINGLE_TYPES_LINKS"],"mappings":"MAgBaA,KAAAA,GAAQ;AACnB;;;;AAIC,MACDC,sBAAAA,EAAwB,gDAAA;AAExB;;;;AAIC,MACDC,wBAAAA,EAA0B,2CAAA;AAE1B;;;;AAIC,MACDC,6BAAAA,EAA+B,kDAAA;AAE/B;;;;AAIC,MACDC,uBAAAA,EAAyB,iDAAA;AAEzB;;;;AAIC,MACDC,yBAAAA,EAA2B;AAC7B;;;;"}