@i2analyze/notebook-sdk 1.9.0-dev.1 → 1.9.0-dev.11
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 +584 -17
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -124,6 +124,11 @@ export declare namespace app {
|
|
|
124
124
|
* @i2since 1.4
|
|
125
125
|
*/
|
|
126
126
|
readonly systemActions: dialog.ISystemDialogActions;
|
|
127
|
+
/**
|
|
128
|
+
* Gets the brush sets manager for controlling chart brushing.
|
|
129
|
+
* @i2since 1.9
|
|
130
|
+
*/
|
|
131
|
+
readonly brushSets: visual.IBrushSetsManager;
|
|
127
132
|
}
|
|
128
133
|
/**
|
|
129
134
|
* A report on the result of one or more mutations.
|
|
@@ -744,6 +749,32 @@ export declare namespace app {
|
|
|
744
749
|
* @i2since 1.5
|
|
745
750
|
*/
|
|
746
751
|
setImage(href: undefined): this;
|
|
752
|
+
/**
|
|
753
|
+
* Sets or resets the border color of the node.
|
|
754
|
+
*
|
|
755
|
+
* @param color - The color to set, or `undefined` to reset the border color to the theme default.
|
|
756
|
+
* @returns The node, with its border color set to the specified value.
|
|
757
|
+
* @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.
|
|
758
|
+
* @i2since 1.9
|
|
759
|
+
*/
|
|
760
|
+
setBorderColor(color: string | undefined): this;
|
|
761
|
+
/**
|
|
762
|
+
* Sets or resets the border width of the node.
|
|
763
|
+
*
|
|
764
|
+
* @param width - The width to set (valid range is 1 to 32), or `undefined` to reset the width to the theme default.
|
|
765
|
+
* @returns The node, with its border width set to the specified value.
|
|
766
|
+
* @throws `Error` if the specified value is neither `undefined` nor a number in the range 1 to 32.
|
|
767
|
+
* @i2since 1.9
|
|
768
|
+
*/
|
|
769
|
+
setBorderWidth(width: number | undefined): this;
|
|
770
|
+
/**
|
|
771
|
+
* Sets or resets the border style of the node.
|
|
772
|
+
*
|
|
773
|
+
* @param lineStyle - The line style to set, or `null` to remove the border, or `undefined` to reset to the default ('solid').
|
|
774
|
+
* @returns The node, with its border style set to the specified value.
|
|
775
|
+
* @i2since 1.9
|
|
776
|
+
*/
|
|
777
|
+
setBorderStyle(lineStyle: visual.LineStyle | null | undefined): this;
|
|
747
778
|
}
|
|
748
779
|
/**
|
|
749
780
|
* A set of methods for modifying the appearance of an edge.
|
|
@@ -758,6 +789,14 @@ export declare namespace app {
|
|
|
758
789
|
* @i2since 1.8
|
|
759
790
|
*/
|
|
760
791
|
setWidth(width: number | undefined): this;
|
|
792
|
+
/**
|
|
793
|
+
* Sets or resets the line style of the edge.
|
|
794
|
+
*
|
|
795
|
+
* @param lineStyle - The line style to set, or `undefined` to reset to the default ('solid').
|
|
796
|
+
* @returns The edge, with its line style set to the specified value.
|
|
797
|
+
* @i2since 1.9
|
|
798
|
+
*/
|
|
799
|
+
setLineStyle(lineStyle: visual.LineStyle | undefined): this;
|
|
761
800
|
}
|
|
762
801
|
/**
|
|
763
802
|
* A set of methods for modifying the contents and position of a node group.
|
|
@@ -775,22 +814,29 @@ export declare namespace app {
|
|
|
775
814
|
/**
|
|
776
815
|
* Sets or resets the color of the node group.
|
|
777
816
|
*
|
|
778
|
-
* @param color - The color to set, or `
|
|
817
|
+
* @param color - The color to set, or `undefined` to reset the border color to the theme default.
|
|
779
818
|
* @returns The node group, with its border color set to the specified value.
|
|
780
|
-
* @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
|
|
819
|
+
* @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.
|
|
781
820
|
* @i2since 1.8
|
|
782
821
|
*/
|
|
783
|
-
setBorderColor(color: string | undefined
|
|
822
|
+
setBorderColor(color: string | undefined): this;
|
|
784
823
|
/**
|
|
785
824
|
* Sets or resets the border width of the node group.
|
|
786
825
|
*
|
|
787
|
-
* @param width - The width to set, or `undefined` to reset the width to the theme default.
|
|
826
|
+
* @param width - The width to set (valid range is 1 to 32), or `undefined` to reset the width to the theme default.
|
|
788
827
|
* @returns The node group, with its border width set to the specified value.
|
|
789
|
-
* @throws `Error` if the specified value is
|
|
790
|
-
* @remarks A size of 0 is valid, and indicates that the node group has no border - equivalent to `setBorderColor(null)`.
|
|
828
|
+
* @throws `Error` if the specified value is neither `undefined` nor a number in the range 1 to 32.
|
|
791
829
|
* @i2since 1.8
|
|
792
830
|
*/
|
|
793
831
|
setBorderWidth(width: number | undefined): this;
|
|
832
|
+
/**
|
|
833
|
+
* Sets or resets the border style of the node group.
|
|
834
|
+
*
|
|
835
|
+
* @param lineStyle - The line style to set, or `null` to remove the border, or `undefined` to reset to the default ('solid').
|
|
836
|
+
* @returns The node group, with its border style set to the specified value.
|
|
837
|
+
* @i2since 1.9
|
|
838
|
+
*/
|
|
839
|
+
setBorderStyle(lineStyle: visual.LineStyle | null | undefined): this;
|
|
794
840
|
/**
|
|
795
841
|
* Sets or resets the background color of the node group.
|
|
796
842
|
*
|
|
@@ -1460,6 +1506,7 @@ export declare namespace app {
|
|
|
1460
1506
|
}
|
|
1461
1507
|
/**
|
|
1462
1508
|
* The names of themes for the i2 Notebook user interface.
|
|
1509
|
+
* @deprecated Use {@link app.ITheme.appearance | appearance} to determine the application theme instead.
|
|
1463
1510
|
* @i2since 1.0
|
|
1464
1511
|
*/
|
|
1465
1512
|
export type ThemeName = 'carbonwhite' | 'carbongray10' | 'carbongray90' | 'carbongray100';
|
|
@@ -1470,6 +1517,7 @@ export declare namespace app {
|
|
|
1470
1517
|
export interface ITheme {
|
|
1471
1518
|
/**
|
|
1472
1519
|
* Gets the name of the theme.
|
|
1520
|
+
* @deprecated Use {@link app.ITheme.appearance | appearance} to determine the application theme instead.
|
|
1473
1521
|
* @i2since 1.0
|
|
1474
1522
|
*/
|
|
1475
1523
|
readonly themeName: ThemeName;
|
|
@@ -1662,6 +1710,145 @@ export declare namespace chart {
|
|
|
1662
1710
|
*/
|
|
1663
1711
|
getRecordsOfType(itemType: schema.ChartItemTypeSpecifier): data.IReadOnlyCollection<records.IChartRecord>;
|
|
1664
1712
|
}
|
|
1713
|
+
/**
|
|
1714
|
+
* Detailed information about the specific properties, notes, and source references that changed within a record.
|
|
1715
|
+
*
|
|
1716
|
+
* @remarks
|
|
1717
|
+
* This interface provides granular change tracking at the property level.
|
|
1718
|
+
* Empty sets indicate no changes occurred in that category.
|
|
1719
|
+
*
|
|
1720
|
+
* **Known Limitations:**
|
|
1721
|
+
* - Only includes changes for properties that have been fetched. Changes to unfetched properties are not reported here.
|
|
1722
|
+
* - Security dimension changes are not included in this interface.
|
|
1723
|
+
* - If a record is reported as having changed but `recordChanges` shows empty sets for all categories, this may indicate unfetched property changes or security-only edits.
|
|
1724
|
+
*
|
|
1725
|
+
* @example
|
|
1726
|
+
* ```typescript
|
|
1727
|
+
* // Plugin code consuming recordChanges
|
|
1728
|
+
* chartChangeListener((change) => {
|
|
1729
|
+
* if (change.type === 'minor' && change.recordChanges) {
|
|
1730
|
+
* change.recordChanges.forEach((recordId, changes) => {
|
|
1731
|
+
* // Check for property changes
|
|
1732
|
+
* if (changes.properties?.changed.size > 0) {
|
|
1733
|
+
* console.log('Properties changed:', changes.properties.changed);
|
|
1734
|
+
* }
|
|
1735
|
+
*
|
|
1736
|
+
* // Check for note additions
|
|
1737
|
+
* if (changes.notes?.added.size > 0) {
|
|
1738
|
+
* console.log('Notes added:', changes.notes.added);
|
|
1739
|
+
* }
|
|
1740
|
+
*
|
|
1741
|
+
* // Check for source reference changes
|
|
1742
|
+
* if (changes.sourceReferences?.changed.size > 0) {
|
|
1743
|
+
* console.log('Source references changed:', changes.sourceReferences.changed);
|
|
1744
|
+
* }
|
|
1745
|
+
*
|
|
1746
|
+
* // Check for source reference removals
|
|
1747
|
+
* if (changes.sourceReferences?.removed.size > 0) {
|
|
1748
|
+
* console.log('Source references removed:', changes.sourceReferences.removed);
|
|
1749
|
+
* }
|
|
1750
|
+
* });
|
|
1751
|
+
* }
|
|
1752
|
+
* });
|
|
1753
|
+
* ```
|
|
1754
|
+
*
|
|
1755
|
+
* @i2since 1.9
|
|
1756
|
+
*/
|
|
1757
|
+
export interface IRecordChanges {
|
|
1758
|
+
/**
|
|
1759
|
+
* Gets the property changes for this record.
|
|
1760
|
+
*
|
|
1761
|
+
* @remarks
|
|
1762
|
+
* The property changes are categorized as follows:
|
|
1763
|
+
* - Added: New properties that were set (property type IDs that were not previously set)
|
|
1764
|
+
* - Removed: Properties that were removed (set to `null` or deleted)
|
|
1765
|
+
* - Changed: Existing properties whose values were modified
|
|
1766
|
+
*
|
|
1767
|
+
* **Note:** If a property value oscillates within the same mutation (for example, A→B→A),
|
|
1768
|
+
* it is still reported as "changed" since this tracks mutations, not just final state.
|
|
1769
|
+
*
|
|
1770
|
+
* Empty sets indicate no changes in that category.
|
|
1771
|
+
*
|
|
1772
|
+
* @i2since 1.9
|
|
1773
|
+
*/
|
|
1774
|
+
readonly properties?: {
|
|
1775
|
+
/**
|
|
1776
|
+
* Gets the property type IDs for properties that were added to the record.
|
|
1777
|
+
* @i2since 1.9
|
|
1778
|
+
*/
|
|
1779
|
+
readonly added: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>;
|
|
1780
|
+
/**
|
|
1781
|
+
* Gets the property type IDs for properties that were removed from the record.
|
|
1782
|
+
* @i2since 1.9
|
|
1783
|
+
*/
|
|
1784
|
+
readonly removed: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>;
|
|
1785
|
+
/**
|
|
1786
|
+
* Gets the property type IDs for properties whose values were changed.
|
|
1787
|
+
* @i2since 1.9
|
|
1788
|
+
*/
|
|
1789
|
+
readonly changed: data.IReadOnlyCollection<schema.PropertyTypeIdentifier>;
|
|
1790
|
+
};
|
|
1791
|
+
/**
|
|
1792
|
+
* Gets the note changes for this record.
|
|
1793
|
+
*
|
|
1794
|
+
* @remarks
|
|
1795
|
+
* The note changes are categorized as follows:
|
|
1796
|
+
* - Added: New notes that were created
|
|
1797
|
+
* - Changed: Existing notes whose content was modified
|
|
1798
|
+
* - Removed: Notes that were deleted
|
|
1799
|
+
*
|
|
1800
|
+
* Empty sets indicate no changes in that category.
|
|
1801
|
+
*
|
|
1802
|
+
* @i2since 1.9
|
|
1803
|
+
*/
|
|
1804
|
+
readonly notes?: {
|
|
1805
|
+
/**
|
|
1806
|
+
* Gets the note IDs for notes that were added to the record.
|
|
1807
|
+
* @i2since 1.9
|
|
1808
|
+
*/
|
|
1809
|
+
readonly added: data.IReadOnlyCollection<data.NoteId>;
|
|
1810
|
+
/**
|
|
1811
|
+
* Gets the note IDs for notes whose content was changed.
|
|
1812
|
+
* @i2since 1.9
|
|
1813
|
+
*/
|
|
1814
|
+
readonly changed: data.IReadOnlyCollection<data.NoteId>;
|
|
1815
|
+
/**
|
|
1816
|
+
* Gets the note IDs for notes that were removed from the record.
|
|
1817
|
+
* @i2since 1.9
|
|
1818
|
+
*/
|
|
1819
|
+
readonly removed: data.IReadOnlyCollection<data.NoteId>;
|
|
1820
|
+
};
|
|
1821
|
+
/**
|
|
1822
|
+
* Gets the source reference changes for this record.
|
|
1823
|
+
*
|
|
1824
|
+
* @remarks
|
|
1825
|
+
* The source reference changes are categorized as follows:
|
|
1826
|
+
* - Added: New source references that were added
|
|
1827
|
+
* - Changed: Existing source references whose content was modified
|
|
1828
|
+
* - Removed: Source references that were deleted
|
|
1829
|
+
*
|
|
1830
|
+
* Empty sets indicate no changes in that category.
|
|
1831
|
+
*
|
|
1832
|
+
* @i2since 1.9
|
|
1833
|
+
*/
|
|
1834
|
+
readonly sourceReferences?: {
|
|
1835
|
+
/**
|
|
1836
|
+
* Gets the source reference IDs for source references that were added to the record.
|
|
1837
|
+
* @i2since 1.9
|
|
1838
|
+
*/
|
|
1839
|
+
readonly added: data.IReadOnlyCollection<data.SourceReferenceId>;
|
|
1840
|
+
/**
|
|
1841
|
+
* Gets the source reference IDs for source references whose content was changed.
|
|
1842
|
+
* @i2since 1.9
|
|
1843
|
+
*/
|
|
1844
|
+
readonly changed: data.IReadOnlyCollection<data.SourceReferenceId>;
|
|
1845
|
+
/**
|
|
1846
|
+
* Gets the source reference IDs for source references that were removed from the record.
|
|
1847
|
+
* @i2since 1.9
|
|
1848
|
+
*/
|
|
1849
|
+
readonly removed: data.IReadOnlyCollection<data.SourceReferenceId>;
|
|
1850
|
+
};
|
|
1851
|
+
}
|
|
1665
1852
|
/**
|
|
1666
1853
|
* A change that has occurred to the data in a chart.
|
|
1667
1854
|
* @i2since 1.0
|
|
@@ -1671,14 +1858,18 @@ export declare namespace chart {
|
|
|
1671
1858
|
* Gets the type of change (minor or major) made to the chart.
|
|
1672
1859
|
*
|
|
1673
1860
|
* @remarks
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1861
|
+
* The `type` field is always "minor" in current versions. The distinction between major and minor changes has been removed.
|
|
1862
|
+
* This field will be removed in the next major release.
|
|
1863
|
+
*
|
|
1864
|
+
* @deprecated This field will be removed in the next major release. All changes now report detailed affected elements and records.
|
|
1676
1865
|
* @i2since 1.0
|
|
1866
|
+
*
|
|
1677
1867
|
*/
|
|
1678
1868
|
readonly type: 'minor' | 'major';
|
|
1679
1869
|
}
|
|
1680
1870
|
/**
|
|
1681
1871
|
* A major change that has occurred to the data on a chart.
|
|
1872
|
+
* @deprecated Use {@link chart.IChartChange} instead. The `type` field is always "minor" and the distinction between major and minor changes has been removed. This interface will be removed in the next major release.
|
|
1682
1873
|
* @i2since 1.0
|
|
1683
1874
|
*/
|
|
1684
1875
|
export interface IChartChangeMajor extends IChartChangeBase {
|
|
@@ -1784,9 +1975,44 @@ export declare namespace chart {
|
|
|
1784
1975
|
*/
|
|
1785
1976
|
readonly removed: data.IReadOnlyCollection<visual.ElementId>;
|
|
1786
1977
|
};
|
|
1978
|
+
/**
|
|
1979
|
+
* Gets granular change details for records that changed in this chart update.
|
|
1980
|
+
*
|
|
1981
|
+
* @remarks
|
|
1982
|
+
* This optional field provides property-level change tracking for records.
|
|
1983
|
+
* When populated, it contains an entry for each record that changed, with detailed information about:
|
|
1984
|
+
* - Which properties were added, removed, or changed
|
|
1985
|
+
* - Which notes were added, changed, or removed
|
|
1986
|
+
* - Which source references were added, changed, or removed
|
|
1987
|
+
* *
|
|
1988
|
+
* **Usage Pattern:**
|
|
1989
|
+
* ```typescript
|
|
1990
|
+
* // New opt-in granularity
|
|
1991
|
+
* change.recordChanges?.forEach((recordId, changes) => {
|
|
1992
|
+
* if (changes.properties?.changed.size > 0) {
|
|
1993
|
+
* console.log('Properties changed for', recordId);
|
|
1994
|
+
* }
|
|
1995
|
+
* });
|
|
1996
|
+
* ```
|
|
1997
|
+
*
|
|
1998
|
+
* **Known Limitations:**
|
|
1999
|
+
* Changes to unfetched properties are not reported here.
|
|
2000
|
+
* - Security dimension changes are not included.
|
|
2001
|
+
* - If a record appears in `records.changed` but has no corresponding entry in `recordChanges`,
|
|
2002
|
+
* or if the entry shows empty sets for all categories, this may indicate unfetched property changes
|
|
2003
|
+
* or security-only edits.
|
|
2004
|
+
*
|
|
2005
|
+
* @i2since 1.9
|
|
2006
|
+
*/
|
|
2007
|
+
readonly recordChanges?: data.IKeyedReadOnlyCollection<records.AnalyzeRecordId, IRecordChanges>;
|
|
1787
2008
|
}
|
|
1788
2009
|
/**
|
|
1789
2010
|
* A change to the data in a chart in i2 Notebook.
|
|
2011
|
+
*
|
|
2012
|
+
* @remarks
|
|
2013
|
+
* Use this type for all chart change handling. The distinction between major and minor changes has been removed,
|
|
2014
|
+
* and all changes now report detailed information about affected elements and records.
|
|
2015
|
+
*
|
|
1790
2016
|
* @i2since 1.0
|
|
1791
2017
|
*/
|
|
1792
2018
|
export type IChartChange = IChartChangeMajor | IChartChangeMinor;
|
|
@@ -1972,6 +2198,11 @@ export declare namespace commands {
|
|
|
1972
2198
|
* @i2since 1.0
|
|
1973
2199
|
*/
|
|
1974
2200
|
export type CommandType = 'application' | 'records' | 'unscoped';
|
|
2201
|
+
/**
|
|
2202
|
+
* A type for a group of actions, which determines how the group is rendered in the user interface.
|
|
2203
|
+
* @i2since 1.9
|
|
2204
|
+
*/
|
|
2205
|
+
export type GroupType = 'expanded' | 'collapsed' | 'command';
|
|
1975
2206
|
/**
|
|
1976
2207
|
* A mapping of command types to their payload types.
|
|
1977
2208
|
* @i2since 1.0
|
|
@@ -2392,6 +2623,12 @@ export declare namespace commands {
|
|
|
2392
2623
|
readonly id: GroupId;
|
|
2393
2624
|
/**
|
|
2394
2625
|
* Indicates whether the group is initially expanded (`false`) or collapsed (`true`) in the user interface.
|
|
2626
|
+
*
|
|
2627
|
+
* @remarks
|
|
2628
|
+
* This is deprecated in favour of the more explicit {@link commands.IGroup."type"} property.
|
|
2629
|
+
* When migrating, use `type: 'collapsed'` instead of `isCollapsed: true`, and `type: 'expanded'` instead of
|
|
2630
|
+
* `isCollapsed: false` or omitting the property.
|
|
2631
|
+
* @deprecated Deprecated since version 1.9. Use {@link commands.IGroup."type"} instead.
|
|
2395
2632
|
* @i2since 1.5
|
|
2396
2633
|
*/
|
|
2397
2634
|
readonly isCollapsed?: boolean;
|
|
@@ -2411,6 +2648,19 @@ export declare namespace commands {
|
|
|
2411
2648
|
* @i2since 1.0
|
|
2412
2649
|
*/
|
|
2413
2650
|
readonly label?: string;
|
|
2651
|
+
/**
|
|
2652
|
+
* Gets the render type of the group.
|
|
2653
|
+
*
|
|
2654
|
+
* @remarks
|
|
2655
|
+
* Use this property to explicitly control how the group is presented in the user interface. The options are:
|
|
2656
|
+
* - `'expanded'` - shows all commands inline (default)
|
|
2657
|
+
* - `'collapsed'` - shows the group as a single icon/label button that opens a dropdown
|
|
2658
|
+
* - `'command'` - indicates the group exposes a primary action (the first surfaced command) while also presenting a menu of related actions; user may render this as a split button in a ribbon, or as an actionable menu entry with a submenu in popup menus.
|
|
2659
|
+
*
|
|
2660
|
+
* If `type` is specified it takes precedence over the deprecated {@link commands.IGroupBase.isCollapsed} boolean.
|
|
2661
|
+
* @i2since 1.9
|
|
2662
|
+
*/
|
|
2663
|
+
readonly type?: GroupType;
|
|
2414
2664
|
}
|
|
2415
2665
|
/**
|
|
2416
2666
|
* A group of actions in a popup menu that do not have a label or an icon.
|
|
@@ -2714,35 +2964,95 @@ export declare namespace commands {
|
|
|
2714
2964
|
*/
|
|
2715
2965
|
readonly groupNodes: CommandId;
|
|
2716
2966
|
/**
|
|
2717
|
-
* Gets the identifier of the system command that performs a grouped layout.
|
|
2967
|
+
* Gets the identifier of the system command that performs a grouped layout on the whole chart.
|
|
2718
2968
|
* @i2since 1.0
|
|
2719
2969
|
*/
|
|
2720
2970
|
readonly layoutGrouped: CommandId;
|
|
2721
2971
|
/**
|
|
2722
|
-
* Gets the identifier of the system command that performs a
|
|
2972
|
+
* Gets the identifier of the system command that performs a grouped layout on the current selection.
|
|
2973
|
+
* @i2since 1.9
|
|
2974
|
+
*/
|
|
2975
|
+
readonly layoutGroupedOnSelection: CommandId;
|
|
2976
|
+
/**
|
|
2977
|
+
* Gets the identifier of the system command that performs a grouped layout within a group.
|
|
2978
|
+
* @i2since 1.9
|
|
2979
|
+
*/
|
|
2980
|
+
readonly layoutGroupedWithinGroup: CommandId;
|
|
2981
|
+
/**
|
|
2982
|
+
* Gets the identifier of the system command that performs a packed layout on the whole chart.
|
|
2723
2983
|
* @i2since 1.0
|
|
2724
2984
|
*/
|
|
2725
2985
|
readonly layoutPacked: CommandId;
|
|
2726
2986
|
/**
|
|
2727
|
-
* Gets the identifier of the system command that performs a
|
|
2987
|
+
* Gets the identifier of the system command that performs a packed layout on the current selection.
|
|
2988
|
+
* @i2since 1.9
|
|
2989
|
+
*/
|
|
2990
|
+
readonly layoutPackedOnSelection: CommandId;
|
|
2991
|
+
/**
|
|
2992
|
+
* Gets the identifier of the system command that performs a packed layout within a group.
|
|
2993
|
+
* @i2since 1.9
|
|
2994
|
+
*/
|
|
2995
|
+
readonly layoutPackedWithinGroup: CommandId;
|
|
2996
|
+
/**
|
|
2997
|
+
* Gets the identifier of the system command that performs a peacock layout on the whole chart.
|
|
2728
2998
|
* @i2since 1.0
|
|
2729
2999
|
*/
|
|
2730
3000
|
readonly layoutPeacock: CommandId;
|
|
2731
3001
|
/**
|
|
2732
|
-
* Gets the identifier of the system command that performs a
|
|
3002
|
+
* Gets the identifier of the system command that performs a peacock layout on the current selection.
|
|
3003
|
+
* @i2since 1.9
|
|
3004
|
+
*/
|
|
3005
|
+
readonly layoutPeacockOnSelection: CommandId;
|
|
3006
|
+
/**
|
|
3007
|
+
* Gets the identifier of the system command that performs a peacock layout within a group.
|
|
3008
|
+
* @i2since 1.9
|
|
3009
|
+
*/
|
|
3010
|
+
readonly layoutPeacockWithinGroup: CommandId;
|
|
3011
|
+
/**
|
|
3012
|
+
* Gets the identifier of the system command that performs a circular layout on the whole chart.
|
|
2733
3013
|
* @i2since 1.8
|
|
2734
3014
|
*/
|
|
2735
3015
|
readonly layoutCircular: CommandId;
|
|
2736
3016
|
/**
|
|
2737
|
-
* Gets the identifier of the system command that performs
|
|
3017
|
+
* Gets the identifier of the system command that performs a circular layout on the current selection.
|
|
3018
|
+
* @i2since 1.9
|
|
3019
|
+
*/
|
|
3020
|
+
readonly layoutCircularOnSelection: CommandId;
|
|
3021
|
+
/**
|
|
3022
|
+
* Gets the identifier of the system command that performs a circular layout within a group.
|
|
3023
|
+
* @i2since 1.9
|
|
3024
|
+
*/
|
|
3025
|
+
readonly layoutCircularWithinGroup: CommandId;
|
|
3026
|
+
/**
|
|
3027
|
+
* Gets the identifier of the system command that performs an organization layout on the whole chart.
|
|
2738
3028
|
* @i2since 1.8
|
|
2739
3029
|
*/
|
|
2740
3030
|
readonly layoutOrganization: CommandId;
|
|
2741
3031
|
/**
|
|
2742
|
-
* Gets the identifier of the system command that performs
|
|
3032
|
+
* Gets the identifier of the system command that performs an organization layout on the current selection.
|
|
3033
|
+
* @i2since 1.9
|
|
3034
|
+
*/
|
|
3035
|
+
readonly layoutOrganizationOnSelection: CommandId;
|
|
3036
|
+
/**
|
|
3037
|
+
* Gets the identifier of the system command that performs an organization layout within a group.
|
|
3038
|
+
* @i2since 1.9
|
|
3039
|
+
*/
|
|
3040
|
+
readonly layoutOrganizationWithinGroup: CommandId;
|
|
3041
|
+
/**
|
|
3042
|
+
* Gets the identifier of the system command that performs a minimize crossed links layout on the whole chart.
|
|
2743
3043
|
* @i2since 1.8
|
|
2744
3044
|
*/
|
|
2745
3045
|
readonly layoutMinimizeCrossedLinks: CommandId;
|
|
3046
|
+
/**
|
|
3047
|
+
* Gets the identifier of the system command that performs a minimize crossed links layout on the current selection.
|
|
3048
|
+
* @i2since 1.9
|
|
3049
|
+
*/
|
|
3050
|
+
readonly layoutMinimizeCrossedLinksOnSelection: CommandId;
|
|
3051
|
+
/**
|
|
3052
|
+
* Gets the identifier of the system command that performs a minimize crossed links layout within a group.
|
|
3053
|
+
* @i2since 1.9
|
|
3054
|
+
*/
|
|
3055
|
+
readonly layoutMinimizeCrossedLinksWithinGroup: CommandId;
|
|
2746
3056
|
/**
|
|
2747
3057
|
* Gets the identifier of the system command that maximizes selected groups in the chart.
|
|
2748
3058
|
*
|
|
@@ -4341,7 +4651,7 @@ export declare interface NotebookStatic {
|
|
|
4341
4651
|
* @public
|
|
4342
4652
|
* @i2since 1.0
|
|
4343
4653
|
*/
|
|
4344
|
-
getEntryPointApi(pluginId: string, apiVersion: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6' | '1.7' | '1.8'): Promise<IEntryPointApi>;
|
|
4654
|
+
getEntryPointApi(pluginId: string, apiVersion: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6' | '1.7' | '1.8' | '1.9'): Promise<IEntryPointApi>;
|
|
4345
4655
|
}
|
|
4346
4656
|
|
|
4347
4657
|
/**
|
|
@@ -5797,6 +6107,11 @@ export declare namespace visual {
|
|
|
5797
6107
|
* @i2since 1.2
|
|
5798
6108
|
*/
|
|
5799
6109
|
export type NodeSize = 0.5 | 1 | 2 | 3 | 4;
|
|
6110
|
+
/**
|
|
6111
|
+
* The style of a line on an i2 Notebook chart. The default value is `'solid'`.
|
|
6112
|
+
* @i2since 1.9
|
|
6113
|
+
*/
|
|
6114
|
+
export type LineStyle = 'solid' | 'dashed' | 'dotted' | 'dash-dot' | 'dash-dot-dot';
|
|
5800
6115
|
/**
|
|
5801
6116
|
* A label for an element.
|
|
5802
6117
|
* @i2since 1.5
|
|
@@ -5999,6 +6314,21 @@ export declare namespace visual {
|
|
|
5999
6314
|
* @i2since 1.2
|
|
6000
6315
|
*/
|
|
6001
6316
|
readonly size: IElementSetting<NodeSize>;
|
|
6317
|
+
/**
|
|
6318
|
+
* Gets the border color of the node.
|
|
6319
|
+
* @i2since 1.9
|
|
6320
|
+
*/
|
|
6321
|
+
readonly borderColor: IElementSetting<string>;
|
|
6322
|
+
/**
|
|
6323
|
+
* Gets the border width of the node.
|
|
6324
|
+
* @i2since 1.9
|
|
6325
|
+
*/
|
|
6326
|
+
readonly borderWidth: IElementSetting<number>;
|
|
6327
|
+
/**
|
|
6328
|
+
* Gets the border style of the node, or null if there is no border.
|
|
6329
|
+
* @i2since 1.9
|
|
6330
|
+
*/
|
|
6331
|
+
readonly borderStyle: IElementSetting<LineStyle | null>;
|
|
6002
6332
|
}
|
|
6003
6333
|
/**
|
|
6004
6334
|
* A style for an edge, which affects its appearance.
|
|
@@ -6010,6 +6340,11 @@ export declare namespace visual {
|
|
|
6010
6340
|
* @i2since 1.8
|
|
6011
6341
|
*/
|
|
6012
6342
|
readonly width: IElementSetting<number>;
|
|
6343
|
+
/**
|
|
6344
|
+
* Gets the line style of the edge.
|
|
6345
|
+
* @i2since 1.9
|
|
6346
|
+
*/
|
|
6347
|
+
readonly lineStyle: IElementSetting<LineStyle>;
|
|
6013
6348
|
}
|
|
6014
6349
|
/**
|
|
6015
6350
|
* A rectangular area, such as the boundary of the chart view.
|
|
@@ -6114,15 +6449,247 @@ export declare namespace visual {
|
|
|
6114
6449
|
*/
|
|
6115
6450
|
readonly color: IElementSetting<string | null>;
|
|
6116
6451
|
/**
|
|
6117
|
-
* Gets the border color of the node group
|
|
6452
|
+
* Gets the border color of the node group.
|
|
6118
6453
|
* @i2since 1.8
|
|
6119
6454
|
*/
|
|
6120
|
-
readonly borderColor: IElementSetting<string
|
|
6455
|
+
readonly borderColor: IElementSetting<string>;
|
|
6121
6456
|
/**
|
|
6122
6457
|
* Gets the border width of the node group.
|
|
6123
6458
|
* @i2since 1.8
|
|
6124
6459
|
*/
|
|
6125
6460
|
readonly borderWidth: IElementSetting<number>;
|
|
6461
|
+
/**
|
|
6462
|
+
* Gets the border style of the node group, or null if there is no border.
|
|
6463
|
+
* @i2since 1.9
|
|
6464
|
+
*/
|
|
6465
|
+
readonly borderStyle: IElementSetting<LineStyle | null>;
|
|
6466
|
+
}
|
|
6467
|
+
/**
|
|
6468
|
+
* An index that represents the priority or importance of a record in a brush set.
|
|
6469
|
+
* Higher values indicate higher importance.
|
|
6470
|
+
* @i2since 1.9
|
|
6471
|
+
*/
|
|
6472
|
+
export type BrushIndex = number;
|
|
6473
|
+
/**
|
|
6474
|
+
* A color range that maps brush indices to CSS color strings.
|
|
6475
|
+
* @i2since 1.9
|
|
6476
|
+
*/
|
|
6477
|
+
export interface IBrushColorRange {
|
|
6478
|
+
/**
|
|
6479
|
+
* Returns the CSS color string for the given brush index.
|
|
6480
|
+
*
|
|
6481
|
+
* @param index - The brush index to get the color for.
|
|
6482
|
+
* @returns A CSS color string (for example, '#FF0000', 'rgb(255, 0, 0)', 'red').
|
|
6483
|
+
* @i2since 1.9
|
|
6484
|
+
*/
|
|
6485
|
+
getColor(index: BrushIndex): string;
|
|
6486
|
+
}
|
|
6487
|
+
/**
|
|
6488
|
+
* A brush set that maps records to brush indices and applies colors based on a color range.
|
|
6489
|
+
* @i2since 1.9
|
|
6490
|
+
*/
|
|
6491
|
+
export interface IBrushSet {
|
|
6492
|
+
/**
|
|
6493
|
+
* Gets the unique identifier of the brush set.
|
|
6494
|
+
* @i2since 1.9
|
|
6495
|
+
*/
|
|
6496
|
+
readonly id: string;
|
|
6497
|
+
/**
|
|
6498
|
+
* Indicates whether the brush set is currently active.
|
|
6499
|
+
*
|
|
6500
|
+
* @remarks
|
|
6501
|
+
* Only one plug-in-owned brush set can be active at a time.
|
|
6502
|
+
* @i2since 1.9
|
|
6503
|
+
*/
|
|
6504
|
+
readonly isActive: boolean;
|
|
6505
|
+
/**
|
|
6506
|
+
* Gets the current color range for this brush set, or `null` if no color range is set.
|
|
6507
|
+
* @i2since 1.9
|
|
6508
|
+
*/
|
|
6509
|
+
readonly colorRange: IBrushColorRange | null;
|
|
6510
|
+
/**
|
|
6511
|
+
* Sets the color range for this brush set.
|
|
6512
|
+
*
|
|
6513
|
+
* @param range - The color range to use for mapping brush indices to colors.
|
|
6514
|
+
* @i2since 1.9
|
|
6515
|
+
*/
|
|
6516
|
+
setColorRange(range: IBrushColorRange): void;
|
|
6517
|
+
/**
|
|
6518
|
+
* Sets the brush index for a single record.
|
|
6519
|
+
*
|
|
6520
|
+
* @param recordId - The identifier of the record.
|
|
6521
|
+
* @param index - The brush index to assign to the record.
|
|
6522
|
+
* @i2since 1.9
|
|
6523
|
+
*/
|
|
6524
|
+
set(recordId: records.AnalyzeRecordId, index: BrushIndex): void;
|
|
6525
|
+
/**
|
|
6526
|
+
* Sets the brush index for multiple records.
|
|
6527
|
+
*
|
|
6528
|
+
* @param entries - An iterable of `[recordId, index]` tuples for multiple records.
|
|
6529
|
+
* @i2since 1.9
|
|
6530
|
+
*/
|
|
6531
|
+
set(entries: Iterable<[records.AnalyzeRecordId, BrushIndex]>): void;
|
|
6532
|
+
/**
|
|
6533
|
+
* Removes specific records from the brush set.
|
|
6534
|
+
*
|
|
6535
|
+
* @param recordIds - An iterable of record identifiers to remove.
|
|
6536
|
+
* @i2since 1.9
|
|
6537
|
+
*/
|
|
6538
|
+
remove(recordIds: Iterable<records.AnalyzeRecordId>): void;
|
|
6539
|
+
/**
|
|
6540
|
+
* Gets the brush index for a record, or `undefined` if the record is not in the brush set.
|
|
6541
|
+
*
|
|
6542
|
+
* @param recordId - The identifier of the record.
|
|
6543
|
+
* @returns The brush index, or `undefined` if the record is not brushed.
|
|
6544
|
+
* @i2since 1.9
|
|
6545
|
+
*/
|
|
6546
|
+
getBrushIndex(recordId: records.AnalyzeRecordId): BrushIndex | undefined;
|
|
6547
|
+
/**
|
|
6548
|
+
* Removes all record mappings from the brush set.
|
|
6549
|
+
* @i2since 1.9
|
|
6550
|
+
*/
|
|
6551
|
+
clear(): void;
|
|
6552
|
+
}
|
|
6553
|
+
/**
|
|
6554
|
+
* An event that is fired when a brush set changes.
|
|
6555
|
+
* @i2since 1.9
|
|
6556
|
+
*/
|
|
6557
|
+
export interface IBrushSetChangeEvent {
|
|
6558
|
+
/**
|
|
6559
|
+
* Gets the brush set that changed.
|
|
6560
|
+
* @i2since 1.9
|
|
6561
|
+
*/
|
|
6562
|
+
readonly brushSet: IBrushSet;
|
|
6563
|
+
}
|
|
6564
|
+
/**
|
|
6565
|
+
* A listener for brush set change events.
|
|
6566
|
+
* @i2since 1.9
|
|
6567
|
+
*/
|
|
6568
|
+
export type BrushSetChangeListener = (event: IBrushSetChangeEvent) => void;
|
|
6569
|
+
/**
|
|
6570
|
+
* Options for adding a brush set change event listener.
|
|
6571
|
+
* @i2since 1.9
|
|
6572
|
+
*/
|
|
6573
|
+
export interface IBrushSetEventOptions {
|
|
6574
|
+
/**
|
|
6575
|
+
* Gets the brush set to listen to changes for. If not specified, listens to all brush sets.
|
|
6576
|
+
* @i2since 1.9
|
|
6577
|
+
*/
|
|
6578
|
+
readonly brushSet?: IBrushSet;
|
|
6579
|
+
}
|
|
6580
|
+
/**
|
|
6581
|
+
* A map of brush sets event types to their listener functions.
|
|
6582
|
+
* @i2since 1.9
|
|
6583
|
+
*/
|
|
6584
|
+
export interface BrushSetsEventMap {
|
|
6585
|
+
/**
|
|
6586
|
+
* Gets the listener function for brush set change events.
|
|
6587
|
+
* @i2since 1.9
|
|
6588
|
+
*/
|
|
6589
|
+
brushsetchange: BrushSetChangeListener;
|
|
6590
|
+
}
|
|
6591
|
+
/**
|
|
6592
|
+
* A map of brush sets event types to their options.
|
|
6593
|
+
* @i2since 1.9
|
|
6594
|
+
*/
|
|
6595
|
+
export interface BrushSetsEventOptionsMap {
|
|
6596
|
+
/**
|
|
6597
|
+
* Gets the options for the `brushsetchange` event.
|
|
6598
|
+
* @i2since 1.9
|
|
6599
|
+
*/
|
|
6600
|
+
brushsetchange: IBrushSetEventOptions;
|
|
6601
|
+
}
|
|
6602
|
+
/**
|
|
6603
|
+
* A manager for brush sets that controls their lifecycle and provides color resolution.
|
|
6604
|
+
* @i2since 1.9
|
|
6605
|
+
*/
|
|
6606
|
+
export interface IBrushSetsManager {
|
|
6607
|
+
/**
|
|
6608
|
+
* Creates a new brush set.
|
|
6609
|
+
*
|
|
6610
|
+
* @returns The newly created brush set.
|
|
6611
|
+
* @i2since 1.9
|
|
6612
|
+
*/
|
|
6613
|
+
create(): IBrushSet;
|
|
6614
|
+
/**
|
|
6615
|
+
* Activates a brush set, making it the active brush set and deactivating any other plug-in-owned brush sets.
|
|
6616
|
+
*
|
|
6617
|
+
* @remarks
|
|
6618
|
+
* Only one plug-in-owned brush set can be active at a time. Activating a brush set automatically
|
|
6619
|
+
* deactivates the previously active plug-in brush set.
|
|
6620
|
+
*
|
|
6621
|
+
* @param brushSet - The brush set to activate.
|
|
6622
|
+
* @throws `Error` if the brush set does not have a color range set.
|
|
6623
|
+
* @i2since 1.9
|
|
6624
|
+
*/
|
|
6625
|
+
activate(brushSet: IBrushSet): void;
|
|
6626
|
+
/**
|
|
6627
|
+
* Deactivates a brush set.
|
|
6628
|
+
*
|
|
6629
|
+
* @param brushSet - The brush set to deactivate.
|
|
6630
|
+
* @i2since 1.9
|
|
6631
|
+
*/
|
|
6632
|
+
deactivate(brushSet: IBrushSet): void;
|
|
6633
|
+
/**
|
|
6634
|
+
* Deletes a brush set, removing it from the manager.
|
|
6635
|
+
*
|
|
6636
|
+
* @param brushSet - The brush set to delete.
|
|
6637
|
+
* @i2since 1.9
|
|
6638
|
+
*/
|
|
6639
|
+
delete(brushSet: IBrushSet): void;
|
|
6640
|
+
/**
|
|
6641
|
+
* Gets the currently active plug-in-owned brush set, or `null` if no plug-in brush set is active.
|
|
6642
|
+
*
|
|
6643
|
+
* @remarks
|
|
6644
|
+
* This property only returns plug-in-owned brush sets. System-owned overlay brush sets
|
|
6645
|
+
* (used internally by features like Find-on-Chart) are not exposed through this property.
|
|
6646
|
+
* @i2since 1.9
|
|
6647
|
+
*/
|
|
6648
|
+
readonly activeBrushSet: IBrushSet | null;
|
|
6649
|
+
/**
|
|
6650
|
+
* Gets the CSS color string for a record based on the active brush sets.
|
|
6651
|
+
*
|
|
6652
|
+
* @remarks
|
|
6653
|
+
* This method resolves colors using a two-layer precedence system:
|
|
6654
|
+
*
|
|
6655
|
+
* 1. System overlay brush sets (for example, Find-on-Chart) take precedence
|
|
6656
|
+
* 2. Falls back to the active plug-in-owned brush set
|
|
6657
|
+
* 3. Returns `null` if the record is not brushed in any active set.
|
|
6658
|
+
*
|
|
6659
|
+
* @param recordId - The identifier of the record.
|
|
6660
|
+
* @returns The CSS color string for the record, or `null` if the record is not brushed.
|
|
6661
|
+
* @i2since 1.9
|
|
6662
|
+
*/
|
|
6663
|
+
getColorForRecord(recordId: records.AnalyzeRecordId): string | null;
|
|
6664
|
+
/**
|
|
6665
|
+
* Gets the CSS color string for a chart element based on the active brush sets.
|
|
6666
|
+
*
|
|
6667
|
+
* @remarks
|
|
6668
|
+
* For elements that represent multiple records, this method uses the maximum brush index
|
|
6669
|
+
* across all constituent records. Higher brush indices represent higher importance.
|
|
6670
|
+
*
|
|
6671
|
+
* Color resolution uses a two-layer precedence system:
|
|
6672
|
+
*
|
|
6673
|
+
* 1. System overlay brush sets (for example, Find-on-Chart) take precedence
|
|
6674
|
+
* 2. Falls back to the active plug-in-owned brush set
|
|
6675
|
+
* 3. Returns `null` if no constituent records are brushed in any active set.
|
|
6676
|
+
*
|
|
6677
|
+
* @param elementId - The identifier of the chart element.
|
|
6678
|
+
* @returns The CSS color string for the element, or `null` if the element is not brushed.
|
|
6679
|
+
* @i2since 1.9
|
|
6680
|
+
*/
|
|
6681
|
+
getColorForElement(elementId: ElementId): string | null;
|
|
6682
|
+
/**
|
|
6683
|
+
* Adds an event listener for brush set events.
|
|
6684
|
+
*
|
|
6685
|
+
* @typeParam K - The type of event to listen for.
|
|
6686
|
+
* @param type - The type of event to listen for.
|
|
6687
|
+
* @param listener - The function to call when the event is fired.
|
|
6688
|
+
* @param options - An optional configuration for the event listener.
|
|
6689
|
+
* @returns A function that removes the event listener when called.
|
|
6690
|
+
* @i2since 1.9
|
|
6691
|
+
*/
|
|
6692
|
+
addEventListener<K extends keyof BrushSetsEventMap>(type: K, listener: BrushSetsEventMap[K], options?: BrushSetsEventOptionsMap[K]): () => void;
|
|
6126
6693
|
}
|
|
6127
6694
|
}
|
|
6128
6695
|
|
package/lib/index.js
CHANGED