@itwin/presentation-frontend 4.0.0-dev.52 → 4.0.0-dev.54

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.
Files changed (88) hide show
  1. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
  2. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +47 -47
  3. package/lib/cjs/presentation-frontend/Diagnostics.d.ts +14 -14
  4. package/lib/cjs/presentation-frontend/Diagnostics.js +61 -61
  5. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
  6. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js +20 -20
  7. package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
  8. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +41 -41
  9. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts +10 -10
  10. package/lib/cjs/presentation-frontend/LocalizationHelper.js +31 -31
  11. package/lib/cjs/presentation-frontend/Presentation.d.ts +73 -73
  12. package/lib/cjs/presentation-frontend/Presentation.js +159 -159
  13. package/lib/cjs/presentation-frontend/PresentationManager.d.ts +205 -205
  14. package/lib/cjs/presentation-frontend/PresentationManager.js +438 -438
  15. package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
  16. package/lib/cjs/presentation-frontend/RulesetManager.d.ts +63 -63
  17. package/lib/cjs/presentation-frontend/RulesetManager.js +85 -85
  18. package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
  19. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +195 -195
  20. package/lib/cjs/presentation-frontend/StateTracker.d.ts +38 -38
  21. package/lib/cjs/presentation-frontend/StateTracker.js +128 -128
  22. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
  23. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
  24. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +519 -519
  25. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  26. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
  27. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +290 -290
  28. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
  29. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +97 -97
  30. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
  31. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +9 -9
  32. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
  33. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +33 -33
  34. package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
  35. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +108 -108
  36. package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +17 -17
  37. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +40 -40
  38. package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +139 -139
  39. package/lib/cjs/presentation-frontend/selection/SelectionManager.js +414 -414
  40. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
  41. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +91 -91
  42. package/lib/cjs/presentation-frontend.d.ts +34 -34
  43. package/lib/cjs/presentation-frontend.js +54 -50
  44. package/lib/cjs/presentation-frontend.js.map +1 -1
  45. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
  46. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +43 -43
  47. package/lib/esm/presentation-frontend/Diagnostics.d.ts +14 -14
  48. package/lib/esm/presentation-frontend/Diagnostics.js +56 -56
  49. package/lib/esm/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
  50. package/lib/esm/presentation-frontend/FrontendLoggerCategory.js +17 -17
  51. package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
  52. package/lib/esm/presentation-frontend/IpcRequestsHandler.js +37 -37
  53. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts +10 -10
  54. package/lib/esm/presentation-frontend/LocalizationHelper.js +27 -27
  55. package/lib/esm/presentation-frontend/Presentation.d.ts +73 -73
  56. package/lib/esm/presentation-frontend/Presentation.js +155 -155
  57. package/lib/esm/presentation-frontend/PresentationManager.d.ts +205 -205
  58. package/lib/esm/presentation-frontend/PresentationManager.js +433 -433
  59. package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
  60. package/lib/esm/presentation-frontend/RulesetManager.d.ts +63 -63
  61. package/lib/esm/presentation-frontend/RulesetManager.js +81 -81
  62. package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
  63. package/lib/esm/presentation-frontend/RulesetVariablesManager.js +191 -191
  64. package/lib/esm/presentation-frontend/StateTracker.d.ts +38 -38
  65. package/lib/esm/presentation-frontend/StateTracker.js +124 -124
  66. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
  67. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
  68. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +514 -513
  69. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  70. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
  71. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +282 -282
  72. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
  73. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +93 -93
  74. package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
  75. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +8 -8
  76. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
  77. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +29 -29
  78. package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
  79. package/lib/esm/presentation-frontend/selection/SelectionHandler.js +104 -104
  80. package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +17 -17
  81. package/lib/esm/presentation-frontend/selection/SelectionHelper.js +36 -36
  82. package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +139 -139
  83. package/lib/esm/presentation-frontend/selection/SelectionManager.js +409 -409
  84. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
  85. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +85 -85
  86. package/lib/esm/presentation-frontend.d.ts +34 -34
  87. package/lib/esm/presentation-frontend.js +38 -38
  88. package/package.json +15 -15
@@ -1,30 +1,30 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { BeEvent, IDisposable } from "@itwin/core-bentley";
5
- import { InternetConnectivityStatus } from "@itwin/core-common";
6
- /** @internal */
7
- export interface IConnectivityInformationProvider {
8
- readonly status: InternetConnectivityStatus;
9
- readonly onInternetConnectivityChanged: BeEvent<(args: {
10
- status: InternetConnectivityStatus;
11
- }) => void>;
12
- }
13
- /**
14
- * A helper that wraps connectivity-related APIs in NativeApp
15
- * to give a unified information for interested parties in presentation.
16
- *
17
- * @internal
18
- */
19
- export declare class ConnectivityInformationProvider implements IConnectivityInformationProvider, IDisposable {
20
- private _currentStatus?;
21
- private _unsubscribeFromInternetConnectivityChangedEvent?;
22
- readonly onInternetConnectivityChanged: BeEvent<(args: {
23
- status: InternetConnectivityStatus;
24
- }) => void>;
25
- constructor();
26
- dispose(): void;
27
- private onNativeAppInternetConnectivityChanged;
28
- get status(): InternetConnectivityStatus;
29
- }
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { BeEvent, IDisposable } from "@itwin/core-bentley";
5
+ import { InternetConnectivityStatus } from "@itwin/core-common";
6
+ /** @internal */
7
+ export interface IConnectivityInformationProvider {
8
+ readonly status: InternetConnectivityStatus;
9
+ readonly onInternetConnectivityChanged: BeEvent<(args: {
10
+ status: InternetConnectivityStatus;
11
+ }) => void>;
12
+ }
13
+ /**
14
+ * A helper that wraps connectivity-related APIs in NativeApp
15
+ * to give a unified information for interested parties in presentation.
16
+ *
17
+ * @internal
18
+ */
19
+ export declare class ConnectivityInformationProvider implements IConnectivityInformationProvider, IDisposable {
20
+ private _currentStatus?;
21
+ private _unsubscribeFromInternetConnectivityChangedEvent?;
22
+ readonly onInternetConnectivityChanged: BeEvent<(args: {
23
+ status: InternetConnectivityStatus;
24
+ }) => void>;
25
+ constructor();
26
+ dispose(): void;
27
+ private onNativeAppInternetConnectivityChanged;
28
+ get status(): InternetConnectivityStatus;
29
+ }
30
30
  //# sourceMappingURL=ConnectivityInformationProvider.d.ts.map
@@ -1,48 +1,48 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Core
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ConnectivityInformationProvider = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const core_common_1 = require("@itwin/core-common");
13
- const core_frontend_1 = require("@itwin/core-frontend");
14
- /**
15
- * A helper that wraps connectivity-related APIs in NativeApp
16
- * to give a unified information for interested parties in presentation.
17
- *
18
- * @internal
19
- */
20
- class ConnectivityInformationProvider {
21
- constructor() {
22
- this.onInternetConnectivityChanged = new core_bentley_1.BeEvent();
23
- // eslint-disable-next-line @typescript-eslint/naming-convention
24
- this.onNativeAppInternetConnectivityChanged = (status) => {
25
- if (this._currentStatus === status)
26
- return;
27
- this._currentStatus = status;
28
- this.onInternetConnectivityChanged.raiseEvent({ status });
29
- };
30
- if (core_frontend_1.NativeApp.isValid) {
31
- this._unsubscribeFromInternetConnectivityChangedEvent = core_frontend_1.NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);
32
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
33
- core_frontend_1.NativeApp.checkInternetConnectivity().then((status) => {
34
- if (undefined === this._currentStatus)
35
- this._currentStatus = status;
36
- });
37
- }
38
- else {
39
- this._currentStatus = core_common_1.InternetConnectivityStatus.Online;
40
- }
41
- }
42
- dispose() {
43
- this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();
44
- }
45
- get status() { return this._currentStatus ?? core_common_1.InternetConnectivityStatus.Offline; }
46
- }
47
- exports.ConnectivityInformationProvider = ConnectivityInformationProvider;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Core
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ConnectivityInformationProvider = void 0;
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ const core_common_1 = require("@itwin/core-common");
13
+ const core_frontend_1 = require("@itwin/core-frontend");
14
+ /**
15
+ * A helper that wraps connectivity-related APIs in NativeApp
16
+ * to give a unified information for interested parties in presentation.
17
+ *
18
+ * @internal
19
+ */
20
+ class ConnectivityInformationProvider {
21
+ constructor() {
22
+ this.onInternetConnectivityChanged = new core_bentley_1.BeEvent();
23
+ // eslint-disable-next-line @typescript-eslint/naming-convention
24
+ this.onNativeAppInternetConnectivityChanged = (status) => {
25
+ if (this._currentStatus === status)
26
+ return;
27
+ this._currentStatus = status;
28
+ this.onInternetConnectivityChanged.raiseEvent({ status });
29
+ };
30
+ if (core_frontend_1.NativeApp.isValid) {
31
+ this._unsubscribeFromInternetConnectivityChangedEvent = core_frontend_1.NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);
32
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
33
+ core_frontend_1.NativeApp.checkInternetConnectivity().then((status) => {
34
+ if (undefined === this._currentStatus)
35
+ this._currentStatus = status;
36
+ });
37
+ }
38
+ else {
39
+ this._currentStatus = core_common_1.InternetConnectivityStatus.Online;
40
+ }
41
+ }
42
+ dispose() {
43
+ this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();
44
+ }
45
+ get status() { return this._currentStatus ?? core_common_1.InternetConnectivityStatus.Offline; }
46
+ }
47
+ exports.ConnectivityInformationProvider = ConnectivityInformationProvider;
48
48
  //# sourceMappingURL=ConnectivityInformationProvider.js.map
@@ -1,15 +1,15 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { ClientDiagnostics, ClientDiagnosticsHandler } from "@itwin/presentation-common";
5
- /**
6
- * A function which logs messages to the console.
7
- * @beta
8
- */
9
- export declare function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics): void;
10
- /**
11
- * A function which calls all diagnostics handlers passed to it.
12
- * @beta
13
- */
14
- export declare function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]): (diagnostics: ClientDiagnostics) => void;
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { ClientDiagnostics, ClientDiagnosticsHandler } from "@itwin/presentation-common";
5
+ /**
6
+ * A function which logs messages to the console.
7
+ * @beta
8
+ */
9
+ export declare function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics): void;
10
+ /**
11
+ * A function which calls all diagnostics handlers passed to it.
12
+ * @beta
13
+ */
14
+ export declare function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]): (diagnostics: ClientDiagnostics) => void;
15
15
  //# sourceMappingURL=Diagnostics.d.ts.map
@@ -1,62 +1,62 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Core
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.createCombinedDiagnosticsHandler = exports.consoleDiagnosticsHandler = void 0;
11
- const presentation_common_1 = require("@itwin/presentation-common");
12
- /**
13
- * A function which logs messages to the console.
14
- * @beta
15
- */
16
- function consoleDiagnosticsHandler(diagnostics) {
17
- // eslint-disable-next-line no-console
18
- diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);
19
- diagnostics.logs && handleDiagnosticLogs(diagnostics.logs, (msg, stack) => {
20
- /* note: we're duplicating the message if it's logged at both editor and dev severity levels */
21
- const str = buildLogMessageString(msg, stack);
22
- if (msg.severity.editor)
23
- getConsoleLogFunc(msg.severity.editor)(str);
24
- if (msg.severity.dev)
25
- getConsoleLogFunc(msg.severity.dev)(str);
26
- });
27
- }
28
- exports.consoleDiagnosticsHandler = consoleDiagnosticsHandler;
29
- /**
30
- * A function which calls all diagnostics handlers passed to it.
31
- * @beta
32
- */
33
- function createCombinedDiagnosticsHandler(handlers) {
34
- return (diagnostics) => {
35
- handlers.forEach((handler) => handler(diagnostics));
36
- };
37
- }
38
- exports.createCombinedDiagnosticsHandler = createCombinedDiagnosticsHandler;
39
- function handleDiagnosticLogs(logs, messageHandler, stack = []) {
40
- logs.forEach((log) => {
41
- if (presentation_common_1.DiagnosticsLogEntry.isMessage(log)) {
42
- messageHandler(log, stack);
43
- }
44
- else if (log.logs) {
45
- handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);
46
- }
47
- });
48
- }
49
- function buildLogMessageString(msg, _stack) {
50
- return msg.message;
51
- }
52
- function getConsoleLogFunc(severity) {
53
- switch (severity) {
54
- case "error": return console.error; // eslint-disable-line no-console
55
- case "warning": return console.warn; // eslint-disable-line no-console
56
- case "info":
57
- case "debug":
58
- case "trace":
59
- return console.log; // eslint-disable-line no-console
60
- }
61
- }
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Core
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.createCombinedDiagnosticsHandler = exports.consoleDiagnosticsHandler = void 0;
11
+ const presentation_common_1 = require("@itwin/presentation-common");
12
+ /**
13
+ * A function which logs messages to the console.
14
+ * @beta
15
+ */
16
+ function consoleDiagnosticsHandler(diagnostics) {
17
+ // eslint-disable-next-line no-console
18
+ diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);
19
+ diagnostics.logs && handleDiagnosticLogs(diagnostics.logs, (msg, stack) => {
20
+ /* note: we're duplicating the message if it's logged at both editor and dev severity levels */
21
+ const str = buildLogMessageString(msg, stack);
22
+ if (msg.severity.editor)
23
+ getConsoleLogFunc(msg.severity.editor)(str);
24
+ if (msg.severity.dev)
25
+ getConsoleLogFunc(msg.severity.dev)(str);
26
+ });
27
+ }
28
+ exports.consoleDiagnosticsHandler = consoleDiagnosticsHandler;
29
+ /**
30
+ * A function which calls all diagnostics handlers passed to it.
31
+ * @beta
32
+ */
33
+ function createCombinedDiagnosticsHandler(handlers) {
34
+ return (diagnostics) => {
35
+ handlers.forEach((handler) => handler(diagnostics));
36
+ };
37
+ }
38
+ exports.createCombinedDiagnosticsHandler = createCombinedDiagnosticsHandler;
39
+ function handleDiagnosticLogs(logs, messageHandler, stack = []) {
40
+ logs.forEach((log) => {
41
+ if (presentation_common_1.DiagnosticsLogEntry.isMessage(log)) {
42
+ messageHandler(log, stack);
43
+ }
44
+ else if (log.logs) {
45
+ handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);
46
+ }
47
+ });
48
+ }
49
+ function buildLogMessageString(msg, _stack) {
50
+ return msg.message;
51
+ }
52
+ function getConsoleLogFunc(severity) {
53
+ switch (severity) {
54
+ case "error": return console.error; // eslint-disable-line no-console
55
+ case "warning": return console.warn; // eslint-disable-line no-console
56
+ case "info":
57
+ case "debug":
58
+ case "trace":
59
+ return console.log; // eslint-disable-line no-console
60
+ }
61
+ }
62
62
  //# sourceMappingURL=Diagnostics.js.map
@@ -1,13 +1,13 @@
1
- /** @packageDocumentation
2
- * @module Logging
3
- */
4
- /**
5
- * Logger categories used by this package
6
- * @note All logger categories in this package start with the `presentation-frontend` prefix.
7
- * @see [Logger]($bentley)
8
- * @public
9
- */
10
- export declare enum PresentationFrontendLoggerCategory {
11
- Package = "presentation-frontend"
12
- }
1
+ /** @packageDocumentation
2
+ * @module Logging
3
+ */
4
+ /**
5
+ * Logger categories used by this package
6
+ * @note All logger categories in this package start with the `presentation-frontend` prefix.
7
+ * @see [Logger]($bentley)
8
+ * @public
9
+ */
10
+ export declare enum PresentationFrontendLoggerCategory {
11
+ Package = "presentation-frontend"
12
+ }
13
13
  //# sourceMappingURL=FrontendLoggerCategory.d.ts.map
@@ -1,21 +1,21 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Logging
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.PresentationFrontendLoggerCategory = void 0;
11
- /**
12
- * Logger categories used by this package
13
- * @note All logger categories in this package start with the `presentation-frontend` prefix.
14
- * @see [Logger]($bentley)
15
- * @public
16
- */
17
- var PresentationFrontendLoggerCategory;
18
- (function (PresentationFrontendLoggerCategory) {
19
- PresentationFrontendLoggerCategory["Package"] = "presentation-frontend";
20
- })(PresentationFrontendLoggerCategory = exports.PresentationFrontendLoggerCategory || (exports.PresentationFrontendLoggerCategory = {}));
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Logging
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PresentationFrontendLoggerCategory = void 0;
11
+ /**
12
+ * Logger categories used by this package
13
+ * @note All logger categories in this package start with the `presentation-frontend` prefix.
14
+ * @see [Logger]($bentley)
15
+ * @public
16
+ */
17
+ var PresentationFrontendLoggerCategory;
18
+ (function (PresentationFrontendLoggerCategory) {
19
+ PresentationFrontendLoggerCategory["Package"] = "presentation-frontend";
20
+ })(PresentationFrontendLoggerCategory = exports.PresentationFrontendLoggerCategory || (exports.PresentationFrontendLoggerCategory = {}));
21
21
  //# sourceMappingURL=FrontendLoggerCategory.js.map
@@ -1,11 +1,11 @@
1
- import { NodeKey, RulesetVariable, SetRulesetVariableParams, UnsetRulesetVariableParams, UpdateHierarchyStateParams } from "@itwin/presentation-common";
2
- /** @internal */
3
- export declare class IpcRequestsHandler {
4
- readonly clientId: string;
5
- constructor(clientId: string);
6
- private call;
7
- setRulesetVariable(params: Omit<SetRulesetVariableParams<RulesetVariable>, "clientId">): Promise<void>;
8
- unsetRulesetVariable(params: Omit<UnsetRulesetVariableParams, "clientId">): Promise<void>;
9
- updateHierarchyState(params: Omit<UpdateHierarchyStateParams<NodeKey>, "clientId">): Promise<void>;
10
- }
1
+ import { NodeKey, RulesetVariable, SetRulesetVariableParams, UnsetRulesetVariableParams, UpdateHierarchyStateParams } from "@itwin/presentation-common";
2
+ /** @internal */
3
+ export declare class IpcRequestsHandler {
4
+ readonly clientId: string;
5
+ constructor(clientId: string);
6
+ private call;
7
+ setRulesetVariable(params: Omit<SetRulesetVariableParams<RulesetVariable>, "clientId">): Promise<void>;
8
+ unsetRulesetVariable(params: Omit<UnsetRulesetVariableParams, "clientId">): Promise<void>;
9
+ updateHierarchyState(params: Omit<UpdateHierarchyStateParams<NodeKey>, "clientId">): Promise<void>;
10
+ }
11
11
  //# sourceMappingURL=IpcRequestsHandler.d.ts.map
@@ -1,42 +1,42 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.IpcRequestsHandler = void 0;
8
- const core_frontend_1 = require("@itwin/core-frontend");
9
- const presentation_common_1 = require("@itwin/presentation-common");
10
- /** @internal */
11
- class IpcRequestsHandler {
12
- constructor(clientId) {
13
- this.clientId = clientId;
14
- }
15
- async call(methodName, ...args) {
16
- return core_frontend_1.IpcApp.callIpcChannel(presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);
17
- }
18
- async setRulesetVariable(params) {
19
- const jsonParams = {
20
- ...params,
21
- clientId: this.clientId,
22
- variable: presentation_common_1.RulesetVariable.toJSON(params.variable),
23
- };
24
- return this.call("setRulesetVariable", jsonParams);
25
- }
26
- async unsetRulesetVariable(params) {
27
- const jsonParams = {
28
- ...params,
29
- clientId: this.clientId,
30
- };
31
- return this.call("unsetRulesetVariable", jsonParams);
32
- }
33
- async updateHierarchyState(params) {
34
- const jsonParams = {
35
- ...params,
36
- clientId: this.clientId,
37
- };
38
- return this.call("updateHierarchyState", jsonParams);
39
- }
40
- }
41
- exports.IpcRequestsHandler = IpcRequestsHandler;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.IpcRequestsHandler = void 0;
8
+ const core_frontend_1 = require("@itwin/core-frontend");
9
+ const presentation_common_1 = require("@itwin/presentation-common");
10
+ /** @internal */
11
+ class IpcRequestsHandler {
12
+ constructor(clientId) {
13
+ this.clientId = clientId;
14
+ }
15
+ async call(methodName, ...args) {
16
+ return core_frontend_1.IpcApp.callIpcChannel(presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);
17
+ }
18
+ async setRulesetVariable(params) {
19
+ const jsonParams = {
20
+ ...params,
21
+ clientId: this.clientId,
22
+ variable: presentation_common_1.RulesetVariable.toJSON(params.variable),
23
+ };
24
+ return this.call("setRulesetVariable", jsonParams);
25
+ }
26
+ async unsetRulesetVariable(params) {
27
+ const jsonParams = {
28
+ ...params,
29
+ clientId: this.clientId,
30
+ };
31
+ return this.call("unsetRulesetVariable", jsonParams);
32
+ }
33
+ async updateHierarchyState(params) {
34
+ const jsonParams = {
35
+ ...params,
36
+ clientId: this.clientId,
37
+ };
38
+ return this.call("updateHierarchyState", jsonParams);
39
+ }
40
+ }
41
+ exports.IpcRequestsHandler = IpcRequestsHandler;
42
42
  //# sourceMappingURL=IpcRequestsHandler.js.map
@@ -1,11 +1,11 @@
1
- import { LocalizationHelper } from "@itwin/presentation-common";
2
- /** @internal */
3
- export declare class FrontendLocalizationHelper extends LocalizationHelper {
4
- private _lang;
5
- constructor(lang?: string);
6
- get locale(): string | undefined;
7
- set locale(locale: string | undefined);
8
- static registerNamespaces(): Promise<void>;
9
- static unregisterNamespaces(): void;
10
- }
1
+ import { LocalizationHelper } from "@itwin/presentation-common";
2
+ /** @internal */
3
+ export declare class FrontendLocalizationHelper extends LocalizationHelper {
4
+ private _lang;
5
+ constructor(lang?: string);
6
+ get locale(): string | undefined;
7
+ set locale(locale: string | undefined);
8
+ static registerNamespaces(): Promise<void>;
9
+ static unregisterNamespaces(): void;
10
+ }
11
11
  //# sourceMappingURL=LocalizationHelper.d.ts.map
@@ -1,32 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FrontendLocalizationHelper = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const presentation_common_1 = require("@itwin/presentation-common");
9
- const Presentation_1 = require("./Presentation");
10
- const NAMESPACES = ["Presentation"];
11
- /** @internal */
12
- class FrontendLocalizationHelper extends presentation_common_1.LocalizationHelper {
13
- constructor(lang) {
14
- super({ getLocalizedString: (key) => Presentation_1.Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });
15
- this._lang = lang;
16
- }
17
- get locale() {
18
- return this._lang;
19
- }
20
- set locale(locale) {
21
- this._lang = locale;
22
- }
23
- static async registerNamespaces() {
24
- const localizationPromises = NAMESPACES.map(async (namespace) => Presentation_1.Presentation.localization.registerNamespace(namespace));
25
- await Promise.all(localizationPromises);
26
- }
27
- static unregisterNamespaces() {
28
- NAMESPACES.map((namespace) => Presentation_1.Presentation.localization.unregisterNamespace(namespace));
29
- }
30
- }
31
- exports.FrontendLocalizationHelper = FrontendLocalizationHelper;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FrontendLocalizationHelper = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ const presentation_common_1 = require("@itwin/presentation-common");
9
+ const Presentation_1 = require("./Presentation");
10
+ const NAMESPACES = ["Presentation"];
11
+ /** @internal */
12
+ class FrontendLocalizationHelper extends presentation_common_1.LocalizationHelper {
13
+ constructor(lang) {
14
+ super({ getLocalizedString: (key) => Presentation_1.Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });
15
+ this._lang = lang;
16
+ }
17
+ get locale() {
18
+ return this._lang;
19
+ }
20
+ set locale(locale) {
21
+ this._lang = locale;
22
+ }
23
+ static async registerNamespaces() {
24
+ const localizationPromises = NAMESPACES.map(async (namespace) => Presentation_1.Presentation.localization.registerNamespace(namespace));
25
+ await Promise.all(localizationPromises);
26
+ }
27
+ static unregisterNamespaces() {
28
+ NAMESPACES.map((namespace) => Presentation_1.Presentation.localization.unregisterNamespace(namespace));
29
+ }
30
+ }
31
+ exports.FrontendLocalizationHelper = FrontendLocalizationHelper;
32
32
  //# sourceMappingURL=LocalizationHelper.js.map