@i2analyze/notebook-sdk 1.2.0-dev.9 → 1.2.0
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/README.md +5 -4
- package/lib/gen/notebook-sdk-public.d.ts +83 -58
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,10 +6,11 @@ This npm package provides the JavaScript library for developing plug-ins and a t
|
|
|
6
6
|
|
|
7
7
|
## Compatibility
|
|
8
8
|
|
|
9
|
-
| `@i2analyze/notebook-sdk` version |
|
|
10
|
-
| --------------------------------- |
|
|
11
|
-
| 1.
|
|
12
|
-
| 1.
|
|
9
|
+
| `@i2analyze/notebook-sdk` version | i2 Analyze version |
|
|
10
|
+
| --------------------------------- | ------------------ |
|
|
11
|
+
| 1.2.\* | 4.4.1.0 |
|
|
12
|
+
| 1.1.\* | 4.4.0.0 |
|
|
13
|
+
| 1.0.\* | 4.3.4.0 |
|
|
13
14
|
|
|
14
15
|
## Documentation
|
|
15
16
|
|
|
@@ -53,10 +53,10 @@ export declare namespace app {
|
|
|
53
53
|
* The list is sorted in ascending order of {@link data.ITimeZone.rawUtcOffset}, and then alphabetically
|
|
54
54
|
* by {@link data.ITimeZone.fullDisplayName} if UTC offsets are equal. For example:
|
|
55
55
|
* ```text
|
|
56
|
-
* (GMT-08:00)
|
|
57
|
-
* (GMT-01:00)
|
|
58
|
-
* (GMT)
|
|
59
|
-
* (GMT+01:00)
|
|
56
|
+
* (GMT-08:00) Los Angeles Time
|
|
57
|
+
* (GMT-01:00) Azores Time [Atlantic/Azores]
|
|
58
|
+
* (GMT) United Kingdom Time [Europe/London]
|
|
59
|
+
* (GMT+01:00)Austria Time
|
|
60
60
|
* (GMT+01:00) Belgium Time
|
|
61
61
|
* ```
|
|
62
62
|
* @i2since 1.0
|
|
@@ -68,57 +68,57 @@ export declare namespace app {
|
|
|
68
68
|
*/
|
|
69
69
|
readonly serverComponents: IServerComponents;
|
|
70
70
|
/**
|
|
71
|
-
* Queues a function that performs tracked mutations on the application contents at the next available opportunity
|
|
71
|
+
* Queues a function that performs tracked mutations on the application contents at the next available opportunity,
|
|
72
|
+
* and can respond to the changes that the mutations cause.
|
|
72
73
|
*
|
|
73
74
|
* @remarks
|
|
74
75
|
* A mutation is an operation that can read or modify the contents of the application.
|
|
75
76
|
* A successful set of _tracked_ mutations is added as a single entry to the undo stack.
|
|
76
77
|
*
|
|
77
78
|
* @param mutationHandler - A function that performs one or more tracked mutations and reports on their success as a whole.
|
|
79
|
+
* @param responseHandler - A callback that receives the changes caused by the mutations.
|
|
78
80
|
* @param options - An object that can control the transaction.
|
|
79
81
|
* @i2since 1.1
|
|
80
82
|
*/
|
|
81
|
-
runTrackedMutations(mutationHandler: TrackedMutationHandler, options?: ITransactionOptions): void;
|
|
83
|
+
runTrackedMutations(mutationHandler: TrackedMutationHandler, responseHandler?: MutationResponseHandler, options?: ITransactionOptions): void;
|
|
82
84
|
/**
|
|
83
|
-
* Queues a function that performs tracked mutations on the application contents at the next available opportunity
|
|
84
|
-
* and can respond to the changes that the mutations cause.
|
|
85
|
+
* Queues a function that performs tracked mutations on the application contents at the next available opportunity.
|
|
85
86
|
*
|
|
86
87
|
* @remarks
|
|
87
88
|
* A mutation is an operation that can read or modify the contents of the application.
|
|
88
89
|
* A successful set of _tracked_ mutations is added as a single entry to the undo stack.
|
|
89
90
|
*
|
|
90
91
|
* @param mutationHandler - A function that performs one or more tracked mutations and reports on their success as a whole.
|
|
91
|
-
* @param responseHandler - A callback that receives the changes caused by the mutations.
|
|
92
92
|
* @param options - An object that can control the transaction.
|
|
93
93
|
* @i2since 1.1
|
|
94
94
|
*/
|
|
95
|
-
runTrackedMutations(mutationHandler: TrackedMutationHandler,
|
|
95
|
+
runTrackedMutations(mutationHandler: TrackedMutationHandler, options?: ITransactionOptions): void;
|
|
96
96
|
/**
|
|
97
|
-
* Queues a function that performs untracked mutations on the application contents at the next available opportunity
|
|
97
|
+
* Queues a function that performs untracked mutations on the application contents at the next available opportunity,
|
|
98
|
+
* and can respond to the changes that the mutations cause.
|
|
98
99
|
*
|
|
99
100
|
* @remarks
|
|
100
101
|
* A mutation is an operation that can read or modify the contents of the application.
|
|
101
102
|
* _Untracked_ mutations are not added to the undo stack, and therefore cannot be undone.
|
|
102
103
|
*
|
|
103
104
|
* @param mutationHandler - A function that performs one or more untracked mutations and reports on their success as a whole.
|
|
105
|
+
* @param responseHandler - A callback that receives the changes produced by the mutations.
|
|
104
106
|
* @param options - An object that can control the transaction.
|
|
105
107
|
* @i2since 1.1
|
|
106
108
|
*/
|
|
107
|
-
runUntrackedMutations(mutationHandler: UntrackedMutationHandler, options?: ITransactionOptions): void;
|
|
109
|
+
runUntrackedMutations(mutationHandler: UntrackedMutationHandler, responseHandler?: MutationResponseHandler, options?: ITransactionOptions): void;
|
|
108
110
|
/**
|
|
109
|
-
* Queues a function that performs untracked mutations on the application contents at the next available opportunity
|
|
110
|
-
* and can respond to the changes that the mutations cause.
|
|
111
|
+
* Queues a function that performs untracked mutations on the application contents at the next available opportunity.
|
|
111
112
|
*
|
|
112
113
|
* @remarks
|
|
113
114
|
* A mutation is an operation that can read or modify the contents of the application.
|
|
114
115
|
* _Untracked_ mutations are not added to the undo stack, and therefore cannot be undone.
|
|
115
116
|
*
|
|
116
117
|
* @param mutationHandler - A function that performs one or more untracked mutations and reports on their success as a whole.
|
|
117
|
-
* @param responseHandler - A callback that receives the changes produced by the mutations.
|
|
118
118
|
* @param options - An object that can control the transaction.
|
|
119
119
|
* @i2since 1.1
|
|
120
120
|
*/
|
|
121
|
-
runUntrackedMutations(mutationHandler: UntrackedMutationHandler,
|
|
121
|
+
runUntrackedMutations(mutationHandler: UntrackedMutationHandler, options?: ITransactionOptions): void;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* A report on the result of one or more mutations.
|
|
@@ -354,12 +354,12 @@ export declare namespace app {
|
|
|
354
354
|
*/
|
|
355
355
|
export type SourceReferenceSpecifier = records.SourceReferenceId | records.ISourceReference;
|
|
356
356
|
/**
|
|
357
|
-
* A common specifier for a
|
|
357
|
+
* A common specifier for a node, for use in mutation APIs.
|
|
358
358
|
* @i2since 1.2
|
|
359
359
|
*/
|
|
360
360
|
export type NodeSpecifier = visual.ElementId | visual.INode;
|
|
361
361
|
/**
|
|
362
|
-
* A common specifier for an
|
|
362
|
+
* A common specifier for an edge, for use in mutation APIs.
|
|
363
363
|
* @i2since 1.2
|
|
364
364
|
*/
|
|
365
365
|
export type EdgeSpecifier = visual.ElementId | visual.IEdge;
|
|
@@ -574,42 +574,44 @@ export declare namespace app {
|
|
|
574
574
|
setLinkDirection(linkDirection: data.LinkDirection): this;
|
|
575
575
|
}
|
|
576
576
|
/**
|
|
577
|
-
* A set of methods for modifying the
|
|
577
|
+
* A set of methods for modifying the appearance of an element.
|
|
578
578
|
* @i2since 1.2
|
|
579
579
|
*/
|
|
580
580
|
export interface IElementEditorBase {
|
|
581
581
|
/**
|
|
582
|
-
* Sets or
|
|
582
|
+
* Sets or resets the color of the element.
|
|
583
583
|
*
|
|
584
|
-
* @param color - The
|
|
585
|
-
* @returns
|
|
586
|
-
* @throws `Error` if the
|
|
584
|
+
* @param color - The color to set, or `undefined` to reset the color to the theme default.
|
|
585
|
+
* @returns The element, with its color set to the specified value.
|
|
586
|
+
* @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.
|
|
587
587
|
* @i2since 1.2
|
|
588
588
|
*/
|
|
589
589
|
setColor(color: string | undefined): this;
|
|
590
590
|
}
|
|
591
591
|
/**
|
|
592
|
-
* A set of
|
|
592
|
+
* A set of methods for modifying the appearance of a node.
|
|
593
593
|
* @i2since 1.2
|
|
594
594
|
*/
|
|
595
595
|
export interface INodeEditor extends IElementEditorBase {
|
|
596
596
|
/**
|
|
597
|
-
* Sets or
|
|
598
|
-
*
|
|
599
|
-
* @
|
|
597
|
+
* Sets or resets the size of the node.
|
|
598
|
+
*
|
|
599
|
+
* @param size - The size to set, or `undefined` to reset the size to `1`.
|
|
600
|
+
* @returns The node, with its size set to the specified value.
|
|
600
601
|
* @i2since 1.2
|
|
601
602
|
*/
|
|
602
603
|
setSize(size: visual.NodeSize | undefined): this;
|
|
603
604
|
/**
|
|
604
|
-
* Moves
|
|
605
|
-
*
|
|
606
|
-
* @
|
|
605
|
+
* Moves the node to be centered at a particular position on the chart.
|
|
606
|
+
*
|
|
607
|
+
* @param position - The position to move the node to.
|
|
608
|
+
* @returns The node, with its position set to the specified value.
|
|
607
609
|
* @i2since 1.2
|
|
608
610
|
*/
|
|
609
611
|
setCenter(position: visual.IPosition): this;
|
|
610
612
|
}
|
|
611
613
|
/**
|
|
612
|
-
* A set of
|
|
614
|
+
* A set of methods for modifying the appearance of an edge.
|
|
613
615
|
* @i2since 1.2
|
|
614
616
|
*/
|
|
615
617
|
export interface IEdgeEditor extends IElementEditorBase {
|
|
@@ -852,7 +854,7 @@ export declare namespace app {
|
|
|
852
854
|
*/
|
|
853
855
|
editRecord(record: RecordSpecifier): IRecordEditor;
|
|
854
856
|
/**
|
|
855
|
-
* Gets an object with methods for editing a node
|
|
857
|
+
* Gets an object with methods for editing the appearance of a node.
|
|
856
858
|
*
|
|
857
859
|
* @param node - The node to be edited.
|
|
858
860
|
* @returns The node-editing object.
|
|
@@ -860,7 +862,7 @@ export declare namespace app {
|
|
|
860
862
|
*/
|
|
861
863
|
editNode(node: NodeSpecifier): INodeEditor;
|
|
862
864
|
/**
|
|
863
|
-
* Gets an object with methods for editing an edge
|
|
865
|
+
* Gets an object with methods for editing the appearance of an edge.
|
|
864
866
|
*
|
|
865
867
|
* @param edge - The edge to be edited.
|
|
866
868
|
* @returns The edge-editing object.
|
|
@@ -874,7 +876,7 @@ export declare namespace app {
|
|
|
874
876
|
* @param position - The location to move the node to.
|
|
875
877
|
* @throws `Error` if the node is not on the chart, or if the x- or y-coordinate of the location is not a number.
|
|
876
878
|
* @i2since 1.1
|
|
877
|
-
* @deprecated
|
|
879
|
+
* @deprecated since version 1.2. Use {@link app.INodeEditor.setCenter} instead.
|
|
878
880
|
*/
|
|
879
881
|
setNodeCenter(node: visual.INode | visual.ElementId, position: visual.IPosition): void;
|
|
880
882
|
/**
|
|
@@ -977,6 +979,11 @@ export declare namespace app {
|
|
|
977
979
|
* @i2since 1.1
|
|
978
980
|
*/
|
|
979
981
|
selectAll(): void;
|
|
982
|
+
/**
|
|
983
|
+
* Inverts the chart selection, so that previously unselected records are selected, and vice versa.
|
|
984
|
+
* @i2since 1.2
|
|
985
|
+
*/
|
|
986
|
+
invert(): void;
|
|
980
987
|
/**
|
|
981
988
|
* Clears the chart selection, so that no records are selected.
|
|
982
989
|
* @i2since 1.1
|
|
@@ -1816,8 +1823,8 @@ export declare namespace commands {
|
|
|
1816
1823
|
* @remarks
|
|
1817
1824
|
* To retrieve areas that represent the entire application ribbon or pop-up menu, use the properties of {@link commands.ICommandApi}.
|
|
1818
1825
|
*
|
|
1819
|
-
* @typeParam TSystemGroups - The type of the system groups in the area.
|
|
1820
|
-
* @typeParam TGroupInfo - The type of
|
|
1826
|
+
* @typeParam TSystemGroups - The type of the list of system action groups in the area.
|
|
1827
|
+
* @typeParam TGroupInfo - The type of action group that the area supports.
|
|
1821
1828
|
* @i2since 1.0
|
|
1822
1829
|
*/
|
|
1823
1830
|
export interface IActionArea<TSystemGroups, TGroupInfo> {
|
|
@@ -2007,12 +2014,12 @@ export declare namespace commands {
|
|
|
2007
2014
|
readonly id: GroupId;
|
|
2008
2015
|
}
|
|
2009
2016
|
/**
|
|
2010
|
-
* A group of actions in i2 Notebook.
|
|
2017
|
+
* A group of actions in a tab, in the i2 Notebook application ribbon.
|
|
2011
2018
|
* @i2since 1.0
|
|
2012
2019
|
*/
|
|
2013
2020
|
export interface IGroup extends IGroupBase {
|
|
2014
2021
|
/**
|
|
2015
|
-
* Gets the
|
|
2022
|
+
* Gets the label of the group, which is displayed to users.
|
|
2016
2023
|
* @i2since 1.0
|
|
2017
2024
|
*/
|
|
2018
2025
|
readonly label: string;
|
|
@@ -2023,10 +2030,10 @@ export declare namespace commands {
|
|
|
2023
2030
|
readonly icon: IIcon;
|
|
2024
2031
|
}
|
|
2025
2032
|
/**
|
|
2026
|
-
* A group of actions
|
|
2033
|
+
* A group of actions in a popup menu, which do not have a label or an icon.
|
|
2027
2034
|
* @i2since 1.2
|
|
2028
2035
|
*/
|
|
2029
|
-
export interface
|
|
2036
|
+
export interface IMenuGroup extends IGroupBase {
|
|
2030
2037
|
}
|
|
2031
2038
|
/**
|
|
2032
2039
|
* A representation of a command in the user interface. An action is created when a command is surfaced.
|
|
@@ -2099,10 +2106,10 @@ export declare namespace commands {
|
|
|
2099
2106
|
* Gets the area that represents the chart's pop-up menu.
|
|
2100
2107
|
*
|
|
2101
2108
|
* @remarks
|
|
2102
|
-
* The `chartPopupMenu` area supports only top-level groups, which correspond to
|
|
2109
|
+
* The `chartPopupMenu` area supports only top-level groups, which correspond to sets of related actions that are separated by dividers in the menu.
|
|
2103
2110
|
* @i2since 1.0
|
|
2104
2111
|
*/
|
|
2105
|
-
readonly chartPopupMenu: IActionArea<IChartPopupMenuSystemGroups,
|
|
2112
|
+
readonly chartPopupMenu: IActionArea<IChartPopupMenuSystemGroups, IMenuGroup>;
|
|
2106
2113
|
/**
|
|
2107
2114
|
* Unregisters and removes a command and all its actions from the application.
|
|
2108
2115
|
*
|
|
@@ -2190,6 +2197,11 @@ export declare namespace commands {
|
|
|
2190
2197
|
* @i2since 1.0
|
|
2191
2198
|
*/
|
|
2192
2199
|
readonly selectAll: CommandId;
|
|
2200
|
+
/**
|
|
2201
|
+
* Gets the identifier of the system command that inverts chart selection.
|
|
2202
|
+
* @i2since 1.2
|
|
2203
|
+
*/
|
|
2204
|
+
readonly selectInvert: CommandId;
|
|
2193
2205
|
/**
|
|
2194
2206
|
* Gets the identifier of the system command that adds attached elements to the current selection.
|
|
2195
2207
|
* @i2since 1.0
|
|
@@ -2225,9 +2237,14 @@ export declare namespace commands {
|
|
|
2225
2237
|
* @i2since 1.2
|
|
2226
2238
|
*/
|
|
2227
2239
|
readonly openThreeSixtyView: CommandId;
|
|
2240
|
+
/**
|
|
2241
|
+
* Gets the identifier of the system command that toggles the style UI.
|
|
2242
|
+
* @i2since 1.2
|
|
2243
|
+
*/
|
|
2244
|
+
readonly toggleStyling: CommandId;
|
|
2228
2245
|
}
|
|
2229
2246
|
/**
|
|
2230
|
-
* A lookup table for the
|
|
2247
|
+
* A lookup table for the identifiers of the system action groups in the Home tab.
|
|
2231
2248
|
* @i2since 1.0
|
|
2232
2249
|
*/
|
|
2233
2250
|
export interface IHomeTabSystemGroups {
|
|
@@ -2258,7 +2275,7 @@ export declare namespace commands {
|
|
|
2258
2275
|
readonly select: GroupId;
|
|
2259
2276
|
}
|
|
2260
2277
|
/**
|
|
2261
|
-
* A lookup table for the
|
|
2278
|
+
* A lookup table for the identifiers of the system action groups in the chart popup menu.
|
|
2262
2279
|
* @i2since 1.2
|
|
2263
2280
|
*/
|
|
2264
2281
|
export interface IChartPopupMenuSystemGroups {
|
|
@@ -2268,7 +2285,7 @@ export declare namespace commands {
|
|
|
2268
2285
|
*/
|
|
2269
2286
|
readonly select: GroupId;
|
|
2270
2287
|
/**
|
|
2271
|
-
* Gets the identifier of the system action group
|
|
2288
|
+
* Gets the identifier of the system action group related to discovery.
|
|
2272
2289
|
* @i2since 1.0
|
|
2273
2290
|
*/
|
|
2274
2291
|
readonly discover: GroupId;
|
|
@@ -4329,7 +4346,7 @@ export declare namespace visual {
|
|
|
4329
4346
|
*/
|
|
4330
4347
|
export type ElementId = string;
|
|
4331
4348
|
/**
|
|
4332
|
-
*
|
|
4349
|
+
* The size of a node on an i2 Notebook chart. The default value is `1`.
|
|
4333
4350
|
* @i2since 1.2
|
|
4334
4351
|
*/
|
|
4335
4352
|
export type NodeSize = 0.5 | 1 | 2 | 3 | 4;
|
|
@@ -4437,7 +4454,7 @@ export declare namespace visual {
|
|
|
4437
4454
|
*/
|
|
4438
4455
|
readonly direction: data.LinkDirection;
|
|
4439
4456
|
/**
|
|
4440
|
-
* Gets the style of the edge.
|
|
4457
|
+
* Gets the style of the edge, which affects its appearance.
|
|
4441
4458
|
* @i2since 1.2
|
|
4442
4459
|
*/
|
|
4443
4460
|
readonly style: IEdgeStyle;
|
|
@@ -4462,16 +4479,24 @@ export declare namespace visual {
|
|
|
4462
4479
|
readonly y: number;
|
|
4463
4480
|
}
|
|
4464
4481
|
/**
|
|
4465
|
-
*
|
|
4466
|
-
* @typeParam T - The type of the
|
|
4482
|
+
* A value for a setting that affects the appearance of an element.
|
|
4483
|
+
* @typeParam T - The logical type of the value.
|
|
4467
4484
|
* @i2since 1.2
|
|
4468
4485
|
*/
|
|
4469
|
-
export interface
|
|
4470
|
-
|
|
4471
|
-
|
|
4486
|
+
export interface IElementSetting<T> {
|
|
4487
|
+
/**
|
|
4488
|
+
* Indicates whether `value` contains the default value for the setting.
|
|
4489
|
+
* @i2since 1.2
|
|
4490
|
+
*/
|
|
4491
|
+
readonly isDefault: boolean;
|
|
4492
|
+
/**
|
|
4493
|
+
* Gets the setting value.
|
|
4494
|
+
* @i2since 1.2
|
|
4495
|
+
*/
|
|
4496
|
+
readonly value: T;
|
|
4472
4497
|
}
|
|
4473
4498
|
/**
|
|
4474
|
-
* A style for an element, which
|
|
4499
|
+
* A style for an element, which affects its appearance.
|
|
4475
4500
|
* @i2since 1.2
|
|
4476
4501
|
*/
|
|
4477
4502
|
export interface IElementStyleBase {
|
|
@@ -4479,15 +4504,15 @@ export declare namespace visual {
|
|
|
4479
4504
|
* Gets the color of the element.
|
|
4480
4505
|
* @i2since 1.2
|
|
4481
4506
|
*/
|
|
4482
|
-
readonly color:
|
|
4507
|
+
readonly color: IElementSetting<string>;
|
|
4483
4508
|
}
|
|
4484
4509
|
/**
|
|
4485
|
-
* A style for a node, which
|
|
4510
|
+
* A style for a node, which affects its appearance.
|
|
4486
4511
|
* @i2since 1.0
|
|
4487
4512
|
*/
|
|
4488
4513
|
export interface INodeStyle extends IElementStyleBase {
|
|
4489
4514
|
/**
|
|
4490
|
-
* Gets the image to display for
|
|
4515
|
+
* Gets the image to display for the node.
|
|
4491
4516
|
* @i2since 1.0
|
|
4492
4517
|
*/
|
|
4493
4518
|
readonly image: data.IImage;
|
|
@@ -4495,10 +4520,10 @@ export declare namespace visual {
|
|
|
4495
4520
|
* Gets the size of the node.
|
|
4496
4521
|
* @i2since 1.2
|
|
4497
4522
|
*/
|
|
4498
|
-
readonly size:
|
|
4523
|
+
readonly size: IElementSetting<NodeSize>;
|
|
4499
4524
|
}
|
|
4500
4525
|
/**
|
|
4501
|
-
* A style for an edge, which
|
|
4526
|
+
* A style for an edge, which affects its appearance.
|
|
4502
4527
|
* @i2since 1.2
|
|
4503
4528
|
*/
|
|
4504
4529
|
export interface IEdgeStyle extends IElementStyleBase {
|