@itwin/presentation-frontend 5.1.0-dev.40 → 5.1.0-dev.42
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 +30 -1
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-frontend/IModelConnectionInitialization.js.map +1 -1
- package/lib/cjs/presentation-frontend/InternalSymbols.js.map +1 -1
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/Presentation.d.ts +2 -2
- package/lib/cjs/presentation-frontend/Presentation.js +1 -1
- package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts +12 -9
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.js +18 -10
- package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +4 -4
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +11 -11
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +1 -1
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +4 -4
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend.js.map +1 -1
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-frontend/IModelConnectionInitialization.js.map +1 -1
- package/lib/esm/presentation-frontend/InternalSymbols.js.map +1 -1
- package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/Presentation.d.ts +2 -2
- package/lib/esm/presentation-frontend/Presentation.js +1 -1
- package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.d.ts +12 -9
- package/lib/esm/presentation-frontend/PresentationManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.js +18 -10
- package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +4 -4
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +11 -11
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +1 -1
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +4 -4
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/esm/presentation-frontend.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
# Change Log - @itwin/presentation-frontend
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 17 Jun 2025 18:35:12 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.0.1
|
|
6
|
+
Tue, 17 Jun 2025 18:33:52 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 5.0.0
|
|
11
|
+
Fri, 13 Jun 2025 20:25:38 GMT
|
|
12
|
+
|
|
13
|
+
### Updates
|
|
14
|
+
|
|
15
|
+
- Add Symbols to prevent duplicate instances of package
|
|
16
|
+
- Bumped `@itwin/unified-selection` version.
|
|
17
|
+
- Handle Models' and SubCategories' selection when syncing `SelectionSet` to unified selection.
|
|
18
|
+
- Upgrade compile target to ES2023 and module to ES2022
|
|
19
|
+
- Add `type: "module"` to `package.json` to tell Node.js to load this package as ESM by default.
|
|
20
|
+
- Deprecate unified selection related APIs.
|
|
21
|
+
- Bump `@itwin/unified-selection` dependency version to `^1.2.0`.
|
|
22
|
+
- Fix selection changes not being handled in certain scenarios: when using blank connections or when using multiple connections to the same iModel.
|
|
23
|
+
- Expose `SelectionManager.selectionStorage` as a readonly member. This gives consumers a chance to start using selection storage directly instead of through soon-to-be-deprecated `SelectionManager`.
|
|
24
|
+
- Remove `@internal` APIs from public barrel exports file.
|
|
25
|
+
- Clean up APIs deprecated in 3.x
|
|
26
|
+
- Clean up APIs deprecated in 3.x
|
|
27
|
+
- Change core peer dependencies to strict version.
|
|
28
|
+
|
|
29
|
+
## 4.11.6
|
|
30
|
+
Mon, 16 Jun 2025 15:00:15 GMT
|
|
31
|
+
|
|
32
|
+
_Version update only_
|
|
4
33
|
|
|
5
34
|
## 4.11.5
|
|
6
35
|
Fri, 06 Jun 2025 13:41:18 GMT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAA8C;AAC9C,oDAAgE;AAChE,wDAAiD;AAQjD;;;;;GAKG;AACH,MAAa,+BAA+B;IAClC,cAAc,CAA8B;IAC5C,gDAAgD,CAAc;IACtD,6BAA6B,GAAG,IAAI,sBAAO,EAA0D,CAAC;IAEtH;QACE,IAAI,yBAAS,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,gDAAgD,GAAG,yBAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,yBAAS,CAAC,yBAAyB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkC,EAAE,EAAE;gBAChF,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;oBACtC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;gBAC/B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,cAAc,GAAG,wCAA0B,CAAC,MAAM,CAAC;QAC1D,CAAC;IACH,CAAC;IAEM,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAEO,sCAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;QACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,cAAc,IAAI,wCAA0B,CAAC,OAAO,CAAC;IACnE,CAAC;CACF;AAnCD,0EAmCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { InternetConnectivityStatus } from \"@itwin/core-common\";\nimport { NativeApp } from \"@itwin/core-frontend\";\n\n/** @internal */\nexport interface IConnectivityInformationProvider {\n readonly status: InternetConnectivityStatus;\n readonly onInternetConnectivityChanged: BeEvent<(args: { status: InternetConnectivityStatus }) => void>;\n}\n\n/**\n * A helper that wraps connectivity-related APIs in NativeApp\n * to give a unified information for interested parties in presentation.\n *\n * @internal\n */\nexport class ConnectivityInformationProvider implements IConnectivityInformationProvider, Disposable {\n private _currentStatus?: InternetConnectivityStatus;\n private _unsubscribeFromInternetConnectivityChangedEvent?: () => void;\n public readonly onInternetConnectivityChanged = new BeEvent<(args: { status: InternetConnectivityStatus }) => void>();\n\n public constructor() {\n if (NativeApp.isValid) {\n this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n NativeApp.checkInternetConnectivity().then((status: InternetConnectivityStatus) => {\n if (undefined === this._currentStatus) {\n this._currentStatus = status;\n }\n });\n } else {\n this._currentStatus = InternetConnectivityStatus.Online;\n }\n }\n\n public [Symbol.dispose]() {\n this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();\n }\n\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\n if (this._currentStatus === status) {\n return;\n }\n\n this._currentStatus = status;\n this.onInternetConnectivityChanged.raiseEvent({ status });\n };\n\n public get status(): InternetConnectivityStatus {\n return this._currentStatus ?? InternetConnectivityStatus.Offline;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAA8C;AAC9C,oDAAgE;AAChE,wDAAiD;AAQjD;;;;;GAKG;AACH,MAAa,+BAA+B;IAClC,cAAc,CAA8B;IAC5C,gDAAgD,CAAc;IACtD,6BAA6B,GAAG,IAAI,sBAAO,EAA0D,CAAC;IAEtH;QACE,IAAI,yBAAS,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,gDAAgD,GAAG,yBAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,yBAAS,CAAC,yBAAyB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkC,EAAE,EAAE;gBAChF,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;oBACtC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;gBAC/B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,cAAc,GAAG,wCAA0B,CAAC,MAAM,CAAC;QAC1D,CAAC;IACH,CAAC;IAEM,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAEO,sCAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;QACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,cAAc,IAAI,wCAA0B,CAAC,OAAO,CAAC;IACnE,CAAC;CACF;AAnCD,0EAmCC","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 Core\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { InternetConnectivityStatus } from \"@itwin/core-common\";\r\nimport { NativeApp } from \"@itwin/core-frontend\";\r\n\r\n/** @internal */\r\nexport interface IConnectivityInformationProvider {\r\n readonly status: InternetConnectivityStatus;\r\n readonly onInternetConnectivityChanged: BeEvent<(args: { status: InternetConnectivityStatus }) => void>;\r\n}\r\n\r\n/**\r\n * A helper that wraps connectivity-related APIs in NativeApp\r\n * to give a unified information for interested parties in presentation.\r\n *\r\n * @internal\r\n */\r\nexport class ConnectivityInformationProvider implements IConnectivityInformationProvider, Disposable {\r\n private _currentStatus?: InternetConnectivityStatus;\r\n private _unsubscribeFromInternetConnectivityChangedEvent?: () => void;\r\n public readonly onInternetConnectivityChanged = new BeEvent<(args: { status: InternetConnectivityStatus }) => void>();\r\n\r\n public constructor() {\r\n if (NativeApp.isValid) {\r\n this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n NativeApp.checkInternetConnectivity().then((status: InternetConnectivityStatus) => {\r\n if (undefined === this._currentStatus) {\r\n this._currentStatus = status;\r\n }\r\n });\r\n } else {\r\n this._currentStatus = InternetConnectivityStatus.Online;\r\n }\r\n }\r\n\r\n public [Symbol.dispose]() {\r\n this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();\r\n }\r\n\r\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\r\n if (this._currentStatus === status) {\r\n return;\r\n }\r\n\r\n this._currentStatus = status;\r\n this.onInternetConnectivityChanged.raiseEvent({ status });\r\n };\r\n\r\n public get status(): InternetConnectivityStatus {\r\n return this._currentStatus ?? InternetConnectivityStatus.Offline;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AAeH,8DAcC;AAMD,4EAIC;AArCD,oEAOoC;AAEpC;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,WAA8B;IACtE,sCAAsC;IACtC,WAAW,CAAC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5F,WAAW,CAAC,IAAI;QACd,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,GAA0B,EAAE,KAA6B,EAAE,EAAE;YACnG,+FAA+F;YAC/F,MAAM,GAAG,GAAG,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9C,IAAI,GAAG,CAAC,QAAQ,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,CAAC,iCAAiC;QACxD,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;IACzD,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport {\n ClientDiagnostics,\n ClientDiagnosticsHandler,\n DiagnosticsLogEntry,\n DiagnosticsLoggerSeverity,\n DiagnosticsLogMessage,\n DiagnosticsScopeLogs,\n} from \"@itwin/presentation-common\";\n\n/**\n * A function which logs messages to the console.\n * @public\n */\nexport function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics) {\n // eslint-disable-next-line no-console\n diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);\n diagnostics.logs &&\n handleDiagnosticLogs(diagnostics.logs, (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => {\n /* note: we're duplicating the message if it's logged at both editor and dev severity levels */\n const str = buildLogMessageString(msg, stack);\n if (msg.severity.editor) {\n getConsoleLogFunc(msg.severity.editor)(str);\n }\n if (msg.severity.dev) {\n getConsoleLogFunc(msg.severity.dev)(str);\n }\n });\n}\n\n/**\n * A function which calls all diagnostics handlers passed to it.\n * @public\n */\nexport function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]) {\n return (diagnostics: ClientDiagnostics) => {\n handlers.forEach((handler) => handler(diagnostics));\n };\n}\n\ntype DiagnosticsLogMessageHandler = (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => void;\n\nfunction handleDiagnosticLogs(logs: DiagnosticsLogEntry[], messageHandler: DiagnosticsLogMessageHandler, stack: DiagnosticsScopeLogs[] = []) {\n logs.forEach((log) => {\n if (DiagnosticsLogEntry.isMessage(log)) {\n messageHandler(log, stack);\n } else if (log.logs) {\n handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);\n }\n });\n}\n\nfunction buildLogMessageString(msg: DiagnosticsLogMessage, _stack: DiagnosticsScopeLogs[]) {\n return msg.message;\n}\n\nfunction getConsoleLogFunc(severity: DiagnosticsLoggerSeverity) {\n switch (severity) {\n case \"error\":\n return console.error; // eslint-disable-line no-console\n case \"warning\":\n return console.warn; // eslint-disable-line no-console\n case \"info\":\n case \"debug\":\n case \"trace\":\n return console.log; // eslint-disable-line no-console\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AAeH,8DAcC;AAMD,4EAIC;AArCD,oEAOoC;AAEpC;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,WAA8B;IACtE,sCAAsC;IACtC,WAAW,CAAC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5F,WAAW,CAAC,IAAI;QACd,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,GAA0B,EAAE,KAA6B,EAAE,EAAE;YACnG,+FAA+F;YAC/F,MAAM,GAAG,GAAG,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACxB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;YAC9C,CAAC;YACD,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;gBACrB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,SAAgB,gCAAgC,CAAC,QAAoC;IACnF,OAAO,CAAC,WAA8B,EAAE,EAAE;QACxC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC;AAID,SAAS,oBAAoB,CAAC,IAA2B,EAAE,cAA4C,EAAE,QAAgC,EAAE;IACzI,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,IAAI,yCAAmB,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACpB,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,GAA0B,EAAE,MAA8B;IACvF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAmC;IAC5D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;QACzD,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,iCAAiC;QACxD,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;IACzD,CAAC;AACH,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 Core\r\n */\r\n\r\nimport {\r\n ClientDiagnostics,\r\n ClientDiagnosticsHandler,\r\n DiagnosticsLogEntry,\r\n DiagnosticsLoggerSeverity,\r\n DiagnosticsLogMessage,\r\n DiagnosticsScopeLogs,\r\n} from \"@itwin/presentation-common\";\r\n\r\n/**\r\n * A function which logs messages to the console.\r\n * @public\r\n */\r\nexport function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics) {\r\n // eslint-disable-next-line no-console\r\n diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);\r\n diagnostics.logs &&\r\n handleDiagnosticLogs(diagnostics.logs, (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => {\r\n /* note: we're duplicating the message if it's logged at both editor and dev severity levels */\r\n const str = buildLogMessageString(msg, stack);\r\n if (msg.severity.editor) {\r\n getConsoleLogFunc(msg.severity.editor)(str);\r\n }\r\n if (msg.severity.dev) {\r\n getConsoleLogFunc(msg.severity.dev)(str);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * A function which calls all diagnostics handlers passed to it.\r\n * @public\r\n */\r\nexport function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]) {\r\n return (diagnostics: ClientDiagnostics) => {\r\n handlers.forEach((handler) => handler(diagnostics));\r\n };\r\n}\r\n\r\ntype DiagnosticsLogMessageHandler = (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => void;\r\n\r\nfunction handleDiagnosticLogs(logs: DiagnosticsLogEntry[], messageHandler: DiagnosticsLogMessageHandler, stack: DiagnosticsScopeLogs[] = []) {\r\n logs.forEach((log) => {\r\n if (DiagnosticsLogEntry.isMessage(log)) {\r\n messageHandler(log, stack);\r\n } else if (log.logs) {\r\n handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);\r\n }\r\n });\r\n}\r\n\r\nfunction buildLogMessageString(msg: DiagnosticsLogMessage, _stack: DiagnosticsScopeLogs[]) {\r\n return msg.message;\r\n}\r\n\r\nfunction getConsoleLogFunc(severity: DiagnosticsLoggerSeverity) {\r\n switch (severity) {\r\n case \"error\":\r\n return console.error; // eslint-disable-line no-console\r\n case \"warning\":\r\n return console.warn; // eslint-disable-line no-console\r\n case \"info\":\r\n case \"debug\":\r\n case \"trace\":\r\n return console.log; // eslint-disable-line no-console\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,kDAAlC,kCAAkC,QAE7C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Logging\n */\n\n/**\n * Logger categories used by this package\n * @note All logger categories in this package start with the `presentation-frontend` prefix.\n * @see [Logger]($bentley)\n * @public\n */\nexport enum PresentationFrontendLoggerCategory {\n Package = \"presentation-frontend\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,kDAAlC,kCAAkC,QAE7C","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 Logging\r\n */\r\n\r\n/**\r\n * Logger categories used by this package\r\n * @note All logger categories in this package start with the `presentation-frontend` prefix.\r\n * @see [Logger]($bentley)\r\n * @public\r\n */\r\nexport enum PresentationFrontendLoggerCategory {\r\n Package = \"presentation-frontend\",\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelConnectionInitialization.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IModelConnectionInitialization.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAchG,8DAIC;AAGD,0DAEC;AAbD,gBAAgB;AACH,QAAA,4BAA4B,GAAG,IAAI,GAAG,EAAyC,CAAC;AAE7F,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,MAAwB;IAChE,KAAK,MAAM,EAAE,mBAAmB,EAAE,IAAI,oCAA4B,EAAE,CAAC;QACnE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,uBAAuB,CAAC,MAAwB;IACpE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,oCAA4B,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACvH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IModelConnection } from \"@itwin/core-frontend\";\n\n/** @internal */\nexport interface IModelConnectionInitializationHandler {\n startInitialization: (imodel: IModelConnection) => void;\n ensureInitialized: (imodel: IModelConnection) => Promise<void>;\n}\n\n/** @internal */\nexport const imodelInitializationHandlers = new Set<IModelConnectionInitializationHandler>();\n\n/** @internal */\nexport function startIModelInitialization(imodel: IModelConnection) {\n for (const { startInitialization } of imodelInitializationHandlers) {\n startInitialization(imodel);\n }\n}\n\n/** @internal */\nexport async function ensureIModelInitialized(imodel: IModelConnection) {\n await Promise.all([...imodelInitializationHandlers].map(async ({ ensureInitialized }) => ensureInitialized(imodel)));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelConnectionInitialization.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IModelConnectionInitialization.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAchG,8DAIC;AAGD,0DAEC;AAbD,gBAAgB;AACH,QAAA,4BAA4B,GAAG,IAAI,GAAG,EAAyC,CAAC;AAE7F,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,MAAwB;IAChE,KAAK,MAAM,EAAE,mBAAmB,EAAE,IAAI,oCAA4B,EAAE,CAAC;QACnE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,uBAAuB,CAAC,MAAwB;IACpE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,oCAA4B,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACvH,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\r\nimport { IModelConnection } from \"@itwin/core-frontend\";\r\n\r\n/** @internal */\r\nexport interface IModelConnectionInitializationHandler {\r\n startInitialization: (imodel: IModelConnection) => void;\r\n ensureInitialized: (imodel: IModelConnection) => Promise<void>;\r\n}\r\n\r\n/** @internal */\r\nexport const imodelInitializationHandlers = new Set<IModelConnectionInitializationHandler>();\r\n\r\n/** @internal */\r\nexport function startIModelInitialization(imodel: IModelConnection) {\r\n for (const { startInitialization } of imodelInitializationHandlers) {\r\n startInitialization(imodel);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport async function ensureIModelInitialized(imodel: IModelConnection) {\r\n await Promise.all([...imodelInitializationHandlers].map(async ({ ensureInitialized }) => ensureInitialized(imodel)));\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalSymbols.js","sourceRoot":"","sources":["../../../src/presentation-frontend/InternalSymbols.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,yDAAyD;AACzD;;GAEG;;;AAEH,SAAS,GAAG,CAAC,IAAY;IACvB,OAAO,GAAG,IAAI,iDAAiD,CAAC;AAClE,CAAC;AAEY,QAAA,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC;AACtG,QAAA,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/* eslint-disable @typescript-eslint/naming-convention */\n/** @packageDocumentation\n * @module Core\n */\n\nfunction sym(name: string): string {\n return `${name}_presentation-frontend_INTERNAL_ONLY_DO_NOT_USE`;\n}\n\nexport const _presentation_manager_rpcRequestsHandler = Symbol.for(sym(\"presentation_manager_rpcRequestsHandler\"));\nexport const _presentation_manager_ipcRequestsHandler = Symbol.for(sym(\"presentation_manager_ipcRequestsHandler\"));\n"]}
|
|
1
|
+
{"version":3,"file":"InternalSymbols.js","sourceRoot":"","sources":["../../../src/presentation-frontend/InternalSymbols.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,yDAAyD;AACzD;;GAEG;;;AAEH,SAAS,GAAG,CAAC,IAAY;IACvB,OAAO,GAAG,IAAI,iDAAiD,CAAC;AAClE,CAAC;AAEY,QAAA,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC;AACtG,QAAA,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,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/* eslint-disable @typescript-eslint/naming-convention */\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nfunction sym(name: string): string {\r\n return `${name}_presentation-frontend_INTERNAL_ONLY_DO_NOT_USE`;\r\n}\r\n\r\nexport const _presentation_manager_rpcRequestsHandler = Symbol.for(sym(\"presentation_manager_rpcRequestsHandler\"));\r\nexport const _presentation_manager_ipcRequestsHandler = Symbol.for(sym(\"presentation_manager_ipcRequestsHandler\"));\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,wDAA8C;AAC9C,oEAA6D;AAC7D,kEAA8G;AAY9G,gBAAgB;AAChB,MAAa,kBAAkB;IACrB,SAAS,GAAG,sBAAM,CAAC,YAAY,CAA2B,wCAA6B,CAAC,CAAC;IACjF,QAAQ,CAAS;IAEjC,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,MAAgC;QAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;YACvC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,qCAAe,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAkC;QAClE,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACzC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,gDAsBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IpcApp } from \"@itwin/core-frontend\";\nimport { RulesetVariable } from \"@itwin/presentation-common\";\nimport { PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface } from \"@itwin/presentation-common/internal\";\n\ninterface SetRulesetVariableParams {\n rulesetId: string;\n variable: RulesetVariable;\n}\n\ninterface UnsetRulesetVariableParams {\n rulesetId: string;\n variableId: string;\n}\n\n/** @internal */\nexport class IpcRequestsHandler {\n private _ipcProxy = IpcApp.makeIpcProxy<PresentationIpcInterface>(PRESENTATION_IPC_CHANNEL_NAME);\n public readonly clientId: string;\n\n constructor(clientId: string) {\n this.clientId = clientId;\n }\n\n public async setRulesetVariable(params: SetRulesetVariableParams) {\n return this._ipcProxy.setRulesetVariable({\n ...params,\n clientId: this.clientId,\n variable: RulesetVariable.toJSON(params.variable),\n });\n }\n\n public async unsetRulesetVariable(params: UnsetRulesetVariableParams) {\n return this._ipcProxy.unsetRulesetVariable({\n ...params,\n clientId: this.clientId,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,wDAA8C;AAC9C,oEAA6D;AAC7D,kEAA8G;AAY9G,gBAAgB;AAChB,MAAa,kBAAkB;IACrB,SAAS,GAAG,sBAAM,CAAC,YAAY,CAA2B,wCAA6B,CAAC,CAAC;IACjF,QAAQ,CAAS;IAEjC,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,MAAgC;QAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;YACvC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,qCAAe,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAkC;QAClE,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACzC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,gDAsBC","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\r\nimport { IpcApp } from \"@itwin/core-frontend\";\r\nimport { RulesetVariable } from \"@itwin/presentation-common\";\r\nimport { PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface } from \"@itwin/presentation-common/internal\";\r\n\r\ninterface SetRulesetVariableParams {\r\n rulesetId: string;\r\n variable: RulesetVariable;\r\n}\r\n\r\ninterface UnsetRulesetVariableParams {\r\n rulesetId: string;\r\n variableId: string;\r\n}\r\n\r\n/** @internal */\r\nexport class IpcRequestsHandler {\r\n private _ipcProxy = IpcApp.makeIpcProxy<PresentationIpcInterface>(PRESENTATION_IPC_CHANNEL_NAME);\r\n public readonly clientId: string;\r\n\r\n constructor(clientId: string) {\r\n this.clientId = clientId;\r\n }\r\n\r\n public async setRulesetVariable(params: SetRulesetVariableParams) {\r\n return this._ipcProxy.setRulesetVariable({\r\n ...params,\r\n clientId: this.clientId,\r\n variable: RulesetVariable.toJSON(params.variable),\r\n });\r\n }\r\n\r\n public async unsetRulesetVariable(params: UnsetRulesetVariableParams) {\r\n return this._ipcProxy.unsetRulesetVariable({\r\n ...params,\r\n clientId: this.clientId,\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,kEAAyE;AACzE,uDAAiD;AAEjD,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;AAEpC,gBAAgB;AAChB,MAAa,0BAA2B,SAAQ,6BAAkB;IACxD,KAAK,CAAqB;IAClC,YAAY,IAAa;QACvB,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAClI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAW,MAAM,CAAC,MAA0B;QAC1C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,oBAAoB,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QACzH,MAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F,CAAC;CACF;AAtBD,gEAsBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { LocalizationHelper } from \"@itwin/presentation-common/internal\";\nimport { Presentation } from \"./Presentation.js\";\n\nconst NAMESPACES = [\"Presentation\"];\n\n/** @internal */\nexport class FrontendLocalizationHelper extends LocalizationHelper {\n private _lang: string | undefined;\n constructor(lang?: string) {\n super({ getLocalizedString: (key) => Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });\n this._lang = lang;\n }\n\n public get locale() {\n return this._lang;\n }\n public set locale(locale: string | undefined) {\n this._lang = locale;\n }\n\n public static async registerNamespaces() {\n const localizationPromises = NAMESPACES.map(async (namespace) => Presentation.localization.registerNamespace(namespace));\n await Promise.all(localizationPromises);\n }\n\n public static unregisterNamespaces() {\n NAMESPACES.map((namespace) => Presentation.localization.unregisterNamespace(namespace));\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,kEAAyE;AACzE,uDAAiD;AAEjD,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;AAEpC,gBAAgB;AAChB,MAAa,0BAA2B,SAAQ,6BAAkB;IACxD,KAAK,CAAqB;IAClC,YAAY,IAAa;QACvB,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAClI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAW,MAAM,CAAC,MAA0B;QAC1C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,oBAAoB,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QACzH,MAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F,CAAC;CACF;AAtBD,gEAsBC","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\nimport { LocalizationHelper } from \"@itwin/presentation-common/internal\";\r\nimport { Presentation } from \"./Presentation.js\";\r\n\r\nconst NAMESPACES = [\"Presentation\"];\r\n\r\n/** @internal */\r\nexport class FrontendLocalizationHelper extends LocalizationHelper {\r\n private _lang: string | undefined;\r\n constructor(lang?: string) {\r\n super({ getLocalizedString: (key) => Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });\r\n this._lang = lang;\r\n }\r\n\r\n public get locale() {\r\n return this._lang;\r\n }\r\n public set locale(locale: string | undefined) {\r\n this._lang = locale;\r\n }\r\n\r\n public static async registerNamespaces() {\r\n const localizationPromises = NAMESPACES.map(async (namespace) => Presentation.localization.registerNamespace(namespace));\r\n await Promise.all(localizationPromises);\r\n }\r\n\r\n public static unregisterNamespaces() {\r\n NAMESPACES.map((namespace) => Presentation.localization.unregisterNamespace(namespace));\r\n }\r\n}\r\n"]}
|
|
@@ -15,7 +15,7 @@ export interface PresentationProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* Props for [[SelectionManager]].
|
|
17
17
|
*
|
|
18
|
-
* @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
|
|
18
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new
|
|
19
19
|
* [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
|
|
20
20
|
*/
|
|
21
21
|
selection?: Partial<SelectionManagerProps>;
|
|
@@ -59,7 +59,7 @@ export declare class Presentation {
|
|
|
59
59
|
/**
|
|
60
60
|
* The singleton [[SelectionManager]].
|
|
61
61
|
*
|
|
62
|
-
* @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
|
|
62
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new
|
|
63
63
|
* [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
|
|
64
64
|
*/
|
|
65
65
|
static get selection(): SelectionManager;
|
|
@@ -128,7 +128,7 @@ class Presentation {
|
|
|
128
128
|
/**
|
|
129
129
|
* The singleton [[SelectionManager]].
|
|
130
130
|
*
|
|
131
|
-
* @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
|
|
131
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new
|
|
132
132
|
* [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
|
|
133
133
|
*/
|
|
134
134
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wDAAiD;AAEjD,oEAAmF;AACnF,qGAA+H;AAC/H,qGAA4I;AAC5I,m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,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9C,CAAC;QACD,yBAAyB,GAAG,SAAS,CAAC;QAEtC,IAAI,gBAAgB,EAAE,CAAC;YACrB,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,CAAC;QACD,gBAAgB,GAAG,SAAS,CAAC;QAC7B,YAAY,GAAG,SAAS,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,6BAA6B,CAAC,OAAkC;QAC5E,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,4CAA4C;IACrC,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACH,4DAA4D;IACrD,MAAM,KAAK,SAAS;QACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,kBAAkB;QAClC,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;QACtG,CAAC;QACD,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAzID,oCAyIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { Localization } from \"@itwin/core-common\";\nimport { PresentationError, PresentationStatus } from \"@itwin/presentation-common\";\nimport { FavoritePropertiesManager, FavoritePropertiesManagerProps } from \"./favorite-properties/FavoritePropertiesManager.js\";\nimport { createFavoritePropertiesStorage, DefaultFavoritePropertiesStorageTypes } from \"./favorite-properties/FavoritePropertiesStorage.js\";\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\nimport { SelectionManager, SelectionManagerProps } from \"./selection/SelectionManager.js\";\nimport { SelectionScopesManager } from \"./selection/SelectionScopesManager.js\";\nimport { imodelInitializationHandlers } from \"./IModelConnectionInitialization.js\";\nimport { _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\n\nlet localization: Localization | undefined;\nlet presentationManager: PresentationManager | undefined;\nlet selectionManager: SelectionManager | undefined; // eslint-disable-line @typescript-eslint/no-deprecated\nlet favoritePropertiesManager: FavoritePropertiesManager | undefined;\nconst initializationHandlers: Array<() => Promise<(() => void) | void>> = [];\nconst terminationHandlers: Array<() => void> = [];\n\n/**\n * Props for initializing [[Presentation]].\n * @public\n */\nexport interface PresentationProps {\n /** Props for [[PresentationManager]]. */\n presentation?: PresentationManagerProps;\n\n /**\n * Props for [[SelectionManager]].\n *\n * @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n selection?: Partial<SelectionManagerProps>;\n\n /** Props for [[FavoritePropertiesManager]]. */\n favorites?: FavoritePropertiesManagerProps;\n}\n\n/**\n * Static class used to statically set up Presentation library for the frontend.\n * Basically what it does is:\n * - Create a singleton [[PresentationManager]] instance\n * - Create a singleton [[SelectionManager]] instance\n * - Create a singleton [[FavoritePropertiesManager]]] instance\n *\n * @public\n */\nexport class Presentation {\n /* c8 ignore next */\n private constructor() {}\n\n /**\n * Initializes Presentation library for the frontend.\n *\n * Example:\n * ``` ts\n * [[include:Presentation.Frontend.Initialization]]\n * ```\n *\n * The method should be called after a call to [IModelApp.startup]($core-frontend).\n */\n public static async initialize(props?: PresentationProps): Promise<void> {\n if (!IModelApp.initialized) {\n throw new PresentationError(PresentationStatus.NotInitialized, \"IModelApp.startup must be called before calling Presentation.initialize\");\n }\n if (!localization) {\n localization = IModelApp.localization;\n }\n if (!presentationManager) {\n const managerProps = props?.presentation ?? {};\n if (!managerProps.activeLocale) {\n const languages = Presentation.localization.getLanguageList();\n managerProps.activeLocale = languages.length ? languages[0] : undefined;\n }\n presentationManager = PresentationManager.create(managerProps);\n }\n if (!selectionManager) {\n /* eslint-disable @typescript-eslint/no-deprecated */\n selectionManager = new SelectionManager({\n ...props?.selection,\n scopes:\n props?.selection?.scopes ??\n new SelectionScopesManager({\n rpcRequestsHandler: presentationManager[_presentation_manager_rpcRequestsHandler],\n localeProvider: () => this.presentation.activeLocale,\n }),\n });\n /* eslint-enable @typescript-eslint/no-deprecated */\n }\n if (!favoritePropertiesManager) {\n favoritePropertiesManager = new FavoritePropertiesManager({\n storage: props?.favorites ? props.favorites.storage : createFavoritePropertiesStorage(DefaultFavoritePropertiesStorageTypes.Noop),\n });\n }\n\n await FrontendLocalizationHelper.registerNamespaces();\n for (const handler of initializationHandlers) {\n const cleanup = await handler();\n if (cleanup) {\n terminationHandlers.push(cleanup);\n }\n }\n }\n\n /**\n * Terminates Presentation library frontend. This method should be called\n * before a call to [IModelApp.shutdown]($core-frontend)\n */\n public static terminate(): void {\n terminationHandlers.forEach((handler) => handler());\n terminationHandlers.length = 0;\n\n imodelInitializationHandlers.clear();\n\n if (localization) {\n FrontendLocalizationHelper.unregisterNamespaces();\n }\n\n if (presentationManager) {\n presentationManager[Symbol.dispose]();\n }\n presentationManager = undefined;\n\n if (favoritePropertiesManager) {\n favoritePropertiesManager[Symbol.dispose]();\n }\n favoritePropertiesManager = undefined;\n\n if (selectionManager) {\n selectionManager[Symbol.dispose]();\n }\n selectionManager = undefined;\n localization = undefined;\n }\n\n /**\n * Registers an additional handler which will be invoked during Presentation library frontend\n * initialization.\n */\n public static registerInitializationHandler(handler: () => Promise<() => void>): void {\n initializationHandlers.push(handler);\n }\n\n /** The singleton [[PresentationManager]] */\n public static get presentation(): PresentationManager {\n if (!presentationManager) {\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return presentationManager;\n }\n\n /**\n * The singleton [[SelectionManager]].\n *\n * @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static get selection(): SelectionManager {\n if (!selectionManager) {\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return selectionManager;\n }\n\n /**\n * The singleton [[FavoritePropertiesManager]]\n */\n public static get favoriteProperties(): FavoritePropertiesManager {\n if (!favoritePropertiesManager) {\n throw new Error(\"Favorite Properties must be first initialized by calling Presentation.initialize\");\n }\n return favoritePropertiesManager;\n }\n\n /**\n * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`.\n */\n public static get localization(): Localization {\n if (!localization) {\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return localization;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wDAAiD;AAEjD,oEAAmF;AACnF,qGAA+H;AAC/H,qGAA4I;AAC5I,mEAAqE;AACrE,qEAAyF;AACzF,yEAA0F;AAC1F,qFAA+E;AAC/E,2FAAmF;AACnF,6DAAgF;AAEhF,IAAI,YAAsC,CAAC;AAC3C,IAAI,mBAAoD,CAAC;AACzD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,OAAO,CAAC,EAAE,CAAC;QACrC,CAAC;QACD,gBAAgB,GAAG,SAAS,CAAC;QAC7B,YAAY,GAAG,SAAS,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,6BAA6B,CAAC,OAAkC;QAC5E,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,4CAA4C;IACrC,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACH,4DAA4D;IACrD,MAAM,KAAK,SAAS;QACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,kBAAkB;QAClC,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;QACtG,CAAC;QACD,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAzID,oCAyIC","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 Core\r\n */\r\n\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\nimport { Localization } from \"@itwin/core-common\";\r\nimport { PresentationError, PresentationStatus } from \"@itwin/presentation-common\";\r\nimport { FavoritePropertiesManager, FavoritePropertiesManagerProps } from \"./favorite-properties/FavoritePropertiesManager.js\";\r\nimport { createFavoritePropertiesStorage, DefaultFavoritePropertiesStorageTypes } from \"./favorite-properties/FavoritePropertiesStorage.js\";\r\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\r\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\r\nimport { SelectionManager, SelectionManagerProps } from \"./selection/SelectionManager.js\";\r\nimport { SelectionScopesManager } from \"./selection/SelectionScopesManager.js\";\r\nimport { imodelInitializationHandlers } from \"./IModelConnectionInitialization.js\";\r\nimport { _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\r\n\r\nlet localization: Localization | undefined;\r\nlet presentationManager: PresentationManager | undefined;\r\nlet selectionManager: SelectionManager | undefined; // eslint-disable-line @typescript-eslint/no-deprecated\r\nlet favoritePropertiesManager: FavoritePropertiesManager | undefined;\r\nconst initializationHandlers: Array<() => Promise<(() => void) | void>> = [];\r\nconst terminationHandlers: Array<() => void> = [];\r\n\r\n/**\r\n * Props for initializing [[Presentation]].\r\n * @public\r\n */\r\nexport interface PresentationProps {\r\n /** Props for [[PresentationManager]]. */\r\n presentation?: PresentationManagerProps;\r\n\r\n /**\r\n * Props for [[SelectionManager]].\r\n *\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new\r\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n selection?: Partial<SelectionManagerProps>;\r\n\r\n /** Props for [[FavoritePropertiesManager]]. */\r\n favorites?: FavoritePropertiesManagerProps;\r\n}\r\n\r\n/**\r\n * Static class used to statically set up Presentation library for the frontend.\r\n * Basically what it does is:\r\n * - Create a singleton [[PresentationManager]] instance\r\n * - Create a singleton [[SelectionManager]] instance\r\n * - Create a singleton [[FavoritePropertiesManager]]] instance\r\n *\r\n * @public\r\n */\r\nexport class Presentation {\r\n /* c8 ignore next */\r\n private constructor() {}\r\n\r\n /**\r\n * Initializes Presentation library for the frontend.\r\n *\r\n * Example:\r\n * ``` ts\r\n * [[include:Presentation.Frontend.Initialization]]\r\n * ```\r\n *\r\n * The method should be called after a call to [IModelApp.startup]($core-frontend).\r\n */\r\n public static async initialize(props?: PresentationProps): Promise<void> {\r\n if (!IModelApp.initialized) {\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"IModelApp.startup must be called before calling Presentation.initialize\");\r\n }\r\n if (!localization) {\r\n localization = IModelApp.localization;\r\n }\r\n if (!presentationManager) {\r\n const managerProps = props?.presentation ?? {};\r\n if (!managerProps.activeLocale) {\r\n const languages = Presentation.localization.getLanguageList();\r\n managerProps.activeLocale = languages.length ? languages[0] : undefined;\r\n }\r\n presentationManager = PresentationManager.create(managerProps);\r\n }\r\n if (!selectionManager) {\r\n /* eslint-disable @typescript-eslint/no-deprecated */\r\n selectionManager = new SelectionManager({\r\n ...props?.selection,\r\n scopes:\r\n props?.selection?.scopes ??\r\n new SelectionScopesManager({\r\n rpcRequestsHandler: presentationManager[_presentation_manager_rpcRequestsHandler],\r\n localeProvider: () => this.presentation.activeLocale,\r\n }),\r\n });\r\n /* eslint-enable @typescript-eslint/no-deprecated */\r\n }\r\n if (!favoritePropertiesManager) {\r\n favoritePropertiesManager = new FavoritePropertiesManager({\r\n storage: props?.favorites ? props.favorites.storage : createFavoritePropertiesStorage(DefaultFavoritePropertiesStorageTypes.Noop),\r\n });\r\n }\r\n\r\n await FrontendLocalizationHelper.registerNamespaces();\r\n for (const handler of initializationHandlers) {\r\n const cleanup = await handler();\r\n if (cleanup) {\r\n terminationHandlers.push(cleanup);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Terminates Presentation library frontend. This method should be called\r\n * before a call to [IModelApp.shutdown]($core-frontend)\r\n */\r\n public static terminate(): void {\r\n terminationHandlers.forEach((handler) => handler());\r\n terminationHandlers.length = 0;\r\n\r\n imodelInitializationHandlers.clear();\r\n\r\n if (localization) {\r\n FrontendLocalizationHelper.unregisterNamespaces();\r\n }\r\n\r\n if (presentationManager) {\r\n presentationManager[Symbol.dispose]();\r\n }\r\n presentationManager = undefined;\r\n\r\n if (favoritePropertiesManager) {\r\n favoritePropertiesManager[Symbol.dispose]();\r\n }\r\n favoritePropertiesManager = undefined;\r\n\r\n if (selectionManager) {\r\n selectionManager[Symbol.dispose]();\r\n }\r\n selectionManager = undefined;\r\n localization = undefined;\r\n }\r\n\r\n /**\r\n * Registers an additional handler which will be invoked during Presentation library frontend\r\n * initialization.\r\n */\r\n public static registerInitializationHandler(handler: () => Promise<() => void>): void {\r\n initializationHandlers.push(handler);\r\n }\r\n\r\n /** The singleton [[PresentationManager]] */\r\n public static get presentation(): PresentationManager {\r\n if (!presentationManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return presentationManager;\r\n }\r\n\r\n /**\r\n * The singleton [[SelectionManager]].\r\n *\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new\r\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public static get selection(): SelectionManager {\r\n if (!selectionManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return selectionManager;\r\n }\r\n\r\n /**\r\n * The singleton [[FavoritePropertiesManager]]\r\n */\r\n public static get favoriteProperties(): FavoritePropertiesManager {\r\n if (!favoritePropertiesManager) {\r\n throw new Error(\"Favorite Properties must be first initialized by calling Presentation.initialize\");\r\n }\r\n return favoritePropertiesManager;\r\n }\r\n\r\n /**\r\n * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`.\r\n */\r\n public static get localization(): Localization {\r\n if (!localization) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return localization;\r\n }\r\n}\r\n"]}
|
|
@@ -83,7 +83,7 @@ export interface PresentationManagerProps {
|
|
|
83
83
|
* overriden for each request through request parameters. If not set, `IModelApp.quantityFormatter.activeUnitSystem`
|
|
84
84
|
* is used by default.
|
|
85
85
|
*
|
|
86
|
-
* @deprecated in 4.0 -
|
|
86
|
+
* @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [IModelApp.quantityFormatter]($core-frontend) to set the active unit system.
|
|
87
87
|
*/
|
|
88
88
|
activeUnitSystem?: UnitSystemKey;
|
|
89
89
|
/**
|
|
@@ -113,6 +113,9 @@ export interface PresentationManagerProps {
|
|
|
113
113
|
* in requested unit system.
|
|
114
114
|
*
|
|
115
115
|
* @note Only has effect when frontend value formatting is enabled by supplying the `schemaContextProvider` prop.
|
|
116
|
+
*
|
|
117
|
+
* @deprecated in 5.1. All formats' logic is now handled by [IModelApp.formatsProvider]($core-frontend). Until the prop is removed, when
|
|
118
|
+
* supplied, this map will be used as a fallback if IModelApp's formats provider doesn't return anything for requested format.
|
|
116
119
|
*/
|
|
117
120
|
defaultFormats?: FormatsMap;
|
|
118
121
|
}
|
|
@@ -143,7 +146,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
143
146
|
/**
|
|
144
147
|
* Get / set active unit system used to format property values with units.
|
|
145
148
|
*
|
|
146
|
-
* @deprecated in 4.0 -
|
|
149
|
+
* @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment
|
|
147
150
|
* [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override
|
|
148
151
|
* is not set.
|
|
149
152
|
*/
|
|
@@ -154,7 +157,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
154
157
|
get activeLocale(): string | undefined;
|
|
155
158
|
set activeLocale(locale: string | undefined);
|
|
156
159
|
[Symbol.dispose](): void;
|
|
157
|
-
/** @deprecated in 5.0. Use [Symbol.dispose] instead. */
|
|
160
|
+
/** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */
|
|
158
161
|
dispose(): void;
|
|
159
162
|
private onUpdate;
|
|
160
163
|
/** @note This is only called in native apps after changes in iModels */
|
|
@@ -186,14 +189,14 @@ export declare class PresentationManager implements Disposable {
|
|
|
186
189
|
}>;
|
|
187
190
|
/**
|
|
188
191
|
* Retrieves nodes
|
|
189
|
-
* @deprecated in 4.5 -
|
|
192
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
190
193
|
*/
|
|
191
194
|
getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]>;
|
|
192
195
|
/** Retrieves nodes count. */
|
|
193
196
|
getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number>;
|
|
194
197
|
/**
|
|
195
198
|
* Retrieves total nodes count and a single page of nodes.
|
|
196
|
-
* @deprecated in 4.5 -
|
|
199
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
197
200
|
*/
|
|
198
201
|
getNodesAndCount(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{
|
|
199
202
|
count: number;
|
|
@@ -227,12 +230,12 @@ export declare class PresentationManager implements Disposable {
|
|
|
227
230
|
} | undefined>;
|
|
228
231
|
/**
|
|
229
232
|
* Retrieves content which consists of a content descriptor and a page of records.
|
|
230
|
-
* @deprecated in 4.5 -
|
|
233
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
231
234
|
*/
|
|
232
235
|
getContent(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<Content | undefined>;
|
|
233
236
|
/**
|
|
234
237
|
* Retrieves content set size and content which consists of a content descriptor and a page of records.
|
|
235
|
-
* @deprecated in 4.5 -
|
|
238
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
236
239
|
*/
|
|
237
240
|
getContentAndSize(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<{
|
|
238
241
|
content: Content;
|
|
@@ -245,7 +248,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
245
248
|
}>;
|
|
246
249
|
/**
|
|
247
250
|
* Retrieves distinct values of specific field from the content.
|
|
248
|
-
* @deprecated in 4.5 -
|
|
251
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.
|
|
249
252
|
*/
|
|
250
253
|
getPagedDistinctValues(requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions): Promise<PagedResponse<DisplayValueGroup>>;
|
|
251
254
|
/**
|
|
@@ -270,7 +273,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
270
273
|
}>;
|
|
271
274
|
/**
|
|
272
275
|
* Retrieves display label definition of specific items.
|
|
273
|
-
* @deprecated in 4.5 -
|
|
276
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.
|
|
274
277
|
*/
|
|
275
278
|
getDisplayLabelDefinitions(requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions): Promise<LabelDefinition[]>;
|
|
276
279
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAa,gBAAgB,EAAU,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,OAAO,EACP,+BAA+B,EAE/B,iCAAiC,EACjC,qBAAqB,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H,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC,gBAAgB,EAAE,OAAO,EAAE,eAAe,CAAC,GAAG,0BAA0B,CAAC;AAEtI;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,gBAAgB,EAAE,UAAU,GAAG,mBAAmB,EAAE,MAAM,EAAE,eAAe,CAAC,GACvI,0BAA0B,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG,4BAA4B,CAAC,gBAAgB,EAAE,UAAU,GAAG,mBAAmB,EAAE,MAAM,EAAE,eAAe,CAAC,GACrJ,0BAA0B,CAAC;AAE7B;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC;IAEjC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,aAAa,CAAC;IAEpE
|
|
1
|
+
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAa,gBAAgB,EAAU,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,OAAO,EACP,+BAA+B,EAE/B,iCAAiC,EACjC,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EAEjB,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,E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,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC,eAAe,EAAE,CAAC;CAI9B"}
|
|
@@ -34,6 +34,7 @@ class PresentationManager {
|
|
|
34
34
|
_rulesetVars;
|
|
35
35
|
_clearEventListener;
|
|
36
36
|
_schemaContextProvider;
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
37
38
|
_defaultFormats;
|
|
38
39
|
_ipcRequestsHandler;
|
|
39
40
|
/**
|
|
@@ -47,7 +48,7 @@ class PresentationManager {
|
|
|
47
48
|
/**
|
|
48
49
|
* Get / set active unit system used to format property values with units.
|
|
49
50
|
*
|
|
50
|
-
* @deprecated in 4.0 -
|
|
51
|
+
* @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment
|
|
51
52
|
* [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override
|
|
52
53
|
* is not set.
|
|
53
54
|
*/
|
|
@@ -70,6 +71,7 @@ class PresentationManager {
|
|
|
70
71
|
this._localizationHelper = new LocalizationHelper_js_1.FrontendLocalizationHelper(props?.activeLocale);
|
|
71
72
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
72
73
|
this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel) => imodel.schemaContext);
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
73
75
|
this._defaultFormats = props?.defaultFormats;
|
|
74
76
|
if (core_frontend_1.IpcApp.isValid) {
|
|
75
77
|
// Ipc only works in ipc apps, so the `onUpdate` callback will only be called there.
|
|
@@ -90,7 +92,7 @@ class PresentationManager {
|
|
|
90
92
|
this._clearEventListener = undefined;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
|
-
/** @deprecated in 5.0. Use [Symbol.dispose] instead. */
|
|
95
|
+
/** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */
|
|
94
96
|
/* c8 ignore next 3 */
|
|
95
97
|
dispose() {
|
|
96
98
|
this[Symbol.dispose]();
|
|
@@ -217,7 +219,7 @@ class PresentationManager {
|
|
|
217
219
|
}
|
|
218
220
|
/**
|
|
219
221
|
* Retrieves nodes
|
|
220
|
-
* @deprecated in 4.5 -
|
|
222
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
221
223
|
*/
|
|
222
224
|
async getNodes(requestOptions) {
|
|
223
225
|
const result = await this.getNodesIterator(requestOptions);
|
|
@@ -232,7 +234,7 @@ class PresentationManager {
|
|
|
232
234
|
}
|
|
233
235
|
/**
|
|
234
236
|
* Retrieves total nodes count and a single page of nodes.
|
|
235
|
-
* @deprecated in 4.5 -
|
|
237
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
236
238
|
*/
|
|
237
239
|
async getNodesAndCount(requestOptions) {
|
|
238
240
|
const result = await this.getNodesIterator(requestOptions);
|
|
@@ -324,8 +326,14 @@ class PresentationManager {
|
|
|
324
326
|
});
|
|
325
327
|
let contentFormatter;
|
|
326
328
|
if (!requestOptions.omitFormattedValues) {
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
+
const schemaContext = this._schemaContextProvider(requestOptions.imodel);
|
|
330
|
+
const unitSystem = requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? core_frontend_1.IModelApp.quantityFormatter.activeUnitSystem;
|
|
331
|
+
const koqPropertyFormatter = new presentation_common_1.KoqPropertyValueFormatter({
|
|
332
|
+
schemaContext,
|
|
333
|
+
formatsProvider: core_frontend_1.IModelApp.formatsProvider,
|
|
334
|
+
});
|
|
335
|
+
koqPropertyFormatter.defaultFormats = this._defaultFormats;
|
|
336
|
+
contentFormatter = new internal_1.ContentFormatter(new internal_1.ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);
|
|
329
337
|
}
|
|
330
338
|
let descriptor = requestOptions.descriptor instanceof presentation_common_1.Descriptor ? requestOptions.descriptor : undefined;
|
|
331
339
|
let firstPage;
|
|
@@ -376,7 +384,7 @@ class PresentationManager {
|
|
|
376
384
|
}
|
|
377
385
|
/**
|
|
378
386
|
* Retrieves content which consists of a content descriptor and a page of records.
|
|
379
|
-
* @deprecated in 4.5 -
|
|
387
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
380
388
|
*/
|
|
381
389
|
async getContent(requestOptions) {
|
|
382
390
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -384,7 +392,7 @@ class PresentationManager {
|
|
|
384
392
|
}
|
|
385
393
|
/**
|
|
386
394
|
* Retrieves content set size and content which consists of a content descriptor and a page of records.
|
|
387
|
-
* @deprecated in 4.5 -
|
|
395
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
388
396
|
*/
|
|
389
397
|
async getContentAndSize(requestOptions) {
|
|
390
398
|
const response = await this.getContentIterator(requestOptions);
|
|
@@ -421,7 +429,7 @@ class PresentationManager {
|
|
|
421
429
|
}
|
|
422
430
|
/**
|
|
423
431
|
* Retrieves distinct values of specific field from the content.
|
|
424
|
-
* @deprecated in 4.5 -
|
|
432
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.
|
|
425
433
|
*/
|
|
426
434
|
async getPagedDistinctValues(requestOptions) {
|
|
427
435
|
const result = await this.getDistinctValuesIterator(requestOptions);
|
|
@@ -510,7 +518,7 @@ class PresentationManager {
|
|
|
510
518
|
}
|
|
511
519
|
/**
|
|
512
520
|
* Retrieves display label definition of specific items.
|
|
513
|
-
* @deprecated in 4.5 -
|
|
521
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.
|
|
514
522
|
*/
|
|
515
523
|
async getDisplayLabelDefinitions(requestOptions) {
|
|
516
524
|
const { items } = await this.getDisplayLabelDefinitionsIterator(requestOptions);
|