@i2analyze/notebook-sdk 1.2.0-dev.5 → 1.2.0-dev.7
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 +145 -13
- package/package.json +1 -1
|
@@ -353,6 +353,16 @@ export declare namespace app {
|
|
|
353
353
|
* @i2since 1.1
|
|
354
354
|
*/
|
|
355
355
|
export type SourceReferenceSpecifier = records.SourceReferenceId | records.ISourceReference;
|
|
356
|
+
/**
|
|
357
|
+
* A common specifier for a Node, for use in mutation APIs.
|
|
358
|
+
* @i2since 1.2
|
|
359
|
+
*/
|
|
360
|
+
export type NodeSpecifier = visual.ElementId | visual.INode;
|
|
361
|
+
/**
|
|
362
|
+
* A common specifier for an Edge, for use in mutation APIs.
|
|
363
|
+
* @i2since 1.2
|
|
364
|
+
*/
|
|
365
|
+
export type EdgeSpecifier = visual.ElementId | visual.IEdge;
|
|
356
366
|
/**
|
|
357
367
|
* The identifier of a record group.
|
|
358
368
|
* @i2since 1.1
|
|
@@ -563,6 +573,47 @@ export declare namespace app {
|
|
|
563
573
|
*/
|
|
564
574
|
setLinkDirection(linkDirection: data.LinkDirection): this;
|
|
565
575
|
}
|
|
576
|
+
/**
|
|
577
|
+
* A set of methods for modifying the styles of an elements on an i2 Notebook chart.
|
|
578
|
+
* @i2since 1.2
|
|
579
|
+
*/
|
|
580
|
+
export interface IElementEditorBase {
|
|
581
|
+
/**
|
|
582
|
+
* Sets or clears the color of the element.
|
|
583
|
+
*
|
|
584
|
+
* @param color - The Color to be set (or undefined resets to default color).
|
|
585
|
+
* @returns This editor, with the defined color in the elements.
|
|
586
|
+
* @throws `Error` if the given color is not a CSS color syntax such as Hex, RGB and color name.
|
|
587
|
+
* @i2since 1.2
|
|
588
|
+
*/
|
|
589
|
+
setColor(color: string | undefined): this;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* A set of styling methods that can be applied on nodes.
|
|
593
|
+
* @i2since 1.2
|
|
594
|
+
*/
|
|
595
|
+
export interface INodeEditor extends IElementEditorBase {
|
|
596
|
+
/**
|
|
597
|
+
* Sets or clears the size of the node.
|
|
598
|
+
* @param size - The node size to be set (or undefined resets to default size 1).
|
|
599
|
+
* @returns This editor, with the defined size on the given node.
|
|
600
|
+
* @i2since 1.2
|
|
601
|
+
*/
|
|
602
|
+
setSize(size: visual.NodeSize | undefined): this;
|
|
603
|
+
/**
|
|
604
|
+
* Moves a node to a particular location on the chart.
|
|
605
|
+
* @param position - The location to move the node to.
|
|
606
|
+
* @returns This editor, with the new position on the given node.
|
|
607
|
+
* @i2since 1.2
|
|
608
|
+
*/
|
|
609
|
+
setCenter(position: visual.IPosition): this;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* A set of styling methods that can be applied on edges.
|
|
613
|
+
* @i2since 1.2
|
|
614
|
+
*/
|
|
615
|
+
export interface IEdgeEditor extends IElementEditorBase {
|
|
616
|
+
}
|
|
566
617
|
/**
|
|
567
618
|
* A record that has been created in a transaction handler, but has not yet been added to a chart.
|
|
568
619
|
* @i2since 1.1
|
|
@@ -800,6 +851,22 @@ export declare namespace app {
|
|
|
800
851
|
* @i2since 1.1
|
|
801
852
|
*/
|
|
802
853
|
editRecord(record: RecordSpecifier): IRecordEditor;
|
|
854
|
+
/**
|
|
855
|
+
* Gets an object with methods for editing a node styles.
|
|
856
|
+
*
|
|
857
|
+
* @param node - The node to be edited.
|
|
858
|
+
* @returns The node-editing object.
|
|
859
|
+
* @i2since 1.2
|
|
860
|
+
*/
|
|
861
|
+
editNode(node: NodeSpecifier): INodeEditor;
|
|
862
|
+
/**
|
|
863
|
+
* Gets an object with methods for editing an edge styles.
|
|
864
|
+
*
|
|
865
|
+
* @param edge - The edge to be edited.
|
|
866
|
+
* @returns The edge-editing object.
|
|
867
|
+
* @i2since 1.2
|
|
868
|
+
*/
|
|
869
|
+
editEdge(edge: EdgeSpecifier): IEdgeEditor;
|
|
803
870
|
/**
|
|
804
871
|
* Moves a node to a particular location on the chart.
|
|
805
872
|
*
|
|
@@ -807,6 +874,7 @@ export declare namespace app {
|
|
|
807
874
|
* @param position - The location to move the node to.
|
|
808
875
|
* @throws `Error` if the node is not on the chart, or if the x- or y-coordinate of the location is not a number.
|
|
809
876
|
* @i2since 1.1
|
|
877
|
+
* @deprecated `app.setNodeCenter` is no longer used instead use {@link app.INodeEditor.setCenter}.
|
|
810
878
|
*/
|
|
811
879
|
setNodeCenter(node: visual.INode | visual.ElementId, position: visual.IPosition): void;
|
|
812
880
|
/**
|
|
@@ -1749,9 +1817,10 @@ export declare namespace commands {
|
|
|
1749
1817
|
* To retrieve areas that represent the entire application ribbon or pop-up menu, use the properties of {@link commands.ICommandApi}.
|
|
1750
1818
|
*
|
|
1751
1819
|
* @typeParam TSystemGroups - The type of the system groups in the area.
|
|
1820
|
+
* @typeParam TGroupInfo - The type of the group of actions in i2 Notebook.
|
|
1752
1821
|
* @i2since 1.0
|
|
1753
1822
|
*/
|
|
1754
|
-
export interface IActionArea<TSystemGroups> {
|
|
1823
|
+
export interface IActionArea<TSystemGroups, TGroupInfo = IGroupBase> {
|
|
1755
1824
|
/**
|
|
1756
1825
|
* Locates the area of the user interface that appears immediately before a particular action or group of actions.
|
|
1757
1826
|
*
|
|
@@ -1760,7 +1829,7 @@ export declare namespace commands {
|
|
|
1760
1829
|
* @throws `Error` if the `id` was not a valid {@link commands.CommandId | CommandId} or {@link commands.GroupId | GroupId}.
|
|
1761
1830
|
* @i2since 1.0
|
|
1762
1831
|
*/
|
|
1763
|
-
before(id: CommandId | GroupId): IActionArea<undefined>;
|
|
1832
|
+
before(id: CommandId | GroupId): IActionArea<undefined, TGroupInfo>;
|
|
1764
1833
|
/**
|
|
1765
1834
|
* Locates the area of the user interface that appears immediately before the action that represents the specified command.
|
|
1766
1835
|
*
|
|
@@ -1769,7 +1838,7 @@ export declare namespace commands {
|
|
|
1769
1838
|
* @throws `Error` if `command.id` is not a valid {@link commands.CommandId | CommandId}.
|
|
1770
1839
|
* @i2since 1.1
|
|
1771
1840
|
*/
|
|
1772
|
-
before(command: ICommand): IActionArea<undefined>;
|
|
1841
|
+
before(command: ICommand): IActionArea<undefined, TGroupInfo>;
|
|
1773
1842
|
/**
|
|
1774
1843
|
* Locates the area of the user interface that appears immediately after a particular action or group of actions.
|
|
1775
1844
|
*
|
|
@@ -1778,7 +1847,7 @@ export declare namespace commands {
|
|
|
1778
1847
|
* @throws `Error` if the `id` was not a valid {@link commands.CommandId | CommandId} or {@link commands.GroupId | GroupId}.
|
|
1779
1848
|
* @i2since 1.0
|
|
1780
1849
|
*/
|
|
1781
|
-
after(id: CommandId | GroupId): IActionArea<undefined>;
|
|
1850
|
+
after(id: CommandId | GroupId): IActionArea<undefined, TGroupInfo>;
|
|
1782
1851
|
/**
|
|
1783
1852
|
* Locates the area of the user interface that appears immediately after the action that represents the specified command.
|
|
1784
1853
|
*
|
|
@@ -1787,7 +1856,7 @@ export declare namespace commands {
|
|
|
1787
1856
|
* @throws `Error` if `command.id` is not a valid {@link commands.CommandId | CommandId}.
|
|
1788
1857
|
* @i2since 1.1
|
|
1789
1858
|
*/
|
|
1790
|
-
after(command: ICommand): IActionArea<undefined>;
|
|
1859
|
+
after(command: ICommand): IActionArea<undefined, TGroupInfo>;
|
|
1791
1860
|
/**
|
|
1792
1861
|
* Locates the area of the user interface that is occupied by a particular group of actions.
|
|
1793
1862
|
*
|
|
@@ -1796,7 +1865,7 @@ export declare namespace commands {
|
|
|
1796
1865
|
* @throws `Error` if the `id` was not a valid {@link commands.CommandId | CommandId} or {@link commands.GroupId | GroupId}.
|
|
1797
1866
|
* @i2since 1.0
|
|
1798
1867
|
*/
|
|
1799
|
-
getGroup(id: GroupId): IActionArea<undefined>;
|
|
1868
|
+
getGroup(id: GroupId): IActionArea<undefined, TGroupInfo>;
|
|
1800
1869
|
/**
|
|
1801
1870
|
* Removes an action or group of actions from the user interface.
|
|
1802
1871
|
*
|
|
@@ -1826,7 +1895,7 @@ export declare namespace commands {
|
|
|
1826
1895
|
* @throws `Error` if the `group` was not valid, or if a group with the same {@link commands.GroupId} was already present.
|
|
1827
1896
|
* @i2since 1.0
|
|
1828
1897
|
*/
|
|
1829
|
-
addGroup(group:
|
|
1898
|
+
addGroup(group: TGroupInfo): IActionArea<undefined, TGroupInfo>;
|
|
1830
1899
|
/**
|
|
1831
1900
|
* Adds the specified group of actions to the user interface, or gets an existing group with the same identifier.
|
|
1832
1901
|
*
|
|
@@ -1840,7 +1909,7 @@ export declare namespace commands {
|
|
|
1840
1909
|
* @throws `Error` if the `group` was not valid, or if it was added before by the same plug-in.
|
|
1841
1910
|
* @i2since 1.0
|
|
1842
1911
|
*/
|
|
1843
|
-
addOrGetGroup(group:
|
|
1912
|
+
addOrGetGroup(group: TGroupInfo): IActionArea<undefined, TGroupInfo>;
|
|
1844
1913
|
/**
|
|
1845
1914
|
* Gets the system groups for the action area, which you can use to specify relative locations for your actions and groups.
|
|
1846
1915
|
* @i2since 1.0
|
|
@@ -1928,14 +1997,30 @@ export declare namespace commands {
|
|
|
1928
1997
|
export type GroupId = string;
|
|
1929
1998
|
/**
|
|
1930
1999
|
* A group of actions in i2 Notebook.
|
|
1931
|
-
* @i2since 1.
|
|
2000
|
+
* @i2since 1.2
|
|
1932
2001
|
*/
|
|
1933
|
-
export interface
|
|
2002
|
+
export interface IGroupBase {
|
|
1934
2003
|
/**
|
|
1935
2004
|
* Gets the identifier of the group, which should be a GUID.
|
|
1936
2005
|
* @i2since 1.0
|
|
1937
2006
|
*/
|
|
1938
2007
|
readonly id: GroupId;
|
|
2008
|
+
/**
|
|
2009
|
+
* Gets the name of the group.
|
|
2010
|
+
* @i2since 1.2
|
|
2011
|
+
*/
|
|
2012
|
+
readonly label?: string;
|
|
2013
|
+
/**
|
|
2014
|
+
* Gets the icon of the group, which is displayed when the group contents are not displayed.
|
|
2015
|
+
* @i2since 1.2
|
|
2016
|
+
*/
|
|
2017
|
+
readonly icon?: IIcon;
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* A group of actions in i2 Notebook.
|
|
2021
|
+
* @i2since 1.0
|
|
2022
|
+
*/
|
|
2023
|
+
export interface IGroup extends IGroupBase {
|
|
1939
2024
|
/**
|
|
1940
2025
|
* Gets the name of the group.
|
|
1941
2026
|
* @i2since 1.0
|
|
@@ -1947,6 +2032,12 @@ export declare namespace commands {
|
|
|
1947
2032
|
*/
|
|
1948
2033
|
readonly icon: IIcon;
|
|
1949
2034
|
}
|
|
2035
|
+
/**
|
|
2036
|
+
* A group of actions that doesn't require label and id in i2 Notebook.
|
|
2037
|
+
* @i2since 1.2
|
|
2038
|
+
*/
|
|
2039
|
+
export interface IChartPopupMenuGroup extends Omit<IGroupBase, 'icon' | 'label'> {
|
|
2040
|
+
}
|
|
1950
2041
|
/**
|
|
1951
2042
|
* A representation of a command in the user interface. An action is created when a command is surfaced.
|
|
1952
2043
|
* @i2since 1.0
|
|
@@ -2021,7 +2112,7 @@ export declare namespace commands {
|
|
|
2021
2112
|
* The `homeTab` area supports top-level and second-level groups, which correspond to labeled groups and drop-down menus in the ribbon.
|
|
2022
2113
|
* @i2since 1.0
|
|
2023
2114
|
*/
|
|
2024
|
-
readonly homeTab: IActionArea<IHomeTabSystemGroups>;
|
|
2115
|
+
readonly homeTab: IActionArea<IHomeTabSystemGroups, IGroup>;
|
|
2025
2116
|
};
|
|
2026
2117
|
/**
|
|
2027
2118
|
* Gets the area that represents the chart's pop-up menu.
|
|
@@ -2030,7 +2121,7 @@ export declare namespace commands {
|
|
|
2030
2121
|
* The `chartPopupMenu` area supports only top-level groups, which correspond to one level of pop-up menu flyout.
|
|
2031
2122
|
* @i2since 1.0
|
|
2032
2123
|
*/
|
|
2033
|
-
readonly chartPopupMenu: IActionArea<undefined>;
|
|
2124
|
+
readonly chartPopupMenu: IActionArea<undefined, IChartPopupMenuGroup>;
|
|
2034
2125
|
/**
|
|
2035
2126
|
* Unregisters and removes a command and all its actions from the application.
|
|
2036
2127
|
*
|
|
@@ -4237,6 +4328,11 @@ export declare namespace visual {
|
|
|
4237
4328
|
* @i2since 1.0
|
|
4238
4329
|
*/
|
|
4239
4330
|
export type ElementId = string;
|
|
4331
|
+
/**
|
|
4332
|
+
* A set of values that represents the size of the Node.
|
|
4333
|
+
* @i2since 1.2
|
|
4334
|
+
*/
|
|
4335
|
+
export type NodeSize = 0.5 | 1 | 2 | 3 | 4;
|
|
4240
4336
|
/**
|
|
4241
4337
|
* A set of information and functionality that is common to all elements on an i2 Notebook chart.
|
|
4242
4338
|
* @i2since 1.0
|
|
@@ -4340,6 +4436,11 @@ export declare namespace visual {
|
|
|
4340
4436
|
* @i2since 1.0
|
|
4341
4437
|
*/
|
|
4342
4438
|
readonly direction: data.LinkDirection;
|
|
4439
|
+
/**
|
|
4440
|
+
* Gets the style of the edge.
|
|
4441
|
+
* @i2since 1.2
|
|
4442
|
+
*/
|
|
4443
|
+
readonly style: IEdgeStyle;
|
|
4343
4444
|
}
|
|
4344
4445
|
/**
|
|
4345
4446
|
* A position on a chart surface.
|
|
@@ -4360,16 +4461,47 @@ export declare namespace visual {
|
|
|
4360
4461
|
*/
|
|
4361
4462
|
readonly y: number;
|
|
4362
4463
|
}
|
|
4464
|
+
/**
|
|
4465
|
+
* Settings that affects the appearence of an element.
|
|
4466
|
+
* @typeParam T - The type of the settings value.
|
|
4467
|
+
* @i2since 1.2
|
|
4468
|
+
*/
|
|
4469
|
+
export interface IInheritable<T> {
|
|
4470
|
+
isDefault: boolean;
|
|
4471
|
+
value: T;
|
|
4472
|
+
}
|
|
4473
|
+
/**
|
|
4474
|
+
* A style for an element, which controls its appearance.
|
|
4475
|
+
* @i2since 1.2
|
|
4476
|
+
*/
|
|
4477
|
+
export interface IElementStyleBase {
|
|
4478
|
+
/**
|
|
4479
|
+
* Gets the color of the element.
|
|
4480
|
+
* @i2since 1.2
|
|
4481
|
+
*/
|
|
4482
|
+
readonly color: IInheritable<string>;
|
|
4483
|
+
}
|
|
4363
4484
|
/**
|
|
4364
4485
|
* A style for a node, which controls its appearance.
|
|
4365
4486
|
* @i2since 1.0
|
|
4366
4487
|
*/
|
|
4367
|
-
export interface INodeStyle {
|
|
4488
|
+
export interface INodeStyle extends IElementStyleBase {
|
|
4368
4489
|
/**
|
|
4369
4490
|
* Gets the image to display for a node.
|
|
4370
4491
|
* @i2since 1.0
|
|
4371
4492
|
*/
|
|
4372
4493
|
readonly image: data.IImage;
|
|
4494
|
+
/**
|
|
4495
|
+
* Gets the size of the node.
|
|
4496
|
+
* @i2since 1.2
|
|
4497
|
+
*/
|
|
4498
|
+
readonly size: IInheritable<NodeSize>;
|
|
4499
|
+
}
|
|
4500
|
+
/**
|
|
4501
|
+
* A style for an edge, which controls its appearance.
|
|
4502
|
+
* @i2since 1.2
|
|
4503
|
+
*/
|
|
4504
|
+
export interface IEdgeStyle extends IElementStyleBase {
|
|
4373
4505
|
}
|
|
4374
4506
|
/**
|
|
4375
4507
|
* A rectangular area, such as the boundary of the chart view.
|