@itwin/appui-abstract 3.0.0-dev.98 → 3.0.0
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 +108 -2
- package/LICENSE.md +1 -1
- package/lib/cjs/appui-abstract/UiItemsManager.d.ts +23 -8
- package/lib/cjs/appui-abstract/UiItemsManager.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/UiItemsManager.js +72 -2
- package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
- package/lib/cjs/appui-abstract/common/KeyboardKey.d.ts +1 -1
- package/lib/cjs/appui-abstract/common/KeyboardKey.js +1 -1
- package/lib/cjs/appui-abstract/common/KeyboardKey.js.map +1 -1
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.d.ts +1 -1
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.js +2 -2
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/cjs/appui-abstract/notification/MessageSeverity.d.ts +2 -1
- package/lib/cjs/appui-abstract/notification/MessageSeverity.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/notification/MessageSeverity.js +1 -0
- package/lib/cjs/appui-abstract/notification/MessageSeverity.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiError.d.ts +1 -1
- package/lib/cjs/appui-abstract/utils/UiError.js +1 -1
- package/lib/cjs/appui-abstract/utils/UiError.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiEvent.d.ts +10 -0
- package/lib/cjs/appui-abstract/utils/UiEvent.d.ts.map +1 -0
- package/lib/cjs/appui-abstract/utils/UiEvent.js +18 -0
- package/lib/cjs/appui-abstract/utils/UiEvent.js.map +1 -0
- package/lib/cjs/appui-abstract/utils/UiEventDispatcher.d.ts +47 -0
- package/lib/cjs/appui-abstract/utils/UiEventDispatcher.d.ts.map +1 -0
- package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js +132 -0
- package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js.map +1 -0
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts +2 -2
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
- package/lib/cjs/appui-abstract/widget/StagePanel.d.ts +1 -1
- package/lib/cjs/appui-abstract/widget/StagePanel.js +1 -1
- package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
- package/lib/cjs/appui-abstract.d.ts +2 -8
- package/lib/cjs/appui-abstract.d.ts.map +1 -1
- package/lib/cjs/appui-abstract.js +2 -8
- package/lib/cjs/appui-abstract.js.map +1 -1
- package/lib/esm/appui-abstract/UiItemsManager.d.ts +23 -8
- package/lib/esm/appui-abstract/UiItemsManager.d.ts.map +1 -1
- package/lib/esm/appui-abstract/UiItemsManager.js +70 -1
- package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
- package/lib/esm/appui-abstract/common/KeyboardKey.d.ts +1 -1
- package/lib/esm/appui-abstract/common/KeyboardKey.js +1 -1
- package/lib/esm/appui-abstract/common/KeyboardKey.js.map +1 -1
- package/lib/esm/appui-abstract/content/StandardContentLayouts.d.ts +1 -1
- package/lib/esm/appui-abstract/content/StandardContentLayouts.d.ts.map +1 -1
- package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/esm/appui-abstract/notification/MessageSeverity.d.ts +2 -1
- package/lib/esm/appui-abstract/notification/MessageSeverity.d.ts.map +1 -1
- package/lib/esm/appui-abstract/notification/MessageSeverity.js +1 -0
- package/lib/esm/appui-abstract/notification/MessageSeverity.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiError.d.ts +1 -1
- package/lib/esm/appui-abstract/utils/UiError.js +1 -1
- package/lib/esm/appui-abstract/utils/UiError.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiEvent.d.ts +10 -0
- package/lib/esm/appui-abstract/utils/UiEvent.d.ts.map +1 -0
- package/lib/esm/appui-abstract/utils/UiEvent.js +14 -0
- package/lib/esm/appui-abstract/utils/UiEvent.js.map +1 -0
- package/lib/esm/appui-abstract/utils/UiEventDispatcher.d.ts +47 -0
- package/lib/esm/appui-abstract/utils/UiEventDispatcher.d.ts.map +1 -0
- package/lib/esm/appui-abstract/utils/UiEventDispatcher.js +127 -0
- package/lib/esm/appui-abstract/utils/UiEventDispatcher.js.map +1 -0
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts +2 -2
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts.map +1 -1
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
- package/lib/esm/appui-abstract/widget/StagePanel.d.ts +1 -1
- package/lib/esm/appui-abstract/widget/StagePanel.js +1 -1
- package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
- package/lib/esm/appui-abstract.d.ts +2 -8
- package/lib/esm/appui-abstract.d.ts.map +1 -1
- package/lib/esm/appui-abstract.js +2 -8
- package/lib/esm/appui-abstract.js.map +1 -1
- package/package.json +13 -14
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Utilities
|
|
3
|
+
*/
|
|
4
|
+
import { UiEvent } from "./UiEvent";
|
|
5
|
+
/** UiSync Event arguments. Contains a set of lower case event Ids.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface UiSyncEventArgs {
|
|
9
|
+
eventIds: Set<string>;
|
|
10
|
+
}
|
|
11
|
+
/** UiSync Event class.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare class UiSyncEvent extends UiEvent<UiSyncEventArgs> {
|
|
15
|
+
}
|
|
16
|
+
/** This class is used to send eventIds to interested UI components so the component can determine if it needs
|
|
17
|
+
* to refresh its display by calling setState on itself.
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare class UiEventDispatcher {
|
|
21
|
+
private _syncEventTimerId;
|
|
22
|
+
private _eventIds;
|
|
23
|
+
private _eventIdAdded;
|
|
24
|
+
private _uiSyncEvent;
|
|
25
|
+
private _timeoutPeriod;
|
|
26
|
+
private _secondaryTimeoutPeriod;
|
|
27
|
+
constructor();
|
|
28
|
+
/** @internal - used for testing only */
|
|
29
|
+
setTimeoutPeriod(period: number): void;
|
|
30
|
+
/** The current timeout period */
|
|
31
|
+
get timeoutPeriod(): number;
|
|
32
|
+
/** Return set of event ids that will be sent to listeners/. */
|
|
33
|
+
get syncEventIds(): Set<string>;
|
|
34
|
+
/** Return UiSyncEvent so callers can register an event callback. */
|
|
35
|
+
get onSyncUiEvent(): UiSyncEvent;
|
|
36
|
+
/** Immediately trigger sync event processing. */
|
|
37
|
+
dispatchImmediateSyncUiEvent(eventId: string): void;
|
|
38
|
+
/** Save eventId in Set for processing. */
|
|
39
|
+
dispatchSyncUiEvent(eventId: string): void;
|
|
40
|
+
/** Save multiple eventIds in Set for processing. */
|
|
41
|
+
dispatchSyncUiEvents(eventIds: string[]): void;
|
|
42
|
+
/** Trigger registered event processing when timer has expired and no addition eventId are added. */
|
|
43
|
+
checkForAdditionalIds(): void;
|
|
44
|
+
/** Checks to see if an eventId of interest is contained in the set of eventIds */
|
|
45
|
+
hasEventOfInterest(eventIds: Set<string>, idsOfInterest: string[]): boolean;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=UiEventDispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiEventDispatcher.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEventDispatcher.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,OAAO,CAAC,eAAe,CAAC;CAAI;AAE7D;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,aAAa,CAAC;IACtB,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,cAAc,CAAC;IACvB,OAAO,CAAC,uBAAuB,CAAC;;IAUhC,wCAAwC;IAEjC,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAe7C,iCAAiC;IACjC,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,+DAA+D;IAC/D,IAAW,YAAY,IAAI,GAAG,CAAC,MAAM,CAAC,CAErC;IAED,oEAAoE;IACpE,IAAW,aAAa,IAAI,WAAW,CAEtC;IAED,iDAAiD;IAC1C,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM1D,0CAA0C;IACnC,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAcjD,oDAAoD;IAC7C,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI;IAerD,oGAAoG;IAC7F,qBAAqB;IA+B5B,kFAAkF;IAC3E,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE;CAMzE"}
|
|
@@ -0,0 +1,132 @@
|
|
|
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 Utilities
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.UiEventDispatcher = exports.UiSyncEvent = void 0;
|
|
11
|
+
// cSpell:ignore configurableui
|
|
12
|
+
const UiEvent_1 = require("./UiEvent");
|
|
13
|
+
/** UiSync Event class.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
class UiSyncEvent extends UiEvent_1.UiEvent {
|
|
17
|
+
}
|
|
18
|
+
exports.UiSyncEvent = UiSyncEvent;
|
|
19
|
+
/** This class is used to send eventIds to interested UI components so the component can determine if it needs
|
|
20
|
+
* to refresh its display by calling setState on itself.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
class UiEventDispatcher {
|
|
24
|
+
constructor() {
|
|
25
|
+
this._eventIds = new Set();
|
|
26
|
+
this._eventIdAdded = false;
|
|
27
|
+
this._uiSyncEvent = new UiSyncEvent();
|
|
28
|
+
this._timeoutPeriod = 100;
|
|
29
|
+
this._secondaryTimeoutPeriod = this._timeoutPeriod / 2;
|
|
30
|
+
}
|
|
31
|
+
/** @internal - used for testing only */
|
|
32
|
+
/* istanbul ignore next */
|
|
33
|
+
setTimeoutPeriod(period) {
|
|
34
|
+
this._timeoutPeriod = period;
|
|
35
|
+
this._secondaryTimeoutPeriod = Math.floor(this._timeoutPeriod / 2);
|
|
36
|
+
if (this._secondaryTimeoutPeriod < 1)
|
|
37
|
+
this._secondaryTimeoutPeriod = 1;
|
|
38
|
+
if (this._syncEventTimerId) {
|
|
39
|
+
window.clearTimeout(this._syncEventTimerId);
|
|
40
|
+
this._syncEventTimerId = undefined;
|
|
41
|
+
}
|
|
42
|
+
if (this._eventIds)
|
|
43
|
+
this._eventIds.clear();
|
|
44
|
+
this._eventIdAdded = false;
|
|
45
|
+
}
|
|
46
|
+
/** The current timeout period */
|
|
47
|
+
get timeoutPeriod() {
|
|
48
|
+
return this._timeoutPeriod;
|
|
49
|
+
}
|
|
50
|
+
/** Return set of event ids that will be sent to listeners/. */
|
|
51
|
+
get syncEventIds() {
|
|
52
|
+
return this._eventIds;
|
|
53
|
+
}
|
|
54
|
+
/** Return UiSyncEvent so callers can register an event callback. */
|
|
55
|
+
get onSyncUiEvent() {
|
|
56
|
+
return this._uiSyncEvent;
|
|
57
|
+
}
|
|
58
|
+
/** Immediately trigger sync event processing. */
|
|
59
|
+
dispatchImmediateSyncUiEvent(eventId) {
|
|
60
|
+
const eventIds = new Set();
|
|
61
|
+
eventIds.add(eventId.toLowerCase());
|
|
62
|
+
this.onSyncUiEvent.emit({ eventIds });
|
|
63
|
+
}
|
|
64
|
+
/** Save eventId in Set for processing. */
|
|
65
|
+
dispatchSyncUiEvent(eventId) {
|
|
66
|
+
// istanbul ignore if
|
|
67
|
+
if (0 === this._timeoutPeriod) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.syncEventIds.add(eventId.toLowerCase());
|
|
71
|
+
if (!this._syncEventTimerId) { // if there is not a timer active, create one
|
|
72
|
+
this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._timeoutPeriod);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this._eventIdAdded = true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** Save multiple eventIds in Set for processing. */
|
|
79
|
+
dispatchSyncUiEvents(eventIds) {
|
|
80
|
+
// istanbul ignore if
|
|
81
|
+
if (0 === this._timeoutPeriod) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
eventIds.forEach((id) => this.syncEventIds.add(id.toLowerCase()));
|
|
85
|
+
// istanbul ignore else
|
|
86
|
+
if (!this._syncEventTimerId) { // if there is not a timer active, create one
|
|
87
|
+
this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._timeoutPeriod);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
this._eventIdAdded = true;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/** Trigger registered event processing when timer has expired and no addition eventId are added. */
|
|
94
|
+
checkForAdditionalIds() {
|
|
95
|
+
/* istanbul ignore else */
|
|
96
|
+
if (!this._eventIdAdded) {
|
|
97
|
+
// istanbul ignore else
|
|
98
|
+
if (this._syncEventTimerId) {
|
|
99
|
+
window.clearTimeout(this._syncEventTimerId);
|
|
100
|
+
this._syncEventTimerId = undefined;
|
|
101
|
+
}
|
|
102
|
+
this._eventIdAdded = false;
|
|
103
|
+
// istanbul ignore else
|
|
104
|
+
if (this.syncEventIds.size > 0) {
|
|
105
|
+
const eventIds = new Set();
|
|
106
|
+
this.syncEventIds.forEach((value) => eventIds.add(value));
|
|
107
|
+
this._eventIds.clear();
|
|
108
|
+
this.onSyncUiEvent.emit({ eventIds });
|
|
109
|
+
}
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
// istanbul ignore next
|
|
113
|
+
if (this._syncEventTimerId) {
|
|
114
|
+
window.clearTimeout(this._syncEventTimerId);
|
|
115
|
+
this._syncEventTimerId = undefined;
|
|
116
|
+
}
|
|
117
|
+
// istanbul ignore next
|
|
118
|
+
this._eventIdAdded = false;
|
|
119
|
+
// if events have been added before the initial timer expired wait half that time to see if events are still being added.
|
|
120
|
+
// istanbul ignore next
|
|
121
|
+
this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._secondaryTimeoutPeriod);
|
|
122
|
+
}
|
|
123
|
+
/** Checks to see if an eventId of interest is contained in the set of eventIds */
|
|
124
|
+
hasEventOfInterest(eventIds, idsOfInterest) {
|
|
125
|
+
/* istanbul ignore else */
|
|
126
|
+
if ((idsOfInterest.length > 0) && idsOfInterest.some((value) => eventIds.has(value.toLowerCase())))
|
|
127
|
+
return true;
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.UiEventDispatcher = UiEventDispatcher;
|
|
132
|
+
//# sourceMappingURL=UiEventDispatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiEventDispatcher.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEventDispatcher.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;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QACtE,0BAA0B;QAC1B,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACjH,OAAO,IAAI,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA5HD,8CA4HC","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 Utilities\r\n */\r\n\r\n// cSpell:ignore configurableui\r\nimport { UiEvent } from \"./UiEvent\";\r\n\r\n/** UiSync Event arguments. Contains a set of lower case event Ids.\r\n * @public\r\n */\r\nexport interface UiSyncEventArgs {\r\n eventIds: Set<string>;\r\n}\r\n\r\n/** UiSync Event class.\r\n * @public\r\n */\r\nexport class UiSyncEvent extends UiEvent<UiSyncEventArgs> { }\r\n\r\n/** This class is used to send eventIds to interested UI components so the component can determine if it needs\r\n * to refresh its display by calling setState on itself.\r\n * @public\r\n */\r\nexport class UiEventDispatcher {\r\n private _syncEventTimerId: number | undefined;\r\n private _eventIds: Set<string>;\r\n private _eventIdAdded;\r\n private _uiSyncEvent: UiSyncEvent;\r\n private _timeoutPeriod;\r\n private _secondaryTimeoutPeriod;\r\n\r\n constructor() {\r\n this._eventIds = new Set<string>();\r\n this._eventIdAdded = false;\r\n this._uiSyncEvent = new UiSyncEvent();\r\n this._timeoutPeriod = 100;\r\n this._secondaryTimeoutPeriod = this._timeoutPeriod / 2;\r\n }\r\n\r\n /** @internal - used for testing only */\r\n /* istanbul ignore next */\r\n public setTimeoutPeriod(period: number): void {\r\n this._timeoutPeriod = period;\r\n this._secondaryTimeoutPeriod = Math.floor(this._timeoutPeriod / 2);\r\n if (this._secondaryTimeoutPeriod < 1)\r\n this._secondaryTimeoutPeriod = 1;\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n if (this._eventIds)\r\n this._eventIds.clear();\r\n\r\n this._eventIdAdded = false;\r\n }\r\n\r\n /** The current timeout period */\r\n public get timeoutPeriod(): number {\r\n return this._timeoutPeriod;\r\n }\r\n /** Return set of event ids that will be sent to listeners/. */\r\n public get syncEventIds(): Set<string> {\r\n return this._eventIds;\r\n }\r\n\r\n /** Return UiSyncEvent so callers can register an event callback. */\r\n public get onSyncUiEvent(): UiSyncEvent {\r\n return this._uiSyncEvent;\r\n }\r\n\r\n /** Immediately trigger sync event processing. */\r\n public dispatchImmediateSyncUiEvent(eventId: string): void {\r\n const eventIds = new Set<string>();\r\n eventIds.add(eventId.toLowerCase());\r\n this.onSyncUiEvent.emit({ eventIds });\r\n }\r\n\r\n /** Save eventId in Set for processing. */\r\n public dispatchSyncUiEvent(eventId: string): void {\r\n // istanbul ignore if\r\n if (0 === this._timeoutPeriod) {\r\n return;\r\n }\r\n\r\n this.syncEventIds.add(eventId.toLowerCase());\r\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\r\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._timeoutPeriod);\r\n } else {\r\n this._eventIdAdded = true;\r\n }\r\n }\r\n\r\n /** Save multiple eventIds in Set for processing. */\r\n public dispatchSyncUiEvents(eventIds: string[]): void {\r\n // istanbul ignore if\r\n if (0 === this._timeoutPeriod) {\r\n return;\r\n }\r\n\r\n eventIds.forEach((id) => this.syncEventIds.add(id.toLowerCase()));\r\n // istanbul ignore else\r\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\r\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._timeoutPeriod);\r\n } else {\r\n this._eventIdAdded = true;\r\n }\r\n }\r\n\r\n /** Trigger registered event processing when timer has expired and no addition eventId are added. */\r\n public checkForAdditionalIds() {\r\n /* istanbul ignore else */\r\n if (!this._eventIdAdded) {\r\n // istanbul ignore else\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n this._eventIdAdded = false;\r\n // istanbul ignore else\r\n if (this.syncEventIds.size > 0) {\r\n const eventIds = new Set<string>();\r\n this.syncEventIds.forEach((value) => eventIds.add(value));\r\n this._eventIds.clear();\r\n this.onSyncUiEvent.emit({ eventIds });\r\n }\r\n return;\r\n }\r\n\r\n // istanbul ignore next\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n // istanbul ignore next\r\n this._eventIdAdded = false;\r\n // if events have been added before the initial timer expired wait half that time to see if events are still being added.\r\n // istanbul ignore next\r\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._secondaryTimeoutPeriod);\r\n }\r\n\r\n /** Checks to see if an eventId of interest is contained in the set of eventIds */\r\n public hasEventOfInterest(eventIds: Set<string>, idsOfInterest: string[]) {\r\n /* istanbul ignore else */\r\n if ((idsOfInterest.length > 0) && idsOfInterest.some((value: string): boolean => eventIds.has(value.toLowerCase())))\r\n return true;\r\n return false;\r\n }\r\n}\r\n"]}
|
|
@@ -13,7 +13,7 @@ export interface AbstractWidgetProps extends ProvidedItem {
|
|
|
13
13
|
readonly getWidgetContent: () => any;
|
|
14
14
|
/** Name of icon WebFont entry or if specifying an SVG symbol added by plug on use "svg:" prefix to imported symbol Id. */
|
|
15
15
|
readonly icon?: string | ConditionalStringValue;
|
|
16
|
-
/**
|
|
16
|
+
/** Id used to uniquely identify the widget.
|
|
17
17
|
* @note It is recommended to provide unique widget id to correctly save/restore App layout.
|
|
18
18
|
*/
|
|
19
19
|
readonly id?: string;
|
|
@@ -23,7 +23,7 @@ export interface AbstractWidgetProps extends ProvidedItem {
|
|
|
23
23
|
readonly label?: string | ConditionalStringValue;
|
|
24
24
|
/** used to explicitly set the tooltip shown by a component. */
|
|
25
25
|
readonly tooltip?: string | ConditionalStringValue;
|
|
26
|
-
/** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false. */
|
|
26
|
+
/** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false. @deprecated */
|
|
27
27
|
readonly isFreeform?: boolean;
|
|
28
28
|
/** Application data attached to the Widget. */
|
|
29
29
|
readonly applicationData?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractWidgetProps.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,8BAA8B;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,CAAC;IACrC,0HAA0H;IAC1H,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,8GAA8G;IAC9G,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IACpC,2KAA2K;IAC3K,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACjD,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACnD,
|
|
1
|
+
{"version":3,"file":"AbstractWidgetProps.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":"AAIA;;GA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,MAAM,CAAC;IACtC,oDAAoD;IACpD,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAC5C,iDAAiD;IACjD,QAAQ,CAAC,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAClD,kFAAkF;IAClF,QAAQ,CAAC,uBAAuB,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,sBAAsB;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,gHAAgH;IAChH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,KAAK,WAAW,CAAC;IACnE,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,6CAA6C;IAC7C,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3C,qDAAqD;IACrD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,OAAO,CAAC;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @public\r\n */\r\nexport interface AbstractWidgetProps extends ProvidedItem {\r\n /** Gets the widget content */\r\n readonly getWidgetContent: () => any;\r\n /** Name of icon WebFont entry or if specifying an SVG symbol added by plug on use \"svg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /**
|
|
1
|
+
{"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @public\r\n */\r\nexport interface AbstractWidgetProps extends ProvidedItem {\r\n /** Gets the widget content */\r\n readonly getWidgetContent: () => any;\r\n /** Name of icon WebFont entry or if specifying an SVG symbol added by plug on use \"svg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Id used to uniquely identify the widget.\r\n * @note It is recommended to provide unique widget id to correctly save/restore App layout.\r\n */\r\n readonly id?: string;\r\n /** Default Widget state. Controls how the Widget is initially displayed. Defaults to WidgetState.Unloaded. */\r\n readonly defaultState?: WidgetState;\r\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\r\n readonly label?: string | ConditionalStringValue;\r\n /** used to explicitly set the tooltip shown by a component. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false. @deprecated */\r\n readonly isFreeform?: boolean;\r\n /** Application data attached to the Widget. */\r\n readonly applicationData?: any;\r\n /** optional data to used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Indicates whether this Widget is for the Tool Settings. */\r\n readonly isToolSettings?: boolean;\r\n /** Indicates whether this Widget is for the Status Bar. */\r\n readonly isStatusBar?: boolean;\r\n /** Indicates whether this Widget should fill the available space in the Zone. */\r\n readonly fillZone?: boolean;\r\n /** Indicates if widget can be popped out to a child window. */\r\n readonly canPopout?: boolean;\r\n /** If the widget state is changed to `floating` and the floatingContainerId is defined then the widget will be added to a\r\n * floating panel by that name. If no name is specified the current practice of using a GUID is used. */\r\n readonly floatingContainerId?: string;\r\n /** Indicates if widget can be in floating state. */\r\n readonly isFloatingStateSupported?: boolean;\r\n /** Indicates if floating widget is resizable. */\r\n readonly isFloatingStateWindowResizable?: boolean;\r\n /** Defines that default Top Left position when widget is floated via API calls */\r\n readonly defaultFloatingPosition?: { x: number, y: number };\r\n /** Widget priority */\r\n readonly priority?: number;\r\n /** Defines the SyncUi event Ids that will trigger the stateFunc to run to determine the state of the widget. */\r\n readonly syncEventIds?: string[];\r\n /** Function executed to determine the state of the widget. */\r\n readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState;\r\n /** Badge to be overlaid on the widget tab. */\r\n readonly badgeType?: BadgeType;\r\n /** Handler for widget state changed event */\r\n readonly onWidgetStateChanged?: () => void;\r\n /** Save transient DOM state (i.e. scroll offset). */\r\n readonly saveTransientState?: () => void;\r\n /** Restore transient DOM state.\r\n * @note Return true if the state is restored or the Widget will remount.\r\n */\r\n readonly restoreTransientState?: () => boolean;\r\n}\r\n"]}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.StagePanelSection = exports.StagePanelLocation = exports.AbstractZoneLocation = void 0;
|
|
11
11
|
/** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].
|
|
12
|
-
* @public
|
|
12
|
+
* @public @deprecated
|
|
13
13
|
*/
|
|
14
14
|
var AbstractZoneLocation;
|
|
15
15
|
(function (AbstractZoneLocation) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagePanel.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/StagePanel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,2EAAc,CAAA;IACd,6EAAe,CAAA;IACf,2EAAc,CAAA;IACd,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B;AAED;;GAEG;AACH,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC5B,2DAAS,CAAA;IACT,mEAAO,CAAA;IACP,6DAAI,CAAA;IACJ,+DAAK,CAAA;IACL,iEAAM,CAAA;IACN,yEAAU,CAAA;AACZ,CAAC,EAPW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAO7B;AAED;;GAEG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,2DAAK,CAAA;IACL,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B","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 Widget\r\n */\r\n\r\n/** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].\r\n * @public\r\n */\r\nexport enum AbstractZoneLocation {\r\n CenterLeft = 4,\r\n CenterRight = 6,\r\n BottomLeft = 7,\r\n BottomRight = 9,\r\n}\r\n\r\n/** Available Stage Panel locations.\r\n * @public\r\n */\r\nexport enum StagePanelLocation {\r\n Top = 101,\r\n TopMost,\r\n Left,\r\n Right,\r\n Bottom,\r\n BottomMost,\r\n}\r\n\r\n/** Enum for Stage Panel Sections\r\n * @public\r\n */\r\nexport enum StagePanelSection {\r\n Start,\r\n Middle,\r\n End,\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"StagePanel.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/StagePanel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,2EAAc,CAAA;IACd,6EAAe,CAAA;IACf,2EAAc,CAAA;IACd,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B;AAED;;GAEG;AACH,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC5B,2DAAS,CAAA;IACT,mEAAO,CAAA;IACP,6DAAI,CAAA;IACJ,+DAAK,CAAA;IACL,iEAAM,CAAA;IACN,yEAAU,CAAA;AACZ,CAAC,EAPW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAO7B;AAED;;GAEG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,2DAAK,CAAA;IACL,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B","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 Widget\r\n */\r\n\r\n/** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].\r\n * @public @deprecated\r\n */\r\nexport enum AbstractZoneLocation {\r\n CenterLeft = 4,\r\n CenterRight = 6,\r\n BottomLeft = 7,\r\n BottomRight = 9,\r\n}\r\n\r\n/** Available Stage Panel locations.\r\n * @public\r\n */\r\nexport enum StagePanelLocation {\r\n Top = 101,\r\n TopMost,\r\n Left,\r\n Right,\r\n Bottom,\r\n BottomMost,\r\n}\r\n\r\n/** Enum for Stage Panel Sections\r\n * @public\r\n */\r\nexport enum StagePanelSection {\r\n Start,\r\n Middle,\r\n End,\r\n}\r\n"]}
|
|
@@ -41,6 +41,8 @@ export * from "./appui-abstract/utils/isLetter";
|
|
|
41
41
|
export * from "./appui-abstract/utils/IconSpecUtilities";
|
|
42
42
|
export * from "./appui-abstract/utils/PointProps";
|
|
43
43
|
export * from "./appui-abstract/utils/UiError";
|
|
44
|
+
export * from "./appui-abstract/utils/UiEventDispatcher";
|
|
45
|
+
export * from "./appui-abstract/utils/UiEvent";
|
|
44
46
|
export * from "./appui-abstract/utils/filter/charCode";
|
|
45
47
|
export * from "./appui-abstract/utils/filter/filters";
|
|
46
48
|
export * from "./appui-abstract/utils/filter/strings";
|
|
@@ -55,10 +57,6 @@ export * from "./appui-abstract/widget/WidgetState";
|
|
|
55
57
|
* @docs-group-description Backstage
|
|
56
58
|
* Abstractions used by appui-react package to create and manage the display Backstage menu items.
|
|
57
59
|
*/
|
|
58
|
-
/**
|
|
59
|
-
* @docs-group-description Common
|
|
60
|
-
* Common enums and functions used throughout the UI packages.
|
|
61
|
-
*/
|
|
62
60
|
/**
|
|
63
61
|
* @docs-group-description ContentView
|
|
64
62
|
* Classes and interfaces used with Content Layouts.
|
|
@@ -87,10 +85,6 @@ export * from "./appui-abstract/widget/WidgetState";
|
|
|
87
85
|
* @docs-group-description Toolbar
|
|
88
86
|
* Classes for creating and managing items in a toolbar.
|
|
89
87
|
*/
|
|
90
|
-
/**
|
|
91
|
-
* @docs-group-description StandardContentLayouts
|
|
92
|
-
* Class that contains standard layout definitions for frontstage content/views.
|
|
93
|
-
*/
|
|
94
88
|
/**
|
|
95
89
|
* @docs-group-description UiAdmin
|
|
96
90
|
* Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appui-abstract.d.ts","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":"AAKA,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,qCAAqC,CAAC;AAEpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAEhE,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AAExD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAElD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+CAA+C,CAAC;AAE9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAElD,cAAc,mDAAmD,CAAC;AAClE,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAE9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,kCAAkC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C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAElD,cAAc,mDAAmD,CAAC;AAClE,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAE9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0CAA0C,CAAC;AACzD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AAEpD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
|
|
@@ -57,6 +57,8 @@ __exportStar(require("./appui-abstract/utils/isLetter"), exports);
|
|
|
57
57
|
__exportStar(require("./appui-abstract/utils/IconSpecUtilities"), exports);
|
|
58
58
|
__exportStar(require("./appui-abstract/utils/PointProps"), exports);
|
|
59
59
|
__exportStar(require("./appui-abstract/utils/UiError"), exports);
|
|
60
|
+
__exportStar(require("./appui-abstract/utils/UiEventDispatcher"), exports);
|
|
61
|
+
__exportStar(require("./appui-abstract/utils/UiEvent"), exports);
|
|
60
62
|
__exportStar(require("./appui-abstract/utils/filter/charCode"), exports);
|
|
61
63
|
__exportStar(require("./appui-abstract/utils/filter/filters"), exports);
|
|
62
64
|
__exportStar(require("./appui-abstract/utils/filter/strings"), exports);
|
|
@@ -71,10 +73,6 @@ __exportStar(require("./appui-abstract/widget/WidgetState"), exports);
|
|
|
71
73
|
* @docs-group-description Backstage
|
|
72
74
|
* Abstractions used by appui-react package to create and manage the display Backstage menu items.
|
|
73
75
|
*/
|
|
74
|
-
/**
|
|
75
|
-
* @docs-group-description Common
|
|
76
|
-
* Common enums and functions used throughout the UI packages.
|
|
77
|
-
*/
|
|
78
76
|
/**
|
|
79
77
|
* @docs-group-description ContentView
|
|
80
78
|
* Classes and interfaces used with Content Layouts.
|
|
@@ -103,10 +101,6 @@ __exportStar(require("./appui-abstract/widget/WidgetState"), exports);
|
|
|
103
101
|
* @docs-group-description Toolbar
|
|
104
102
|
* Classes for creating and managing items in a toolbar.
|
|
105
103
|
*/
|
|
106
|
-
/**
|
|
107
|
-
* @docs-group-description StandardContentLayouts
|
|
108
|
-
* Class that contains standard layout definitions for frontstage content/views.
|
|
109
|
-
*/
|
|
110
104
|
/**
|
|
111
105
|
* @docs-group-description UiAdmin
|
|
112
106
|
* Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,2DAAyC;AACzC,kEAAgD;AAEhD,2EAAyD;AACzD,mFAAiE;AAEjE,sEAAoD;AAEpD,8EAA4D;AAC5D,kFAAgE;AAEhE,sEAAoD;AACpD,gFAA8D;AAC9D,0EAAwD;AAExD,2EAAyD;AACzD,+EAA6D;AAC7D,sEAAoD;AACpD,8EAA4D;AAC5D,mEAAiD;AAEjD,iFAA+D;AAC/D,gFAA8D;AAC9D,0EAAwD;AACxD,sEAAoD;AACpD,0EAAwD;AACxD,oEAAkD;AAElD,iFAA+D;AAC/D,gFAA8D;AAE9D,0EAAwD;AACxD,2EAAyD;AACzD,6EAA2D;AAC3D,qEAAmD;AACnD,kFAAgE;AAChE,gFAA8D;AAC9D,oEAAkD;AAElD,oFAAkE;AAClE,2EAAyD;AACzD,mFAAiE;AAEjE,wEAAsD;AACtD,gFAA8D;AAE9D,2EAAyD;AACzD,mFAAiE;AAEjE,mEAAiD;AACjD,8DAA4C;AAC5C,kEAAgD;AAChD,2EAAyD;AACzD,oEAAkD;AAClD,iEAA+C;AAC/C,yEAAuD;AACvD,wEAAsD;AACtD,wEAAsD;AAEtD,8EAA4D;AAC5D,qEAAmD;AACnD,sEAAoD;AAEpD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG
|
|
1
|
+
{"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,2DAAyC;AACzC,kEAAgD;AAEhD,2EAAyD;AACzD,mFAAiE;AAEjE,sEAAoD;AAEpD,8EAA4D;AAC5D,kFAAgE;AAEhE,sEAAoD;AACpD,gFAA8D;AAC9D,0EAAwD;AAExD,2EAAyD;AACzD,+EAA6D;AAC7D,sEAAoD;AACpD,8EAA4D;AAC5D,mEAAiD;AAEjD,iFAA+D;AAC/D,gFAA8D;AAC9D,0EAAwD;AACxD,sEAAoD;AACpD,0EAAwD;AACxD,oEAAkD;AAElD,iFAA+D;AAC/D,gFAA8D;AAE9D,0EAAwD;AACxD,2EAAyD;AACzD,6EAA2D;AAC3D,qEAAmD;AACnD,kFAAgE;AAChE,gFAA8D;AAC9D,oEAAkD;AAElD,oFAAkE;AAClE,2EAAyD;AACzD,mFAAiE;AAEjE,wEAAsD;AACtD,gFAA8D;AAE9D,2EAAyD;AACzD,mFAAiE;AAEjE,mEAAiD;AACjD,8DAA4C;AAC5C,kEAAgD;AAChD,2EAAyD;AACzD,oEAAkD;AAClD,iEAA+C;AAC/C,2EAAyD;AACzD,iEAA+C;AAC/C,yEAAuD;AACvD,wEAAsD;AACtD,wEAAsD;AAEtD,8EAA4D;AAC5D,qEAAmD;AACnD,sEAAoD;AAEpD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./appui-abstract/UiAdmin\";\r\nexport * from \"./appui-abstract/UiItemsManager\";\r\n\r\nexport * from \"./appui-abstract/backstage/BackstageItem\";\r\nexport * from \"./appui-abstract/backstage/BackstageItemsManager\";\r\n\r\nexport * from \"./appui-abstract/common/KeyboardKey\";\r\n\r\nexport * from \"./appui-abstract/content/ContentLayoutProps\";\r\nexport * from \"./appui-abstract/content/StandardContentLayouts\";\r\n\r\nexport * from \"./appui-abstract/dialogs/DialogItem\";\r\nexport * from \"./appui-abstract/dialogs/UiLayoutDataProvider\";\r\nexport * from \"./appui-abstract/dialogs/UiDataProvider\";\r\n\r\nexport * from \"./appui-abstract/items/AbstractItemProps\";\r\nexport * from \"./appui-abstract/items/AbstractMenuItemProps\";\r\nexport * from \"./appui-abstract/items/ProvidedItem\";\r\nexport * from \"./appui-abstract/items/AbstractToolbarProps\";\r\nexport * from \"./appui-abstract/items/BadgeType\";\r\n\r\nexport * from \"./appui-abstract/items/ConditionalBooleanValue\";\r\nexport * from \"./appui-abstract/items/ConditionalStringValue\";\r\nexport * from \"./appui-abstract/items/RelativePosition\";\r\nexport * from \"./appui-abstract/items/ProvidedItem\";\r\nexport * from \"./appui-abstract/items/RelativePosition\";\r\nexport * from \"./appui-abstract/items/StageUsage\";\r\n\r\nexport * from \"./appui-abstract/notification/MessagePresenter\";\r\nexport * from \"./appui-abstract/notification/MessageSeverity\";\r\n\r\nexport * from \"./appui-abstract/properties/Description\";\r\nexport * from \"./appui-abstract/properties/EditorParams\";\r\nexport * from \"./appui-abstract/properties/PrimitiveTypes\";\r\nexport * from \"./appui-abstract/properties/Record\";\r\nexport * from \"./appui-abstract/properties/StandardEditorNames\";\r\nexport * from \"./appui-abstract/properties/StandardTypeNames\";\r\nexport * from \"./appui-abstract/properties/Value\";\r\n\r\nexport * from \"./appui-abstract/quantity/BaseQuantityDescription\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/toolbars/ToolbarItem\";\r\nexport * from \"./appui-abstract/toolbars/ToolbarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/utils/callbacks\";\r\nexport * from \"./appui-abstract/utils/misc\";\r\nexport * from \"./appui-abstract/utils/isLetter\";\r\nexport * from \"./appui-abstract/utils/IconSpecUtilities\";\r\nexport * from \"./appui-abstract/utils/PointProps\";\r\nexport * from \"./appui-abstract/utils/UiError\";\r\nexport * from \"./appui-abstract/utils/UiEventDispatcher\";\r\nexport * from \"./appui-abstract/utils/UiEvent\";\r\nexport * from \"./appui-abstract/utils/filter/charCode\";\r\nexport * from \"./appui-abstract/utils/filter/filters\";\r\nexport * from \"./appui-abstract/utils/filter/strings\";\r\n\r\nexport * from \"./appui-abstract/widget/AbstractWidgetProps\";\r\nexport * from \"./appui-abstract/widget/StagePanel\";\r\nexport * from \"./appui-abstract/widget/WidgetState\";\r\n\r\n/** @docs-package-description\r\n * The appui-abstract package contains abstractions for UI controls, such as toolbars, buttons and menus.\r\n * For more information, see [learning about appui-abstract]($docs/learning/ui/abstract/index.md).\r\n */\r\n/**\r\n * @docs-group-description Backstage\r\n * Abstractions used by appui-react package to create and manage the display Backstage menu items.\r\n */\r\n/**\r\n * @docs-group-description ContentView\r\n * Classes and interfaces used with Content Layouts.\r\n */\r\n/**\r\n * @docs-group-description Dialog\r\n * Interfaces and classes for generating UI items for Dialogs.\r\n */\r\n/**\r\n * @docs-group-description Item\r\n * Classes for working with an Item in a Toolbar, Widget, Backstage or Context Menu\r\n */\r\n/**\r\n * @docs-group-description Notification\r\n * Interfaces and enums for working with a message\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Properties system for data input and formatting.\r\n */\r\n/**\r\n * @docs-group-description StatusBar\r\n * Classes for creating and managing items in the status bar.\r\n */\r\n/**\r\n * @docs-group-description Toolbar\r\n * Classes for creating and managing items in a toolbar.\r\n */\r\n/**\r\n * @docs-group-description UiAdmin\r\n * Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.\r\n */\r\n/**\r\n * @docs-group-description UiItemsProvider\r\n * Interface for specifying UI items to be inserted at runtime.\r\n */\r\n/**\r\n * @docs-group-description Utilities\r\n * Various utility classes for working with a UI.\r\n */\r\n/**\r\n * @docs-group-description Widget\r\n * Classes for creating and providing Widgets.\r\n */\r\n"]}
|
|
@@ -34,14 +34,29 @@ export interface UiItemsProvider {
|
|
|
34
34
|
* @note Returned widgets must provide unique `AbstractWidgetProps["id"]` to correctly save/restore App layout.
|
|
35
35
|
*/
|
|
36
36
|
provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>;
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
/** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */
|
|
38
|
+
onUnregister?: () => void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the
|
|
42
|
+
* active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare class BaseUiItemsProvider implements UiItemsProvider {
|
|
46
|
+
protected _providerId: string;
|
|
47
|
+
isSupportedStage?: ((stageId: string, stageUsage: string, stageAppData?: any) => boolean) | undefined;
|
|
48
|
+
constructor(_providerId: string, isSupportedStage?: ((stageId: string, stageUsage: string, stageAppData?: any) => boolean) | undefined);
|
|
49
|
+
get id(): string;
|
|
50
|
+
onUnregister(): void;
|
|
51
|
+
unregister(): void;
|
|
52
|
+
/** Backstage items are not stage specific so no callback is used */
|
|
53
|
+
provideBackstageItems(): BackstageItem[];
|
|
54
|
+
provideToolbarButtonItemsInternal(_stageId: string, _stageUsage: string, _toolbarUsage: ToolbarUsage, _toolbarOrientation: ToolbarOrientation, _stageAppData?: any): CommonToolbarItem[];
|
|
55
|
+
provideToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[];
|
|
56
|
+
provideStatusBarItemsInternal(_stageId: string, _stageUsage: string, _stageAppData?: any): CommonStatusBarItem[];
|
|
57
|
+
provideStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[];
|
|
58
|
+
provideWidgetsInternal(_stageId: string, _stageUsage: string, _location: StagePanelLocation, _section?: StagePanelSection, _stageAppData?: any): AbstractWidgetProps[];
|
|
59
|
+
provideWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, _zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps>;
|
|
45
60
|
}
|
|
46
61
|
/** UIProvider Registered Event Args interface.
|
|
47
62
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiItemsManager.d.ts","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UiItemsManager.d.ts","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIlG;;GAEG;AACH,oBAAY,wBAAwB;IAClC,mCAAmC;IACnC,KAAK,IAAA;IACL,sCAAsC;IACtC,QAAQ,IAAA;IACR,wCAAwC;IACxC,MAAM,IAAA;CACP;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,uFAAuF;IACvF,yBAAyB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,iBAAiB,EAAE,CAAC;IACjL,gGAAgG;IAChG,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,mBAAmB,EAAE,CA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iBAAiB,EAAE;IAgBlF;;;;OAIG;WACW,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,mBAAmB,EAAE;IAgB/G;;OAEG;WACW,iBAAiB,IAAI,aAAa,EAAE;IAgBlD;;;;;;OAMG;WACW,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,aAAa,CAAC,mBAAmB,CAAC;CAgBtN"}
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/* eslint-disable deprecation/deprecation */
|
|
5
6
|
/** @packageDocumentation
|
|
6
7
|
* @module UiItemsProvider
|
|
7
8
|
*/
|
|
8
9
|
import { BeEvent, Logger } from "@itwin/core-bentley";
|
|
9
10
|
import { loggerCategory } from "./utils/misc";
|
|
11
|
+
import { StageUsage } from "./items/StageUsage";
|
|
10
12
|
/** Action taken by the application on item provided by a UiItemsProvider
|
|
11
13
|
* @public
|
|
12
14
|
*/
|
|
@@ -19,6 +21,71 @@ export var UiItemsApplicationAction;
|
|
|
19
21
|
/** Update the item during the change */
|
|
20
22
|
UiItemsApplicationAction[UiItemsApplicationAction["Update"] = 2] = "Update";
|
|
21
23
|
})(UiItemsApplicationAction || (UiItemsApplicationAction = {}));
|
|
24
|
+
/**
|
|
25
|
+
* Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the
|
|
26
|
+
* active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export class BaseUiItemsProvider {
|
|
30
|
+
/*
|
|
31
|
+
* @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want
|
|
32
|
+
* to set up custom stage with their own subset of standard tools.
|
|
33
|
+
* @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and
|
|
34
|
+
* the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.
|
|
35
|
+
*/
|
|
36
|
+
constructor(_providerId, isSupportedStage) {
|
|
37
|
+
this._providerId = _providerId;
|
|
38
|
+
this.isSupportedStage = isSupportedStage;
|
|
39
|
+
}
|
|
40
|
+
get id() { return this._providerId; }
|
|
41
|
+
onUnregister() { }
|
|
42
|
+
unregister() {
|
|
43
|
+
UiItemsManager.unregister(this._providerId);
|
|
44
|
+
}
|
|
45
|
+
/** Backstage items are not stage specific so no callback is used */
|
|
46
|
+
provideBackstageItems() {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
provideToolbarButtonItemsInternal(_stageId, _stageUsage, _toolbarUsage, _toolbarOrientation, _stageAppData) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData) {
|
|
53
|
+
let provideToStage = false;
|
|
54
|
+
if (this.isSupportedStage) {
|
|
55
|
+
provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
provideToStage = (stageUsage === StageUsage.General);
|
|
59
|
+
}
|
|
60
|
+
return provideToStage ? this.provideToolbarButtonItemsInternal(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData) : [];
|
|
61
|
+
}
|
|
62
|
+
provideStatusBarItemsInternal(_stageId, _stageUsage, _stageAppData) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
provideStatusBarItems(stageId, stageUsage, stageAppData) {
|
|
66
|
+
let provideToStage = false;
|
|
67
|
+
if (this.isSupportedStage) {
|
|
68
|
+
provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
provideToStage = (stageUsage === StageUsage.General);
|
|
72
|
+
}
|
|
73
|
+
return provideToStage ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData) : [];
|
|
74
|
+
}
|
|
75
|
+
provideWidgetsInternal(_stageId, _stageUsage, _location, _section, _stageAppData) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
provideWidgets(stageId, stageUsage, location, section, _zoneLocation, stageAppData) {
|
|
79
|
+
let provideToStage = false;
|
|
80
|
+
if (this.isSupportedStage) {
|
|
81
|
+
provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
provideToStage = (stageUsage === StageUsage.General);
|
|
85
|
+
}
|
|
86
|
+
return provideToStage ? this.provideWidgetsInternal(stageId, stageUsage, location, section, stageAppData) : [];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
22
89
|
/**
|
|
23
90
|
* Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.
|
|
24
91
|
* @public
|
|
@@ -59,8 +126,10 @@ export class UiItemsManager {
|
|
|
59
126
|
}
|
|
60
127
|
/** Remove a specific UiItemsProvider from the list of available providers. */
|
|
61
128
|
static unregister(uiProviderId) {
|
|
62
|
-
|
|
129
|
+
const provider = UiItemsManager.getUiItemsProvider(uiProviderId);
|
|
130
|
+
if (!provider)
|
|
63
131
|
return;
|
|
132
|
+
provider.onUnregister && provider.onUnregister();
|
|
64
133
|
UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);
|
|
65
134
|
Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProviderId}) unloaded`);
|
|
66
135
|
// trigger a refresh of the ui
|