@i2analyze/notebook-sdk 1.1.0-dev.22 → 1.1.0-dev.25

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @i2analyze/notebook-sdk
2
2
 
3
+ ## 1.1.0-dev.25
4
+
5
+ ### Minor Changes
6
+
7
+ - Add Expand to system commands.
8
+
9
+ ## 1.1.0-dev.24
10
+
11
+ ### Minor Changes
12
+
13
+ - Update return type for TransactionHandler to be void|Promise<void>.
14
+
15
+ ## 1.1.0-dev.23
16
+
17
+ ### Minor Changes
18
+
19
+ - Add PropertySpecifier and ensurePropertiesFetched API
20
+
3
21
  ## 1.1.0-dev.22
4
22
 
5
23
  ### Minor Changes
@@ -299,10 +299,10 @@ export declare namespace app {
299
299
  */
300
300
  export type SelectionOption = 'addRecordsToSelection' | 'setSelectionToRecords' | 'setSelectionToNewRecords';
301
301
  /**
302
- * A common specifier for record properties used to pass record properties when adding or editing a record.
302
+ * A common specifier for record properties, for use in mutation APIs.
303
303
  * @i2since 1.1
304
304
  */
305
- export type RecordPropertiesSpecifier = Record<schema.ChartPropertyTypeId, data.PropertyValue> | Iterable<[schema.IChartPropertyType | schema.ChartPropertyTypeId, data.PropertyValue]>;
305
+ export type RecordPropertiesSpecifier = Record<schema.ChartPropertyTypeId, data.PropertyValue> | Iterable<[schema.PropertyTypeSpecifier, data.PropertyValue]>;
306
306
  /**
307
307
  * A set of data that is common to creating records of all types.
308
308
  * @i2since 1.1
@@ -673,20 +673,20 @@ export declare namespace app {
673
673
  */
674
674
  readonly valueFactory: IValueFactory;
675
675
  /**
676
- * Creates an entity record that will be added to the chart when the mutation is committed.
676
+ * Creates an entity record that is added to the chart on committal.
677
677
  *
678
678
  * @param recordTemplate - The data from which to create the record.
679
679
  * @param hints - A TODO.
680
- * @returns The new, "pending" record.
680
+ * @returns The new, pending record.
681
681
  * @i2since 1.1
682
682
  */
683
683
  addEntityRecord(recordTemplate: IChartEntityRecordData, hints?: TODO): IPendingRecord;
684
684
  /**
685
- * Creates a link record that will be added to the chart when the mutation is committed.
685
+ * Creates a link record that is added to the chart on committal.
686
686
  *
687
687
  * @param recordTemplate - The data from which to create the record.
688
688
  * @param hints - A TODO.
689
- * @returns The new, "pending" record.
689
+ * @returns The new, pending record.
690
690
  * @i2since 1.1
691
691
  */
692
692
  addLinkRecord(recordTemplate: IChartLinkRecordData, hints?: TODO): IPendingRecord;
@@ -896,7 +896,7 @@ export declare namespace app {
896
896
  * This function _must not_ maintain references to charts or any of their objects after the work completes.
897
897
  * @i2since 1.0
898
898
  */
899
- export type TransactionHandler = (applicationContents: IApplicationContents) => void;
899
+ export type TransactionHandler = (applicationContents: IApplicationContents) => void | Promise<void>;
900
900
  /**
901
901
  * The contents of the i2 Notebook application.
902
902
  * @i2since 1.0
@@ -1151,6 +1151,21 @@ export declare namespace chart {
1151
1151
  * @i2since 1.0
1152
1152
  */
1153
1153
  readonly selection: ISelection;
1154
+ /**
1155
+ * Fetches property values from the server of the specified types for the specified records, if they have not previously been fetched.
1156
+ *
1157
+ * @remarks
1158
+ * Some property values might not be fetched immediately from the server, due to size or other factors.
1159
+ * The property values that this method fetches become "unfetched" on subsequent record updates by the server.
1160
+ * See also the `hasUnfetchedProperties`, `isValueUnfetched()`, and `getUnfetchedPropertyTypes()` members of {@link records.IChartRecordBase}.
1161
+ *
1162
+ * @param records - The records to update with fetched property values.
1163
+ * @param propertyTypes - The types of the properties whose values are to be fetched if necessary.
1164
+ * @param signal - A signal that the application uses to abort the operation.
1165
+ * @returns A promise that is fulfilled if the work completes successfully, or rejected if there is a problem performing it.
1166
+ * @i2since 1.1
1167
+ */
1168
+ ensurePropertiesFetched(records: app.RecordSpecifier | Iterable<app.RecordSpecifier>, propertyTypes: schema.PropertyTypeSpecifier | Iterable<schema.PropertyTypeSpecifier>, signal?: AbortSignal): Promise<void>;
1154
1169
  }
1155
1170
  /**
1156
1171
  * A change that has occurred to the data in a chart.
@@ -2013,6 +2028,11 @@ export declare namespace commands {
2013
2028
  * @i2since 1.1
2014
2029
  */
2015
2030
  readonly saveChart: CommandId;
2031
+ /**
2032
+ * Gets the identifier of the system command that expands the current selection.
2033
+ * @i2since 1.1
2034
+ */
2035
+ readonly expand: CommandId;
2016
2036
  }
2017
2037
  /**
2018
2038
  * A lookup table for the group identifiers of the default system action groups.
@@ -2945,7 +2965,7 @@ export declare namespace records {
2945
2965
  * @returns The property value or, if not present, `undefined`.
2946
2966
  * @i2since 1.0
2947
2967
  */
2948
- getProperty(propertyType: schema.IChartPropertyType | schema.ChartPropertyTypeId): data.PropertyValue | data.IValueNotFetched | undefined;
2968
+ getProperty(propertyType: schema.PropertyTypeSpecifier): data.PropertyValue | data.IValueNotFetched | undefined;
2949
2969
  /**
2950
2970
  * Tests whether the record is an entity record; functions as a TypeScript typeguard.
2951
2971
  *
@@ -3555,6 +3575,11 @@ export declare namespace schema {
3555
3575
  * @i2since 1.0
3556
3576
  */
3557
3577
  export type AnalyzePropertyTypeId = string;
3578
+ /**
3579
+ * A specifier for a property type.
3580
+ * @i2since 1.1
3581
+ */
3582
+ export type PropertyTypeSpecifier = ChartPropertyTypeId | IChartPropertyType;
3558
3583
  /**
3559
3584
  * A property type.
3560
3585
  * @i2since 1.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.1.0-dev.22",
3
+ "version": "1.1.0-dev.25",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {