@i2analyze/notebook-sdk 1.10.0-dev.1 → 1.10.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 +656 -13
- package/package.json +1 -1
|
@@ -597,17 +597,71 @@ export declare namespace app {
|
|
|
597
597
|
}
|
|
598
598
|
/**
|
|
599
599
|
* A set of methods for modifying the appearance of an edge summary.
|
|
600
|
+
*
|
|
601
|
+
* @remarks
|
|
602
|
+
* Apart from {@link app.IEdgeSummaryEditor.setLabel | setLabel} (which is tracked,
|
|
603
|
+
* persisted, and undoable), every method on this editor sets or clears an **untracked**
|
|
604
|
+
* style override on the summary line.
|
|
605
|
+
*
|
|
606
|
+
* Each style setter accepts `undefined` to clear that single attribute and revert it to
|
|
607
|
+
* the value derived from the member edges. Every style setter throws if the edge summary
|
|
608
|
+
* is no longer live.
|
|
600
609
|
* @i2since 1.6
|
|
601
610
|
*/
|
|
602
611
|
export interface IEdgeSummaryEditor {
|
|
603
612
|
/**
|
|
604
613
|
* Sets or resets the label of the edge summary.
|
|
605
614
|
*
|
|
615
|
+
* @remarks
|
|
616
|
+
* Tracked: the change is persisted to the server and added to the undo stack.
|
|
617
|
+
*
|
|
606
618
|
* @param label - The label to set, or `undefined` to reset the label to the default.
|
|
607
619
|
* @returns The edge summary, with its label set to the specified value.
|
|
608
620
|
* @i2since 1.6
|
|
609
621
|
*/
|
|
610
622
|
setLabel(label: string | undefined): this;
|
|
623
|
+
/**
|
|
624
|
+
* Sets or clears the color override on the edge summary line.
|
|
625
|
+
*
|
|
626
|
+
* @param color - The color to set, or `undefined` to clear the override.
|
|
627
|
+
* @returns This editor, for chaining.
|
|
628
|
+
* @throws `Error` if the value is not `undefined` or a CSS color string.
|
|
629
|
+
* @throws `Error` if the edge summary is no longer live.
|
|
630
|
+
* @i2since 1.10
|
|
631
|
+
*/
|
|
632
|
+
setColor(color: string | undefined): this;
|
|
633
|
+
/**
|
|
634
|
+
* Sets or clears the width override on the edge summary line.
|
|
635
|
+
*
|
|
636
|
+
* @param width - The width to set (1 to 32), or `undefined` to clear the override.
|
|
637
|
+
* @returns This editor, for chaining.
|
|
638
|
+
* @throws `Error` if the value is not `undefined` or a finite number in the range 1 to 32.
|
|
639
|
+
* @throws `Error` if the edge summary is no longer live.
|
|
640
|
+
* @i2since 1.10
|
|
641
|
+
*/
|
|
642
|
+
setWidth(width: number | undefined): this;
|
|
643
|
+
/**
|
|
644
|
+
* Sets or clears the line style override on the edge summary line.
|
|
645
|
+
*
|
|
646
|
+
* @param lineStyle - The line style to set, or `undefined` to clear the override.
|
|
647
|
+
* @returns This editor, for chaining.
|
|
648
|
+
* @throws `Error` if the value is not `undefined` or a recognized
|
|
649
|
+
* {@link visual.LineStyle | LineStyle}.
|
|
650
|
+
* @throws `Error` if the edge summary is no longer live.
|
|
651
|
+
* @i2since 1.10
|
|
652
|
+
*/
|
|
653
|
+
setLineStyle(lineStyle: visual.LineStyle | undefined): this;
|
|
654
|
+
/**
|
|
655
|
+
* Sets or clears the direction override on the edge summary line.
|
|
656
|
+
*
|
|
657
|
+
* @param direction - The direction to set, or `undefined` to clear the override.
|
|
658
|
+
* @returns This editor, for chaining.
|
|
659
|
+
* @throws `Error` if the value is not `undefined` or a recognized
|
|
660
|
+
* {@link data.LinkDirection | LinkDirection}.
|
|
661
|
+
* @throws `Error` if the edge summary is no longer live.
|
|
662
|
+
* @i2since 1.10
|
|
663
|
+
*/
|
|
664
|
+
setDirection(direction: data.LinkDirection | undefined): this;
|
|
611
665
|
}
|
|
612
666
|
/**
|
|
613
667
|
* A set of methods for modifying common record data.
|
|
@@ -728,6 +782,42 @@ export declare namespace app {
|
|
|
728
782
|
* @i2since 1.5
|
|
729
783
|
*/
|
|
730
784
|
setLabel(label: string | undefined): this;
|
|
785
|
+
/**
|
|
786
|
+
* Sets a badge icon in the given slot on the element.
|
|
787
|
+
*
|
|
788
|
+
* @param slot - The slot position (0 to 5). Slots 0 to 2 are trailing; slots 3 to 5 are leading.
|
|
789
|
+
* @param href - The URL of the badge icon image.
|
|
790
|
+
* @param description - A description of the badge, used as alternative text and in tooltips.
|
|
791
|
+
* @returns The element, with the badge icon in the specified slot set to the specified value.
|
|
792
|
+
* @i2since 1.10
|
|
793
|
+
*/
|
|
794
|
+
setBadge(slot: visual.BadgeSlot, href: string, description?: string): this;
|
|
795
|
+
/**
|
|
796
|
+
* Clears the badge icon in the given slot on the element.
|
|
797
|
+
*
|
|
798
|
+
* @remarks
|
|
799
|
+
* After this call, {@link visual.IElementStyleBase.getBadge | style.getBadge(slot)}
|
|
800
|
+
* returns `undefined` and {@link visual.IElementStyleBase.badges | style.badges}
|
|
801
|
+
* no longer includes an entry for the slot.
|
|
802
|
+
*
|
|
803
|
+
* @param slot - The slot position (0 to 5).
|
|
804
|
+
* @param href - `undefined` is the only valid argument for clearing the slot.
|
|
805
|
+
* @returns The element, with the badge icon in the specified slot cleared.
|
|
806
|
+
* @i2since 1.10
|
|
807
|
+
*/
|
|
808
|
+
setBadge(slot: visual.BadgeSlot, href: undefined): this;
|
|
809
|
+
/**
|
|
810
|
+
* Clears all badge icons on the element.
|
|
811
|
+
*
|
|
812
|
+
* @remarks
|
|
813
|
+
* After this call, {@link visual.IElementStyleBase.badges | style.badges} is
|
|
814
|
+
* empty and {@link visual.IElementStyleBase.getBadge | style.getBadge(slot)}
|
|
815
|
+
* returns `undefined` for every slot.
|
|
816
|
+
*
|
|
817
|
+
* @returns The element, with all badge icons cleared.
|
|
818
|
+
* @i2since 1.10
|
|
819
|
+
*/
|
|
820
|
+
clearBadges(): this;
|
|
731
821
|
}
|
|
732
822
|
/**
|
|
733
823
|
* A set of methods for modifying the appearance of a node.
|
|
@@ -2141,6 +2231,11 @@ export declare namespace chart {
|
|
|
2141
2231
|
* @i2since 1.9
|
|
2142
2232
|
*/
|
|
2143
2233
|
readonly brushsetchange: BrushSetChangeListener;
|
|
2234
|
+
/**
|
|
2235
|
+
* Gets the type of the callback method that listens for "charthoverchange" events.
|
|
2236
|
+
* @i2since 1.10
|
|
2237
|
+
*/
|
|
2238
|
+
readonly charthoverchange: HoverChangeListener;
|
|
2144
2239
|
}
|
|
2145
2240
|
/**
|
|
2146
2241
|
* A mapping of chart event types to their listener options types.
|
|
@@ -2172,6 +2267,11 @@ export declare namespace chart {
|
|
|
2172
2267
|
* @i2since 1.9
|
|
2173
2268
|
*/
|
|
2174
2269
|
readonly brushsetchange: app.ISubscriptionOptions;
|
|
2270
|
+
/**
|
|
2271
|
+
* Gets the type of the object that provides control over "charthoverchange" event listeners.
|
|
2272
|
+
* @i2since 1.10
|
|
2273
|
+
*/
|
|
2274
|
+
readonly charthoverchange: app.ISubscriptionOptions;
|
|
2175
2275
|
}
|
|
2176
2276
|
/**
|
|
2177
2277
|
* A callback function that handles chart selection events.
|
|
@@ -2213,6 +2313,18 @@ export declare namespace chart {
|
|
|
2213
2313
|
* @i2since 1.9
|
|
2214
2314
|
*/
|
|
2215
2315
|
export type BrushSetChangeListener = (brushSet: visual.IBrushSet, applicationContents: app.IApplicationContents) => void;
|
|
2316
|
+
/**
|
|
2317
|
+
* A callback function that handles chart hover change events.
|
|
2318
|
+
*
|
|
2319
|
+
* @remarks
|
|
2320
|
+
* This callback fires when the pointer moves over a different chart element, or when it enters or leaves
|
|
2321
|
+
* all chart elements. It does not fire on every `pointermove` — only when the hovered element changes.
|
|
2322
|
+
*
|
|
2323
|
+
* @param element - The chart element now under the pointer, or `null` if the pointer has left all chart elements.
|
|
2324
|
+
* @param applicationContents - The contents of the application, including the current chart.
|
|
2325
|
+
* @i2since 1.10
|
|
2326
|
+
*/
|
|
2327
|
+
export type HoverChangeListener = (element: visual.INode | visual.IEdge | visual.IEdgeSummary | visual.INodeGroup | null, applicationContents: app.IApplicationContents) => void;
|
|
2216
2328
|
/**
|
|
2217
2329
|
* Constraints that control a view-fitting operation.
|
|
2218
2330
|
*
|
|
@@ -2264,7 +2376,7 @@ export declare namespace commands {
|
|
|
2264
2376
|
* A type for a group of actions, which determines how the group is rendered in the user interface.
|
|
2265
2377
|
* @i2since 1.9
|
|
2266
2378
|
*/
|
|
2267
|
-
export type GroupType = 'expanded' | 'collapsed' | 'command';
|
|
2379
|
+
export type GroupType = 'expanded' | 'collapsed' | 'command' | 'stacked';
|
|
2268
2380
|
/**
|
|
2269
2381
|
* A mapping of command types to their payload types.
|
|
2270
2382
|
* @i2since 1.0
|
|
@@ -2381,7 +2493,10 @@ export declare namespace commands {
|
|
|
2381
2493
|
*/
|
|
2382
2494
|
readonly icon: IIcon;
|
|
2383
2495
|
/**
|
|
2384
|
-
* Gets the identifier of the command
|
|
2496
|
+
* Gets the identifier of the command. This must be a non-empty string.
|
|
2497
|
+
*
|
|
2498
|
+
* @remarks
|
|
2499
|
+
* Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
|
|
2385
2500
|
* @i2since 1.0
|
|
2386
2501
|
*/
|
|
2387
2502
|
readonly id: CommandId;
|
|
@@ -2503,11 +2618,29 @@ export declare namespace commands {
|
|
|
2503
2618
|
* Adds the specified group of actions to the user interface.
|
|
2504
2619
|
*
|
|
2505
2620
|
* @param group - The group to add.
|
|
2621
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
|
|
2506
2622
|
* @returns An object that you can use to add actions or a further group to the new group.
|
|
2507
2623
|
* @throws `Error` if the `group` was not valid, or if a group with the same {@link commands.GroupId} was already present.
|
|
2508
2624
|
* @i2since 1.0
|
|
2509
2625
|
*/
|
|
2510
|
-
addGroup(group: IGroup): IActionArea<undefined>;
|
|
2626
|
+
addGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IActionArea<undefined>;
|
|
2627
|
+
/**
|
|
2628
|
+
* Adds a dynamic group whose commands are created on demand each time the group is opened.
|
|
2629
|
+
*
|
|
2630
|
+
* @remarks
|
|
2631
|
+
* Unlike {@link commands.IActionArea.addGroup}, the commands in a dynamic group are not created during plug-in
|
|
2632
|
+
* initialization. Instead, the {@link commands.IDynamicGroupConfigBase.onPopulate} callback is called each time the
|
|
2633
|
+
* group is opened, allowing you to create commands that reflect the current application state.
|
|
2634
|
+
*
|
|
2635
|
+
* A dynamic group renders as a popup, never inline: by default a collapsed dropdown/submenu, or — when
|
|
2636
|
+
* `config.type` is `'command'` with a `primaryCommand` — a split button whose dropdown is populated on open.
|
|
2637
|
+
*
|
|
2638
|
+
* @param config - The configuration for the dynamic group, including the `onPopulate` callback.
|
|
2639
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what payload is passed to `onPopulate` and what event API is passed to `onSurface`.
|
|
2640
|
+
* @throws `Error` if `config.id` is not a valid {@link commands.GroupId | GroupId}.
|
|
2641
|
+
* @i2since 1.10
|
|
2642
|
+
*/
|
|
2643
|
+
addDynamicGroup<TCommandType extends CommandType = CommandType>(config: IDynamicGroupConfig<TCommandType>): void;
|
|
2511
2644
|
/**
|
|
2512
2645
|
* Adds the specified group of actions to the user interface, or gets an existing group with the same identifier.
|
|
2513
2646
|
*
|
|
@@ -2517,11 +2650,12 @@ export declare namespace commands {
|
|
|
2517
2650
|
* plug-ins that want to use the same group, and these plug-ins can be deployed independently, then you should use this method.
|
|
2518
2651
|
*
|
|
2519
2652
|
* @param group - The group to add or get.
|
|
2653
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
|
|
2520
2654
|
* @returns An object that you can use to add actions or a further group to the new or existing group.
|
|
2521
2655
|
* @throws `Error` if the `group` was not valid, or if it was added before by the same plug-in.
|
|
2522
2656
|
* @i2since 1.0
|
|
2523
2657
|
*/
|
|
2524
|
-
addOrGetGroup(group: IGroup): IActionArea<undefined>;
|
|
2658
|
+
addOrGetGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IActionArea<undefined>;
|
|
2525
2659
|
/**
|
|
2526
2660
|
* Locates the area of the user interface that appears immediately after a particular action or group of actions.
|
|
2527
2661
|
*
|
|
@@ -2588,6 +2722,24 @@ export declare namespace commands {
|
|
|
2588
2722
|
* @i2since 1.0
|
|
2589
2723
|
*/
|
|
2590
2724
|
surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
|
|
2725
|
+
/**
|
|
2726
|
+
* Surfaces a detached group, created with {@link commands.ICommandApi.createGroup}, and its contents into the user interface.
|
|
2727
|
+
*
|
|
2728
|
+
* @remarks
|
|
2729
|
+
* Unlike {@link commands.IActionArea.addGroup}, which builds a group in place, `surfaceGroup` adds a group template
|
|
2730
|
+
* that you built once and can reuse. The group and its descendants are added at this area's location — use
|
|
2731
|
+
* {@link commands.IActionArea.(before:1)} or {@link commands.IActionArea.(after:1)} to position it, just as you
|
|
2732
|
+
* would when surfacing commands.
|
|
2733
|
+
*
|
|
2734
|
+
* The template's group and command identifiers are used as they are, so you can surface the same template into
|
|
2735
|
+
* different areas. Surfacing a template more than once into the same area throws, because the identifiers collide.
|
|
2736
|
+
*
|
|
2737
|
+
* @param group - The detached group template to surface.
|
|
2738
|
+
* @throws `Error` if `group` was not a group template created by {@link commands.ICommandApi.createGroup},
|
|
2739
|
+
* or if a command or group in the template was already surfaced in the area.
|
|
2740
|
+
* @i2since 1.10
|
|
2741
|
+
*/
|
|
2742
|
+
surfaceGroup(group: IGroupTemplate): void;
|
|
2591
2743
|
/**
|
|
2592
2744
|
* Gets the system groups for the action area, which you can use to specify relative locations for your actions and groups.
|
|
2593
2745
|
* @i2since 1.0
|
|
@@ -2679,7 +2831,10 @@ export declare namespace commands {
|
|
|
2679
2831
|
*/
|
|
2680
2832
|
export interface IGroupBase {
|
|
2681
2833
|
/**
|
|
2682
|
-
* Gets the identifier of the group
|
|
2834
|
+
* Gets the identifier of the group. This must be a non-empty string.
|
|
2835
|
+
*
|
|
2836
|
+
* @remarks
|
|
2837
|
+
* Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
|
|
2683
2838
|
* @i2since 1.0
|
|
2684
2839
|
*/
|
|
2685
2840
|
readonly id: GroupId;
|
|
@@ -2687,29 +2842,95 @@ export declare namespace commands {
|
|
|
2687
2842
|
* Indicates whether the group is initially expanded (`false`) or collapsed (`true`) in the user interface.
|
|
2688
2843
|
*
|
|
2689
2844
|
* @remarks
|
|
2690
|
-
* This is deprecated in favour of the more explicit {@link commands.
|
|
2845
|
+
* This is deprecated in favour of the more explicit {@link commands.IStandardGroup."type"} property.
|
|
2691
2846
|
* When migrating, use `type: 'collapsed'` instead of `isCollapsed: true`, and `type: 'expanded'` instead of
|
|
2692
2847
|
* `isCollapsed: false` or omitting the property.
|
|
2693
|
-
* @deprecated Deprecated since version 1.9. Use {@link commands.
|
|
2848
|
+
* @deprecated Deprecated since version 1.9. Use {@link commands.IStandardGroup."type"} instead.
|
|
2694
2849
|
* @i2since 1.5
|
|
2695
2850
|
*/
|
|
2696
2851
|
readonly isCollapsed?: boolean;
|
|
2697
2852
|
}
|
|
2698
2853
|
/**
|
|
2699
|
-
*
|
|
2854
|
+
* Configuration shared by the {@link commands.IGroup} variants.
|
|
2855
|
+
*
|
|
2856
|
+
* @remarks
|
|
2857
|
+
* The fields common to the non-split {@link commands.IStandardGroup} and the split-button
|
|
2858
|
+
* {@link commands.ICommandGroup}.
|
|
2859
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to {@link commands.IGroupConfigBase.onSurface}. Defaults to `'unscoped'`.
|
|
2700
2860
|
* @i2since 1.0
|
|
2701
2861
|
*/
|
|
2702
|
-
export interface
|
|
2862
|
+
export interface IGroupConfigBase<TCommandType extends CommandType = 'unscoped'> extends IGroupBase {
|
|
2703
2863
|
/**
|
|
2704
2864
|
* Gets the icon of the group, which is displayed if the group is collapsed.
|
|
2705
2865
|
* @i2since 1.0
|
|
2706
2866
|
*/
|
|
2707
2867
|
readonly icon?: IIcon;
|
|
2708
2868
|
/**
|
|
2709
|
-
* Gets the label of the group
|
|
2869
|
+
* Gets the label of the group.
|
|
2870
|
+
*
|
|
2871
|
+
* @remarks
|
|
2872
|
+
* In an application ribbon the label is shown on the group's button (if the group is collapsed or
|
|
2873
|
+
* stacked) or omitted (if the group is expanded inline).
|
|
2874
|
+
*
|
|
2875
|
+
* In popup menus, a group with a label produces a non-interactive section-header separator above
|
|
2876
|
+
* its children. Groups without a label render their children directly with no separator. By
|
|
2877
|
+
* default groups have no label; set one to opt into this visual grouping cue.
|
|
2710
2878
|
* @i2since 1.0
|
|
2711
2879
|
*/
|
|
2712
2880
|
readonly label?: string;
|
|
2881
|
+
/**
|
|
2882
|
+
* Gets the popup style for the group's trigger button.
|
|
2883
|
+
*
|
|
2884
|
+
* @remarks
|
|
2885
|
+
* Only applies to `'collapsed'` and `'command'` group types; ignored for `'expanded'` and `'stacked'`.
|
|
2886
|
+
*
|
|
2887
|
+
* When set to `'ribbon'`, the group opens a floating ribbon-style popup panel that renders its
|
|
2888
|
+
* children as ribbon sections rather than a standard dropdown menu. This is equivalent to how a
|
|
2889
|
+
* minimized ribbon tab expands as a popup.
|
|
2890
|
+
*
|
|
2891
|
+
* If omitted, the group uses a standard dropdown menu.
|
|
2892
|
+
* @i2since 1.10
|
|
2893
|
+
*/
|
|
2894
|
+
readonly popoutStyle?: 'ribbon';
|
|
2895
|
+
/**
|
|
2896
|
+
* Gets the command-context type, which determines what event API is passed to {@link commands.IGroupConfigBase.onSurface}.
|
|
2897
|
+
*
|
|
2898
|
+
* @remarks
|
|
2899
|
+
* Mirrors {@link commands.IDynamicGroupConfigBase.context} (and, by analogy, {@link commands.ICommandConfig."type"}).
|
|
2900
|
+
* Defaults to `'unscoped'`, which means {@link commands.IGroupConfigBase.onSurface} receives no event API.
|
|
2901
|
+
* @i2since 1.10
|
|
2902
|
+
*/
|
|
2903
|
+
readonly context?: TCommandType;
|
|
2904
|
+
/**
|
|
2905
|
+
* Runs when an action derived from the group is surfaced, enabling the group to configure the action in response to events.
|
|
2906
|
+
*
|
|
2907
|
+
* @remarks
|
|
2908
|
+
* Mirrors {@link commands.ICommandConfig.onSurface} but applies to groups: use the supplied
|
|
2909
|
+
* {@link commands.IGroupAction} to change the group's label, icon, or enabled/hidden state at any
|
|
2910
|
+
* time during its surfaced lifetime. The signal aborts when the group is removed from the user
|
|
2911
|
+
* interface; the optional returned cleanup function runs at the same time.
|
|
2912
|
+
*
|
|
2913
|
+
* If there is no implementation of `onSurface()`, the group renders with its static configuration
|
|
2914
|
+
* and remains enabled.
|
|
2915
|
+
*
|
|
2916
|
+
* @param groupAction - The group action being surfaced.
|
|
2917
|
+
* @param eventApi - The events that the group can subscribe to, keyed by the group's `context`.
|
|
2918
|
+
* @param signal - A signal that the application uses to tell the group that it is removing it from the user interface.
|
|
2919
|
+
*
|
|
2920
|
+
* @returns A function that the application calls when it removes the group from the user interface.
|
|
2921
|
+
* In its implementation, the group must unsubscribe from any events that it has subscribed to.
|
|
2922
|
+
* @i2since 1.10
|
|
2923
|
+
*/
|
|
2924
|
+
onSurface?(groupAction: IGroupAction, eventApi: CommandEventsMap[TCommandType], signal: AbortSignal): void | (() => void);
|
|
2925
|
+
}
|
|
2926
|
+
/**
|
|
2927
|
+
* A non-split group of actions: rendered inline (`'expanded'`), as a single dropdown button
|
|
2928
|
+
* (`'collapsed'`), or as a stacked column (`'stacked'`).
|
|
2929
|
+
*
|
|
2930
|
+
* @typeParam TCommandType - The type of the command-context for the group. Defaults to `'unscoped'`.
|
|
2931
|
+
* @i2since 1.0
|
|
2932
|
+
*/
|
|
2933
|
+
export interface IStandardGroup<TCommandType extends CommandType = 'unscoped'> extends IGroupConfigBase<TCommandType> {
|
|
2713
2934
|
/**
|
|
2714
2935
|
* Gets the render type of the group.
|
|
2715
2936
|
*
|
|
@@ -2717,12 +2938,73 @@ export declare namespace commands {
|
|
|
2717
2938
|
* Use this property to explicitly control how the group is presented in the user interface. The options are:
|
|
2718
2939
|
* - `'expanded'` - shows all commands inline (default)
|
|
2719
2940
|
* - `'collapsed'` - shows the group as a single icon/label button that opens a dropdown
|
|
2720
|
-
* - `'
|
|
2941
|
+
* - `'stacked'` - renders the group's children as a vertical column of small (icon + label) buttons that expand inline in the ribbon. A stacked group behaves like an `'expanded'` group but with a compact visual layout; it can collapse under overflow pressure. In popup menus the children render as normal menu items below the group's section-header label.
|
|
2721
2942
|
*
|
|
2943
|
+
* For a split button that exposes a primary action, use {@link commands.ICommandGroup} (`type: 'command'`).
|
|
2722
2944
|
* If `type` is specified it takes precedence over the deprecated {@link commands.IGroupBase.isCollapsed} boolean.
|
|
2723
2945
|
* @i2since 1.9
|
|
2724
2946
|
*/
|
|
2725
|
-
readonly type?:
|
|
2947
|
+
readonly type?: 'expanded' | 'collapsed' | 'stacked';
|
|
2948
|
+
/**
|
|
2949
|
+
* Gets the primary action, which is not applicable to a non-split group.
|
|
2950
|
+
*
|
|
2951
|
+
* @remarks
|
|
2952
|
+
* Use {@link commands.ICommandGroup} (`type: 'command'`) to specify a primary action.
|
|
2953
|
+
* @i2since 1.10
|
|
2954
|
+
*/
|
|
2955
|
+
readonly primaryCommand?: never;
|
|
2956
|
+
}
|
|
2957
|
+
/**
|
|
2958
|
+
* A split-button group.
|
|
2959
|
+
*
|
|
2960
|
+
* @remarks
|
|
2961
|
+
* Exposes a {@link commands.ICommandGroup.primaryCommand | primary action} alongside a menu of related
|
|
2962
|
+
* actions. In a ribbon this renders as a split button; in popup menus, as an actionable menu entry with
|
|
2963
|
+
* a submenu.
|
|
2964
|
+
* @typeParam TCommandType - The type of the command-context for the group. Defaults to `'unscoped'`.
|
|
2965
|
+
* @i2since 1.10
|
|
2966
|
+
*/
|
|
2967
|
+
export interface ICommandGroup<TCommandType extends CommandType = 'unscoped'> extends IGroupConfigBase<TCommandType> {
|
|
2968
|
+
/**
|
|
2969
|
+
* Gets the render type, always `'command'` for a split-button group.
|
|
2970
|
+
* @i2since 1.9
|
|
2971
|
+
*/
|
|
2972
|
+
readonly type: 'command';
|
|
2973
|
+
/**
|
|
2974
|
+
* Gets the group's primary (face) action, as a command or command identifier.
|
|
2975
|
+
*
|
|
2976
|
+
* @remarks
|
|
2977
|
+
* The primary action is shown on the face of the split button (in a ribbon) or as the actionable
|
|
2978
|
+
* part of the menu entry (in a popup menu). It is *not* part of the group's dropdown list — the
|
|
2979
|
+
* dropdown is formed from the group's surfaced child commands. To repeat the primary in the
|
|
2980
|
+
* dropdown, surface it as a child as well.
|
|
2981
|
+
* @i2since 1.10
|
|
2982
|
+
*/
|
|
2983
|
+
readonly primaryCommand: ICommand | CommandId;
|
|
2984
|
+
}
|
|
2985
|
+
/**
|
|
2986
|
+
* A group of actions in either the i2 Notebook application ribbon or a popup menu.
|
|
2987
|
+
*
|
|
2988
|
+
* @remarks
|
|
2989
|
+
* Either a non-split {@link commands.IStandardGroup} (inline, collapsed, or stacked) or a split-button
|
|
2990
|
+
* {@link commands.ICommandGroup} (`type: 'command'` with a `primaryCommand`). The `type` discriminates
|
|
2991
|
+
* between them, so `primaryCommand` is required exactly when `type` is `'command'`.
|
|
2992
|
+
*
|
|
2993
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its `onSurface`. Defaults to `'unscoped'`.
|
|
2994
|
+
* @i2since 1.0
|
|
2995
|
+
*/
|
|
2996
|
+
export type IGroup<TCommandType extends CommandType = 'unscoped'> = IStandardGroup<TCommandType> | ICommandGroup<TCommandType>;
|
|
2997
|
+
/**
|
|
2998
|
+
* A detached group of actions that you build once and surface into one or more areas.
|
|
2999
|
+
*
|
|
3000
|
+
* @remarks
|
|
3001
|
+
* Create a template with {@link commands.ICommandApi.createGroup}, build its contents using the inherited
|
|
3002
|
+
* {@link commands.IActionArea} methods, then add it to areas with {@link commands.IActionArea.surfaceGroup}.
|
|
3003
|
+
* Because the template carries its own group and command identifiers, a single template can be surfaced into
|
|
3004
|
+
* several areas without rebuilding it. Nothing appears in the user interface until the template is surfaced.
|
|
3005
|
+
* @i2since 1.10
|
|
3006
|
+
*/
|
|
3007
|
+
export interface IGroupTemplate extends IActionArea<undefined> {
|
|
2726
3008
|
}
|
|
2727
3009
|
/**
|
|
2728
3010
|
* A group of actions in a popup menu that do not have a label or an icon.
|
|
@@ -2731,6 +3013,255 @@ export declare namespace commands {
|
|
|
2731
3013
|
*/
|
|
2732
3014
|
export interface IMenuGroup extends IGroupBase {
|
|
2733
3015
|
}
|
|
3016
|
+
/**
|
|
3017
|
+
* Configuration shared by the {@link commands.IDynamicGroupConfig} variants.
|
|
3018
|
+
*
|
|
3019
|
+
* @remarks
|
|
3020
|
+
* The fields common to the collapsed {@link commands.IStandardDynamicGroup} and the split-button
|
|
3021
|
+
* {@link commands.ICommandDynamicGroup}.
|
|
3022
|
+
* A dynamic group solves the limitation that commands can only be created during plug-in initialization.
|
|
3023
|
+
* Instead, the {@link commands.IDynamicGroupConfigBase.onPopulate} callback is called each time the group is
|
|
3024
|
+
* opened, allowing commands to be created based on the current application state. The group's
|
|
3025
|
+
* popup-button state (label, icon, enabled, hidden) can be driven separately by an optional
|
|
3026
|
+
* {@link commands.IDynamicGroupConfigBase.onSurface} callback that runs once when the group is
|
|
3027
|
+
* surfaced on a host.
|
|
3028
|
+
*
|
|
3029
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what payload is passed to {@link commands.IDynamicGroupConfigBase.onPopulate} and what event API is passed to {@link commands.IDynamicGroupConfigBase.onSurface}.
|
|
3030
|
+
* @i2since 1.10
|
|
3031
|
+
*/
|
|
3032
|
+
export interface IDynamicGroupConfigBase<TCommandType extends CommandType = CommandType> {
|
|
3033
|
+
/**
|
|
3034
|
+
* Gets the identifier of the group. This must be a non-empty string.
|
|
3035
|
+
*
|
|
3036
|
+
* @remarks
|
|
3037
|
+
* Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
|
|
3038
|
+
* @i2since 1.10
|
|
3039
|
+
*/
|
|
3040
|
+
readonly id: GroupId;
|
|
3041
|
+
/**
|
|
3042
|
+
* Gets the label of the group, which is displayed as the button/menu-entry title.
|
|
3043
|
+
* @i2since 1.10
|
|
3044
|
+
*/
|
|
3045
|
+
readonly label: string;
|
|
3046
|
+
/**
|
|
3047
|
+
* Gets the icon of the group.
|
|
3048
|
+
* @i2since 1.10
|
|
3049
|
+
*/
|
|
3050
|
+
readonly icon?: IIcon;
|
|
3051
|
+
/**
|
|
3052
|
+
* Gets the command-context type for the group.
|
|
3053
|
+
*
|
|
3054
|
+
* @remarks
|
|
3055
|
+
* Determines what payload is passed to {@link commands.IDynamicGroupConfigBase.onPopulate} and what
|
|
3056
|
+
* event API is passed to {@link commands.IDynamicGroupConfigBase.onSurface}.
|
|
3057
|
+
* @i2since 1.10
|
|
3058
|
+
*/
|
|
3059
|
+
readonly context: TCommandType;
|
|
3060
|
+
/**
|
|
3061
|
+
* Populates the group's commands each time the group is opened.
|
|
3062
|
+
*
|
|
3063
|
+
* @remarks
|
|
3064
|
+
* May be synchronous or asynchronous. A synchronous callback creates and surfaces every
|
|
3065
|
+
* command before it returns; the host then renders the populated group. An asynchronous
|
|
3066
|
+
* callback returns a `Promise` that resolves once the contents are ready: the host opens the
|
|
3067
|
+
* group immediately with skeleton placeholder rows in place of the real items, and swaps them
|
|
3068
|
+
* in atomically when the promise resolves. If the group closes before the promise resolves
|
|
3069
|
+
* the `signal` is aborted and any surfaced commands are discarded.
|
|
3070
|
+
*
|
|
3071
|
+
* @param commandArea - A scoped area for creating and surfacing commands. Only commands created here are visible in this group.
|
|
3072
|
+
* @param context - The context based on the group's `context` field: `undefined` for `'unscoped'`, {@link commands.IRecordsContext} for `'records'`, the application object for `'application'`.
|
|
3073
|
+
* @param signal - An AbortSignal that is aborted when the group closes. Use it to cancel any async work started in this callback.
|
|
3074
|
+
* @returns An optional cleanup function that is called when the group closes, before the signal is aborted. Async callbacks may resolve with the cleanup function or with `undefined`.
|
|
3075
|
+
* @i2since 1.10
|
|
3076
|
+
*/
|
|
3077
|
+
onPopulate(commandArea: IDynamicActionArea, context: CommandPayloadMap[TCommandType], signal: AbortSignal): void | (() => void) | Promise<void | (() => void)>;
|
|
3078
|
+
/**
|
|
3079
|
+
* Runs when the dynamic group's popup button is surfaced, enabling its state to be driven from events.
|
|
3080
|
+
*
|
|
3081
|
+
* @remarks
|
|
3082
|
+
* The lifetime of this callback is the dynamic group's *button* — separate from the per-open
|
|
3083
|
+
* lifecycle of {@link commands.IDynamicGroupConfigBase.onPopulate}, which populates the popup's
|
|
3084
|
+
* contents. Use this callback to react to long-lived application state; populate the popup's
|
|
3085
|
+
* contents in `onPopulate`.
|
|
3086
|
+
*
|
|
3087
|
+
* If there is no implementation of `onSurface()`, the popup button renders with its static
|
|
3088
|
+
* configuration and remains enabled.
|
|
3089
|
+
*
|
|
3090
|
+
* @param groupAction - The group action being surfaced.
|
|
3091
|
+
* @param eventApi - The events that the group can subscribe to, keyed by the group's `context`.
|
|
3092
|
+
* @param signal - A signal that the application uses to tell the group that it is removing the popup button from the user interface.
|
|
3093
|
+
*
|
|
3094
|
+
* @returns A function that the application calls when it removes the popup button from the user interface.
|
|
3095
|
+
* In its implementation, the group must unsubscribe from any events that it has subscribed to.
|
|
3096
|
+
* @i2since 1.10
|
|
3097
|
+
*/
|
|
3098
|
+
onSurface?(groupAction: IGroupAction, eventApi: CommandEventsMap[TCommandType], signal: AbortSignal): void | (() => void);
|
|
3099
|
+
}
|
|
3100
|
+
/**
|
|
3101
|
+
* A dynamic group that renders as a collapsed dropdown/submenu, populated on open.
|
|
3102
|
+
*
|
|
3103
|
+
* @typeParam TCommandType - The type of the command-context for the group.
|
|
3104
|
+
* @i2since 1.10
|
|
3105
|
+
*/
|
|
3106
|
+
export interface IStandardDynamicGroup<TCommandType extends CommandType = CommandType> extends IDynamicGroupConfigBase<TCommandType> {
|
|
3107
|
+
/**
|
|
3108
|
+
* Gets the render type, `'collapsed'` (the default) for a dropdown/submenu.
|
|
3109
|
+
* @i2since 1.10
|
|
3110
|
+
*/
|
|
3111
|
+
readonly type?: 'collapsed';
|
|
3112
|
+
/**
|
|
3113
|
+
* Gets the primary action, which is not applicable to a collapsed dynamic group.
|
|
3114
|
+
*
|
|
3115
|
+
* @remarks
|
|
3116
|
+
* Use {@link commands.ICommandDynamicGroup} (`type: 'command'`) to specify a primary action.
|
|
3117
|
+
* @i2since 1.10
|
|
3118
|
+
*/
|
|
3119
|
+
readonly primaryCommand?: never;
|
|
3120
|
+
}
|
|
3121
|
+
/**
|
|
3122
|
+
* A dynamic split-button group: a static {@link commands.ICommandDynamicGroup.primaryCommand | primary action}
|
|
3123
|
+
* (the face) whose dropdown is populated on open.
|
|
3124
|
+
*
|
|
3125
|
+
* @typeParam TCommandType - The type of the command-context for the group.
|
|
3126
|
+
* @i2since 1.10
|
|
3127
|
+
*/
|
|
3128
|
+
export interface ICommandDynamicGroup<TCommandType extends CommandType = CommandType> extends IDynamicGroupConfigBase<TCommandType> {
|
|
3129
|
+
/**
|
|
3130
|
+
* Gets the render type, always `'command'` for a split-button dynamic group.
|
|
3131
|
+
* @i2since 1.10
|
|
3132
|
+
*/
|
|
3133
|
+
readonly type: 'command';
|
|
3134
|
+
/**
|
|
3135
|
+
* Gets the primary (face) action of the split button, as a command or command identifier.
|
|
3136
|
+
*
|
|
3137
|
+
* @remarks
|
|
3138
|
+
* It is *not* part of the dropdown, which is populated by {@link commands.IDynamicGroupConfigBase.onPopulate}.
|
|
3139
|
+
* Because the face renders before the group is ever opened, the primary command must already exist —
|
|
3140
|
+
* create it during plug-in initialization, not inside `onPopulate`.
|
|
3141
|
+
* @i2since 1.10
|
|
3142
|
+
*/
|
|
3143
|
+
readonly primaryCommand: ICommand | CommandId;
|
|
3144
|
+
}
|
|
3145
|
+
/**
|
|
3146
|
+
* Configuration for a dynamic group whose commands are created on demand when the group is opened.
|
|
3147
|
+
*
|
|
3148
|
+
* @remarks
|
|
3149
|
+
* A dynamic group renders as a popup, never inline: either a collapsed {@link commands.IStandardDynamicGroup}
|
|
3150
|
+
* dropdown/submenu, or a split-button {@link commands.ICommandDynamicGroup} (`type: 'command'` with a
|
|
3151
|
+
* `primaryCommand`). The `type` discriminates between them, so `primaryCommand` is required exactly when
|
|
3152
|
+
* `type` is `'command'`.
|
|
3153
|
+
*
|
|
3154
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what payload is passed to `onPopulate` and what event API is passed to `onSurface`.
|
|
3155
|
+
* @i2since 1.10
|
|
3156
|
+
*/
|
|
3157
|
+
export type IDynamicGroupConfig<TCommandType extends CommandType = CommandType> = IStandardDynamicGroup<TCommandType> | ICommandDynamicGroup<TCommandType>;
|
|
3158
|
+
/**
|
|
3159
|
+
* A scoped area for creating and surfacing commands within a {@link commands.IDynamicGroupConfigBase.onPopulate} callback.
|
|
3160
|
+
*
|
|
3161
|
+
* @remarks
|
|
3162
|
+
* Methods on this interface work like their equivalents on {@link commands.IActionArea}, but are scoped to the
|
|
3163
|
+
* current populate session. Commands created here exist only while the group is open and are automatically
|
|
3164
|
+
* unregistered when it closes.
|
|
3165
|
+
*
|
|
3166
|
+
* `getGroup` is restricted to groups created within the same `onPopulate` call — it throws if you pass an
|
|
3167
|
+
* external group identifier.
|
|
3168
|
+
* @i2since 1.10
|
|
3169
|
+
*/
|
|
3170
|
+
export interface IDynamicActionArea extends Pick<ICommandApi, 'createCommand'> {
|
|
3171
|
+
/**
|
|
3172
|
+
* Returns an area positioned immediately before the specified action or group.
|
|
3173
|
+
* @param idOrCommand - The command, command identifier, or group identifier to use as a reference.
|
|
3174
|
+
* @returns A scoped area positioned before the specified item.
|
|
3175
|
+
* @i2since 1.10
|
|
3176
|
+
*/
|
|
3177
|
+
before(idOrCommand: CommandId | GroupId | ICommand): IDynamicActionArea;
|
|
3178
|
+
/**
|
|
3179
|
+
* Returns an area positioned immediately after the specified action or group.
|
|
3180
|
+
* @param idOrCommand - The command, command identifier, or group identifier to use as a reference.
|
|
3181
|
+
* @returns A scoped area positioned after the specified item.
|
|
3182
|
+
* @i2since 1.10
|
|
3183
|
+
*/
|
|
3184
|
+
after(idOrCommand: CommandId | GroupId | ICommand): IDynamicActionArea;
|
|
3185
|
+
/**
|
|
3186
|
+
* Returns an area scoped to a group created during this `onPopulate` call.
|
|
3187
|
+
*
|
|
3188
|
+
* @param id - The identifier of a group created in this populate session.
|
|
3189
|
+
* @returns A scoped area for the contents of the group.
|
|
3190
|
+
* @throws `Error` if `id` refers to a group that was not created in this populate session.
|
|
3191
|
+
* @i2since 1.10
|
|
3192
|
+
*/
|
|
3193
|
+
getGroup(id: GroupId): IDynamicActionArea;
|
|
3194
|
+
/**
|
|
3195
|
+
* Adds a new group.
|
|
3196
|
+
* @param group - The group configuration.
|
|
3197
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
|
|
3198
|
+
* @returns A scoped area for the contents of the new group.
|
|
3199
|
+
* @i2since 1.10
|
|
3200
|
+
*/
|
|
3201
|
+
addGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IDynamicActionArea;
|
|
3202
|
+
/**
|
|
3203
|
+
* Adds a new group, or returns the existing one if it was already added during this `onPopulate` call.
|
|
3204
|
+
* @param group - The group configuration.
|
|
3205
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
|
|
3206
|
+
* @returns A scoped area for the contents of the new or existing group.
|
|
3207
|
+
* @i2since 1.10
|
|
3208
|
+
*/
|
|
3209
|
+
addOrGetGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IDynamicActionArea;
|
|
3210
|
+
/**
|
|
3211
|
+
* Surfaces the specified commands in the group.
|
|
3212
|
+
* @param commandsOrCommandIds - The commands or command identifiers to surface.
|
|
3213
|
+
* @i2since 1.10
|
|
3214
|
+
*/
|
|
3215
|
+
surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
|
|
3216
|
+
}
|
|
3217
|
+
/**
|
|
3218
|
+
* A representation of a group of commands in the user interface. A group action is created when a group is surfaced.
|
|
3219
|
+
*
|
|
3220
|
+
* @remarks
|
|
3221
|
+
* Group actions mirror {@link commands.IAction} for individual commands. They are passed to
|
|
3222
|
+
* {@link commands.IGroupConfigBase.onSurface} (for static groups) and {@link commands.IDynamicGroupConfigBase.onSurface}
|
|
3223
|
+
* (for the popup button of a dynamic group), allowing the group's label, icon, and enabled/hidden
|
|
3224
|
+
* state to be driven from application state.
|
|
3225
|
+
*
|
|
3226
|
+
* When a group is disabled and expanded, its immediate children are rendered as disabled too —
|
|
3227
|
+
* disabling the group is therefore a render-time cascade, not a mutation of child state.
|
|
3228
|
+
* @i2since 1.10
|
|
3229
|
+
*/
|
|
3230
|
+
export interface IGroupAction {
|
|
3231
|
+
/**
|
|
3232
|
+
* Sets the label of the group. For example, "Layouts".
|
|
3233
|
+
*
|
|
3234
|
+
* @param value - A label for the group.
|
|
3235
|
+
* @i2since 1.10
|
|
3236
|
+
*/
|
|
3237
|
+
setName(value: string): void;
|
|
3238
|
+
/**
|
|
3239
|
+
* Sets whether the group is enabled — that is, whether it is available for users to interact with.
|
|
3240
|
+
*
|
|
3241
|
+
* @remarks
|
|
3242
|
+
* When disabled and expanded, the group's immediate child actions render as disabled; when
|
|
3243
|
+
* disabled and collapsed (or a dynamic group), the popup trigger cannot be opened.
|
|
3244
|
+
*
|
|
3245
|
+
* @param value - `true` to enable the group; `false` to disable it.
|
|
3246
|
+
* @i2since 1.10
|
|
3247
|
+
*/
|
|
3248
|
+
setEnabled(value: boolean): void;
|
|
3249
|
+
/**
|
|
3250
|
+
* Sets whether the group is hidden — that is, whether it is visible to users at all.
|
|
3251
|
+
* Hidden groups do not render their container, label, or children.
|
|
3252
|
+
*
|
|
3253
|
+
* @param value - `true` to hide the group; `false` to show it.
|
|
3254
|
+
* @i2since 1.10
|
|
3255
|
+
*/
|
|
3256
|
+
setHidden(value: boolean): void;
|
|
3257
|
+
/**
|
|
3258
|
+
* Sets the icon for the group.
|
|
3259
|
+
*
|
|
3260
|
+
* @param value - An icon for the group.
|
|
3261
|
+
* @i2since 1.10
|
|
3262
|
+
*/
|
|
3263
|
+
setIcon(value: IIcon): void;
|
|
3264
|
+
}
|
|
2734
3265
|
/**
|
|
2735
3266
|
* A representation of a command in the user interface. An action is created when a command is surfaced.
|
|
2736
3267
|
* @i2since 1.0
|
|
@@ -2829,6 +3360,22 @@ export declare namespace commands {
|
|
|
2829
3360
|
* @i2since 1.0
|
|
2830
3361
|
*/
|
|
2831
3362
|
createToolViewToggleCommand(config: ICommandConfigBase, toolview: toolview.IToolView): ICommand;
|
|
3363
|
+
/**
|
|
3364
|
+
* Creates a detached group that you build once and surface into one or more areas with {@link commands.IActionArea.surfaceGroup}.
|
|
3365
|
+
*
|
|
3366
|
+
* @remarks
|
|
3367
|
+
* The returned {@link commands.IGroupTemplate} exposes the same methods as an {@link commands.IActionArea}, so you
|
|
3368
|
+
* build its contents — commands and nested groups — exactly as you would in place. Nothing is surfaced into the user
|
|
3369
|
+
* interface until you pass the template to {@link commands.IActionArea.surfaceGroup}, which you can do for several
|
|
3370
|
+
* areas to avoid rebuilding the same group structure in each one.
|
|
3371
|
+
*
|
|
3372
|
+
* @param group - The root group to create.
|
|
3373
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
|
|
3374
|
+
* @returns A detached group template that you can build on and surface.
|
|
3375
|
+
* @throws `Error` if the `group` was not valid.
|
|
3376
|
+
* @i2since 1.10
|
|
3377
|
+
*/
|
|
3378
|
+
createGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IGroupTemplate;
|
|
2832
3379
|
/**
|
|
2833
3380
|
* Unregisters and removes a command and all its actions from the application.
|
|
2834
3381
|
*
|
|
@@ -2945,7 +3492,10 @@ export declare namespace commands {
|
|
|
2945
3492
|
*/
|
|
2946
3493
|
export interface IRibbonTabConfig {
|
|
2947
3494
|
/**
|
|
2948
|
-
* Gets the identifier of the tab
|
|
3495
|
+
* Gets the identifier of the tab. This must be a non-empty string.
|
|
3496
|
+
*
|
|
3497
|
+
* @remarks
|
|
3498
|
+
* Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
|
|
2949
3499
|
* @i2since 1.6
|
|
2950
3500
|
*/
|
|
2951
3501
|
readonly id: RibbonTabId;
|
|
@@ -5582,6 +6132,11 @@ export declare namespace schema {
|
|
|
5582
6132
|
* @i2since 1.0
|
|
5583
6133
|
*/
|
|
5584
6134
|
readonly analyzeId?: AnalyzePropertyTypeId;
|
|
6135
|
+
/**
|
|
6136
|
+
* Gets the item type that the property type belongs to.
|
|
6137
|
+
* @i2since 1.10
|
|
6138
|
+
*/
|
|
6139
|
+
readonly itemType: IChartItemType;
|
|
5585
6140
|
/**
|
|
5586
6141
|
* Gets the display name of the property type.
|
|
5587
6142
|
* @i2since 1.0
|
|
@@ -6191,6 +6746,15 @@ export declare namespace visual {
|
|
|
6191
6746
|
* @i2since 1.9
|
|
6192
6747
|
*/
|
|
6193
6748
|
export type LineStyle = 'solid' | 'dashed' | 'dotted' | 'dash-dot' | 'dash-dot-dot';
|
|
6749
|
+
/**
|
|
6750
|
+
* The slot position of a badge icon on a node or edge.
|
|
6751
|
+
*
|
|
6752
|
+
* @remarks
|
|
6753
|
+
* Slots 0, 1, and 2 are trailing positions, displayed after the label of the element.
|
|
6754
|
+
* Slots 3, 4, and 5 are leading positions, displayed before the label of the element.
|
|
6755
|
+
* @i2since 1.10
|
|
6756
|
+
*/
|
|
6757
|
+
export type BadgeSlot = 0 | 1 | 2 | 3 | 4 | 5;
|
|
6194
6758
|
/**
|
|
6195
6759
|
* A label for an element.
|
|
6196
6760
|
* @i2since 1.5
|
|
@@ -6314,6 +6878,11 @@ export declare namespace visual {
|
|
|
6314
6878
|
* @i2since 1.2
|
|
6315
6879
|
*/
|
|
6316
6880
|
readonly style: IEdgeStyle;
|
|
6881
|
+
/**
|
|
6882
|
+
* Gets the edge summary that currently contains this edge, or `undefined` if the edge is not summarized.
|
|
6883
|
+
* @i2since 1.10
|
|
6884
|
+
*/
|
|
6885
|
+
readonly summary: IEdgeSummary | undefined;
|
|
6317
6886
|
}
|
|
6318
6887
|
/**
|
|
6319
6888
|
* A position on a chart surface.
|
|
@@ -6361,6 +6930,23 @@ export declare namespace visual {
|
|
|
6361
6930
|
* @i2since 1.2
|
|
6362
6931
|
*/
|
|
6363
6932
|
readonly color: IElementSetting<string>;
|
|
6933
|
+
/**
|
|
6934
|
+
* Gets the badge icons displayed on the element, in slot order.
|
|
6935
|
+
*
|
|
6936
|
+
* @remarks
|
|
6937
|
+
* The array contains one entry for each populated slot, ordered by slot number.
|
|
6938
|
+
* Empty if no badges are set on the element.
|
|
6939
|
+
* @i2since 1.10
|
|
6940
|
+
*/
|
|
6941
|
+
readonly badges: ReadonlyArray<IBadgeIcon>;
|
|
6942
|
+
/**
|
|
6943
|
+
* Gets the badge icon in the given slot.
|
|
6944
|
+
*
|
|
6945
|
+
* @param slot - The slot position to read.
|
|
6946
|
+
* @returns The badge icon in the slot, or `undefined` if the slot is empty.
|
|
6947
|
+
* @i2since 1.10
|
|
6948
|
+
*/
|
|
6949
|
+
getBadge(slot: BadgeSlot): IBadgeIcon | undefined;
|
|
6364
6950
|
}
|
|
6365
6951
|
/**
|
|
6366
6952
|
* An image for a node element.
|
|
@@ -6373,6 +6959,22 @@ export declare namespace visual {
|
|
|
6373
6959
|
*/
|
|
6374
6960
|
readonly isDefault: boolean;
|
|
6375
6961
|
}
|
|
6962
|
+
/**
|
|
6963
|
+
* A badge icon displayed alongside a node or edge in one of six slot positions.
|
|
6964
|
+
*
|
|
6965
|
+
* @remarks
|
|
6966
|
+
* Extends {@link data.IImage}, so `href` and `description` follow the same
|
|
6967
|
+
* convention as {@link visual.INodeStyle.image}. `description` is required
|
|
6968
|
+
* but may be the empty string.
|
|
6969
|
+
* @i2since 1.10
|
|
6970
|
+
*/
|
|
6971
|
+
export interface IBadgeIcon extends data.IImage {
|
|
6972
|
+
/**
|
|
6973
|
+
* Gets the slot position of the badge.
|
|
6974
|
+
* @i2since 1.10
|
|
6975
|
+
*/
|
|
6976
|
+
readonly slot: BadgeSlot;
|
|
6977
|
+
}
|
|
6376
6978
|
/**
|
|
6377
6979
|
* A style for a node, which affects its appearance.
|
|
6378
6980
|
* @i2since 1.0
|
|
@@ -6476,6 +7078,47 @@ export declare namespace visual {
|
|
|
6476
7078
|
* @i2since 1.6
|
|
6477
7079
|
*/
|
|
6478
7080
|
readonly edges: data.IKeyedReadOnlyCollection<ElementId, IEdge>;
|
|
7081
|
+
/**
|
|
7082
|
+
* Gets the effective style of the edge summary line.
|
|
7083
|
+
*
|
|
7084
|
+
* @remarks
|
|
7085
|
+
* Each attribute defaults to a value computed from the member edges (for example, the
|
|
7086
|
+
* shared color of all members, or `undefined` if the members disagree). A plug-in can
|
|
7087
|
+
* override any attribute through {@link app.IEdgeSummaryEditor | editEdgeSummary(...)};
|
|
7088
|
+
* the override takes precedence over the computed value.
|
|
7089
|
+
*
|
|
7090
|
+
* {@link visual.IElementSetting.isDefault | isDefault} is `true` when the computed value
|
|
7091
|
+
* is in effect, and `false` when an override is. The returned object is a live view.
|
|
7092
|
+
* @i2since 1.10
|
|
7093
|
+
*/
|
|
7094
|
+
readonly style: IEdgeSummaryStyle;
|
|
7095
|
+
}
|
|
7096
|
+
/**
|
|
7097
|
+
* The effective style of an edge summary line.
|
|
7098
|
+
* @i2since 1.10
|
|
7099
|
+
*/
|
|
7100
|
+
export interface IEdgeSummaryStyle {
|
|
7101
|
+
/**
|
|
7102
|
+
* Gets the color of the edge summary line.
|
|
7103
|
+
* @i2since 1.10
|
|
7104
|
+
*/
|
|
7105
|
+
readonly color: IElementSetting<string>;
|
|
7106
|
+
/**
|
|
7107
|
+
* Gets the width of the edge summary line.
|
|
7108
|
+
* @i2since 1.10
|
|
7109
|
+
*/
|
|
7110
|
+
readonly width: IElementSetting<number>;
|
|
7111
|
+
/**
|
|
7112
|
+
* Gets the line style of the edge summary line.
|
|
7113
|
+
* @i2since 1.10
|
|
7114
|
+
*/
|
|
7115
|
+
readonly lineStyle: IElementSetting<LineStyle>;
|
|
7116
|
+
/**
|
|
7117
|
+
* Gets the direction of the edge summary line, expressed relative to the natural direction
|
|
7118
|
+
* implied by its 'from' and 'to' ends.
|
|
7119
|
+
* @i2since 1.10
|
|
7120
|
+
*/
|
|
7121
|
+
readonly direction: IElementSetting<data.LinkDirection>;
|
|
6479
7122
|
}
|
|
6480
7123
|
/**
|
|
6481
7124
|
* A node group, which is a collection of nodes that can be moved and selected together.
|