@i2analyze/notebook-sdk 1.4.0-dev.6 → 1.4.0-dev.7

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.
@@ -120,7 +120,7 @@ export declare namespace app {
120
120
  */
121
121
  runUntrackedMutations(mutationHandler: UntrackedMutationHandler, options?: ITransactionOptions): void;
122
122
  /**
123
- * Gets the command identifiers of the default system dialog actions.
123
+ * Gets the identifiers of the system dialog actions.
124
124
  * @i2since 1.4
125
125
  */
126
126
  readonly systemActions: dialog.ISystemDialogActions;
@@ -3050,7 +3050,8 @@ export declare namespace data {
3050
3050
  }
3051
3051
 
3052
3052
  /**
3053
- * The members of the `dialog` namespace enable you to open the dialog over the application that you write for your plug-ins with the i2 Notebook application.
3053
+ * The members of the `dialog` namespace enable you to create and display dialog windows from your plug-ins
3054
+ * that are modal with respect to the whole i2 Notebook application.
3054
3055
  *
3055
3056
  * @public
3056
3057
  * @i2since 1.4
@@ -3062,33 +3063,33 @@ export declare namespace dialog {
3062
3063
  */
3063
3064
  export type DialogSize = 'small' | 'medium' | 'large';
3064
3065
  /**
3065
- * An identifier of dialog action.
3066
+ * An identifier of a dialog action.
3066
3067
  * @i2since 1.4
3067
3068
  */
3068
3069
  export type DialogActionId = string;
3069
3070
  /**
3070
- * A set of information to create dialog action button.
3071
+ * A set of information for creating or modifying a dialog action.
3071
3072
  * @i2since 1.4
3072
3073
  */
3073
- export interface IDialogAction {
3074
+ export interface IDialogActionConfig {
3074
3075
  /**
3075
- * Indicates the visibility state of the action button.
3076
+ * Indicates whether the action is enabled.
3076
3077
  * @i2since 1.4
3077
3078
  */
3078
- enabled?: boolean;
3079
+ readonly enabled?: boolean;
3079
3080
  /**
3080
- * Gets the value to show in the action button.
3081
+ * Gets the label for the action.
3081
3082
  * @i2since 1.4
3082
3083
  */
3083
- label?: string;
3084
+ readonly label?: string;
3084
3085
  }
3085
3086
  /**
3086
- * A Basic set of information to create dialog action button.
3087
+ * An action for a dialog window.
3087
3088
  * @i2since 1.4
3088
3089
  */
3089
- export interface IDialogActionConfig extends IDialogAction {
3090
+ export interface IDialogAction extends IDialogActionConfig {
3090
3091
  /**
3091
- * Gets the identifier of the dialog action.
3092
+ * Gets the identifier of the action.
3092
3093
  * @i2since 1.4
3093
3094
  */
3094
3095
  readonly id: DialogActionId;
@@ -3096,7 +3097,7 @@ export declare namespace dialog {
3096
3097
  /**
3097
3098
  * A set of information for creating a dialog.
3098
3099
  *
3099
- * @typeParam TInitialize - The type of data to populate the dialog content.
3100
+ * @typeParam TInitialize - The type of the data that's used for populating the dialog when it's displayed.
3100
3101
  * @i2since 1.4
3101
3102
  */
3102
3103
  export interface IDialogConfig<TInitialize> {
@@ -3106,7 +3107,7 @@ export declare namespace dialog {
3106
3107
  */
3107
3108
  readonly name: string;
3108
3109
  /**
3109
- * Gets the path to the content to host the dialog content, relative to the plug-in entry point.
3110
+ * Gets the path to the content to host in the dialog, relative to the plug-in entry point.
3110
3111
  *
3111
3112
  * @remarks
3112
3113
  * For example, if `path` is '`./`', then the server uses the folder that contains the entry point.
@@ -3119,55 +3120,55 @@ export declare namespace dialog {
3119
3120
  */
3120
3121
  readonly size: DialogSize;
3121
3122
  /**
3122
- * Gets the information that required to create the dialog content.
3123
+ * Gets the data for populating the dialog when it's first displayed.
3123
3124
  *
3124
- * @typeParam TInitialize - The type of data to populate the dialog content.
3125
+ * @typeParam TInitialize - The type of the data that's used for populating the dialog.
3125
3126
  * @i2since 1.4
3126
3127
  */
3127
3128
  readonly initialValue?: TInitialize;
3128
3129
  /**
3129
- * Gets the information to show the button like OK, Cancel.
3130
+ * Gets the action buttons that appear at the bottom of the dialog, below the content.
3130
3131
  *
3131
3132
  * @i2since 1.4
3132
3133
  */
3133
- readonly actions: (IDialogActionConfig | DialogActionId)[];
3134
+ readonly actions: (DialogActionId | IDialogAction)[];
3134
3135
  }
3135
3136
  /**
3136
- * A collection of methods and properties that allow plug-in dialog to interact with i2 Notebook.
3137
+ * A collection of methods and properties that allow plug-in dialogs to interact with i2 Notebook.
3137
3138
  *
3138
3139
  * @i2since 1.4
3139
3140
  */
3140
3141
  export interface IDialogApi extends app.IApplication {
3141
3142
  /**
3142
- * Updates the dialog action buttons it could be label or visibility.
3143
+ * Updates the label or the enabled state of the specified dialog action.
3143
3144
  *
3144
- * @param id - An id of action which needs to be updated.
3145
- * @param action - An updated action.
3145
+ * @param id - The identifier of the action to update.
3146
+ * @param config - The new configuration for the specified action.
3146
3147
  * @i2since 1.4
3147
3148
  */
3148
- updateAction(id: DialogActionId, action: IDialogAction): void;
3149
+ updateAction(id: DialogActionId, config: IDialogActionConfig): void;
3149
3150
  /**
3150
- * Submits the committed value and close the dialog.
3151
+ * Submits and closes the dialog.
3151
3152
  *
3152
- * @param value - A value that is committed/expected when the dialog is closed.
3153
- * @typeParam TResult - The type of data when the dialog is submitted.
3153
+ * @param value - The value that's submitted when the dialog is closed.
3154
+ * @typeParam TResult - The type of the data that the dialog returns.
3154
3155
  * @i2since 1.4
3155
3156
  */
3156
3157
  submitAndClose<TResult>(value: TResult): void;
3157
3158
  /**
3158
- * Closes the dialog.
3159
+ * Closes the dialog without submitting it.
3159
3160
  *
3160
3161
  * @i2since 1.4
3161
3162
  */
3162
3163
  close(): void;
3163
3164
  /**
3164
- * Gets the information that required to create the dialog content.
3165
+ * Gets the data for populating the dialog when it's displayed.
3165
3166
  *
3166
- * @typeParam TInitialize - The type of data to populate the dialog content.
3167
- * @returns A value to populate the dialog content.
3167
+ * @typeParam TInitialize - The type of the data for populating the dialog.
3168
+ * @returns See above.
3168
3169
  * @i2since 1.4
3169
3170
  */
3170
- getInitiaValue<TInitialize>(): TInitialize;
3171
+ getInitialValue<TInitialize>(): TInitialize;
3171
3172
  /**
3172
3173
  * Adds a listener for events that might affect the dialog.
3173
3174
  *
@@ -3212,17 +3213,14 @@ export declare namespace dialog {
3212
3213
  readonly action: app.ITransactionOptions;
3213
3214
  }
3214
3215
  /**
3215
- * A callback function that handles dialog action button events.
3216
+ * A callback function that handles dialog action events.
3216
3217
  *
3217
- * @remarks
3218
- * Typically, this listener receieves an event after action button is clicked.
3219
- *
3220
- * @param actionId - An identifier of the action button which is clicked
3218
+ * @param actionId - The identifier of the clicked button.
3221
3219
  * @i2since 1.4
3222
3220
  */
3223
3221
  export type DialogActionListener = (actionId: DialogActionId) => void;
3224
3222
  /**
3225
- * A lookup table for the dialog action identifiers of the default actions.
3223
+ * A lookup table for the identifiers of the standard dialog action.
3226
3224
  * @i2since 1.4
3227
3225
  */
3228
3226
  export interface ISystemDialogActions {
@@ -3230,17 +3228,17 @@ export declare namespace dialog {
3230
3228
  * Gets the identifier of the "submit" action.
3231
3229
  * @i2since 1.4
3232
3230
  */
3233
- submit: DialogActionId;
3231
+ readonly submit: DialogActionId;
3234
3232
  /**
3235
3233
  * Gets the identifier of the "cancel" action.
3236
3234
  * @i2since 1.4
3237
3235
  */
3238
- cancel: DialogActionId;
3236
+ readonly cancel: DialogActionId;
3239
3237
  /**
3240
3238
  * Gets the identifier of the "close" action.
3241
3239
  * @i2since 1.4
3242
3240
  */
3243
- close: DialogActionId;
3241
+ readonly close: DialogActionId;
3244
3242
  }
3245
3243
  }
3246
3244
 
@@ -3323,11 +3321,11 @@ export declare interface IEntryPointApi extends app.IApplication {
3323
3321
  */
3324
3322
  createToolView(config: toolview.IToolViewConfig): toolview.IToolView;
3325
3323
  /**
3326
- * Opens a dialog with specified configuration.
3324
+ * Creates and displays a modal dialog with the specified configuration.
3327
3325
  *
3328
- * @param config - The information to create a modal dialog.
3329
- * @typeParam TResult - The type of data when the dialog is submitted.
3330
- * @typeParam TInitialize - The type of data to populate the dialog content.
3326
+ * @param config - The information for creating the dialog, including its size and its buttons.
3327
+ * @typeParam TResult - The type of the data that the dialog returns when it's submitted.
3328
+ * @typeParam TInitialize - The type of the data that's used to populate the dialog when it's displayed.
3331
3329
  * @returns The value submitted from the dialog.
3332
3330
  * @i2since 1.4
3333
3331
  */
@@ -4661,11 +4659,11 @@ export declare namespace toolview {
4661
4659
  */
4662
4660
  removeEventListener<K extends keyof ToolViewApiEventMap>(type: K, listener: ToolViewApiEventMap[K]): void;
4663
4661
  /**
4664
- * Opens a dialog with specified configuration.
4662
+ * Creates and displays a modal dialog with the specified configuration.
4665
4663
  *
4666
- * @param config - The information to create a modal dialog.
4667
- * @typeParam TResult - The type of data when the dialog is submitted.
4668
- * @typeParam TInitialize - The type of data to populate the dialog content.
4664
+ * @param config - The information for creating the dialog, including its size and its buttons.
4665
+ * @typeParam TResult - The type of the data that the dialog returns when it's submitted.
4666
+ * @typeParam TInitialize - The type of the data that's used for populating the dialog when it's displayed.
4669
4667
  * @returns The value submitted from the dialog.
4670
4668
  * @i2since 1.4
4671
4669
  */
package/lib/index.js CHANGED
@@ -39,7 +39,6 @@ export function getToolViewApi() {
39
39
  scan();
40
40
  });
41
41
  }
42
- //TODO: DOCs REVIEW
43
42
  /**
44
43
  * Retrieves the plug-in dialog API.
45
44
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.4.0-dev.6",
3
+ "version": "1.4.0-dev.7",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {