config/listCrud
Interfaces
BulkDeleteArgsRaw
Raw arguments for a bulk-delete operation before additional list CRUD arguments are merged in.
Properties
pkKey
pkKey:
string
The key name of the primary key.
pks
pks:
string[]
The pks of the objects to be deleted.
target
target:
TargetArgs
The arguments to be passed to the crud handlers.
ExecuteActionArgsRaw
Raw arguments for a list execute-action operation before additional list CRUD arguments are merged in.
Properties
action
action:
string
The action to execute.
pkKey
pkKey:
string
The key name of the primary key.
pks
pks:
string[]
The pks of the objects to be acted upon.
target
target:
TargetArgs
The arguments to be passed to the crud handlers.
ListArgsRaw
Raw arguments for a list operation before run-tracking and additional list CRUD arguments are merged in.
Properties
clearObjects
clearObjects:
ClearObjectsFn
The method to call to clear the objects.
isCancelled
isCancelled:
Readonly<Ref<boolean,boolean>>
A readonly ref that becomes true once the request is cancelled.
params
params:
any
Your listing or retrieval arguments, passed through to the crud handlers.
pkKey
pkKey:
string
The key name of the primary key.
pushObjects
pushObjects:
PushObjectsFn
The method to call with new page(s) of data received.
setColumnTotals
setColumnTotals:
SetColumnTotals
The method to update column totals.
setPaginateInfo
setPaginateInfo:
SetPaginateInfo
The method to update pagination information.
target
target:
TargetArgs
The arguments to be passed to the crud handlers.
ListCrudHandlers
The set of optional CRUD handler functions (list, bulkDelete, executeAction, subscribe) for a list.
Properties
bulkDelete?
optionalbulkDelete?:CrudBulkDeleteFn
The delete function to bulk delete a list of items.
executeAction?
optionalexecuteAction?:CrudExecuteActionFn
The function to execute a certain action on a list of items.
list?
optionallist?:CrudListFn
The list function to get a list of items.
subscribe?
optionalsubscribe?:CrudListSubscribeFn
The subscribe function to get a subscription to a list of items.
ListSubscribeArgsRaw
Raw arguments for a list subscribe operation before run-tracking and additional list CRUD arguments are merged in.
Properties
applyObjectEvent
applyObjectEvent:
applyObjectEvent
The method to call when new data is received.
isCancelled
isCancelled:
Readonly<Ref<boolean,boolean>>
A readonly ref that becomes true once the request is cancelled.
params
params:
any
Your listing or retrieval arguments, passed through to the crud handlers.
pkKey
pkKey:
string
The key name of the primary key.
target
target:
TargetArgs
The arguments to be passed to the crud handlers.
ListTarget
The default target arguments passed through to the list CRUD handlers.
Properties
args
args:
any
The default arguments for the crud handlers.
ListTargetOption
Optional target arguments passed through to the list CRUD handlers.
Properties
target?
optionaltarget?:any
The default arguments for the crud handlers.
Type Aliases
AdditionalListArgs
AdditionalListArgs =
object
Additional arguments that can be passed to list crud handlers.
Type Parameters
Index Signature
[key: string]: any
applyObjectEvent
applyObjectEvent = (
newOrUpdatedOrDeleteObject,action) =>void
Callback that applies a created, updated, or deleted object event received from a subscription to the list.
Type Parameters
Parameters
newOrUpdatedOrDeleteObject
ExistingCrudObject | string
action
"create" | "update" | "delete"
Returns
void
BulkDeleteArgs
BulkDeleteArgs =
BulkDeleteArgsRaw&AdditionalListArgs
Arguments for a bulk-delete operation, combining the raw arguments with any additional list CRUD arguments.
Type Parameters
ClearObjectsFn
ClearObjectsFn = (
options?) =>void
Signature for the handler that clears the objects held by the list.
Type Parameters
Parameters
options?
Returns
void
CrudBulkDeleteFn
CrudBulkDeleteFn = (
args) =>Promise<boolean>
Signature for the handler that bulk-deletes objects from the backing store.
Type Parameters
Parameters
args
The arguments to be passed to the crud handlers.
Returns
Promise<boolean>
CrudExecuteActionFn
CrudExecuteActionFn = (
args) =>Promise<object|string|null>
Signature for the handler that executes an action on a list of objects in the backing store.
Type Parameters
Parameters
args
The arguments to be passed to the crud handlers.
Returns
Promise<object | string | null>
CrudListFn
CrudListFn = (
args) =>MaybeCancellablePromise
Signature for the handler that lists objects from the backing store.
Type Parameters
Parameters
args
The arguments to be passed to the crud handlers.
Returns
CrudListSubscribeFn
CrudListSubscribeFn = (
args) =>CancellablePromise
Signature for the handler that subscribes to list changes in the backing store.
Type Parameters
Parameters
args
The arguments to be passed to the crud handlers.
Returns
ExecuteActionArgs
ExecuteActionArgs =
ExecuteActionArgsRaw&AdditionalListArgs
Arguments for a list execute-action operation, combining the raw arguments with any additional list CRUD arguments.
Type Parameters
ListArgs
ListArgs =
ListArgsRaw&Partial<CommonRunTracking> &AdditionalListArgs
Arguments for a list operation, combining the raw arguments with run-tracking and any additional list CRUD arguments.
Type Parameters
ListSubscribeArgs
ListSubscribeArgs =
ListSubscribeArgsRaw&Partial<CommonRunTracking> &AdditionalListArgs
Arguments for a list subscribe operation, combining the raw arguments with run-tracking and any additional list CRUD arguments.
Type Parameters
SetColumnTotals
SetColumnTotals = (
total) =>void
Signature for the handler that updates the list's column totals.
Type Parameters
Parameters
total
Returns
void
SetPaginateInfo
SetPaginateInfo = (
info) =>void
Signature for the handler that updates the list's pagination information.
Type Parameters
Parameters
info
Returns
void
Variables
defaultListCrud
constdefaultListCrud:Readonly<ListCrudHandlers>
The default list crud handlers.
Functions
getListCrud()
getListCrud(
target,options):void
Get the previously set list and subscribe handlers for the default crud.
Parameters
target
The reactive crud object, which will be mutated.
args
any
The default arguments for the crud handlers.
bulkDelete?
The delete function to bulk delete a list of items.
executeAction?
The function to execute a certain action on a list of items.
list?
The list function to get a list of items.
subscribe?
The subscribe function to get a subscription to a list of items.
options
The options for the default crud.
handlers?
The functions to set for the crud.
props?
{ target?: any; }
The props to set for the crud.
props.target?
any
The default arguments for the crud handlers.
Returns
void
Throws
- If an invalid function is passed, or if the function is not a function.
setListCrud()
setListCrud(
options):void
Set the list and subscribe handlers for the default crud.
Parameters
options
ListCrudHandlers & Partial<ListTarget>
The options for the default crud.
Returns
void
Throws
- If unknown keys are passed.