Any of the core actions
TODO: Move to interfaces
TODO: Move to interfaces
TODO: Move to interfaces
Checks if need to perform autosave on specified action type call
Different widget types that are considered tables
in nature for purposes of applying some shared features.
For example, autofocus on missing required field should work for tables but not forms.
TODO: Make extension point
Default implementation for bcCancelCreateDataEpic
epic
Sends cancel-create
custom operation with record's pending changes and vstamp;
Dispatches sendOperationSuccess
and bcChangeCursors
to drop cursors, also
processPostInvoke
if received postActions
in response.
On error dispatches bcDeleteDataFail
.
sendOperation with cancel-create
role
Store instance
Default implementation for bcFetchRowMetaRequest
epic
Access row-meta
API endpoint for business component; response will contain information
about operations available for row and additional information about row fields.
On success, bcFetchRowMetaSuccess action dispatched to store received row meta. On failure, console.error called and bcFetchRowMetaFail action dispatched to drop fetching state.
If any action from cancelRequestActionTypes
array dispatched while this epic is in progress,
this epic will be cancelled and bcFetchRowMetaFail action
will be dispatched.
Store instance
Root epic to cancel
Default implementation for bcNewDataEpic
epic
Access row-meta-new
API endpoint for business component endpoint; response will contain
row meta where currentValue
of id
field will contain an id for newly created record.
bcNewDataSuccess
action dispatched with new data item draft (vstamp = -1).
bcFetchRowMetaSuccess
action dispatched to set BC cursor to this new id.
changeDataItem
action dispatched to add this new item to pending changes.
processPostInvoke
dispatched to handle possible post invokes.
In case of an error message is logged as warning and bcNewDataFail
action dispatched.
sendOperation
with create
role
Store instance
Default implementation for bcSaveData
epic
Post record's pending changes to save data
API endpoint.
Pending changes for fields disabled through row meta are not send; pleace notice that fields are
disabled by default.
On success following actions are dispatched:
onSuccessAction
callback if provided in payload.On failure, console.error called and bcSaveDataFail action dispatched.
If there was a onSuccessAction
callback provided in action payload (and widget option
disableNotification was not set)
then a notification will be shown on failure with suggestion to cancel pending changes and a button that fires
bcCancelPendingChanges
sendOperation with save
role
Store instance
Set a cursor when expanding a record in hierarchy widgets builded around single business components and fetch the data for children of expanded record.
bcChangeDepthCursor action is dispatched to set the cursor for expanded record; only one expanded record is allowed per hierarchy depth level.
bcFetchDataRequest action is dispatched to fetch children data for expanded record. `ignorePageLimit`` is set as there are no controls for navigating between data pages in nested levels of hierarchy so instead all records are fetched.
TODO: There is no apparent reason why widgetName
is empty; probably will be mandatory and replace bcName
in 2.0.0.
This epic will fire on bcSelectDepthRecord action
Default implementation for fileUploadConfirm
epic
It sends customAction request for file-upload-save
endpoint with bulkIds
data
containing ids of uploaded files.
On success it fires sendOperationSuccess
, bcForceUpdate
and closeViewPopup
actions
to refresh business component and close popup.
It also launces postOperationRoutine to handle pre and post invokes.
removeMultivalueTag
Store instance
Default implementation for handleRouter
epic.
If server routing is used, this epic will send a requst to Tesler API router endpoint. It writes a console error if request fails.
This epic will fire on handleRouter action
Redux store instance
Default implementation does not throw any additional actions
Default implementation for removeMultivalueTag
epic
For full hierarchies it fires changeDataItem
action to remove value from source record
With hierarchyGroupDeselection
widget option, parent removal also remove children; removing
last child will also remove the parent.
With hierarchyTraverse
widget option, descendants are used instead of children.
When parent should be removed with both option, removeMultivalueTag
with updated removedItem
will
fire instead of changeDataItem
.
For non-full hierarchies two changeDataItem
actions will fire, first to drop _associate
flag
of remove item and second to update value of soure record.
Widget options are not tested for non-full hierarchies.
removeMultivalueTag
Store instance
Default implementation for selectView
epic.
Schedules data fetch for every widget on the view
After selecting a view, this epic schedules a data fetch for every widget present on the view. If business componenet for the widget has a parent, then root ancestor BC is scheduled for data fetch instead and data for its descendants will be scheduled after ancestor data fetch resolved.
Default implementation for sendOperationAssociate
epic.
Opens a popup with associate component.
This epic will fire on userDrillDown action
Redux store instance
showViewPopup for ${bcName}Assoc
Default implementation for showFileUploadPopupImpl
epic
Fires bcChangeCursors
and showFileUploadPopup
to drop the cursors and show file upload popup.
sendOperation
Default implementation for userDrillDown
epic.
Sends a request to fetch row meta; will write a console error if request fails. Otherwise a chain of actions will be dispatched:
Drilldown url is taken from WidgetField.drillDown property in widget meta configuration or from record directly if record's property specified in WidgetField.drillDownKey
This epic will fire on userDrillDown action
Redux store instance
TODO
Allows to ignore frequently changing values by returning only the last one received until specified delay.
Frequently changing value
Delay until the next change
bcName passed to field
widget field meta
field ID
Receive flat list of fields from array containing fields or field blocks.
Field type
Array of fields or field blocks
Handles interactions between <RowOperationsButton />
and antd <Table />
Initializes references to both components and prepares a hover configuration for table.
A tuple of three values:
<RowOperationsButton />
<RowOperationsButton />
and <Table />
onMouseEnter
/onMouseLeave
pair for antd <Table onRow />
propertyReturns an array of tabs for specified level of navigation
1 for top level navigation; 2, 3, 4 for SecondLevelMenu, ThirdLevelMenu and FourthLevelMenu
Returns a memoized array of operations with respect to include/exclude list in widget meta configuration
List of operations
Widget meta configuration
BC name in case of hierarchy usage
Menu with available record operations
On operation selection dispatches sendOperation
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
The connect function. See {@type Connect} for details.
Request to save an association (many-to-many relation)
bcUrl
, request body should have an array of records with a flag
to set or drop an association.bcUrl
, request body should have a dictionary where key is bcUrl
for business component and value is an array of records with associate flagScreen name
Business component cursors hierarchy
An array of records or a dictionary
Request for a custom operation
Screen name
Business component cursors hierarchy
Changed fields
Call context
Request to delete a data record
Screen name
Business component cursors hierarchy
Call context
Send request for BC data
TODO
Send request for row-meta
Request row meta with preview of force-active changes
Screen name
Business component cursors hierarchy
Changed fields
Request for role switching
Code of new role
Request to create a new data record
Screen name
Business component cursors hierarchy
Request for refresh screens, views and widgets meta
Request to save a data record
Screen name
Business component cursors hierarchy
Changed fields
Call context
Returns MenuItem if it is ViewNavigationGroup
to be identified as group
Returns MenuItem if it is ViewNavigationItem
to be identified as view
TODO
Global instance
Performs mechanism of autosave
HTTP DELETE axios request wrapped into RxJS Observable.
Can be interrupted by redirectOccured
function.
Response payload type
Endpoint url
Call context
HTTP GET axios request wrapped into RxJS Observable.
Can be interrupted by redirectOccured
function.
Response payload type
Endpoint url
Call context
HTTP POST axios request wrapped into RxJS Observable.
Can be interrupted by redirectOccured
function.
Response payload type
Endpoint url
Call context
HTTP PUT axios request wrapped into RxJS Observable.
Can be interrupted by redirectOccured
function.
Response payload type
Endpoint url
Call context
Forms a string representation of business components hierarchy with respect to business components ancestors and their corresponding cursors
Business component name
If result hierarchy should include target bc or only ancestors
TODO
TODO
Combines a dictionary of reducers for different slices of the store into one root reducer.
Effectively works like default redux combineReducers
but provides access to the store
via the third argument to allow reducers read only access to other slices
(simplifies callbacks, epics and actions' payloads).
A dictionary of reducers for different slices of the redux store
TODO
TODO
Extract operations from all operations groups and return them as an array of flat operations
Operations or operation groups as received from row meta
Maps an input array of BcFilter objects into a dictionary of GET-request params
Name of the param formed as field name and filter type, separated by dot,
e.g. ${filter.fieldName}.${filter.type}
Value of the param is:
Filters for business components
Dictionary of query-params for GET-request
Returns an array of operations with respect to include/exclude lists.
If element is an operation group than its nested operations also checked against inclusion/exclusion lists; noth inclusion/exclusion lists from arguments and from group declarations are checked against.
List of operations
List of operations to include
List of operations to exclude
Maps an input array of business component sorters into a dictionary of query params for
Tesler API, where values are field names and keys follows the template:
_sort.${index}.${item.direction}
Array of business component sorters
Dictionary of query-params for GET-request
TODO
Check if an operation matches a specified role
directly by type or by actionRole
field.
If operation role is unavailable due to the store lacking an appropriate row meta, only role
is checked.
Expected operation role or 'none' if operation shouldn't match any crud role
sendOperation action payload
Store instance
Parses a business component hierarchy url into a dictionary of business components and their cursors.
Business component hierarchy url, e.g. bcName1/cursor1/bcName2/cursor2
Function for parsing filters from string into BcFilter type
string representation of filters
Parse sorter string into separate sorter objects. String representation of sorters is url based: "_sort.{order}.{direction}={fieldKey}&_sort.{order}.{direction}"
string representation of sorters
Generated using TypeDoc
Runtime exports of Tesler UI.
Can be imported as:
import {entityName} from '@tesler-ui/core'