@i2analyze/notebook-sdk 1.2.0-dev.8 → 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 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 | EIA version |
10
- | --------------------------------- | ----------- |
11
- | 1.1.\* | 4.4.0.0 |
12
- | 1.0.\* | 4.3.4.0 |
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)‬ ‎‪Los Angeles Time‬‬
57
- * ‪‪(GMT-01:00)‬ Azores Time [Atlantic/Azores]‬‬
58
- * ‪‪(GMT)‬ ‎‪United Kingdom Time [Europe/London]‬‬
59
- * ‪‪(GMT+01:00)‬ Austria Time
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, responseHandler?: MutationResponseHandler, options?: ITransactionOptions): void;
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, responseHandler?: MutationResponseHandler, options?: ITransactionOptions): void;
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 Node, for use in mutation APIs.
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 Edge, for use in mutation APIs.
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 styles of an elements on an i2 Notebook chart.
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 clears the color of the element.
582
+ * Sets or resets the color of the element.
583
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.
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 styling methods that can be applied on nodes.
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 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.
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 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.
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 styling methods that can be applied on edges.
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 styles.
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 styles.
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 `app.setNodeCenter` is no longer used instead use {@link app.INodeEditor.setCenter}.
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,11 +1823,11 @@ 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 the group of actions in i2 Notebook.
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
- export interface IActionArea<TSystemGroups, TGroupInfo = IGroupBase> {
1830
+ export interface IActionArea<TSystemGroups, TGroupInfo> {
1824
1831
  /**
1825
1832
  * Locates the area of the user interface that appears immediately before a particular action or group of actions.
1826
1833
  *
@@ -2005,24 +2012,14 @@ export declare namespace commands {
2005
2012
  * @i2since 1.0
2006
2013
  */
2007
2014
  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
2015
  }
2019
2016
  /**
2020
- * A group of actions in i2 Notebook.
2017
+ * A group of actions in a tab, in the i2 Notebook application ribbon.
2021
2018
  * @i2since 1.0
2022
2019
  */
2023
2020
  export interface IGroup extends IGroupBase {
2024
2021
  /**
2025
- * Gets the name of the group.
2022
+ * Gets the label of the group, which is displayed to users.
2026
2023
  * @i2since 1.0
2027
2024
  */
2028
2025
  readonly label: string;
@@ -2033,10 +2030,10 @@ export declare namespace commands {
2033
2030
  readonly icon: IIcon;
2034
2031
  }
2035
2032
  /**
2036
- * A group of actions that doesn't require label and id in i2 Notebook.
2033
+ * A group of actions in a popup menu, which do not have a label or an icon.
2037
2034
  * @i2since 1.2
2038
2035
  */
2039
- export interface IChartPopupMenuGroup extends Omit<IGroupBase, 'icon' | 'label'> {
2036
+ export interface IMenuGroup extends IGroupBase {
2040
2037
  }
2041
2038
  /**
2042
2039
  * A representation of a command in the user interface. An action is created when a command is surfaced.
@@ -2104,24 +2101,15 @@ export declare namespace commands {
2104
2101
  * Gets the area that represents the whole of the i2 Notebook application ribbon.
2105
2102
  * @i2since 1.0
2106
2103
  */
2107
- readonly applicationRibbon: {
2108
- /**
2109
- * Gets the area that represents the "Home" tab in the application ribbon.
2110
- *
2111
- * @remarks
2112
- * The `homeTab` area supports top-level and second-level groups, which correspond to labeled groups and drop-down menus in the ribbon.
2113
- * @i2since 1.0
2114
- */
2115
- readonly homeTab: IActionArea<IHomeTabSystemGroups, IGroup>;
2116
- };
2104
+ readonly applicationRibbon: IApplicationRibbon;
2117
2105
  /**
2118
2106
  * Gets the area that represents the chart's pop-up menu.
2119
2107
  *
2120
2108
  * @remarks
2121
- * The `chartPopupMenu` area supports only top-level groups, which correspond to one level of pop-up menu flyout.
2109
+ * The `chartPopupMenu` area supports only top-level groups, which correspond to sets of related actions that are separated by dividers in the menu.
2122
2110
  * @i2since 1.0
2123
2111
  */
2124
- readonly chartPopupMenu: IActionArea<IChartPopupMenuSystemGroups, IChartPopupMenuGroup>;
2112
+ readonly chartPopupMenu: IActionArea<IChartPopupMenuSystemGroups, IMenuGroup>;
2125
2113
  /**
2126
2114
  * Unregisters and removes a command and all its actions from the application.
2127
2115
  *
@@ -2137,9 +2125,12 @@ export declare namespace commands {
2137
2125
  export interface IApplicationRibbon {
2138
2126
  /**
2139
2127
  * Gets the area that represents the "Home" tab in the application ribbon.
2128
+ *
2129
+ * @remarks
2130
+ * The `homeTab` area supports top-level and second-level groups, which correspond to labeled groups and drop-down menus in the ribbon.
2140
2131
  * @i2since 1.0
2141
2132
  */
2142
- readonly homeTab: IActionArea<IHomeTabSystemGroups>;
2133
+ readonly homeTab: IActionArea<IHomeTabSystemGroups, IGroup>;
2143
2134
  }
2144
2135
  /**
2145
2136
  * A lookup table for the command identifiers of the default system commands.
@@ -2206,6 +2197,11 @@ export declare namespace commands {
2206
2197
  * @i2since 1.0
2207
2198
  */
2208
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;
2209
2205
  /**
2210
2206
  * Gets the identifier of the system command that adds attached elements to the current selection.
2211
2207
  * @i2since 1.0
@@ -2241,9 +2237,14 @@ export declare namespace commands {
2241
2237
  * @i2since 1.2
2242
2238
  */
2243
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;
2244
2245
  }
2245
2246
  /**
2246
- * A lookup table for the group identifiers of the default system action groups.
2247
+ * A lookup table for the identifiers of the system action groups in the Home tab.
2247
2248
  * @i2since 1.0
2248
2249
  */
2249
2250
  export interface IHomeTabSystemGroups {
@@ -2274,7 +2275,7 @@ export declare namespace commands {
2274
2275
  readonly select: GroupId;
2275
2276
  }
2276
2277
  /**
2277
- * A lookup table for the group identifiers of the default context menu action groups.
2278
+ * A lookup table for the identifiers of the system action groups in the chart popup menu.
2278
2279
  * @i2since 1.2
2279
2280
  */
2280
2281
  export interface IChartPopupMenuSystemGroups {
@@ -2284,7 +2285,7 @@ export declare namespace commands {
2284
2285
  */
2285
2286
  readonly select: GroupId;
2286
2287
  /**
2287
- * Gets the identifier of the system action group reated to discover.
2288
+ * Gets the identifier of the system action group related to discovery.
2288
2289
  * @i2since 1.0
2289
2290
  */
2290
2291
  readonly discover: GroupId;
@@ -4345,7 +4346,7 @@ export declare namespace visual {
4345
4346
  */
4346
4347
  export type ElementId = string;
4347
4348
  /**
4348
- * A set of values that represents the size of the Node.
4349
+ * The size of a node on an i2 Notebook chart. The default value is `1`.
4349
4350
  * @i2since 1.2
4350
4351
  */
4351
4352
  export type NodeSize = 0.5 | 1 | 2 | 3 | 4;
@@ -4453,7 +4454,7 @@ export declare namespace visual {
4453
4454
  */
4454
4455
  readonly direction: data.LinkDirection;
4455
4456
  /**
4456
- * Gets the style of the edge.
4457
+ * Gets the style of the edge, which affects its appearance.
4457
4458
  * @i2since 1.2
4458
4459
  */
4459
4460
  readonly style: IEdgeStyle;
@@ -4478,16 +4479,24 @@ export declare namespace visual {
4478
4479
  readonly y: number;
4479
4480
  }
4480
4481
  /**
4481
- * Settings that affects the appearence of an element.
4482
- * @typeParam T - The type of the settings value.
4482
+ * A value for a setting that affects the appearance of an element.
4483
+ * @typeParam T - The logical type of the value.
4483
4484
  * @i2since 1.2
4484
4485
  */
4485
- export interface IInheritable<T> {
4486
- isDefault: boolean;
4487
- value: T;
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;
4488
4497
  }
4489
4498
  /**
4490
- * A style for an element, which controls its appearance.
4499
+ * A style for an element, which affects its appearance.
4491
4500
  * @i2since 1.2
4492
4501
  */
4493
4502
  export interface IElementStyleBase {
@@ -4495,15 +4504,15 @@ export declare namespace visual {
4495
4504
  * Gets the color of the element.
4496
4505
  * @i2since 1.2
4497
4506
  */
4498
- readonly color: IInheritable<string>;
4507
+ readonly color: IElementSetting<string>;
4499
4508
  }
4500
4509
  /**
4501
- * A style for a node, which controls its appearance.
4510
+ * A style for a node, which affects its appearance.
4502
4511
  * @i2since 1.0
4503
4512
  */
4504
4513
  export interface INodeStyle extends IElementStyleBase {
4505
4514
  /**
4506
- * Gets the image to display for a node.
4515
+ * Gets the image to display for the node.
4507
4516
  * @i2since 1.0
4508
4517
  */
4509
4518
  readonly image: data.IImage;
@@ -4511,10 +4520,10 @@ export declare namespace visual {
4511
4520
  * Gets the size of the node.
4512
4521
  * @i2since 1.2
4513
4522
  */
4514
- readonly size: IInheritable<NodeSize>;
4523
+ readonly size: IElementSetting<NodeSize>;
4515
4524
  }
4516
4525
  /**
4517
- * A style for an edge, which controls its appearance.
4526
+ * A style for an edge, which affects its appearance.
4518
4527
  * @i2since 1.2
4519
4528
  */
4520
4529
  export interface IEdgeStyle extends IElementStyleBase {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.2.0-dev.8",
3
+ "version": "1.2.0",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {