@i2analyze/notebook-sdk 1.9.0-dev.10 → 1.9.0-dev.12
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 +190 -0
- 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.
|
|
@@ -2087,6 +2092,11 @@ export declare namespace chart {
|
|
|
2087
2092
|
* @i2since 1.5
|
|
2088
2093
|
*/
|
|
2089
2094
|
readonly chartschemachange: ChartSchemaChangeListener;
|
|
2095
|
+
/**
|
|
2096
|
+
* Gets the type of the callback method that listens for "brushsetchange" events.
|
|
2097
|
+
* @i2since 1.9
|
|
2098
|
+
*/
|
|
2099
|
+
readonly brushsetchange: BrushSetChangeListener;
|
|
2090
2100
|
}
|
|
2091
2101
|
/**
|
|
2092
2102
|
* A mapping of chart event types to their listener options types.
|
|
@@ -2113,6 +2123,11 @@ export declare namespace chart {
|
|
|
2113
2123
|
* @i2since 1.5
|
|
2114
2124
|
*/
|
|
2115
2125
|
readonly chartschemachange: app.ISubscriptionOptions;
|
|
2126
|
+
/**
|
|
2127
|
+
* Gets the type of the object that provides control over "brushsetchange" event listeners.
|
|
2128
|
+
* @i2since 1.9
|
|
2129
|
+
*/
|
|
2130
|
+
readonly brushsetchange: app.ISubscriptionOptions;
|
|
2116
2131
|
}
|
|
2117
2132
|
/**
|
|
2118
2133
|
* A callback function that handles chart selection events.
|
|
@@ -2146,6 +2161,14 @@ export declare namespace chart {
|
|
|
2146
2161
|
* @i2since 1.0
|
|
2147
2162
|
*/
|
|
2148
2163
|
export type ViewListener = (view: IChartView & app.IChangeSource, applicationContents: app.IApplicationContents) => void;
|
|
2164
|
+
/**
|
|
2165
|
+
* A callback function that handles brush set change events.
|
|
2166
|
+
*
|
|
2167
|
+
* @param brushSet - The brush set that changed.
|
|
2168
|
+
* @param applicationContents - The contents of the application, including the current chart.
|
|
2169
|
+
* @i2since 1.9
|
|
2170
|
+
*/
|
|
2171
|
+
export type BrushSetChangeListener = (brushSet: visual.IBrushSet, applicationContents: app.IApplicationContents) => void;
|
|
2149
2172
|
/**
|
|
2150
2173
|
* Constraints that control a view-fitting operation.
|
|
2151
2174
|
*
|
|
@@ -6459,6 +6482,173 @@ export declare namespace visual {
|
|
|
6459
6482
|
*/
|
|
6460
6483
|
readonly borderStyle: IElementSetting<LineStyle | null>;
|
|
6461
6484
|
}
|
|
6485
|
+
/**
|
|
6486
|
+
* An index that represents the priority or importance of a record in a brush set.
|
|
6487
|
+
* Higher values indicate higher importance.
|
|
6488
|
+
* @i2since 1.9
|
|
6489
|
+
*/
|
|
6490
|
+
export type BrushIndex = number;
|
|
6491
|
+
/**
|
|
6492
|
+
* A color range that maps brush indices to CSS color strings.
|
|
6493
|
+
* @i2since 1.9
|
|
6494
|
+
*/
|
|
6495
|
+
export interface IBrushColorRange {
|
|
6496
|
+
/**
|
|
6497
|
+
* Returns the CSS color string for the given brush index.
|
|
6498
|
+
*
|
|
6499
|
+
* @param index - The brush index to get the color for.
|
|
6500
|
+
* @returns A CSS color string (for example, '#FF0000', 'rgb(255, 0, 0)', 'red').
|
|
6501
|
+
* @i2since 1.9
|
|
6502
|
+
*/
|
|
6503
|
+
getColor(index: BrushIndex): string;
|
|
6504
|
+
}
|
|
6505
|
+
/**
|
|
6506
|
+
* A brush set that maps records to brush indices and applies colors based on a color range.
|
|
6507
|
+
* @i2since 1.9
|
|
6508
|
+
*/
|
|
6509
|
+
export interface IBrushSet {
|
|
6510
|
+
/**
|
|
6511
|
+
* Gets the unique identifier of the brush set.
|
|
6512
|
+
* @i2since 1.9
|
|
6513
|
+
*/
|
|
6514
|
+
readonly id: string;
|
|
6515
|
+
/**
|
|
6516
|
+
* Indicates whether the brush set is currently active.
|
|
6517
|
+
*
|
|
6518
|
+
* @remarks
|
|
6519
|
+
* Only one plug-in-owned brush set can be active at a time.
|
|
6520
|
+
* @i2since 1.9
|
|
6521
|
+
*/
|
|
6522
|
+
readonly isActive: boolean;
|
|
6523
|
+
/**
|
|
6524
|
+
* Gets the current color range for this brush set, or `null` if no color range is set.
|
|
6525
|
+
* @i2since 1.9
|
|
6526
|
+
*/
|
|
6527
|
+
readonly colorRange: IBrushColorRange | null;
|
|
6528
|
+
/**
|
|
6529
|
+
* Sets the color range for this brush set.
|
|
6530
|
+
*
|
|
6531
|
+
* @param range - The color range to use for mapping brush indices to colors.
|
|
6532
|
+
* @i2since 1.9
|
|
6533
|
+
*/
|
|
6534
|
+
setColorRange(range: IBrushColorRange): void;
|
|
6535
|
+
/**
|
|
6536
|
+
* Sets the brush index for a single record.
|
|
6537
|
+
*
|
|
6538
|
+
* @param recordId - The identifier of the record.
|
|
6539
|
+
* @param index - The brush index to assign to the record.
|
|
6540
|
+
* @i2since 1.9
|
|
6541
|
+
*/
|
|
6542
|
+
set(recordId: records.AnalyzeRecordId, index: BrushIndex): void;
|
|
6543
|
+
/**
|
|
6544
|
+
* Sets the brush index for multiple records.
|
|
6545
|
+
*
|
|
6546
|
+
* @param entries - An iterable of `[recordId, index]` tuples for multiple records.
|
|
6547
|
+
* @i2since 1.9
|
|
6548
|
+
*/
|
|
6549
|
+
set(entries: Iterable<[records.AnalyzeRecordId, BrushIndex]>): void;
|
|
6550
|
+
/**
|
|
6551
|
+
* Removes specific records from the brush set.
|
|
6552
|
+
*
|
|
6553
|
+
* @param recordIds - An iterable of record identifiers to remove.
|
|
6554
|
+
* @i2since 1.9
|
|
6555
|
+
*/
|
|
6556
|
+
remove(recordIds: Iterable<records.AnalyzeRecordId>): void;
|
|
6557
|
+
/**
|
|
6558
|
+
* Gets the brush index for a record, or `undefined` if the record is not in the brush set.
|
|
6559
|
+
*
|
|
6560
|
+
* @param recordId - The identifier of the record.
|
|
6561
|
+
* @returns The brush index, or `undefined` if the record is not brushed.
|
|
6562
|
+
* @i2since 1.9
|
|
6563
|
+
*/
|
|
6564
|
+
getBrushIndex(recordId: records.AnalyzeRecordId): BrushIndex | undefined;
|
|
6565
|
+
/**
|
|
6566
|
+
* Removes all record mappings from the brush set.
|
|
6567
|
+
* @i2since 1.9
|
|
6568
|
+
*/
|
|
6569
|
+
clear(): void;
|
|
6570
|
+
}
|
|
6571
|
+
/**
|
|
6572
|
+
* A manager for brush sets that controls their lifecycle and provides color resolution.
|
|
6573
|
+
* @i2since 1.9
|
|
6574
|
+
*/
|
|
6575
|
+
export interface IBrushSetsManager {
|
|
6576
|
+
/**
|
|
6577
|
+
* Creates a new brush set.
|
|
6578
|
+
*
|
|
6579
|
+
* @returns The newly created brush set.
|
|
6580
|
+
* @i2since 1.9
|
|
6581
|
+
*/
|
|
6582
|
+
create(): IBrushSet;
|
|
6583
|
+
/**
|
|
6584
|
+
* Activates a brush set, making it the active brush set and deactivating any other plug-in-owned brush sets.
|
|
6585
|
+
*
|
|
6586
|
+
* @remarks
|
|
6587
|
+
* Only one plug-in-owned brush set can be active at a time. Activating a brush set automatically
|
|
6588
|
+
* deactivates the previously active plug-in brush set.
|
|
6589
|
+
*
|
|
6590
|
+
* @param brushSet - The brush set to activate.
|
|
6591
|
+
* @throws `Error` if the brush set does not have a color range set.
|
|
6592
|
+
* @i2since 1.9
|
|
6593
|
+
*/
|
|
6594
|
+
activate(brushSet: IBrushSet): void;
|
|
6595
|
+
/**
|
|
6596
|
+
* Deactivates a brush set.
|
|
6597
|
+
*
|
|
6598
|
+
* @param brushSet - The brush set to deactivate.
|
|
6599
|
+
* @i2since 1.9
|
|
6600
|
+
*/
|
|
6601
|
+
deactivate(brushSet: IBrushSet): void;
|
|
6602
|
+
/**
|
|
6603
|
+
* Deletes a brush set, removing it from the manager.
|
|
6604
|
+
*
|
|
6605
|
+
* @param brushSet - The brush set to delete.
|
|
6606
|
+
* @i2since 1.9
|
|
6607
|
+
*/
|
|
6608
|
+
delete(brushSet: IBrushSet): void;
|
|
6609
|
+
/**
|
|
6610
|
+
* Gets the currently active plug-in-owned brush set, or `null` if no plug-in brush set is active.
|
|
6611
|
+
*
|
|
6612
|
+
* @remarks
|
|
6613
|
+
* This property only returns plug-in-owned brush sets. System-owned overlay brush sets
|
|
6614
|
+
* (used internally by features like Find-on-Chart) are not exposed through this property.
|
|
6615
|
+
* @i2since 1.9
|
|
6616
|
+
*/
|
|
6617
|
+
readonly activeBrushSet: IBrushSet | null;
|
|
6618
|
+
/**
|
|
6619
|
+
* Gets the CSS color string for a record based on the active brush sets.
|
|
6620
|
+
*
|
|
6621
|
+
* @remarks
|
|
6622
|
+
* This method resolves colors using a two-layer precedence system:
|
|
6623
|
+
*
|
|
6624
|
+
* 1. System overlay brush sets (for example, Find-on-Chart) take precedence
|
|
6625
|
+
* 2. Falls back to the active plug-in-owned brush set
|
|
6626
|
+
* 3. Returns `null` if the record is not brushed in any active set.
|
|
6627
|
+
*
|
|
6628
|
+
* @param recordId - The identifier of the record.
|
|
6629
|
+
* @returns The CSS color string for the record, or `null` if the record is not brushed.
|
|
6630
|
+
* @i2since 1.9
|
|
6631
|
+
*/
|
|
6632
|
+
getColorForRecord(recordId: records.AnalyzeRecordId): string | null;
|
|
6633
|
+
/**
|
|
6634
|
+
* Gets the CSS color string for a chart element based on the active brush sets.
|
|
6635
|
+
*
|
|
6636
|
+
* @remarks
|
|
6637
|
+
* For elements that represent multiple records, this method uses the maximum brush index
|
|
6638
|
+
* across all constituent records. Higher brush indices represent higher importance.
|
|
6639
|
+
*
|
|
6640
|
+
* Color resolution uses a two-layer precedence system:
|
|
6641
|
+
*
|
|
6642
|
+
* 1. System overlay brush sets (for example, Find-on-Chart) take precedence
|
|
6643
|
+
* 2. Falls back to the active plug-in-owned brush set
|
|
6644
|
+
* 3. Returns `null` if no constituent records are brushed in any active set.
|
|
6645
|
+
*
|
|
6646
|
+
* @param elementId - The identifier of the chart element.
|
|
6647
|
+
* @returns The CSS color string for the element, or `null` if the element is not brushed.
|
|
6648
|
+
* @i2since 1.9
|
|
6649
|
+
*/
|
|
6650
|
+
getColorForElement(elementId: ElementId): string | null;
|
|
6651
|
+
}
|
|
6462
6652
|
}
|
|
6463
6653
|
|
|
6464
6654
|
export { }
|