@i2analyze/notebook-sdk 1.5.0-dev.1 → 1.5.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.
@@ -279,10 +279,22 @@ export declare namespace app {
279
279
  */
280
280
  export interface IMutationResult {
281
281
  /**
282
- * Gets the changes that were caused by the mutation.
282
+ * Gets the changes that were caused by the mutation. If only the
283
+ * chart schema changed, the collections in this field are empty.
283
284
  * @i2since 1.1
285
+ * @deprecated Deprecated since version 1.5. Use {@link app.IMutationResult.chartChange | chartChange} instead.
284
286
  */
285
- change: chart.IChartChange;
287
+ readonly change: chart.IChartChange;
288
+ /**
289
+ * Gets the chart changes that were caused by the mutation.
290
+ * @i2since 1.5
291
+ */
292
+ readonly chartChange?: chart.IChartChange;
293
+ /**
294
+ * Gets the chart schema changes that were caused by the mutation.
295
+ * @i2since 1.5
296
+ */
297
+ readonly chartSchemaChange?: schema.IChartSchemaChange;
286
298
  }
287
299
  /**
288
300
  * A collection of methods and properties for handling the situation when a user cancels an operation.
@@ -1553,6 +1565,11 @@ export declare namespace chart {
1553
1565
  * @i2since 1.0
1554
1566
  */
1555
1567
  readonly chartviewchange: ViewListener;
1568
+ /**
1569
+ * Gets the type of the callback method that listens for "chartschemachange" events.
1570
+ * @i2since 1.5
1571
+ */
1572
+ readonly chartschemachange: ChartSchemaChangeListener;
1556
1573
  }
1557
1574
  /**
1558
1575
  * A mapping of chart event types to their listener options types.
@@ -1574,6 +1591,11 @@ export declare namespace chart {
1574
1591
  * @i2since 1.0
1575
1592
  */
1576
1593
  readonly chartviewchange: app.ISubscriptionOptions;
1594
+ /**
1595
+ * Gets the type of the object that provides control over "chartschemachange" event listeners.
1596
+ * @i2since 1.5
1597
+ */
1598
+ readonly chartschemachange: app.ISubscriptionOptions;
1577
1599
  }
1578
1600
  /**
1579
1601
  * A callback function that handles chart selection events.
@@ -1591,6 +1613,14 @@ export declare namespace chart {
1591
1613
  * @i2since 1.0
1592
1614
  */
1593
1615
  export type ChangeListener = (change: IChartChange & app.IChangeSource, applicationContents: app.IApplicationContents) => void;
1616
+ /**
1617
+ * A callback function that handles chart schema change events.
1618
+ *
1619
+ * @param chartSchemaChange - The change in the chart schema that caused the callback to be invoked, and the source of the schema change.
1620
+ * @param applicationContents - The contents of the application, including the current chart.
1621
+ * @i2since 1.5
1622
+ */
1623
+ export type ChartSchemaChangeListener = (chartSchemaChange: schema.IChartSchemaChange & app.IChangeSource, applicationContents: app.IApplicationContents) => void;
1594
1624
  /**
1595
1625
  * A callback function that handles chart view events.
1596
1626
  *
@@ -1878,9 +1908,10 @@ export declare namespace commands {
1878
1908
  *
1879
1909
  * @typeParam TSystemGroups - The type of the list of system action groups in the area.
1880
1910
  * @typeParam TGroupInfo - The type of action group that the area supports.
1911
+ * @typeParam TChildGroupInfo - The type of sub action group that the area supports.
1881
1912
  * @i2since 1.0
1882
1913
  */
1883
- export interface IActionArea<TSystemGroups, TGroupInfo> {
1914
+ export interface IActionArea<TSystemGroups, TGroupInfo, TChildGroupInfo = TGroupInfo> {
1884
1915
  /**
1885
1916
  * Locates the area of the user interface that appears immediately before a particular action or group of actions.
1886
1917
  *
@@ -1889,7 +1920,7 @@ export declare namespace commands {
1889
1920
  * @throws `Error` if the `id` was not a valid {@link commands.CommandId | CommandId} or {@link commands.GroupId | GroupId}.
1890
1921
  * @i2since 1.0
1891
1922
  */
1892
- before(id: CommandId | GroupId): IActionArea<undefined, TGroupInfo>;
1923
+ before(id: CommandId | GroupId): IActionArea<undefined, TGroupInfo, TChildGroupInfo>;
1893
1924
  /**
1894
1925
  * Locates the area of the user interface that appears immediately before the action that represents the specified command.
1895
1926
  *
@@ -1898,7 +1929,7 @@ export declare namespace commands {
1898
1929
  * @throws `Error` if `command.id` is not a valid {@link commands.CommandId | CommandId}.
1899
1930
  * @i2since 1.1
1900
1931
  */
1901
- before(command: ICommand): IActionArea<undefined, TGroupInfo>;
1932
+ before(command: ICommand): IActionArea<undefined, TGroupInfo, TChildGroupInfo>;
1902
1933
  /**
1903
1934
  * Locates the area of the user interface that appears immediately after a particular action or group of actions.
1904
1935
  *
@@ -1907,7 +1938,7 @@ export declare namespace commands {
1907
1938
  * @throws `Error` if the `id` was not a valid {@link commands.CommandId | CommandId} or {@link commands.GroupId | GroupId}.
1908
1939
  * @i2since 1.0
1909
1940
  */
1910
- after(id: CommandId | GroupId): IActionArea<undefined, TGroupInfo>;
1941
+ after(id: CommandId | GroupId): IActionArea<undefined, TGroupInfo, TChildGroupInfo>;
1911
1942
  /**
1912
1943
  * Locates the area of the user interface that appears immediately after the action that represents the specified command.
1913
1944
  *
@@ -1916,7 +1947,7 @@ export declare namespace commands {
1916
1947
  * @throws `Error` if `command.id` is not a valid {@link commands.CommandId | CommandId}.
1917
1948
  * @i2since 1.1
1918
1949
  */
1919
- after(command: ICommand): IActionArea<undefined, TGroupInfo>;
1950
+ after(command: ICommand): IActionArea<undefined, TGroupInfo, TChildGroupInfo>;
1920
1951
  /**
1921
1952
  * Locates the area of the user interface that is occupied by a particular group of actions.
1922
1953
  *
@@ -1925,7 +1956,7 @@ export declare namespace commands {
1925
1956
  * @throws `Error` if the `id` was not a valid {@link commands.CommandId | CommandId} or {@link commands.GroupId | GroupId}.
1926
1957
  * @i2since 1.0
1927
1958
  */
1928
- getGroup(id: GroupId): IActionArea<undefined, TGroupInfo>;
1959
+ getGroup(id: GroupId): IActionArea<undefined, TChildGroupInfo, TChildGroupInfo>;
1929
1960
  /**
1930
1961
  * Removes an action or group of actions from the user interface.
1931
1962
  *
@@ -1951,11 +1982,11 @@ export declare namespace commands {
1951
1982
  * Adds the specified group of actions to the user interface.
1952
1983
  *
1953
1984
  * @param group - The group to add.
1954
- * @returns An object that you can use to add actions or a further group to the added group.
1985
+ * @returns An object that you can use to add actions or a further group to the added group based on the child type provided.
1955
1986
  * @throws `Error` if the `group` was not valid, or if a group with the same {@link commands.GroupId} was already present.
1956
1987
  * @i2since 1.0
1957
1988
  */
1958
- addGroup(group: TGroupInfo): IActionArea<undefined, TGroupInfo>;
1989
+ addGroup(group: TGroupInfo): IActionArea<undefined, TChildGroupInfo, TChildGroupInfo>;
1959
1990
  /**
1960
1991
  * Adds the specified group of actions to the user interface, or gets an existing group with the same identifier.
1961
1992
  *
@@ -1969,7 +2000,7 @@ export declare namespace commands {
1969
2000
  * @throws `Error` if the `group` was not valid, or if it was added before by the same plug-in.
1970
2001
  * @i2since 1.0
1971
2002
  */
1972
- addOrGetGroup(group: TGroupInfo): IActionArea<undefined, TGroupInfo>;
2003
+ addOrGetGroup(group: TGroupInfo): IActionArea<undefined, TChildGroupInfo, TChildGroupInfo>;
1973
2004
  /**
1974
2005
  * Gets the system groups for the action area, which you can use to specify relative locations for your actions and groups.
1975
2006
  * @i2since 1.0
@@ -2110,6 +2141,13 @@ export declare namespace commands {
2110
2141
  * @i2since 1.0
2111
2142
  */
2112
2143
  setEnabled(value: boolean): void;
2144
+ /**
2145
+ * Sets the icon for the action.
2146
+ *
2147
+ * @param value - An icon for the action.
2148
+ * @i2since 1.5
2149
+ */
2150
+ setIcon(value: IIcon): void;
2113
2151
  /**
2114
2152
  * Sets whether the action is toggled "on" or "off" - that is, whether it appears to be active or inactive.
2115
2153
  *
@@ -2117,6 +2155,13 @@ export declare namespace commands {
2117
2155
  * @i2since 1.0
2118
2156
  */
2119
2157
  setToggledState(value: boolean): void;
2158
+ /**
2159
+ * Sets whether the action should be hidden - that is, whether it is visible for users to interact with.
2160
+ *
2161
+ * @param value - `true` to show the action; `false` to hide it.
2162
+ * @i2since 1.5
2163
+ */
2164
+ setHidden(value: boolean): void;
2120
2165
  }
2121
2166
  /**
2122
2167
  * A collection of methods and properties that allow custom commands to interact with i2 Notebook.
@@ -2162,7 +2207,7 @@ export declare namespace commands {
2162
2207
  * The `chartSurfacePopupMenu` area supports only top-level groups, which correspond to sets of related actions that are separated by dividers in the menu.
2163
2208
  * @i2since 1.4
2164
2209
  */
2165
- readonly chartSurfacePopupMenu: IActionArea<IChartSurfacePopupMenuSystemGroups, IMenuGroup>;
2210
+ readonly chartSurfacePopupMenu: IActionArea<IChartSurfacePopupMenuSystemGroups, IMenuGroup, IGroup>;
2166
2211
  /**
2167
2212
  * Gets the area that represents the pop-up menu for chart items.
2168
2213
  *
@@ -2170,7 +2215,7 @@ export declare namespace commands {
2170
2215
  * The `chartItemPopupMenu` area supports only top-level groups, which correspond to sets of related actions that are separated by dividers in the menu.
2171
2216
  * @i2since 1.4
2172
2217
  */
2173
- readonly chartItemPopupMenu: IActionArea<IChartItemPopupMenuSystemGroups, IMenuGroup>;
2218
+ readonly chartItemPopupMenu: IActionArea<IChartItemPopupMenuSystemGroups, IMenuGroup, IGroup>;
2174
2219
  /**
2175
2220
  * Gets the area that represents the pop-up menu for chart items.
2176
2221
  *
@@ -2179,7 +2224,7 @@ export declare namespace commands {
2179
2224
  * @i2since 1.0
2180
2225
  * @deprecated Deprecated since version 1.4. `commands.ICommandApi.chartPopupMenu` has been renamed to {@link commands.ICommandApi.chartItemPopupMenu}.
2181
2226
  */
2182
- readonly chartPopupMenu: IActionArea<IChartPopupMenuSystemGroups, IMenuGroup>;
2227
+ readonly chartPopupMenu: IActionArea<IChartPopupMenuSystemGroups, IMenuGroup, IGroup>;
2183
2228
  /**
2184
2229
  * Unregisters and removes a command and all its actions from the application.
2185
2230
  *
@@ -2302,6 +2347,11 @@ export declare namespace commands {
2302
2347
  * @i2since 1.1
2303
2348
  */
2304
2349
  readonly addToMap: CommandId;
2350
+ /**
2351
+ * Gets the identifier of the system command that opens the i2 Notebook importer.
2352
+ * @i2since 1.5
2353
+ */
2354
+ readonly openImporter: CommandId;
2305
2355
  /**
2306
2356
  * Gets the identifier of the system command that opens a 360 view of the selected Information Store entity record.
2307
2357
  * @i2since 1.2
@@ -2404,6 +2454,11 @@ export declare namespace commands {
2404
2454
  * @i2since 1.4
2405
2455
  */
2406
2456
  readonly clipboard: GroupId;
2457
+ /**
2458
+ * Gets the identifier of the system action group related to link direction operations.
2459
+ * @i2since 1.5
2460
+ */
2461
+ readonly linkDirection: GroupId;
2407
2462
  }
2408
2463
  /**
2409
2464
  * A lookup table for the identifiers of the system action groups in the chart pop-up menu.
@@ -2888,6 +2943,12 @@ export declare namespace data {
2888
2943
  * @i2since 1.0
2889
2944
  */
2890
2945
  reduceRight<U>(callbackfn: (previousValue: U, currentValue: V, currentIndex: number) => U, initialValue: U): U;
2946
+ /**
2947
+ * Creates a new readonly array instance populated with the object contained in this collection.
2948
+ * @returns A readonly array of the objects in the collection.
2949
+ * @i2since 1.5
2950
+ */
2951
+ toArray(): readonly V[];
2891
2952
  /**
2892
2953
  * Returns an object that can be used to iterate over all objects in the collection.
2893
2954
  *
@@ -4069,6 +4130,16 @@ export declare namespace schema {
4069
4130
  * @i2since 1.0
4070
4131
  */
4071
4132
  export interface IChartLinkType extends IChartItemTypeBase {
4133
+ /**
4134
+ * Gets the valid entity types that can be on the "from" end of a link of this type.
4135
+ * @i2since 1.5
4136
+ */
4137
+ fromEntityTypes: data.IReadOnlyCollection<IChartEntityType>;
4138
+ /**
4139
+ * Gets the valid entity types that can be on the "to" end of a link of this type.
4140
+ * @i2since 1.5
4141
+ */
4142
+ toEntityTypes: data.IReadOnlyCollection<IChartEntityType>;
4072
4143
  }
4073
4144
  /**
4074
4145
  * A part of a label that consists of a literal string.
@@ -4456,6 +4527,22 @@ export declare namespace schema {
4456
4527
  */
4457
4528
  readonly description: string;
4458
4529
  }
4530
+ /**
4531
+ * A change that has occurred to an i2 Notebook chart schema.
4532
+ * @i2since 1.5
4533
+ */
4534
+ export interface IChartSchemaChange {
4535
+ /**
4536
+ * Gets the item types that were added to the schema.
4537
+ * @i2since 1.5
4538
+ */
4539
+ readonly addedTypes: data.IReadOnlyCollection<IChartItemType>;
4540
+ /**
4541
+ * Gets the item types that were changed in the schema.
4542
+ * @i2since 1.5
4543
+ */
4544
+ readonly changedTypes: data.IReadOnlyCollection<IChartItemType>;
4545
+ }
4459
4546
  }
4460
4547
 
4461
4548
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.5.0-dev.1",
3
+ "version": "1.5.0-dev.10",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {