@i2analyze/notebook-sdk 1.9.0-dev.3 → 1.9.0-dev.4

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.
@@ -2473,47 +2473,6 @@ export declare namespace commands {
2473
2473
  * @i2since 1.0
2474
2474
  */
2475
2475
  surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
2476
- /**
2477
- * Adds a dynamic group whose commands are determined at runtime based on the current application state.
2478
- *
2479
- * @remarks
2480
- * Dynamic groups allow commands to be created and surfaced at runtime, when the group is displayed
2481
- * from a menu or ribbon popup. The group's `onSurface` callback is invoked when the group needs to
2482
- * be rendered, and receives the current context along with a scoped {@link commands.IDynamicActionArea}
2483
- * for creating and positioning commands.
2484
- *
2485
- * Commands created within a dynamic group are transient - they exist only while the group is visible
2486
- * and are automatically cleaned up when the group is removed from the surface.
2487
- *
2488
- * @example
2489
- * ```typescript
2490
- * // Add a dynamic group to the chart item popup menu
2491
- * api.commands.chartItemPopupMenu.addDynamicGroup({
2492
- * id: 'context-actions',
2493
- * label: 'Context Actions',
2494
- * type: 'records',
2495
- * onSurface: (commandArea, context, signal) => {
2496
- * // Create commands based on current selection
2497
- * const entityCount = context.entityRecords.count;
2498
- * if (entityCount > 0) {
2499
- * const cmd = commandArea.createCommand({
2500
- * id: 'process-selected',
2501
- * name: `Process ${entityCount} selected items`,
2502
- * type: 'records',
2503
- * onExecute: (payload) => { /* ... *\/ }
2504
- * });
2505
- * commandArea.surfaceCommands(cmd);
2506
- * }
2507
- * }
2508
- * });
2509
- * ```
2510
- *
2511
- * @typeParam TCommandType - The type of commands in this group, which determines the context passed to `onSurface`.
2512
- * @param config - The configuration for the dynamic group.
2513
- * @throws `Error` if the configuration is invalid or a group with the same identifier already exists.
2514
- * @i2since 1.9
2515
- */
2516
- addDynamicGroup<TCommandType extends CommandType = CommandType>(config: IDynamicGroupConfig<TCommandType>): void;
2517
2476
  /**
2518
2477
  * Gets the system groups for the action area, which you can use to specify relative locations for your actions and groups.
2519
2478
  * @i2since 1.0
@@ -2638,128 +2597,6 @@ export declare namespace commands {
2638
2597
  */
2639
2598
  export interface IMenuGroup extends IGroupBase {
2640
2599
  }
2641
- /**
2642
- * Configuration for a dynamic group whose contents is determined at runtime.
2643
- *
2644
- * @typeParam TCommandType - The type of commands in this group, which determines the context passed to `onSurface`.
2645
- * @i2since 1.9
2646
- */
2647
- export interface IDynamicGroupConfig<TCommandType extends CommandType = CommandType> {
2648
- /**
2649
- * Gets the identifier of the group, which should be a GUID.
2650
- * @i2since 1.9
2651
- */
2652
- readonly id: GroupId;
2653
- /**
2654
- * Gets the label of the group, which is displayed to users.
2655
- *
2656
- * @remarks
2657
- * The label appears in popup menus and submenus, and also as the label for ribbon buttons
2658
- * that open a pop-out menu.
2659
- *
2660
- * @i2since 1.9
2661
- */
2662
- readonly label: string;
2663
- /**
2664
- * Gets the icon of the group, which is displayed in the user interface.
2665
- * @i2since 1.9
2666
- */
2667
- readonly icon?: IIcon;
2668
- /**
2669
- * Gets the type of context that is passed to the `onSurface` callback.
2670
- *
2671
- * @remarks
2672
- * The value `'unscoped'` means no context (the context parameter is `undefined`).
2673
- * The value `'records'` provides a chart selection records context ({@link commands.IRecordsContext}).
2674
- * The value `'application'` provides the full application contents context ({@link app.IApplicationContents}).
2675
- *
2676
- * @i2since 1.9
2677
- */
2678
- readonly type: TCommandType;
2679
- /**
2680
- * Invokes a callback when the group needs to be rendered in the user interface.
2681
- *
2682
- * @remarks
2683
- * Receives a scoped {@link commands.IDynamicActionArea} for creating and surfacing commands.
2684
- * Commands created in this callback are transient and exist only while the group is visible.
2685
- * They are automatically unregistered when the group is removed from the surface.
2686
- *
2687
- * The `signal` parameter fires when the group is being removed, allowing you to cancel pending
2688
- * async operations or clean up resources.
2689
- *
2690
- * @param commandArea - A scoped action area for creating and positioning commands within this group.
2691
- * @param context - The context based on the group type, determined by {@link commands.CommandPayloadMap}.
2692
- * @param signal - An `AbortSignal` that fires when the group is removed from the surface.
2693
- * @returns An optional cleanup function that is called when the group is removed.
2694
- * @i2since 1.9
2695
- */
2696
- onSurface(commandArea: IDynamicActionArea, context: CommandPayloadMap[TCommandType], signal: AbortSignal): void | (() => void);
2697
- }
2698
- /**
2699
- * A scoped action area for creating and positioning commands within a dynamic group.
2700
- *
2701
- * @remarks
2702
- * This interface is provided to the `onSurface` callback of {@link commands.IDynamicGroupConfig}.
2703
- * It allows you to create commands and organize them within the dynamic group using positioning
2704
- * methods like `before`, `after`, and `getGroup`.
2705
- *
2706
- * Commands created through this area are automatically cleaned up when the dynamic group is removed
2707
- * from the surface.
2708
- *
2709
- * @i2since 1.9
2710
- */
2711
- export interface IDynamicActionArea extends Pick<ICommandApi, 'createCommand'> {
2712
- /**
2713
- * Locates the area of the user interface that appears immediately before a particular action or group of actions.
2714
- *
2715
- * @param idOrCommand - The identifier of the action or group to use as a reference, or a command object.
2716
- * @returns An object that you can use to add actions or a group to the located area.
2717
- * @i2since 1.9
2718
- */
2719
- before(idOrCommand: CommandId | GroupId | ICommand): IDynamicActionArea;
2720
- /**
2721
- * Locates the area of the user interface that appears immediately after a particular action or group of actions.
2722
- *
2723
- * @param idOrCommand - The identifier of the action or group to use as a reference, or a command object.
2724
- * @returns An object that you can use to add actions or a group to the located area.
2725
- * @i2since 1.9
2726
- */
2727
- after(idOrCommand: CommandId | GroupId | ICommand): IDynamicActionArea;
2728
- /**
2729
- * Locates the area of the user interface that is occupied by a particular group of actions.
2730
- *
2731
- * @param id - The identifier of the group to use as a reference.
2732
- * @returns An action area representing the specified group.
2733
- * @i2since 1.9
2734
- */
2735
- getGroup(id: GroupId): IDynamicActionArea;
2736
- /**
2737
- * Adds the specified group of actions to the user interface.
2738
- *
2739
- * @param group - The group to add.
2740
- * @returns An object that you can use to add actions or a further group to the new group.
2741
- * @i2since 1.9
2742
- */
2743
- addGroup(group: IGroup): IDynamicActionArea;
2744
- /**
2745
- * Adds the specified group of actions to the user interface, or gets an existing group with the same identifier.
2746
- *
2747
- * @param group - The group to add or get.
2748
- * @returns An object that you can use to add actions or a further group to the new or existing group.
2749
- * @i2since 1.9
2750
- */
2751
- addOrGetGroup(group: IGroup): IDynamicActionArea;
2752
- /**
2753
- * Adds actions for the specified registered commands to the user interface.
2754
- *
2755
- * @remarks
2756
- * When you surface multiple commands, the actions are added to the user interface in the same order as you specify them.
2757
- *
2758
- * @param commandsOrCommandIds - The registered commands, or the identifiers of the commands, to surface.
2759
- * @i2since 1.9
2760
- */
2761
- surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
2762
- }
2763
2600
  /**
2764
2601
  * A representation of a command in the user interface. An action is created when a command is surfaced.
2765
2602
  * @i2since 1.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.9.0-dev.3",
3
+ "version": "1.9.0-dev.4",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {