import type { NodeList, Transformation } from '@linkurious/ogma'; import { IVizNodeGroupInfo, LkEdgeData, LkNodeData, NodeGroupingRule } from '@linkurious/rest-client'; import { LKOgma } from '../index'; export declare const LKE_NODE_GROUPING_EDGE = "LKE_NODE_GROUPING_EDGE"; export declare class NodeGroupingTransformation { transformation?: Transformation; groupRule?: NodeGroupingRule; private _nodeGroupingStyleRule?; private _ogma; private _nodeGroupingCollapsedStyleRule?; private _collapsedDefaultValue; private _nodeGroupingAttributes; constructor(ogma: LKOgma); /** * Set the grouping rule * @param rule of grouping */ setGroupingRule(rule?: NodeGroupingRule): void; /** * create a node grouping transformation * It uses groupRule to define the rule * Group the nodes based on a category type and a property value */ initTransformation(): Promise; /** * refresh the transformation * Called when there is a change in the rule */ refreshTransformation(): Promise; /** * init node grouping style */ initNodeGroupingStyle(): void; refreshNodeGroupingStyle(): Promise; /** * Get the virtual nodes of the transformation * @private */ getVirtualNodesOfTransformation(): NodeList; /** * Set node initial attributes * @param nodeGroups object containing the node group id and the layoutable attribute */ setNodeGroupingAttributes(nodeGroups: IVizNodeGroupInfo[]): void; /** * set collapse default value, this will be the state of newly created groups */ setCollapseDefaultValue(value: boolean): void; /** * Return the caption of a virtual node * @param node reference to the virtual node */ private _getNodeGroupingCaption; private _getAdjacentEdgeNodeGroupingCaption; private _getPropertyValueNodeGroupingCaption; private _isRuleNotApplicableToNode; private _isRelationshipRuleNotApplicableToNode; private _hasEdgeOfType; private _isPropertyRuleNotApplicableToNode; /** * Unpin list of nodes * @param nodes * @private */ private _unpinNodes; /** * Get all the raw nodes part of the transformation * @private */ private _getAllTransformationRawNodes; private _findGroupingPropertyValue; /** * Return a hashed string that represents the group id */ private _findNodeGroupId; /** * For a relation type grouping rule, return the central node from one of the nodes in the group */ private static _getGroupCentralNode; private _getPropertyValueGroupId; private _getAdjacentEdgeGroupId; /** * Initialize the style for the intermediate group state, when transitioning from expanded to collapsed */ private _initIntermediateGroupStyle; private _getDefaultCollapsedState; private _getDefaultLayoutableValue; /** * Set styles for the class "filtered" */ private _setSubSelectedClass; }