@i2analyze/notebook-sdk 1.7.2-dev.0 → 1.8.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gen/notebook-sdk-public.d.ts +240 -9
- package/package.json +1 -1
|
@@ -385,6 +385,11 @@ export declare namespace app {
|
|
|
385
385
|
* @i2since 1.6
|
|
386
386
|
*/
|
|
387
387
|
export type EdgeSummarySpecifier = visual.ElementId | visual.IEdgeSummary;
|
|
388
|
+
/**
|
|
389
|
+
* A common specifier for a node group, for use in mutation APIs.
|
|
390
|
+
* @i2since 1.8
|
|
391
|
+
*/
|
|
392
|
+
export type NodeGroupSpecifier = visual.ElementId | visual.INodeGroup;
|
|
388
393
|
/**
|
|
389
394
|
* The identifier of a record group.
|
|
390
395
|
* @i2since 1.1
|
|
@@ -643,7 +648,16 @@ export declare namespace app {
|
|
|
643
648
|
* A set of methods for modifying the appearance of a node.
|
|
644
649
|
* @i2since 1.2
|
|
645
650
|
*/
|
|
646
|
-
export interface INodeEditor extends IElementEditorBase {
|
|
651
|
+
export interface INodeEditor extends Omit<IElementEditorBase, 'setColor'> {
|
|
652
|
+
/**
|
|
653
|
+
* Sets or resets the color of the element.
|
|
654
|
+
*
|
|
655
|
+
* @param color - The color to set, or `undefined` to reset the color to the theme default, or 'null' to remove the color.
|
|
656
|
+
* @returns The element, with its color set to the specified value.
|
|
657
|
+
* @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name.
|
|
658
|
+
* @i2since 1.2
|
|
659
|
+
*/
|
|
660
|
+
setColor(color: string | undefined | null): this;
|
|
647
661
|
/**
|
|
648
662
|
* Sets or resets the size of the node.
|
|
649
663
|
*
|
|
@@ -683,17 +697,103 @@ export declare namespace app {
|
|
|
683
697
|
* @i2since 1.2
|
|
684
698
|
*/
|
|
685
699
|
export interface IEdgeEditor extends IElementEditorBase {
|
|
700
|
+
/**
|
|
701
|
+
* Sets or resets the width of the edge.
|
|
702
|
+
*
|
|
703
|
+
* @param width - The width to set, or undefined to reset the width to 1.
|
|
704
|
+
* @returns The edge, with its width set to the specified value.
|
|
705
|
+
* @i2since 1.8
|
|
706
|
+
*/
|
|
707
|
+
setWidth(width: number | undefined): this;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* A set of methods for modifying the contents and position of a node group.
|
|
711
|
+
* @i2since 1.8
|
|
712
|
+
*/
|
|
713
|
+
export interface INodeGroupEditor {
|
|
714
|
+
/**
|
|
715
|
+
* Sets or resets the label of the node group.
|
|
716
|
+
*
|
|
717
|
+
* @param label - The label to set, or `undefined` to indicate there is no label.
|
|
718
|
+
* @returns The node group, with its label set to the specified value.
|
|
719
|
+
* @i2since 1.8
|
|
720
|
+
*/
|
|
721
|
+
setLabel(label: string | undefined): this;
|
|
722
|
+
/**
|
|
723
|
+
* Sets or resets the color of the node group.
|
|
724
|
+
*
|
|
725
|
+
* @param color - The color to set, or `null` to remove the border, or `undefined` to reset the border color to the theme default.
|
|
726
|
+
* @returns The node group, with its border color set to the specified value.
|
|
727
|
+
* @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name, or `null` or `undefined`.
|
|
728
|
+
* @i2since 1.8
|
|
729
|
+
*/
|
|
730
|
+
setBorderColor(color: string | undefined | null): this;
|
|
731
|
+
/**
|
|
732
|
+
* Sets or resets the border width of the node group.
|
|
733
|
+
*
|
|
734
|
+
* @param width - The width to set, or `undefined` to reset the width to the theme default.
|
|
735
|
+
* @returns The node group, with its border width set to the specified value.
|
|
736
|
+
* @throws `Error` if the specified value is not either a positive number or `undefined`.
|
|
737
|
+
* @remarks A size of 0 is valid, and indicates that the node group has no border - equivalent to `setBorderColor(null)`.
|
|
738
|
+
* @i2since 1.8
|
|
739
|
+
*/
|
|
740
|
+
setBorderWidth(width: number | undefined): this;
|
|
741
|
+
/**
|
|
742
|
+
* Sets or resets the background color of the node group.
|
|
743
|
+
*
|
|
744
|
+
* @param color - The color to set, or `null` to remove the background, or `undefined` to reset the background color to the theme default.
|
|
745
|
+
* @returns The node group, with its background color set to the specified value.
|
|
746
|
+
* @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name, or `null` or `undefined`.
|
|
747
|
+
* @i2since 1.8
|
|
748
|
+
*/
|
|
749
|
+
setColor(color: string | undefined | null): this;
|
|
750
|
+
/**
|
|
751
|
+
* Sets or resets the image for the node group.
|
|
752
|
+
*
|
|
753
|
+
* @param href - The URL of the image to use, or 'undefined' to indicate there is no image.
|
|
754
|
+
* @param description - A description of the image.
|
|
755
|
+
* @returns The node group, with its image set to the specified URL and description.
|
|
756
|
+
* @remarks If an image is not set, then a default image will be used when a label is also set.
|
|
757
|
+
* @i2since 1.8
|
|
758
|
+
*/
|
|
759
|
+
setImage(href: string | undefined, description?: string): this;
|
|
760
|
+
/**
|
|
761
|
+
* Adds nodes to the group.
|
|
762
|
+
* @param nodes - The nodes to add to the group.
|
|
763
|
+
* @throws `Error` if any of the nodes are not on the chart.
|
|
764
|
+
* @returns The node group, with the specified nodes added.
|
|
765
|
+
* @i2since 1.8
|
|
766
|
+
*/
|
|
767
|
+
addNodes(nodes: NodeSpecifier | Iterable<NodeSpecifier>): this;
|
|
768
|
+
/**
|
|
769
|
+
* Removes nodes from the group. If the group is empty after the mutation is committed, the group itself is removed.
|
|
770
|
+
* @param nodes - The nodes to remove from the group.
|
|
771
|
+
* @returns The node group, with the specified nodes removed.
|
|
772
|
+
* @i2since 1.8
|
|
773
|
+
*/
|
|
774
|
+
removeNodes(nodes: NodeSpecifier | Iterable<NodeSpecifier>): this;
|
|
686
775
|
}
|
|
687
776
|
/**
|
|
688
|
-
* A record that has been created in a
|
|
777
|
+
* A record that has been created in a mutation handler, but has not yet been added to a chart.
|
|
689
778
|
* @i2since 1.1
|
|
690
779
|
*/
|
|
691
780
|
export interface IPendingRecord extends IRecordEditor {
|
|
692
781
|
/**
|
|
693
|
-
* Gets
|
|
782
|
+
* Gets the identifier of the record.
|
|
694
783
|
* @i2since 1.1
|
|
695
784
|
*/
|
|
696
|
-
recordId: records.AnalyzeRecordId;
|
|
785
|
+
readonly recordId: records.AnalyzeRecordId;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* A node group that has been created in a mutation handler, but has not yet been added to a chart.
|
|
789
|
+
* @i2since 1.8
|
|
790
|
+
*/
|
|
791
|
+
export interface IPendingNodeGroup extends INodeGroupEditor {
|
|
792
|
+
/**
|
|
793
|
+
* Gets the identifier of the node group.
|
|
794
|
+
* @i2since 1.8
|
|
795
|
+
*/
|
|
796
|
+
readonly id: visual.ElementId;
|
|
697
797
|
}
|
|
698
798
|
/**
|
|
699
799
|
* A set of utility functions for creating property and other values that can be reused across records.
|
|
@@ -913,6 +1013,15 @@ export declare namespace app {
|
|
|
913
1013
|
* @i2since 1.1
|
|
914
1014
|
*/
|
|
915
1015
|
addRecordGroup(recordGroupId: AnalyzeRecordGroupId, selectionOption: SelectionOption): void;
|
|
1016
|
+
/**
|
|
1017
|
+
* Creates a node group from the specified nodes.
|
|
1018
|
+
*
|
|
1019
|
+
* @param nodes - The nodes to add to the group.
|
|
1020
|
+
* @throws `Error` if any of the nodes are not on the chart.
|
|
1021
|
+
* @returns The node group, with the specified nodes added.
|
|
1022
|
+
* @i2since 1.8
|
|
1023
|
+
*/
|
|
1024
|
+
addNodeGroup(nodes: Iterable<NodeSpecifier>): IPendingNodeGroup;
|
|
916
1025
|
/**
|
|
917
1026
|
* Gets an object with methods for editing a record.
|
|
918
1027
|
*
|
|
@@ -937,6 +1046,14 @@ export declare namespace app {
|
|
|
937
1046
|
* @i2since 1.2
|
|
938
1047
|
*/
|
|
939
1048
|
editEdge(edge: EdgeSpecifier): IEdgeEditor;
|
|
1049
|
+
/**
|
|
1050
|
+
* Gets an object with methods for editing a node group.
|
|
1051
|
+
*
|
|
1052
|
+
* @param nodeGroup - The node group to be edited.
|
|
1053
|
+
* @returns The node-group-editing object.
|
|
1054
|
+
* @i2since 1.8
|
|
1055
|
+
*/
|
|
1056
|
+
editNodeGroup(nodeGroup: NodeGroupSpecifier): INodeGroupEditor;
|
|
940
1057
|
/**
|
|
941
1058
|
* Moves a node to a particular location on the chart.
|
|
942
1059
|
*
|
|
@@ -973,6 +1090,22 @@ export declare namespace app {
|
|
|
973
1090
|
* @i2since 1.1
|
|
974
1091
|
*/
|
|
975
1092
|
removeElements(elements: ElementSpecifier | Iterable<ElementSpecifier>): boolean;
|
|
1093
|
+
/**
|
|
1094
|
+
* Removes node groups from the chart. Removing a node group does not remove the nodes that were part of it.
|
|
1095
|
+
*
|
|
1096
|
+
* @param nodeGroups - The node group or groups to be removed.
|
|
1097
|
+
* @returns `true` if one or more node groups were successfully removed from the chart; `false` if none of the node groups existed.
|
|
1098
|
+
* @i2since 1.8
|
|
1099
|
+
*/
|
|
1100
|
+
removeNodeGroups(nodeGroups: NodeGroupSpecifier | Iterable<NodeGroupSpecifier>): boolean;
|
|
1101
|
+
/**
|
|
1102
|
+
* Removes nodes from their node group. If the group is empty after the mutation is committed, the group itself is removed.
|
|
1103
|
+
*
|
|
1104
|
+
* @param nodes - The node or nodes to be removed.
|
|
1105
|
+
* @returns `true` if one or more nodes were successfully removed from the group; `false` if none of the nodes existed.
|
|
1106
|
+
* @i2since 1.8
|
|
1107
|
+
*/
|
|
1108
|
+
removeFromNodeGroup(nodes: NodeSpecifier | Iterable<NodeSpecifier>): boolean;
|
|
976
1109
|
/**
|
|
977
1110
|
* Removes the currently selected records from the chart.
|
|
978
1111
|
* @i2since 1.1
|
|
@@ -1404,6 +1537,11 @@ export declare namespace chart {
|
|
|
1404
1537
|
* @i2since 1.6
|
|
1405
1538
|
*/
|
|
1406
1539
|
readonly edgeSummaries: data.IKeyedReadOnlyCollection<visual.ElementId, visual.IEdgeSummary>;
|
|
1540
|
+
/**
|
|
1541
|
+
* Gets all the node groups in the chart.
|
|
1542
|
+
* @i2since 1.8
|
|
1543
|
+
*/
|
|
1544
|
+
readonly nodeGroups: data.IKeyedReadOnlyCollection<visual.ElementId, visual.INodeGroup>;
|
|
1407
1545
|
/**
|
|
1408
1546
|
* Gets all the records in the chart.
|
|
1409
1547
|
* @i2since 1.0
|
|
@@ -1564,6 +1702,27 @@ export declare namespace chart {
|
|
|
1564
1702
|
*/
|
|
1565
1703
|
readonly removed: data.IReadOnlyCollection<visual.ElementId>;
|
|
1566
1704
|
};
|
|
1705
|
+
/**
|
|
1706
|
+
* Gets the {@link visual.INodeGroup | node groups} that changed.
|
|
1707
|
+
* @i2since 1.8
|
|
1708
|
+
*/
|
|
1709
|
+
readonly nodeGroups: {
|
|
1710
|
+
/**
|
|
1711
|
+
* Gets the node groups that were added.
|
|
1712
|
+
* @i2since 1.8
|
|
1713
|
+
*/
|
|
1714
|
+
readonly added: data.IKeyedReadOnlyCollection<visual.ElementId, visual.INodeGroup>;
|
|
1715
|
+
/**
|
|
1716
|
+
* Gets the node groups that were changed.
|
|
1717
|
+
* @i2since 1.8
|
|
1718
|
+
*/
|
|
1719
|
+
readonly changed: data.IKeyedReadOnlyCollection<visual.ElementId, visual.INodeGroup>;
|
|
1720
|
+
/**
|
|
1721
|
+
* Gets the identifiers of the node groups that were removed.
|
|
1722
|
+
* @i2since 1.8
|
|
1723
|
+
*/
|
|
1724
|
+
readonly removed: data.IReadOnlyCollection<visual.ElementId>;
|
|
1725
|
+
};
|
|
1567
1726
|
}
|
|
1568
1727
|
/**
|
|
1569
1728
|
* A change to the data in a chart in i2 Notebook.
|
|
@@ -2406,7 +2565,7 @@ export declare namespace commands {
|
|
|
2406
2565
|
*/
|
|
2407
2566
|
readonly addToMap: CommandId;
|
|
2408
2567
|
/**
|
|
2409
|
-
* Gets the identifier of the system command opens the chart settings dialog.
|
|
2568
|
+
* Gets the identifier of the system command that opens the chart settings dialog.
|
|
2410
2569
|
* @i2since 1.5
|
|
2411
2570
|
*/
|
|
2412
2571
|
readonly chartSettings: CommandId;
|
|
@@ -2425,6 +2584,11 @@ export declare namespace commands {
|
|
|
2425
2584
|
* @i2since 1.0
|
|
2426
2585
|
*/
|
|
2427
2586
|
readonly deleteSelected: CommandId;
|
|
2587
|
+
/**
|
|
2588
|
+
* Gets the identifier of the system command that allows users to download records in Excel format.
|
|
2589
|
+
* @i2since 1.6
|
|
2590
|
+
*/
|
|
2591
|
+
readonly downloadRecords: CommandId;
|
|
2428
2592
|
/**
|
|
2429
2593
|
* Gets the identifier of the system command that performs a one-level expand operation on the current selection.
|
|
2430
2594
|
* @i2since 1.1
|
|
@@ -2440,6 +2604,11 @@ export declare namespace commands {
|
|
|
2440
2604
|
* @i2since 1.0
|
|
2441
2605
|
*/
|
|
2442
2606
|
readonly getPaths: CommandId;
|
|
2607
|
+
/**
|
|
2608
|
+
* Gets the identifier of the system command that adds selected nodes to a group.
|
|
2609
|
+
* @i2since 1.8
|
|
2610
|
+
*/
|
|
2611
|
+
readonly groupNodes: CommandId;
|
|
2443
2612
|
/**
|
|
2444
2613
|
* Gets the identifier of the system command that performs a grouped layout.
|
|
2445
2614
|
* @i2since 1.0
|
|
@@ -2561,10 +2730,10 @@ export declare namespace commands {
|
|
|
2561
2730
|
*/
|
|
2562
2731
|
readonly undo: CommandId;
|
|
2563
2732
|
/**
|
|
2564
|
-
* Gets the identifier of the system command that
|
|
2565
|
-
* @i2since 1.
|
|
2733
|
+
* Gets the identifier of the system command that removes selected nodes from their group.
|
|
2734
|
+
* @i2since 1.8
|
|
2566
2735
|
*/
|
|
2567
|
-
readonly
|
|
2736
|
+
readonly ungroupNodes: CommandId;
|
|
2568
2737
|
}
|
|
2569
2738
|
/**
|
|
2570
2739
|
* A lookup table for the identifiers of the system action groups in the Home tab.
|
|
@@ -5505,7 +5674,12 @@ export declare namespace visual {
|
|
|
5505
5674
|
* A style for a node, which affects its appearance.
|
|
5506
5675
|
* @i2since 1.0
|
|
5507
5676
|
*/
|
|
5508
|
-
export interface INodeStyle extends IElementStyleBase {
|
|
5677
|
+
export interface INodeStyle extends Omit<IElementStyleBase, 'color'> {
|
|
5678
|
+
/**
|
|
5679
|
+
* Gets the color of the node, or null if there is no color and the node background is transparent.
|
|
5680
|
+
* @i2since 1.2
|
|
5681
|
+
*/
|
|
5682
|
+
readonly color: IElementSetting<string | null>;
|
|
5509
5683
|
/**
|
|
5510
5684
|
* Gets the image to display for the node.
|
|
5511
5685
|
* @i2since 1.0
|
|
@@ -5522,6 +5696,11 @@ export declare namespace visual {
|
|
|
5522
5696
|
* @i2since 1.2
|
|
5523
5697
|
*/
|
|
5524
5698
|
export interface IEdgeStyle extends IElementStyleBase {
|
|
5699
|
+
/**
|
|
5700
|
+
* Gets the width of the edge.
|
|
5701
|
+
* @i2since 1.8
|
|
5702
|
+
*/
|
|
5703
|
+
readonly width: IElementSetting<number>;
|
|
5525
5704
|
}
|
|
5526
5705
|
/**
|
|
5527
5706
|
* A rectangular area, such as the boundary of the chart view.
|
|
@@ -5575,6 +5754,58 @@ export declare namespace visual {
|
|
|
5575
5754
|
*/
|
|
5576
5755
|
readonly edges: data.IKeyedReadOnlyCollection<ElementId, IEdge>;
|
|
5577
5756
|
}
|
|
5757
|
+
/**
|
|
5758
|
+
* A node group, which is a collection of nodes that can be moved and selected together.
|
|
5759
|
+
* @i2since 1.8
|
|
5760
|
+
*/
|
|
5761
|
+
export interface INodeGroup {
|
|
5762
|
+
/**
|
|
5763
|
+
* Gets the identifier of the node group.
|
|
5764
|
+
* @i2since 1.8
|
|
5765
|
+
*/
|
|
5766
|
+
readonly id: ElementId;
|
|
5767
|
+
/**
|
|
5768
|
+
* Gets the label of the node group, or undefined if there is no explicit label.
|
|
5769
|
+
* @i2since 1.8
|
|
5770
|
+
*/
|
|
5771
|
+
readonly label: string | undefined;
|
|
5772
|
+
/**
|
|
5773
|
+
* Gets the style of the node group.
|
|
5774
|
+
* @i2since 1.8
|
|
5775
|
+
*/
|
|
5776
|
+
readonly style: INodeGroupStyle;
|
|
5777
|
+
/**
|
|
5778
|
+
* Gets the nodes in the node group.
|
|
5779
|
+
* @i2since 1.8
|
|
5780
|
+
*/
|
|
5781
|
+
readonly nodes: data.IKeyedReadOnlyCollection<ElementId, INode>;
|
|
5782
|
+
}
|
|
5783
|
+
/**
|
|
5784
|
+
* A style for a node group, which affects its appearance.
|
|
5785
|
+
* @i2since 1.8
|
|
5786
|
+
*/
|
|
5787
|
+
export interface INodeGroupStyle {
|
|
5788
|
+
/**
|
|
5789
|
+
* Gets the image to display for the node group.
|
|
5790
|
+
* @i2since 1.8
|
|
5791
|
+
*/
|
|
5792
|
+
readonly image: IImageSetting;
|
|
5793
|
+
/**
|
|
5794
|
+
* Gets the color of the node group, or null if there is no background.
|
|
5795
|
+
* @i2since 1.8
|
|
5796
|
+
*/
|
|
5797
|
+
readonly color: IElementSetting<string | null>;
|
|
5798
|
+
/**
|
|
5799
|
+
* Gets the border color of the node group, or null if there is no border.
|
|
5800
|
+
* @i2since 1.8
|
|
5801
|
+
*/
|
|
5802
|
+
readonly borderColor: IElementSetting<string | null>;
|
|
5803
|
+
/**
|
|
5804
|
+
* Gets the border width of the node group.
|
|
5805
|
+
* @i2since 1.8
|
|
5806
|
+
*/
|
|
5807
|
+
readonly borderWidth: IElementSetting<number>;
|
|
5808
|
+
}
|
|
5578
5809
|
}
|
|
5579
5810
|
|
|
5580
5811
|
export { }
|