string id of the case, that is currently being reloaded, undefined
if no case is currently being reloaded
Weather the tree is eager loaded or not.
Defaults to false
.
It is not recommended to eager load large trees as each node sends a separate backend request to load its data.
Weather the tree is eager loaded or not.
Defaults to false
.
It is not recommended to eager load large trees as each node sends a separate backend request to load its data.
the new setting for eager loading
an Observable
of the LoadingEmitter representing whether the root node is currently
in the process of adding a new child node or not.
Returns undefined
if the tree has not yet been initialized.
Wait for an emission on the [treeRootLoaded$]{@link CaseTreeService#treeRootLoaded$} stream before getting this Observable.
The first value emitted by the Observable is false
, when the tree finishes initializing.
an Observable
of the LoadingEmitter representing the loading state of the root node.
Returns undefined
if the tree has not yet been initialized.
Wait for an emission on the [treeRootLoaded$]{@link CaseTreeService#treeRootLoaded$} stream before getting this Observable.
The first value emitted by the Observable is false
, when the tree finishes initializing.
Emits a value whenever a new root node Filter is set.
true
is emitted if the root node was successfully loaded. false
otherwise.
On subscription emits the last emitted value (if any) to the subscriber.
Adds a new child node to the given node based on the properties of the node's case
emits true
if the child was successfully added, false
if not
Adds a child to the root node.
Useful if you are using the layout where the root node is hidden.
emits true
if the child was successfully added, false
if not
Notifies the parent TreeCaseView that a case was clicked in the tree and it's Task should be displayed
Transforms a CaseTreePath object into an ExpansionTree object. The result has all the common paths merged into single branches of the resulting tree structure.
nodes that should be expanded along with their path from the root node
an ExpansionTree equivalent to the provided CaseTreePath
Creates a new case and adds it to the children of the specified node
identifier of the process that should be created
the node that is the parent of the new case
the result of the operation will be emitted into this stream when the operation completes
the CaseTreeNode who's children the Filter should return
a request body that finds all child cases of the given node
.
Returns undefined
if the provided node
doesn't contain enough information to create the request body.
Deletes the subtrees rooted at the nodes that are present in the parent node's child case ref values, but are no longer present in the new value
an inner node of the tree that had some of it's children removed
the new value of the parent node's case ref
Deselects the currently selected node if it is a descendant of the provided node
the node who's descendants should be deselected
Recursively expands all nodes from the provided array of nodes, that appear in the top level of the ExpansionTree object.
nodes from which the expansion should start
a tree structure representing the nodes that are to be expanded recursively.
The top level nodes are expanded first, from the provided levelNodes
.
Expands the target node in the tree and reloads it's children if they are marked as dirty
the CaseTreeNode that should be expanded
emits true
if the node is expanded and false
if not. If the expansion causes more node expansions
(e.g. eager loaded tree) then, the Observable emits after all the subtree expansions complete.
Expands all nodes in the tree dictated by the argument.
nodes that should be expanded along with their path from the root node
Adds the loaded tree root to the display based on the setting.
whether the root of the tree should be displayed in the tree or not. If the root is not displayed it's children will be displayed on the first level.
an Observable that emits when the tree finishes initialization.
Loads and populates the topmost level of the tree.
The displayed cases are determined by this object's [rootFilter]{@link CaseTreeService#rootFilter}.
Cases are loaded one page at a time and the tree is refreshed after each page.
[finishedLoadingFirstLevel$]{@link CaseTreeService#treeRootLoaded$}
will emit true
once the last page loads successfully.
false
will be emitted if any of the requests fail.
Performs a backend call on the given case, and sets the value of the case ref field in the transition defined by [CASE_REF_TRANSITION]{@link TreePetriflowIdentifiers#CASE_REF_TRANSITION}.
string ID of the case that should have it's tree case ref set
the new value of the case ref field
Adds a new child node to the affectedNode
by adding the last Case from the newCaseRefValue
the node in the tree that had a child added - the parent node
the case ref field of the affected node
the new value of the case ref field in the node
an Observable
that emits true
if a node was successfully added, false
otherwise.
Removes the deleted node from the children of the affectedNode
the node in the tree that had it's child removed
the case ref field of the affected node
the new value of the case ref field in the node
an Observable
that emits true
when the remove operation completes.
Adds a new child node to the target parent node.
the nodes whose child should be added
the child case
the newly added node
Reloads the currently selected case node. The Case object held in the CaseTreeNode instance is not replaced,
but the new Case is Object.assign
-ed into it. This means that the reference to the Case instance is unchanged but references
to all it's non-primitive attributes are changed.
If a reload of the current node is initiated before the previous one completed, the new one is ignored.
If the currently selected case changed before a response from backend was received the response is ignored.
Note that the parent node, nor the child nodes are reloaded.
removes the provided non-root node if the underlying case allows it.
The underlying case is removed from the case ref of it's parent element with the help from the remove
operation provided by case ref itself.
the node that should be removed from the tree
Toggles the expansion state of a node
the CaseTreeNode who's content should be toggled
Updates the children of the given CaseTreeNode with Cases from the provided Page.
the CaseTreeNode who's children are updated
the Page that contains the updated children
Checks whether dirty children need to be reloaded and reloads them if needed.
the CaseTreeNode who's children are updated
emits when loading finishes
Performs an update after adding or removing a node from the tree.
If only one node was added adds it into the tree
If only one node was removed removes it from the tree
Otherwise collapses the affected node and marks it's children as dirty
node that had it's children changed
new value of the caseRef field returned by backend
an Observable
that emits an object with the [result]{@link ResultWithAfterActions#result} attribute set to true
if
the update completes successfully and false
otherwise.
Loads every page of children from the given number and updates the existing children.
Missing nodes are removed. Existing nodes are marked as dirty. New nodes are added.
Nodes are returned in their insertion order.
the CaseTreeNode who's children are updated
the number of the first page that should be loaded. All following pages are loaded as well
next is emitted when loading of all pages completes (regardless of the outcome)
Updates the tree after adding a new child
the parent node
the new value of the parent node's case ref
the result of the operation will be emitted into this stream when the operation completes
Generated using TypeDoc
Weather the tree is eager loaded or not.
Defaults to
false
.It is not recommended to eager load large trees as each node sends a separate backend request to load its data.