@i2analyze/notebook-sdk 1.2.0-dev.4 → 1.2.0-dev.6

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.
@@ -165,12 +165,13 @@ export declare namespace app {
165
165
  details: string;
166
166
  }
167
167
  /**
168
- * Unique identifiers relating to a change made.
168
+ * The source of a change that takes place in the i2 Notebook application.
169
169
  * @i2since 1.2
170
170
  */
171
171
  export interface IChangeSource {
172
172
  /**
173
- * Gets the id of a plug-in responsible for a change.
173
+ * Gets the identifier of the plug-in that is responsible for the change, or <code>null</code>
174
+ * if the change is the result of a user action outside a plug-in.
174
175
  * @i2since 1.2
175
176
  */
176
177
  readonly pluginId?: string;
@@ -352,6 +353,16 @@ export declare namespace app {
352
353
  * @i2since 1.1
353
354
  */
354
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;
355
366
  /**
356
367
  * The identifier of a record group.
357
368
  * @i2since 1.1
@@ -562,6 +573,47 @@ export declare namespace app {
562
573
  */
563
574
  setLinkDirection(linkDirection: data.LinkDirection): this;
564
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
+ }
565
617
  /**
566
618
  * A record that has been created in a transaction handler, but has not yet been added to a chart.
567
619
  * @i2since 1.1
@@ -799,6 +851,22 @@ export declare namespace app {
799
851
  * @i2since 1.1
800
852
  */
801
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;
802
870
  /**
803
871
  * Moves a node to a particular location on the chart.
804
872
  *
@@ -806,6 +874,7 @@ export declare namespace app {
806
874
  * @param position - The location to move the node to.
807
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.
808
876
  * @i2since 1.1
877
+ * @deprecated `app.setNodeCenter` is no longer used instead use {@link app.INodeEditor.setCenter}.
809
878
  */
810
879
  setNodeCenter(node: visual.INode | visual.ElementId, position: visual.IPosition): void;
811
880
  /**
@@ -1129,7 +1198,6 @@ export declare namespace app {
1129
1198
  */
1130
1199
  export interface ApplicationEventOptionsMap extends chart.ChartEventOptionsMap {
1131
1200
  }
1132
- {};
1133
1201
  }
1134
1202
 
1135
1203
  /**
@@ -1450,15 +1518,15 @@ export declare namespace chart {
1450
1518
  /**
1451
1519
  * A callback function that handles chart selection events.
1452
1520
  *
1453
- * @param selection -The selection on the chart at the moment the callback was invoked and the source of change.
1521
+ * @param selection - The selection on the chart at the moment the callback was invoked, and the source of the selection change.
1454
1522
  * @param applicationContents - The contents of the application, including the current chart.
1455
1523
  * @i2since 1.0
1456
1524
  */
1457
1525
  export type SelectionListener = (selection: ISelection & app.IChangeSource, applicationContents: app.IApplicationContents) => void;
1458
1526
  /**
1459
- * A callback function that handles chart events.
1527
+ * A callback function that handles chart data change events.
1460
1528
  *
1461
- * @param change - The change that took place on the chart and caused the callback to be invoked and the source of change.
1529
+ * @param change - The change that took place on the chart and caused the callback to be invoked, and the source of the data change.
1462
1530
  * @param applicationContents - The contents of the application, including the current chart.
1463
1531
  * @i2since 1.0
1464
1532
  */
@@ -1466,7 +1534,7 @@ export declare namespace chart {
1466
1534
  /**
1467
1535
  * A callback function that handles chart view events.
1468
1536
  *
1469
- * @param view -The appearance of the chart following the change that caused the callback to be invoked and the source of change.
1537
+ * @param view - The appearance of the chart following the change that caused the callback to be invoked, and the source of the view change.
1470
1538
  * @param applicationContents - The contents of the application, including the current chart.
1471
1539
  * @i2since 1.0
1472
1540
  */
@@ -1613,7 +1681,8 @@ export declare namespace commands {
1613
1681
  /**
1614
1682
  * A callback function that handles records context change events.
1615
1683
  *
1616
- * @param recordsContext - The records that are pertinent in the context of the surfaced command and the source of change.
1684
+ * @param recordsContext - The records that were pertinent in the context of the surfaced command
1685
+ * at the moment the callback was invoked, and the source of the change to those records.
1617
1686
  * @i2since 1.0
1618
1687
  */
1619
1688
  export type RecordsContextChangeListener = (recordsContext: IRecordsContext & app.IChangeSource) => void;
@@ -2145,7 +2214,7 @@ export declare namespace commands {
2145
2214
  */
2146
2215
  readonly addToMap: CommandId;
2147
2216
  /**
2148
- * Gets the identifier of the system command that opens the ThreeSixty View of the selected information store entity record.
2217
+ * Gets the identifier of the system command that opens a 360 view of the selected Information Store entity record.
2149
2218
  * @i2since 1.2
2150
2219
  */
2151
2220
  readonly openThreeSixtyView: CommandId;
@@ -3156,7 +3225,7 @@ export declare namespace records {
3156
3225
  */
3157
3226
  get360ViewUrl(): string | undefined;
3158
3227
  /**
3159
- * Gets the element to which the record belongs.
3228
+ * Gets the chart element to which the record belongs.
3160
3229
  * @i2since 1.2
3161
3230
  */
3162
3231
  readonly element: visual.IElement;
@@ -3446,10 +3515,10 @@ export declare namespace schema {
3446
3515
  */
3447
3516
  readonly itemTypes: data.IKeyedReadOnlyCollection<ChartItemTypeId, IChartItemType>;
3448
3517
  /**
3449
- * Gets the item type with the specified analyze type id.
3450
- * @param analyzeItemTypeId - An analyze item type id.
3451
- * @returns The requested item type.
3452
- * @throws `VerbatimError` if an item type with the specified analyze type id could not be found.
3518
+ * Gets the item type in the chart schema that has the specified i2 Analyze type identifier.
3519
+ * @param analyzeItemTypeId - An i2 Analyze item type identifier.
3520
+ * @returns The requested chart item type.
3521
+ * @throws `VerbatimError` if no chart item type has the specified i2 Analyze type identifier.
3453
3522
  * @i2since 1.2
3454
3523
  */
3455
3524
  getItemType(analyzeItemTypeId: AnalyzeItemTypeId): IChartItemType;
@@ -3674,10 +3743,10 @@ export declare namespace schema {
3674
3743
  */
3675
3744
  readonly propertyTypes: data.IKeyedReadOnlyCollection<ChartPropertyTypeId, IChartPropertyType>;
3676
3745
  /**
3677
- * Gets the property type with the specified analyze property type id.
3678
- * @param analyzePropertyTypeId - An analyze property type id.
3679
- * @returns The requested property type, or undefined if the property type could not be found.
3680
- * @throws `VerbatimError` if a property type with the specified analyze property id could not be found.
3746
+ * Gets the property type that has the specified i2 Analyze type identifier.
3747
+ * @param analyzePropertyTypeId - An i2 Analyze property type identifier.
3748
+ * @returns The requested property type.
3749
+ * @throws `VerbatimError` if the item type does not contain a property type that has the specified i2 Analyze type identifier.
3681
3750
  * @i2since 1.2
3682
3751
  */
3683
3752
  getPropertyType(analyzePropertyTypeId: AnalyzePropertyTypeId): IChartPropertyType;
@@ -4217,7 +4286,6 @@ export declare namespace toolview {
4217
4286
  */
4218
4287
  export interface ToolViewApiEventOptionsMap extends ToolViewEventOptionsMap, app.ApplicationEventOptionsMap {
4219
4288
  }
4220
- {};
4221
4289
  }
4222
4290
 
4223
4291
  /**
@@ -4237,6 +4305,11 @@ export declare namespace visual {
4237
4305
  * @i2since 1.0
4238
4306
  */
4239
4307
  export type ElementId = string;
4308
+ /**
4309
+ * A set of values that represents the size of the Node.
4310
+ * @i2since 1.2
4311
+ */
4312
+ export type NodeSize = 0.5 | 1 | 2 | 3 | 4;
4240
4313
  /**
4241
4314
  * A set of information and functionality that is common to all elements on an i2 Notebook chart.
4242
4315
  * @i2since 1.0
@@ -4340,6 +4413,11 @@ export declare namespace visual {
4340
4413
  * @i2since 1.0
4341
4414
  */
4342
4415
  readonly direction: data.LinkDirection;
4416
+ /**
4417
+ * Gets the style of the edge.
4418
+ * @i2since 1.2
4419
+ */
4420
+ readonly style: IEdgeStyle;
4343
4421
  }
4344
4422
  /**
4345
4423
  * A position on a chart surface.
@@ -4360,16 +4438,47 @@ export declare namespace visual {
4360
4438
  */
4361
4439
  readonly y: number;
4362
4440
  }
4441
+ /**
4442
+ * Settings that affects the appearence of an element.
4443
+ * @typeParam T - The type of the settings value.
4444
+ * @i2since 1.2
4445
+ */
4446
+ export interface IInheritable<T> {
4447
+ isDefault: boolean;
4448
+ value: T;
4449
+ }
4450
+ /**
4451
+ * A style for an element, which controls its appearance.
4452
+ * @i2since 1.2
4453
+ */
4454
+ export interface IElementStyleBase {
4455
+ /**
4456
+ * Gets the color of the element.
4457
+ * @i2since 1.2
4458
+ */
4459
+ readonly color: IInheritable<string>;
4460
+ }
4363
4461
  /**
4364
4462
  * A style for a node, which controls its appearance.
4365
4463
  * @i2since 1.0
4366
4464
  */
4367
- export interface INodeStyle {
4465
+ export interface INodeStyle extends IElementStyleBase {
4368
4466
  /**
4369
4467
  * Gets the image to display for a node.
4370
4468
  * @i2since 1.0
4371
4469
  */
4372
4470
  readonly image: data.IImage;
4471
+ /**
4472
+ * Gets the size of the node.
4473
+ * @i2since 1.2
4474
+ */
4475
+ readonly size: IInheritable<NodeSize>;
4476
+ }
4477
+ /**
4478
+ * A style for an edge, which controls its appearance.
4479
+ * @i2since 1.2
4480
+ */
4481
+ export interface IEdgeStyle extends IElementStyleBase {
4373
4482
  }
4374
4483
  /**
4375
4484
  * A rectangular area, such as the boundary of the chart view.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.2.0-dev.4",
3
+ "version": "1.2.0-dev.6",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {