File tree 4 files changed +27
-4
lines changed
4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
const runtime = require ( '@babel/plugin-transform-runtime' )
9
9
const styled = require ( 'babel-plugin-styled-components' )
10
- const bundler = require ( '../lib /backend/bundler/bundler' )
11
- const env = require ( '../lib /backend/bundler/bundler-env' )
10
+ const bundler = require ( '../src /backend/bundler/bundler' )
11
+ const env = require ( '../src /backend/bundler/bundler-env' )
12
12
13
13
const once = ! ! process . env . ONCE
14
14
Original file line number Diff line number Diff line change @@ -235,6 +235,15 @@ export type After<T> = (
235
235
context : ActionContext ,
236
236
) => Promise < T >
237
237
238
+ export type BuildInActions =
239
+ 'show' |
240
+ 'edit' |
241
+ 'list' |
242
+ 'delete' |
243
+ 'bulkDelete' |
244
+ 'new' |
245
+ 'search'
246
+
238
247
/**
239
248
* @classdesc
240
249
* Interface representing an Action in AdminBro.
@@ -305,7 +314,7 @@ export interface Action <T extends ActionResponse> {
305
314
* _bulkDelete_ you override existing actions.
306
315
* For all other keys you create a new action.
307
316
*/
308
- name : string ;
317
+ name : BuildInActions | string ;
309
318
/**
310
319
* indicates if action should be visible for given invocation context.
311
320
* It also can be a simple boolean value.
Original file line number Diff line number Diff line change
1
+ import { New } from './new'
2
+ import { Edit } from './edit'
3
+ import { Show } from './show'
4
+ import { List } from './list'
5
+ import { BulkDelete } from './bulk-delete'
6
+
1
7
export * from './new'
2
8
export * from './edit'
3
9
export * from './show'
4
10
export * from './list'
5
11
export * from './bulk-delete'
6
12
export * from './utils'
13
+
14
+ export const actions = {
15
+ new : New ,
16
+ edit : Edit ,
17
+ show : Show ,
18
+ list : List ,
19
+ bulkDelete : BulkDelete ,
20
+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { Trans } from 'react-i18next'
3
3
import { MessageBox , Link } from '@admin-bro/design-system'
4
4
5
5
import ErrorBoundary from './error-boundary'
6
- import * as actions from '../actions'
6
+ import { actions } from '../actions'
7
7
import { DOCS } from '../../../constants'
8
8
import { ActionProps } from '../actions/action.props'
9
9
import { useTranslation } from '../../hooks'
You can’t perform that action at this time.
0 commit comments