@itwin/editor-common 3.6.0-dev.8 → 4.0.0-dev.2

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,6 +1,31 @@
1
1
  # Change Log - @itwin/editor-common
2
2
 
3
- This log was last generated on Wed, 07 Dec 2022 19:12:37 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 26 Jan 2023 22:53:27 GMT and should not be manually modified.
4
+
5
+ ## 3.5.5
6
+ Thu, 26 Jan 2023 22:53:27 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 3.5.4
11
+ Wed, 18 Jan 2023 15:27:15 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 3.5.3
16
+ Fri, 13 Jan 2023 17:23:07 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 3.5.2
21
+ Wed, 11 Jan 2023 16:46:30 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 3.5.1
26
+ Thu, 15 Dec 2022 16:38:29 GMT
27
+
28
+ _Version update only_
4
29
 
5
30
  ## 3.5.0
6
31
  Wed, 07 Dec 2022 19:12:37 GMT
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright © 2017-2022 Bentley Systems, Incorporated. All rights reserved.
3
+ Copyright © 2017-2023 Bentley Systems, Incorporated. All rights reserved.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -2,14 +2,38 @@
2
2
  * @module Editing
3
3
  */
4
4
  /** @internal */
5
- export declare const editorChannel = "editor";
6
- /** @alpha */
5
+ export declare const editorIpcStrings: {
6
+ readonly channel: "editor";
7
+ readonly commandBusy: "EditCommandBusy";
8
+ };
9
+ /**
10
+ * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.
11
+ * @beta
12
+ */
7
13
  export interface EditorIpc {
14
+ /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.
15
+ * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === "", the current command is
16
+ * requested to finish but no new EditCommand is started.
17
+ * @param iModelKey the key that identifies the iModel that the EditCommand modifies.
18
+ * @param args arguments passed to the constructor of the new `EditCommand`
19
+ * @return the value returned by the new `EditCommand`'s `onStart` method.
20
+ * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`
21
+ * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies
22
+ * the work it is performing for `EditTools.busyHandler` to retry and/or display.
23
+ */
8
24
  startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;
25
+ /** Call a method on the currently active `EditCommand` and return its value.
26
+ * @param name the name of the method to invoke.
27
+ * @param args arguments passed to the method.
28
+ * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */
9
29
  callMethod: (name: string, ...args: any[]) => Promise<any>;
10
30
  }
11
- /** @alpha */
31
+ /**
32
+ * Interface implemented by all backend `EditCommands`.
33
+ * @beta
34
+ */
12
35
  export interface EditCommandIpc {
36
+ /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */
13
37
  ping: () => Promise<{
14
38
  commandId: string;
15
39
  version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorIpc.d.ts","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,aAAa;AACb,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACrF,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5D;AAED,aAAa;AACb,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;CACtF"}
1
+ {"version":3,"file":"EditorIpc.d.ts","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,SAAS;IAExB;;;;;;;;;OASG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAErF;;;6IAGyI;IACzI,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5D;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,iIAAiI;IACjI,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;CACtF"}
@@ -7,7 +7,10 @@
7
7
  * @module Editing
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.editorChannel = void 0;
10
+ exports.editorIpcStrings = void 0;
11
11
  /** @internal */
12
- exports.editorChannel = "editor";
12
+ exports.editorIpcStrings = {
13
+ channel: "editor",
14
+ commandBusy: "EditCommandBusy",
15
+ };
13
16
  //# sourceMappingURL=EditorIpc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gBAAgB;AACH,QAAA,aAAa,GAAG,QAAQ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\n/** @internal */\r\nexport const editorChannel = \"editor\";\r\n\r\n/** @alpha */\r\nexport interface EditorIpc {\r\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\r\n callMethod: (name: string, ...args: any[]) => Promise<any>;\r\n}\r\n\r\n/** @alpha */\r\nexport interface EditCommandIpc {\r\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\r\n}\r\n"]}
1
+ {"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gBAAgB;AACH,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,iBAAiB;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\n/** @internal */\r\nexport const editorIpcStrings = {\r\n channel: \"editor\",\r\n commandBusy: \"EditCommandBusy\",\r\n} as const;\r\n\r\n/**\r\n * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.\r\n * @beta\r\n */\r\nexport interface EditorIpc {\r\n\r\n /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.\r\n * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === \"\", the current command is\r\n * requested to finish but no new EditCommand is started.\r\n * @param iModelKey the key that identifies the iModel that the EditCommand modifies.\r\n * @param args arguments passed to the constructor of the new `EditCommand`\r\n * @return the value returned by the new `EditCommand`'s `onStart` method.\r\n * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`\r\n * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies\r\n * the work it is performing for `EditTools.busyHandler` to retry and/or display.\r\n */\r\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\r\n\r\n /** Call a method on the currently active `EditCommand` and return its value.\r\n * @param name the name of the method to invoke.\r\n * @param args arguments passed to the method.\r\n * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */\r\n callMethod: (name: string, ...args: any[]) => Promise<any>;\r\n}\r\n\r\n/**\r\n * Interface implemented by all backend `EditCommands`.\r\n * @beta\r\n */\r\nexport interface EditCommandIpc {\r\n /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */\r\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\r\n}\r\n"]}
@@ -2,14 +2,38 @@
2
2
  * @module Editing
3
3
  */
4
4
  /** @internal */
5
- export declare const editorChannel = "editor";
6
- /** @alpha */
5
+ export declare const editorIpcStrings: {
6
+ readonly channel: "editor";
7
+ readonly commandBusy: "EditCommandBusy";
8
+ };
9
+ /**
10
+ * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.
11
+ * @beta
12
+ */
7
13
  export interface EditorIpc {
14
+ /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.
15
+ * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === "", the current command is
16
+ * requested to finish but no new EditCommand is started.
17
+ * @param iModelKey the key that identifies the iModel that the EditCommand modifies.
18
+ * @param args arguments passed to the constructor of the new `EditCommand`
19
+ * @return the value returned by the new `EditCommand`'s `onStart` method.
20
+ * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`
21
+ * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies
22
+ * the work it is performing for `EditTools.busyHandler` to retry and/or display.
23
+ */
8
24
  startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;
25
+ /** Call a method on the currently active `EditCommand` and return its value.
26
+ * @param name the name of the method to invoke.
27
+ * @param args arguments passed to the method.
28
+ * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */
9
29
  callMethod: (name: string, ...args: any[]) => Promise<any>;
10
30
  }
11
- /** @alpha */
31
+ /**
32
+ * Interface implemented by all backend `EditCommands`.
33
+ * @beta
34
+ */
12
35
  export interface EditCommandIpc {
36
+ /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */
13
37
  ping: () => Promise<{
14
38
  commandId: string;
15
39
  version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorIpc.d.ts","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,aAAa;AACb,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACrF,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5D;AAED,aAAa;AACb,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;CACtF"}
1
+ {"version":3,"file":"EditorIpc.d.ts","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,SAAS;IAExB;;;;;;;;;OASG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAErF;;;6IAGyI;IACzI,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5D;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,iIAAiI;IACjI,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;CACtF"}
@@ -6,5 +6,8 @@
6
6
  * @module Editing
7
7
  */
8
8
  /** @internal */
9
- export const editorChannel = "editor";
9
+ export const editorIpcStrings = {
10
+ channel: "editor",
11
+ commandBusy: "EditCommandBusy",
12
+ };
10
13
  //# sourceMappingURL=EditorIpc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,gBAAgB;AAChB,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\n/** @internal */\r\nexport const editorChannel = \"editor\";\r\n\r\n/** @alpha */\r\nexport interface EditorIpc {\r\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\r\n callMethod: (name: string, ...args: any[]) => Promise<any>;\r\n}\r\n\r\n/** @alpha */\r\nexport interface EditCommandIpc {\r\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\r\n}\r\n"]}
1
+ {"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,iBAAiB;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\n/** @internal */\r\nexport const editorIpcStrings = {\r\n channel: \"editor\",\r\n commandBusy: \"EditCommandBusy\",\r\n} as const;\r\n\r\n/**\r\n * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.\r\n * @beta\r\n */\r\nexport interface EditorIpc {\r\n\r\n /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.\r\n * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === \"\", the current command is\r\n * requested to finish but no new EditCommand is started.\r\n * @param iModelKey the key that identifies the iModel that the EditCommand modifies.\r\n * @param args arguments passed to the constructor of the new `EditCommand`\r\n * @return the value returned by the new `EditCommand`'s `onStart` method.\r\n * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`\r\n * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies\r\n * the work it is performing for `EditTools.busyHandler` to retry and/or display.\r\n */\r\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\r\n\r\n /** Call a method on the currently active `EditCommand` and return its value.\r\n * @param name the name of the method to invoke.\r\n * @param args arguments passed to the method.\r\n * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */\r\n callMethod: (name: string, ...args: any[]) => Promise<any>;\r\n}\r\n\r\n/**\r\n * Interface implemented by all backend `EditCommands`.\r\n * @beta\r\n */\r\nexport interface EditCommandIpc {\r\n /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */\r\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/editor-common",
3
- "version": "3.6.0-dev.8",
3
+ "version": "4.0.0-dev.2",
4
4
  "description": "iTwin.js editing properties common to frontend and backend",
5
5
  "main": "lib/cjs/editor-common.js",
6
6
  "module": "lib/esm/editor-common.js",
@@ -22,16 +22,16 @@
22
22
  "url": "http://www.bentley.com"
23
23
  },
24
24
  "peerDependencies": {
25
- "@itwin/core-bentley": "^3.6.0-dev.8",
26
- "@itwin/core-geometry": "^3.6.0-dev.8",
27
- "@itwin/core-common": "^3.6.0-dev.8"
25
+ "@itwin/core-bentley": "^4.0.0-dev.2",
26
+ "@itwin/core-geometry": "^4.0.0-dev.2",
27
+ "@itwin/core-common": "^4.0.0-dev.2"
28
28
  },
29
29
  "devDependencies": {
30
- "@itwin/core-bentley": "3.6.0-dev.8",
31
- "@itwin/build-tools": "3.6.0-dev.8",
32
- "@itwin/eslint-plugin": "3.6.0-dev.8",
33
- "@itwin/core-geometry": "3.6.0-dev.8",
34
- "@itwin/core-common": "3.6.0-dev.8",
30
+ "@itwin/core-bentley": "4.0.0-dev.2",
31
+ "@itwin/build-tools": "4.0.0-dev.2",
32
+ "@itwin/eslint-plugin": "4.0.0-dev.2",
33
+ "@itwin/core-geometry": "4.0.0-dev.2",
34
+ "@itwin/core-common": "4.0.0-dev.2",
35
35
  "@types/chai": "4.3.1",
36
36
  "@types/mocha": "^8.2.2",
37
37
  "@types/node": "18.11.5",