@itwin/appui-abstract 4.1.3 → 4.1.5
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 +11 -1
- package/lib/cjs/appui-abstract/BaseUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
- package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
- package/lib/cjs/appui-abstract/UiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
- package/lib/cjs/appui-abstract/common/KeyboardKey.js.map +1 -1
- package/lib/cjs/appui-abstract/content/ContentLayoutProps.js.map +1 -1
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/items/AbstractItemProps.js.map +1 -1
- package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
- package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
- package/lib/cjs/appui-abstract/items/BadgeType.js.map +1 -1
- package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
- package/lib/cjs/appui-abstract/items/ConditionalStringValue.js.map +1 -1
- package/lib/cjs/appui-abstract/items/ProvidedItem.js.map +1 -1
- package/lib/cjs/appui-abstract/items/RelativePosition.js.map +1 -1
- package/lib/cjs/appui-abstract/items/StageUsage.js.map +1 -1
- package/lib/cjs/appui-abstract/notification/MessagePresenter.js.map +1 -1
- package/lib/cjs/appui-abstract/notification/MessageSeverity.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/Description.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/EditorParams.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/Record.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/StandardEditorNames.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/StandardTypeNames.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/Value.js.map +1 -1
- package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
- package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
- package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/PointProps.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiError.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiEvent.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/callbacks.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/filter/charCode.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/filter/map.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/filter/strings.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/isLetter.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/misc.js.map +1 -1
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
- package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
- package/lib/cjs/appui-abstract/widget/WidgetState.js.map +1 -1
- package/lib/cjs/appui-abstract.js.map +1 -1
- package/lib/esm/appui-abstract/BaseUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
- package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
- package/lib/esm/appui-abstract/UiItemsProvider.js.map +1 -1
- package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
- package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
- package/lib/esm/appui-abstract/common/KeyboardKey.js.map +1 -1
- package/lib/esm/appui-abstract/content/ContentLayoutProps.js.map +1 -1
- package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
- package/lib/esm/appui-abstract/items/AbstractItemProps.js.map +1 -1
- package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
- package/lib/esm/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
- package/lib/esm/appui-abstract/items/BadgeType.js.map +1 -1
- package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
- package/lib/esm/appui-abstract/items/ConditionalStringValue.js.map +1 -1
- package/lib/esm/appui-abstract/items/ProvidedItem.js.map +1 -1
- package/lib/esm/appui-abstract/items/RelativePosition.js.map +1 -1
- package/lib/esm/appui-abstract/items/StageUsage.js.map +1 -1
- package/lib/esm/appui-abstract/notification/MessagePresenter.js.map +1 -1
- package/lib/esm/appui-abstract/notification/MessageSeverity.js.map +1 -1
- package/lib/esm/appui-abstract/properties/Description.js.map +1 -1
- package/lib/esm/appui-abstract/properties/EditorParams.js.map +1 -1
- package/lib/esm/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
- package/lib/esm/appui-abstract/properties/Record.js.map +1 -1
- package/lib/esm/appui-abstract/properties/StandardEditorNames.js.map +1 -1
- package/lib/esm/appui-abstract/properties/StandardTypeNames.js.map +1 -1
- package/lib/esm/appui-abstract/properties/Value.js.map +1 -1
- package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
- package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
- package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
- package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
- package/lib/esm/appui-abstract/utils/PointProps.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiError.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiEvent.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
- package/lib/esm/appui-abstract/utils/callbacks.js.map +1 -1
- package/lib/esm/appui-abstract/utils/filter/charCode.js.map +1 -1
- package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
- package/lib/esm/appui-abstract/utils/filter/map.js.map +1 -1
- package/lib/esm/appui-abstract/utils/filter/strings.js.map +1 -1
- package/lib/esm/appui-abstract/utils/isLetter.js.map +1 -1
- package/lib/esm/appui-abstract/utils/misc.js.map +1 -1
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
- package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
- package/lib/esm/appui-abstract/widget/WidgetState.js.map +1 -1
- package/lib/esm/appui-abstract.js.map +1 -1
- package/package.json +5 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/map.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;AAyB/F;;GAEG;AACH,uBAAuB;AACvB,MAAa,SAAS;IAWpB;QATS,QAAoB,GAAG,WAAW,CAAC;QAU1C,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,EAAiB,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CA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rB,CAAC;IAED,IAAI,KAAK,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9C,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAEQ,GAAG,CAAC,GAAM,EAAE,2BAA0B;QAC7C,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI,CAAC,GAAM;QACT,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,qBAAa,CAAC;IACpC,CAAC;IAEQ,GAAG,CAAC,GAAM,EAAE,KAAQ;QAC3B,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,sBAAc,CAAC;QACnC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,SAAS;QACf,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE;YAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SACrD;IACH,CAAC;CACF;AAhDD,4BAgDC","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\n// code extracted from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/map.ts\n\n/* eslint-disable @typescript-eslint/explicit-member-accessibility */\n/* eslint-disable @itwin/prefer-get */\n/* eslint-disable no-restricted-syntax */\n/* eslint-disable @typescript-eslint/no-this-alias */\n\ninterface Item<K, V> {\n previous: Item<K, V> | undefined;\n next: Item<K, V> | undefined;\n key: K;\n value: V;\n}\n\n/**\n * @internal\n */\nexport const enum Touch {\n None = 0,\n AsOld = 1,\n AsNew = 2\n}\n\n/**\n * @internal\n */\n// istanbul ignore next\nexport class LinkedMap<K, V> implements Map<K, V> {\n\n readonly [Symbol.toStringTag] = \"LinkedMap\";\n\n private _map: Map<K, Item<K, V>>;\n private _head: Item<K, V> | undefined;\n private _tail: Item<K, V> | undefined;\n private _size: number;\n\n private _state: number;\n\n constructor() {\n this._map = new Map<K, Item<K, V>>();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state = 0;\n }\n\n clear(): void {\n this._map.clear();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state++;\n }\n\n isEmpty(): boolean {\n return !this._head && !this._tail;\n }\n\n get size(): number {\n return this._size;\n }\n\n get first(): V | undefined {\n return this._head?.value;\n }\n\n get last(): V | undefined {\n return this._tail?.value;\n }\n\n has(key: K): boolean {\n return this._map.has(key);\n }\n\n get(key: K, touch: Touch = Touch.None): V | undefined {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n return item.value;\n }\n\n set(key: K, value: V, touch: Touch = Touch.None): this {\n let item = this._map.get(key);\n if (item) {\n item.value = value;\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n } else {\n item = { key, value, next: undefined, previous: undefined };\n switch (touch) {\n case Touch.None:\n this.addItemLast(item);\n break;\n case Touch.AsOld:\n this.addItemFirst(item);\n break;\n case Touch.AsNew:\n this.addItemLast(item);\n break;\n default:\n this.addItemLast(item);\n break;\n }\n this._map.set(key, item);\n this._size++;\n }\n return this;\n }\n\n delete(key: K): boolean {\n return !!this.remove(key);\n }\n\n remove(key: K): V | undefined {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n this._map.delete(key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n\n shift(): V | undefined {\n if (!this._head && !this._tail) {\n return undefined;\n }\n if (!this._head || !this._tail) {\n throw new Error(\"Invalid list\");\n }\n const item = this._head;\n this._map.delete(item.key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n\n forEach(callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void, thisArg?: any): void {\n const state = this._state;\n let current = this._head;\n while (current) {\n if (thisArg) {\n callbackfn.bind(thisArg)(current.value, current.key, this);\n } else {\n callbackfn(current.value, current.key, this);\n }\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n current = current.next;\n }\n }\n\n keys(): IterableIterator<K> {\n const map = this;\n const state = this._state;\n let current = this._head;\n const iterator: IterableIterator<K> = {\n [Symbol.iterator]() {\n return iterator;\n },\n next(): IteratorResult<K> {\n if (map._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.key, done: false };\n current = current.next;\n return result;\n } else {\n return { value: undefined, done: true };\n }\n },\n };\n return iterator;\n }\n\n values(): IterableIterator<V> {\n const map = this;\n const state = this._state;\n let current = this._head;\n const iterator: IterableIterator<V> = {\n [Symbol.iterator]() {\n return iterator;\n },\n next(): IteratorResult<V> {\n if (map._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.value, done: false };\n current = current.next;\n return result;\n } else {\n return { value: undefined, done: true };\n }\n },\n };\n return iterator;\n }\n\n entries(): IterableIterator<[K, V]> {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const map = this;\n const state = this._state;\n let current = this._head;\n const iterator: IterableIterator<[K, V]> = {\n [Symbol.iterator]() {\n return iterator;\n },\n next(): IteratorResult<[K, V]> {\n if (map._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result: IteratorResult<[K, V]> = { value: [current.key, current.value], done: false };\n current = current.next;\n return result;\n } else {\n return { value: undefined, done: true };\n }\n },\n };\n return iterator;\n }\n\n [Symbol.iterator](): IterableIterator<[K, V]> {\n return this.entries();\n }\n\n protected trimOld(newSize: number) {\n if (newSize >= this.size) {\n return;\n }\n if (newSize === 0) {\n this.clear();\n return;\n }\n let current = this._head;\n let currentSize = this.size;\n while (current && currentSize > newSize) {\n this._map.delete(current.key);\n current = current.next;\n currentSize--;\n }\n this._head = current;\n this._size = currentSize;\n if (current) {\n current.previous = undefined;\n }\n this._state++;\n }\n\n private addItemFirst(item: Item<K, V>): void {\n // First time Insert\n if (!this._head && !this._tail) {\n this._tail = item;\n } else if (!this._head) {\n throw new Error(\"Invalid list\");\n } else {\n item.next = this._head;\n this._head.previous = item;\n }\n this._head = item;\n this._state++;\n }\n\n private addItemLast(item: Item<K, V>): void {\n // First time Insert\n if (!this._head && !this._tail) {\n this._head = item;\n } else if (!this._tail) {\n throw new Error(\"Invalid list\");\n } else {\n item.previous = this._tail;\n this._tail.next = item;\n }\n this._tail = item;\n this._state++;\n }\n\n private removeItem(item: Item<K, V>): void {\n if (item === this._head && item === this._tail) {\n this._head = undefined;\n this._tail = undefined;\n } else if (item === this._head) {\n // This can only happend if size === 1 which is handle\n // by the case above.\n if (!item.next) {\n throw new Error(\"Invalid list\");\n }\n item.next.previous = undefined;\n this._head = item.next;\n } else if (item === this._tail) {\n // This can only happend if size === 1 which is handle\n // by the case above.\n if (!item.previous) {\n throw new Error(\"Invalid list\");\n }\n item.previous.next = undefined;\n this._tail = item.previous;\n } else {\n const next = item.next;\n const previous = item.previous;\n if (!next || !previous) {\n throw new Error(\"Invalid list\");\n }\n next.previous = previous;\n previous.next = next;\n }\n item.next = undefined;\n item.previous = undefined;\n this._state++;\n }\n\n private touch(item: Item<K, V>, touch: Touch): void {\n if (!this._head || !this._tail) {\n throw new Error(\"Invalid list\");\n }\n if ((touch !== Touch.AsOld && touch !== Touch.AsNew)) {\n return;\n }\n\n if (touch === Touch.AsOld) {\n if (item === this._head) {\n return;\n }\n\n const next = item.next;\n const previous = item.previous;\n\n // Unlink the item\n if (item === this._tail) {\n // previous must be defined since item was not head but is tail\n // So there are more than on item in the map\n previous!.next = undefined;\n this._tail = previous;\n } else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next!.previous = previous;\n previous!.next = next;\n }\n\n // Insert the node at head\n item.previous = undefined;\n item.next = this._head;\n this._head.previous = item;\n this._head = item;\n this._state++;\n } else if (touch === Touch.AsNew) {\n if (item === this._tail) {\n return;\n }\n\n const next = item.next;\n const previous = item.previous;\n\n // Unlink the item.\n if (item === this._head) {\n // next must be defined since item was not tail but is head\n // So there are more than on item in the map\n next!.previous = undefined;\n this._head = next;\n } else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next!.previous = previous;\n previous!.next = next;\n }\n item.next = undefined;\n item.previous = this._tail;\n this._tail.next = item;\n this._tail = item;\n this._state++;\n }\n }\n\n toJSON(): [K, V][] {\n const data: [K, V][] = [];\n\n this.forEach((value, key) => {\n data.push([key, value]);\n });\n\n return data;\n }\n\n fromJSON(data: [K, V][]): void {\n this.clear();\n\n for (const [key, value] of data) {\n this.set(key, value);\n }\n }\n}\n\n/**\n * @internal\n */\n// istanbul ignore next\nexport class LRUCache<K, V> extends LinkedMap<K, V> {\n\n private _limit: number;\n private _ratio: number;\n\n constructor(limit: number, ratio: number = 1) {\n super();\n this._limit = limit;\n this._ratio = Math.min(Math.max(0, ratio), 1);\n }\n\n get limit(): number {\n return this._limit;\n }\n\n set limit(limit: number) {\n this._limit = limit;\n this.checkTrim();\n }\n\n get ratio(): number {\n return this._ratio;\n }\n\n set ratio(ratio: number) {\n this._ratio = Math.min(Math.max(0, ratio), 1);\n this.checkTrim();\n }\n\n override get(key: K, touch: Touch = Touch.AsNew): V | undefined {\n return super.get(key, touch);\n }\n\n peek(key: K): V | undefined {\n return super.get(key, Touch.None);\n }\n\n override set(key: K, value: V): this {\n super.set(key, value, Touch.AsNew);\n this.checkTrim();\n return this;\n }\n\n private checkTrim() {\n if (this.size > this._limit) {\n this.trimOld(Math.round(this._limit * this._ratio));\n }\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/map.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;AAyB/F;;GAEG;AACH,uBAAuB;AACvB,MAAa,SAAS;IAWpB;QATS,QAAoB,GAAG,WAAW,CAAC;QAU1C,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,EAAiB,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,OAAO;QACL,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IACpC,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC;IAC3B,CAAC;IAED,GAAG,CAAC,GAAM;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,GAAG,CAAC,GAAM,EAAE,0BAAyB;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG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AAI,GAAG,IAAI,CAAC,MAAM,EAAE;YAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SACrD;IACH,CAAC;CACF;AAhDD,4BAgDC","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\n// code extracted from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/map.ts\r\n\r\n/* eslint-disable @typescript-eslint/explicit-member-accessibility */\r\n/* eslint-disable @itwin/prefer-get */\r\n/* eslint-disable no-restricted-syntax */\r\n/* eslint-disable @typescript-eslint/no-this-alias */\r\n\r\ninterface Item<K, V> {\r\n previous: Item<K, V> | undefined;\r\n next: Item<K, V> | undefined;\r\n key: K;\r\n value: V;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const enum Touch {\r\n None = 0,\r\n AsOld = 1,\r\n AsNew = 2\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\n// istanbul ignore next\r\nexport class LinkedMap<K, V> implements Map<K, V> {\r\n\r\n readonly [Symbol.toStringTag] = \"LinkedMap\";\r\n\r\n private _map: Map<K, Item<K, V>>;\r\n private _head: Item<K, V> | undefined;\r\n private _tail: Item<K, V> | undefined;\r\n private _size: number;\r\n\r\n private _state: number;\r\n\r\n constructor() {\r\n this._map = new Map<K, Item<K, V>>();\r\n this._head = undefined;\r\n this._tail = undefined;\r\n this._size = 0;\r\n this._state = 0;\r\n }\r\n\r\n clear(): void {\r\n this._map.clear();\r\n this._head = undefined;\r\n this._tail = undefined;\r\n this._size = 0;\r\n this._state++;\r\n }\r\n\r\n isEmpty(): boolean {\r\n return !this._head && !this._tail;\r\n }\r\n\r\n get size(): number {\r\n return this._size;\r\n }\r\n\r\n get first(): V | undefined {\r\n return this._head?.value;\r\n }\r\n\r\n get last(): V | undefined {\r\n return this._tail?.value;\r\n }\r\n\r\n has(key: K): boolean {\r\n return this._map.has(key);\r\n }\r\n\r\n get(key: K, touch: Touch = Touch.None): V | undefined {\r\n const item = this._map.get(key);\r\n if (!item) {\r\n return undefined;\r\n }\r\n if (touch !== Touch.None) {\r\n this.touch(item, touch);\r\n }\r\n return item.value;\r\n }\r\n\r\n set(key: K, value: V, touch: Touch = Touch.None): this {\r\n let item = this._map.get(key);\r\n if (item) {\r\n item.value = value;\r\n if (touch !== Touch.None) {\r\n this.touch(item, touch);\r\n }\r\n } else {\r\n item = { key, value, next: undefined, previous: undefined };\r\n switch (touch) {\r\n case Touch.None:\r\n this.addItemLast(item);\r\n break;\r\n case Touch.AsOld:\r\n this.addItemFirst(item);\r\n break;\r\n case Touch.AsNew:\r\n this.addItemLast(item);\r\n break;\r\n default:\r\n this.addItemLast(item);\r\n break;\r\n }\r\n this._map.set(key, item);\r\n this._size++;\r\n }\r\n return this;\r\n }\r\n\r\n delete(key: K): boolean {\r\n return !!this.remove(key);\r\n }\r\n\r\n remove(key: K): V | undefined {\r\n const item = this._map.get(key);\r\n if (!item) {\r\n return undefined;\r\n }\r\n this._map.delete(key);\r\n this.removeItem(item);\r\n this._size--;\r\n return item.value;\r\n }\r\n\r\n shift(): V | undefined {\r\n if (!this._head && !this._tail) {\r\n return undefined;\r\n }\r\n if (!this._head || !this._tail) {\r\n throw new Error(\"Invalid list\");\r\n }\r\n const item = this._head;\r\n this._map.delete(item.key);\r\n this.removeItem(item);\r\n this._size--;\r\n return item.value;\r\n }\r\n\r\n forEach(callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void, thisArg?: any): void {\r\n const state = this._state;\r\n let current = this._head;\r\n while (current) {\r\n if (thisArg) {\r\n callbackfn.bind(thisArg)(current.value, current.key, this);\r\n } else {\r\n callbackfn(current.value, current.key, this);\r\n }\r\n if (this._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n current = current.next;\r\n }\r\n }\r\n\r\n keys(): IterableIterator<K> {\r\n const map = this;\r\n const state = this._state;\r\n let current = this._head;\r\n const iterator: IterableIterator<K> = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next(): IteratorResult<K> {\r\n if (map._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n if (current) {\r\n const result = { value: current.key, done: false };\r\n current = current.next;\r\n return result;\r\n } else {\r\n return { value: undefined, done: true };\r\n }\r\n },\r\n };\r\n return iterator;\r\n }\r\n\r\n values(): IterableIterator<V> {\r\n const map = this;\r\n const state = this._state;\r\n let current = this._head;\r\n const iterator: IterableIterator<V> = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next(): IteratorResult<V> {\r\n if (map._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n if (current) {\r\n const result = { value: current.value, done: false };\r\n current = current.next;\r\n return result;\r\n } else {\r\n return { value: undefined, done: true };\r\n }\r\n },\r\n };\r\n return iterator;\r\n }\r\n\r\n entries(): IterableIterator<[K, V]> {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n const map = this;\r\n const state = this._state;\r\n let current = this._head;\r\n const iterator: IterableIterator<[K, V]> = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next(): IteratorResult<[K, V]> {\r\n if (map._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n if (current) {\r\n const result: IteratorResult<[K, V]> = { value: [current.key, current.value], done: false };\r\n current = current.next;\r\n return result;\r\n } else {\r\n return { value: undefined, done: true };\r\n }\r\n },\r\n };\r\n return iterator;\r\n }\r\n\r\n [Symbol.iterator](): IterableIterator<[K, V]> {\r\n return this.entries();\r\n }\r\n\r\n protected trimOld(newSize: number) {\r\n if (newSize >= this.size) {\r\n return;\r\n }\r\n if (newSize === 0) {\r\n this.clear();\r\n return;\r\n }\r\n let current = this._head;\r\n let currentSize = this.size;\r\n while (current && currentSize > newSize) {\r\n this._map.delete(current.key);\r\n current = current.next;\r\n currentSize--;\r\n }\r\n this._head = current;\r\n this._size = currentSize;\r\n if (current) {\r\n current.previous = undefined;\r\n }\r\n this._state++;\r\n }\r\n\r\n private addItemFirst(item: Item<K, V>): void {\r\n // First time Insert\r\n if (!this._head && !this._tail) {\r\n this._tail = item;\r\n } else if (!this._head) {\r\n throw new Error(\"Invalid list\");\r\n } else {\r\n item.next = this._head;\r\n this._head.previous = item;\r\n }\r\n this._head = item;\r\n this._state++;\r\n }\r\n\r\n private addItemLast(item: Item<K, V>): void {\r\n // First time Insert\r\n if (!this._head && !this._tail) {\r\n this._head = item;\r\n } else if (!this._tail) {\r\n throw new Error(\"Invalid list\");\r\n } else {\r\n item.previous = this._tail;\r\n this._tail.next = item;\r\n }\r\n this._tail = item;\r\n this._state++;\r\n }\r\n\r\n private removeItem(item: Item<K, V>): void {\r\n if (item === this._head && item === this._tail) {\r\n this._head = undefined;\r\n this._tail = undefined;\r\n } else if (item === this._head) {\r\n // This can only happend if size === 1 which is handle\r\n // by the case above.\r\n if (!item.next) {\r\n throw new Error(\"Invalid list\");\r\n }\r\n item.next.previous = undefined;\r\n this._head = item.next;\r\n } else if (item === this._tail) {\r\n // This can only happend if size === 1 which is handle\r\n // by the case above.\r\n if (!item.previous) {\r\n throw new Error(\"Invalid list\");\r\n }\r\n item.previous.next = undefined;\r\n this._tail = item.previous;\r\n } else {\r\n const next = item.next;\r\n const previous = item.previous;\r\n if (!next || !previous) {\r\n throw new Error(\"Invalid list\");\r\n }\r\n next.previous = previous;\r\n previous.next = next;\r\n }\r\n item.next = undefined;\r\n item.previous = undefined;\r\n this._state++;\r\n }\r\n\r\n private touch(item: Item<K, V>, touch: Touch): void {\r\n if (!this._head || !this._tail) {\r\n throw new Error(\"Invalid list\");\r\n }\r\n if ((touch !== Touch.AsOld && touch !== Touch.AsNew)) {\r\n return;\r\n }\r\n\r\n if (touch === Touch.AsOld) {\r\n if (item === this._head) {\r\n return;\r\n }\r\n\r\n const next = item.next;\r\n const previous = item.previous;\r\n\r\n // Unlink the item\r\n if (item === this._tail) {\r\n // previous must be defined since item was not head but is tail\r\n // So there are more than on item in the map\r\n previous!.next = undefined;\r\n this._tail = previous;\r\n } else {\r\n // Both next and previous are not undefined since item was neither head nor tail.\r\n next!.previous = previous;\r\n previous!.next = next;\r\n }\r\n\r\n // Insert the node at head\r\n item.previous = undefined;\r\n item.next = this._head;\r\n this._head.previous = item;\r\n this._head = item;\r\n this._state++;\r\n } else if (touch === Touch.AsNew) {\r\n if (item === this._tail) {\r\n return;\r\n }\r\n\r\n const next = item.next;\r\n const previous = item.previous;\r\n\r\n // Unlink the item.\r\n if (item === this._head) {\r\n // next must be defined since item was not tail but is head\r\n // So there are more than on item in the map\r\n next!.previous = undefined;\r\n this._head = next;\r\n } else {\r\n // Both next and previous are not undefined since item was neither head nor tail.\r\n next!.previous = previous;\r\n previous!.next = next;\r\n }\r\n item.next = undefined;\r\n item.previous = this._tail;\r\n this._tail.next = item;\r\n this._tail = item;\r\n this._state++;\r\n }\r\n }\r\n\r\n toJSON(): [K, V][] {\r\n const data: [K, V][] = [];\r\n\r\n this.forEach((value, key) => {\r\n data.push([key, value]);\r\n });\r\n\r\n return data;\r\n }\r\n\r\n fromJSON(data: [K, V][]): void {\r\n this.clear();\r\n\r\n for (const [key, value] of data) {\r\n this.set(key, value);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\n// istanbul ignore next\r\nexport class LRUCache<K, V> extends LinkedMap<K, V> {\r\n\r\n private _limit: number;\r\n private _ratio: number;\r\n\r\n constructor(limit: number, ratio: number = 1) {\r\n super();\r\n this._limit = limit;\r\n this._ratio = Math.min(Math.max(0, ratio), 1);\r\n }\r\n\r\n get limit(): number {\r\n return this._limit;\r\n }\r\n\r\n set limit(limit: number) {\r\n this._limit = limit;\r\n this.checkTrim();\r\n }\r\n\r\n get ratio(): number {\r\n return this._ratio;\r\n }\r\n\r\n set ratio(ratio: number) {\r\n this._ratio = Math.min(Math.max(0, ratio), 1);\r\n this.checkTrim();\r\n }\r\n\r\n override get(key: K, touch: Touch = Touch.AsNew): V | undefined {\r\n return super.get(key, touch);\r\n }\r\n\r\n peek(key: K): V | undefined {\r\n return super.get(key, Touch.None);\r\n }\r\n\r\n override set(key: K, value: V): this {\r\n super.set(key, value, Touch.AsNew);\r\n this.checkTrim();\r\n return this;\r\n }\r\n\r\n private checkTrim() {\r\n if (this.size > this._limit) {\r\n this.trimOld(Math.round(this._limit * this._ratio));\r\n }\r\n }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/strings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAI/F;;GAEG;AACH,SAAgB,2BAA2B,CAAC,OAAe;IACzD,OAAO,OAAO,CAAC,OAAO,CAAC,uCAAuC,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACjG,CAAC;AAFD,kEAEC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,uBAAc,IAAI,IAAI,wBAAc,CAAC;AAClD,CAAC;AAFD,gDAEC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,uBAAc,IAAI,IAAI,uBAAc,CAAC;AAClD,CAAC;AAFD,gDAEC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,CAAS,EAAE,CAAS;IACnD,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAFD,4CAEC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,CAAS,EAAE,CAAS,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM;IACjE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAE9B,IAAI,KAAK,KAAK,KAAK,EAAE;YACnB,SAAS;SACV;QAED,UAAU;QACV,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE;YAChD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;YACrC,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,EAAE,EAAE;gBAC7B,OAAO,KAAK,CAAC;aACd;SACF;aAAM;YACL,sBAAsB;YACtB,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE;gBACzF,OAAO,KAAK,CAAC;aACd;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAAC,GAAW,EAAE,SAAiB;IACjE,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,CAAC;IACzC,IAAI,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IAED,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC7D,CAAC;AAPD,oDAOC","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 { CharCode } from \"./charCode\";\n\n/**\n * @internal\n */\nexport function convertSimple2RegExpPattern(pattern: string): string {\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, \"\\\\$&\").replace(/[\\*]/g, \".*\");\n}\n\n/**\n * @internal\n */\nexport function isLowerAsciiLetter(code: number): boolean {\n return code >= CharCode.a && code <= CharCode.z;\n}\n\n/**\n * @internal\n */\nexport function isUpperAsciiLetter(code: number): boolean {\n return code >= CharCode.A && code <= CharCode.Z;\n}\n\n/**\n * @internal\n */\nfunction isAsciiLetter(code: number): boolean {\n return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);\n}\n\n/**\n * @internal\n */\nexport function equalsIgnoreCase(a: string, b: string): boolean {\n return a.length === b.length && doEqualsIgnoreCase(a, b);\n}\n\n/**\n * @internal\n */\nfunction doEqualsIgnoreCase(a: string, b: string, stopAt = a.length): boolean {\n for (let i = 0; i < stopAt; i++) {\n const codeA = a.charCodeAt(i);\n const codeB = b.charCodeAt(i);\n\n if (codeA === codeB) {\n continue;\n }\n\n // a-z A-Z\n if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {\n const diff = Math.abs(codeA - codeB);\n if (diff !== 0 && diff !== 32) {\n return false;\n }\n } else {\n // Any other char code\n if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {\n return false;\n }\n }\n }\n\n return true;\n}\n\n/**\n * @internal\n */\nexport function startsWithIgnoreCase(str: string, candidate: string): boolean {\n const candidateLength = candidate.length;\n if (candidate.length > str.length) {\n return false;\n }\n\n return doEqualsIgnoreCase(str, candidate, candidateLength);\n}\n"]}
|
1
|
+
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/strings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAI/F;;GAEG;AACH,SAAgB,2BAA2B,CAAC,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C,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,EAAE,EAAE;gBAC7B,OAAO,KAAK,CAAC;aACd;SACF;aAAM;YACL,sBAAsB;YACtB,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE;gBACzF,OAAO,KAAK,CAAC;aACd;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAAC,GAAW,EAAE,SAAiB;IACjE,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,CAAC;IACzC,IAAI,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IAED,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC7D,CAAC;AAPD,oDAOC","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 { CharCode } from \"./charCode\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function convertSimple2RegExpPattern(pattern: string): string {\r\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, \"\\\\$&\").replace(/[\\*]/g, \".*\");\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function isLowerAsciiLetter(code: number): boolean {\r\n return code >= CharCode.a && code <= CharCode.z;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function isUpperAsciiLetter(code: number): boolean {\r\n return code >= CharCode.A && code <= CharCode.Z;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nfunction isAsciiLetter(code: number): boolean {\r\n return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function equalsIgnoreCase(a: string, b: string): boolean {\r\n return a.length === b.length && doEqualsIgnoreCase(a, b);\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nfunction doEqualsIgnoreCase(a: string, b: string, stopAt = a.length): boolean {\r\n for (let i = 0; i < stopAt; i++) {\r\n const codeA = a.charCodeAt(i);\r\n const codeB = b.charCodeAt(i);\r\n\r\n if (codeA === codeB) {\r\n continue;\r\n }\r\n\r\n // a-z A-Z\r\n if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {\r\n const diff = Math.abs(codeA - codeB);\r\n if (diff !== 0 && diff !== 32) {\r\n return false;\r\n }\r\n } else {\r\n // Any other char code\r\n if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function startsWithIgnoreCase(str: string, candidate: string): boolean {\r\n const candidateLength = candidate.length;\r\n if (candidate.length > str.length) {\r\n return false;\r\n }\r\n\r\n return doEqualsIgnoreCase(str, candidate, candidateLength);\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"isLetter.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/isLetter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;AACxE,CAAC;AAFD,4BAEC","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 Utilities\n */\n\n/** Uses ECMAScript case transformation (toLowerCase() and toUpperCase()) to check whether or not a given character is a letter.\n * Beyond the English alphabet, this solution will also work for most Greek, Armenian, Cyrillic, and Latin characters.\n * But, it will not work for Chinese or Japanese characters since those languages do not have uppercase and lowercase letters.\n * @alpha\n */\nexport function isLetter(char: string): boolean {\n return char.length === 1 && char.toLowerCase() !== char.toUpperCase();\n}\n"]}
|
1
|
+
{"version":3,"file":"isLetter.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/isLetter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;AACxE,CAAC;AAFD,4BAEC","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/** Uses ECMAScript case transformation (toLowerCase() and toUpperCase()) to check whether or not a given character is a letter.\r\n * Beyond the English alphabet, this solution will also work for most Greek, Armenian, Cyrillic, and Latin characters.\r\n * But, it will not work for Chinese or Japanese characters since those languages do not have uppercase and lowercase letters.\r\n * @alpha\r\n */\r\nexport function isLetter(char: string): boolean {\r\n return char.length === 1 && char.toLowerCase() !== char.toUpperCase();\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/misc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACI,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAU,EAAE;IAC/C,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,GAAG,EAAE;QACP,IAAI,GAAG,CAAC,IAAI;YACV,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAClB;YACH,uBAAuB;YACvB,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI;gBACzC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;SACpC;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB;AAEF;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAU,EAAE;IACjD,MAAM,SAAS,GAAG,IAAA,oBAAY,EAAC,GAAG,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACvE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB","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 Utilities\n */\n\n/** Gets the class name for an object.\n * @internal\n */\nexport const getClassName = (obj: any): string => {\n let className = \"\";\n\n if (obj) {\n if (obj.name)\n className = obj.name;\n else {\n // istanbul ignore else\n if (obj.constructor && obj.constructor.name)\n className = obj.constructor.name;\n }\n }\n\n return className;\n};\n\n/** Gets category to use for adding Log entries\n * @internal\n */\nexport const loggerCategory = (obj: any): string => {\n const className = getClassName(obj);\n const category = `appui-abstract${(className ? `.${className}` : \"\")}`;\n return category;\n};\n\n"]}
|
1
|
+
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/misc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACI,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAU,EAAE;IAC/C,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,GAAG,EAAE;QACP,IAAI,GAAG,CAAC,IAAI;YACV,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAClB;YACH,uBAAuB;YACvB,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI;gBACzC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;SACpC;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB;AAEF;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAU,EAAE;IACjD,MAAM,SAAS,GAAG,IAAA,oBAAY,EAAC,GAAG,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACvE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB","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/** Gets the class name for an object.\r\n * @internal\r\n */\r\nexport const getClassName = (obj: any): string => {\r\n let className = \"\";\r\n\r\n if (obj) {\r\n if (obj.name)\r\n className = obj.name;\r\n else {\r\n // istanbul ignore else\r\n if (obj.constructor && obj.constructor.name)\r\n className = obj.constructor.name;\r\n }\r\n }\r\n\r\n return className;\r\n};\r\n\r\n/** Gets category to use for adding Log entries\r\n * @internal\r\n */\r\nexport const loggerCategory = (obj: any): string => {\r\n const className = getClassName(obj);\r\n const category = `appui-abstract${(className ? `.${className}` : \"\")}`;\r\n return category;\r\n};\r\n\r\n"]}
|
@@ -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":["/*---------------------------------------------------------------------------------------------\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 Widget\n */\n\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\nimport { WidgetState } from \"./WidgetState\";\n\n/** Properties for a Widget.\n * @deprecated in 3.6. Use [Widget]($appui-react) instead.\n * @public\n */\nexport interface AbstractWidgetProps extends ProvidedItem { // eslint-disable-line deprecation/deprecation\n /** Gets the widget content. */\n readonly getWidgetContent: () => any;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Id used to uniquely identify the widget.\n * @note It is recommended to provide unique widget id to correctly save/restore App layout.\n */\n readonly id?: string;\n /** Default Widget state. Controls how the Widget is initially displayed. Defaults to WidgetState.Unloaded. */\n readonly defaultState?: WidgetState; // eslint-disable-line deprecation/deprecation\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. */\n readonly label?: string | ConditionalStringValue;\n /** used to explicitly set the tooltip shown by a component. */\n readonly tooltip?: string | ConditionalStringValue;\n /** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false.\n * @deprecated in 3.0. Free-form widgets are obsolete.\n * */\n readonly isFreeform?: boolean;\n /** Application data attached to the Widget. */\n readonly applicationData?: any;\n /** optional data to used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Indicates whether this Widget is for the Tool Settings. */\n readonly isToolSettings?: boolean;\n /** Indicates whether this Widget is for the Status Bar. */\n readonly isStatusBar?: boolean;\n /** Indicates whether this Widget should fill the available space in the Zone. */\n readonly fillZone?: boolean;\n /** Indicates if widget can be popped out to a child window. Defaults to false. */\n readonly canPopout?: boolean;\n /** If the widget state is changed to `floating` and the floatingContainerId is defined, the widget will be added to a\n * floating panel by that name. If no name is specified, a GUID is used. */\n readonly floatingContainerId?: string;\n /** Indicates if widget can be in floating state, default to true. */\n readonly isFloatingStateSupported?: boolean;\n /** Indicates if floating widget is resizable, defaults to false which caused the widget to be auto-sized.. */\n readonly isFloatingStateWindowResizable?: boolean;\n /** Defines that default Top Left position when widget is floated via API calls */\n readonly defaultFloatingPosition?: { x: number, y: number };\n /** Widget priority */\n readonly priority?: number;\n /** Defines the SyncUi event Ids that will trigger the stateFunc to run to determine the state of the widget. */\n readonly syncEventIds?: string[];\n /** Function executed to determine the state of the widget.\n * Used by UI 1.0 widgets ONLY.\n * @deprecated in 3.3. UI 1.0 support will be removed in AppUi 4.0.\n */\n readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState; // eslint-disable-line deprecation/deprecation\n /** Badge to be overlaid on the widget tab. */\n readonly badgeType?: BadgeType;\n /** Handler for widget state changed event */\n readonly onWidgetStateChanged?: () => void;\n /** Save transient DOM state (i.e. scroll offset). */\n readonly saveTransientState?: () => void;\n /** Restore transient DOM state.\n * @note Return true if the state is restored or the Widget will remount.\n */\n readonly restoreTransientState?: () => boolean;\n /** Optional default size to use when floating a widget. If not specified then the default is to size to content if possible.\n * Certain widget can't be intrinsically sized and must specify a content. These are typically ones that use a canvas element\n * internally. */\n defaultFloatingSize?: { width: number, height: number };\n /** Optional prop that tells the widget system to fade this widget out with the rest of the UI when it is in floating state */\n hideWithUiWhenFloating?: boolean;\n /** Optional prop specifying which Panel sides can be docking targets for this widget. If this prop is not specified, all sides are allowed.\n * An empty array is treated the same as an undefined prop, allowing all targets. */\n readonly allowedPanelTargets?: ReadonlyArray<\"left\"|\"right\"|\"bottom\"|\"top\">;\n}\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 * @deprecated in 3.6. Use [Widget]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractWidgetProps extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** Gets the widget content. */\r\n readonly getWidgetContent: () => any;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" 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; // eslint-disable-line deprecation/deprecation\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.\r\n * @deprecated in 3.0. Free-form widgets are obsolete.\r\n * */\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. Defaults to false. */\r\n readonly canPopout?: boolean;\r\n /** If the widget state is changed to `floating` and the floatingContainerId is defined, the widget will be added to a\r\n * floating panel by that name. If no name is specified, a GUID is used. */\r\n readonly floatingContainerId?: string;\r\n /** Indicates if widget can be in floating state, default to true. */\r\n readonly isFloatingStateSupported?: boolean;\r\n /** Indicates if floating widget is resizable, defaults to false which caused the widget to be auto-sized.. */\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 * Used by UI 1.0 widgets ONLY.\r\n * @deprecated in 3.3. UI 1.0 support will be removed in AppUi 4.0.\r\n */\r\n readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState; // eslint-disable-line deprecation/deprecation\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 /** Optional default size to use when floating a widget. If not specified then the default is to size to content if possible.\r\n * Certain widget can't be intrinsically sized and must specify a content. These are typically ones that use a canvas element\r\n * internally. */\r\n defaultFloatingSize?: { width: number, height: number };\r\n /** Optional prop that tells the widget system to fade this widget out with the rest of the UI when it is in floating state */\r\n hideWithUiWhenFloating?: boolean;\r\n /** Optional prop specifying which Panel sides can be docking targets for this widget. If this prop is not specified, all sides are allowed.\r\n * An empty array is treated the same as an undefined prop, allowing all targets. */\r\n readonly allowedPanelTargets?: ReadonlyArray<\"left\"|\"right\"|\"bottom\"|\"top\">;\r\n}\r\n"]}
|
@@ -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;;;GAGG;AACH,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,2DAAS,CAAA;IACT,sEAAsE;IACtE,mEAAO,CAAA;IACP,6DAAI,CAAA;IACJ,+DAAK,CAAA;IACL,iEAAM,CAAA;IACN,sEAAsE;IACtE,yEAAU,CAAA;AACZ,CAAC,EATW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAS7B;AAED;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,2DAAK,CAAA;IACL,mGAAmG;IACnG,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B","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 Widget\n */\n\n/** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].\n * @public @deprecated in 3.0. UI 1.0 support will be removed in AppUi 4.0.\n */\nexport enum AbstractZoneLocation {\n CenterLeft = 4,\n CenterRight = 6,\n BottomLeft = 7,\n BottomRight = 9,\n}\n\n/** Available Stage Panel locations.\n * @deprecated in 3.6. Use [StagePanelLocation]($appui-react) instead.\n * @public\n */\nexport enum StagePanelLocation {\n Top = 101,\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\n TopMost,\n Left,\n Right,\n Bottom,\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\n BottomMost,\n}\n\n/** Enum for Stage Panel Sections\n * @deprecated in 3.6. Use [StagePanelSection]($appui-react) instead.\n * @public\n */\nexport enum StagePanelSection {\n Start,\n /** @deprecated in 3.2. - all widgets that a targeted for Middle will be placed in `End` section */\n Middle,\n End,\n}\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;;;GAGG;AACH,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,2DAAS,CAAA;IACT,sEAAsE;IACtE,mEAAO,CAAA;IACP,6DAAI,CAAA;IACJ,+DAAK,CAAA;IACL,iEAAM,CAAA;IACN,sEAAsE;IACtE,yEAAU,CAAA;AACZ,CAAC,EATW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAS7B;AAED;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,2DAAK,CAAA;IACL,mGAAmG;IACnG,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B","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 in 3.0. UI 1.0 support will be removed in AppUi 4.0.\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 * @deprecated in 3.6. Use [StagePanelLocation]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StagePanelLocation {\r\n Top = 101,\r\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\r\n TopMost,\r\n Left,\r\n Right,\r\n Bottom,\r\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\r\n BottomMost,\r\n}\r\n\r\n/** Enum for Stage Panel Sections\r\n * @deprecated in 3.6. Use [StagePanelSection]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StagePanelSection {\r\n Start,\r\n /** @deprecated in 3.2. - all widgets that a targeted for Middle will be placed in `End` section */\r\n Middle,\r\n End,\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WidgetState.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/WidgetState.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,oEAAoE;IACpE,6CAAI,CAAA;IACJ,6DAA6D;IAC7D,iDAAM,CAAA;IACN,8CAA8C;IAC9C,iDAAM,CAAA;IACN,gFAAgF;IAChF,qDAAQ,CAAA;IACR,4DAA4D;IAC5D,qDAAQ,CAAA;AACV,CAAC,EAXW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAWtB","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 Widget\n */\n\n/** Widget state enum.\n * @deprecated in 3.6. Use [WidgetState]($appui-react) instead.\n * @public\n */\nexport enum WidgetState {\n /** Widget tab is visible and active and its contents are visible */\n Open,\n /** Widget tab is visible but its contents are not visible */\n Closed,\n /** Widget tab nor its contents are visible */\n Hidden,\n /** Widget tab is in a 'floating' state and is not docked in zone's tab stack */\n Floating,\n /** Widget tab is visible but its contents are not loaded */\n Unloaded,\n}\n"]}
|
1
|
+
{"version":3,"file":"WidgetState.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/WidgetState.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,oEAAoE;IACpE,6CAAI,CAAA;IACJ,6DAA6D;IAC7D,iDAAM,CAAA;IACN,8CAA8C;IAC9C,iDAAM,CAAA;IACN,gFAAgF;IAChF,qDAAQ,CAAA;IACR,4DAA4D;IAC5D,qDAAQ,CAAA;AACV,CAAC,EAXW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAWtB","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/** Widget state enum.\r\n * @deprecated in 3.6. Use [WidgetState]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum WidgetState {\r\n /** Widget tab is visible and active and its contents are visible */\r\n Open,\r\n /** Widget tab is visible but its contents are not visible */\r\n Closed,\r\n /** Widget tab nor its contents are visible */\r\n Hidden,\r\n /** Widget tab is in a 'floating' state and is not docked in zone's tab stack */\r\n Floating,\r\n /** Widget tab is visible but its contents are not loaded */\r\n Unloaded,\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,uEAAqD;AACrD,2DAAyC;AACzC,kEAAgD;AAChD,mEAAiD;AAEjD,2EAAyD;AACzD,mFAAiE;AAEjE,sEAAoD;AAEpD,8EAA4D;AAC5D,kFAAgE;AAEhE,sEAAoD;AACpD,gFAA8D;AAC9D,0EAAwD;AAExD,2EAAyD;AACzD,+EAA6D;AAC7D,8EAA4D;AAC5D,mEAAiD;AACjD,iFAA+D;AAC/D,gFAA8D;AAC9D,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":["/*---------------------------------------------------------------------------------------------\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\nexport * from \"./appui-abstract/BaseUiItemsProvider\";\nexport * from \"./appui-abstract/UiAdmin\";\nexport * from \"./appui-abstract/UiItemsManager\";\nexport * from \"./appui-abstract/UiItemsProvider\";\n\nexport * from \"./appui-abstract/backstage/BackstageItem\";\nexport * from \"./appui-abstract/backstage/BackstageItemsManager\";\n\nexport * from \"./appui-abstract/common/KeyboardKey\";\n\nexport * from \"./appui-abstract/content/ContentLayoutProps\";\nexport * from \"./appui-abstract/content/StandardContentLayouts\";\n\nexport * from \"./appui-abstract/dialogs/DialogItem\";\nexport * from \"./appui-abstract/dialogs/UiLayoutDataProvider\";\nexport * from \"./appui-abstract/dialogs/UiDataProvider\";\n\nexport * from \"./appui-abstract/items/AbstractItemProps\";\nexport * from \"./appui-abstract/items/AbstractMenuItemProps\";\nexport * from \"./appui-abstract/items/AbstractToolbarProps\";\nexport * from \"./appui-abstract/items/BadgeType\";\nexport * from \"./appui-abstract/items/ConditionalBooleanValue\";\nexport * from \"./appui-abstract/items/ConditionalStringValue\";\nexport * from \"./appui-abstract/items/ProvidedItem\";\nexport * from \"./appui-abstract/items/RelativePosition\";\nexport * from \"./appui-abstract/items/StageUsage\";\n\nexport * from \"./appui-abstract/notification/MessagePresenter\";\nexport * from \"./appui-abstract/notification/MessageSeverity\";\n\nexport * from \"./appui-abstract/properties/Description\";\nexport * from \"./appui-abstract/properties/EditorParams\";\nexport * from \"./appui-abstract/properties/PrimitiveTypes\";\nexport * from \"./appui-abstract/properties/Record\";\nexport * from \"./appui-abstract/properties/StandardEditorNames\";\nexport * from \"./appui-abstract/properties/StandardTypeNames\";\nexport * from \"./appui-abstract/properties/Value\";\n\nexport * from \"./appui-abstract/quantity/BaseQuantityDescription\";\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\n\nexport * from \"./appui-abstract/toolbars/ToolbarItem\";\nexport * from \"./appui-abstract/toolbars/ToolbarItemsManager\";\n\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\n\nexport * from \"./appui-abstract/utils/callbacks\";\nexport * from \"./appui-abstract/utils/misc\";\nexport * from \"./appui-abstract/utils/isLetter\";\nexport * from \"./appui-abstract/utils/IconSpecUtilities\";\nexport * from \"./appui-abstract/utils/PointProps\";\nexport * from \"./appui-abstract/utils/UiError\";\nexport * from \"./appui-abstract/utils/UiEventDispatcher\";\nexport * from \"./appui-abstract/utils/UiEvent\";\nexport * from \"./appui-abstract/utils/filter/charCode\";\nexport * from \"./appui-abstract/utils/filter/filters\";\nexport * from \"./appui-abstract/utils/filter/strings\";\n\nexport * from \"./appui-abstract/widget/AbstractWidgetProps\";\nexport * from \"./appui-abstract/widget/StagePanel\";\nexport * from \"./appui-abstract/widget/WidgetState\";\n\n/** @docs-package-description\n * The appui-abstract package contains abstractions for UI controls, such as toolbars, buttons and menus.\n * For more information, see [learning about appui-abstract]($docs/learning/ui/abstract/index.md).\n */\n/**\n * @docs-group-description Backstage\n * Abstractions used by appui-react package to create and manage the display Backstage menu items.\n */\n/**\n * @docs-group-description ContentView\n * Classes and interfaces used with Content Layouts.\n */\n/**\n * @docs-group-description Dialog\n * Interfaces and classes for generating UI items for Dialogs.\n */\n/**\n * @docs-group-description Item\n * Classes for working with an Item in a Toolbar, Widget, Backstage or Context Menu\n */\n/**\n * @docs-group-description Notification\n * Interfaces and enums for working with a message\n */\n/**\n * @docs-group-description Properties\n * Properties system for data input and formatting.\n */\n/**\n * @docs-group-description StatusBar\n * Classes for creating and managing items in the status bar.\n */\n/**\n * @docs-group-description Toolbar\n * Classes for creating and managing items in a toolbar.\n */\n/**\n * @docs-group-description UiAdmin\n * Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.\n */\n/**\n * @docs-group-description UiItemsProvider\n * Interface for specifying UI items to be inserted at runtime.\n */\n/**\n * @docs-group-description Utilities\n * Various utility classes for working with a UI.\n */\n/**\n * @docs-group-description Widget\n * Classes for creating and providing Widgets.\n */\n"]}
|
1
|
+
{"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,uEAAqD;AACrD,2DAAyC;AACzC,kEAAgD;AAChD,mEAAiD;AAEjD,2EAAyD;AACzD,mFAAiE;AAEjE,sEAAoD;AAEpD,8EAA4D;AAC5D,kFAAgE;AAEhE,sEAAoD;AACpD,gFAA8D;AAC9D,0EAAwD;AAExD,2EAAyD;AACzD,+EAA6D;AAC7D,8EAA4D;AAC5D,mEAAiD;AACjD,iFAA+D;AAC/D,gFAA8D;AAC9D,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/BaseUiItemsProvider\";\r\nexport * from \"./appui-abstract/UiAdmin\";\r\nexport * from \"./appui-abstract/UiItemsManager\";\r\nexport * from \"./appui-abstract/UiItemsProvider\";\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/AbstractToolbarProps\";\r\nexport * from \"./appui-abstract/items/BadgeType\";\r\nexport * from \"./appui-abstract/items/ConditionalBooleanValue\";\r\nexport * from \"./appui-abstract/items/ConditionalStringValue\";\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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BaseUiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;;;OAKG;IACH,YAAsB,WAAmB,EAAS,gBAAmH;QAA/I,gBAAW,GAAX,WAAW,CAAQ;QAAS,qBAAgB,GAAhB,gBAAgB,CAAmG;IAAI,CAAC;IAE1K,IAAW,EAAE,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7C,YAAY,KAAW,CAAC;IAExB,UAAU;QACf,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,oEAAoE;IAC7D,qBAAqB;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,iCAAiC,CAAC,QAAgB,EAAE,WAAmB,EAAE,aAA2B,EAAE,mBAAuC,EAAE,aAAmB;QACvK,OAAO,EAAE,CAAC;IACZ,CAAC;IACM,yBAAyB,CAA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oC,EAAE,YAAkB;QACxD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;SACjF;aAAM;YACL,cAAc,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,CAAC;SACtD;QAED,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChI,CAAC;CACF","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 deprecation/deprecation */\n/** @packageDocumentation\n * @module UiItemsProvider\n */\n\nimport { BackstageItem } from \"./backstage/BackstageItem\";\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\nimport { StageUsage } from \"./items/StageUsage\";\nimport { UiItemsProvider } from \"./UiItemsProvider\";\nimport { UiItemsManager } from \"./UiItemsManager\";\n\n/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the\n * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.\n * @deprecated in 3.6. Use [BaseUiItemsProvider]($appui-react) instead.\n * @public\n */\nexport class BaseUiItemsProvider implements UiItemsProvider {\n /*\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n constructor(protected _providerId: string, public isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any, provider?: UiItemsProvider) => boolean) { }\n\n public get id(): string { return this._providerId; }\n public onUnregister(): void { }\n\n public unregister() {\n UiItemsManager.unregister(this._providerId);\n }\n\n /** Backstage items are not stage specific so no callback is used */\n public provideBackstageItems(): BackstageItem[] {\n return [];\n }\n\n public provideToolbarButtonItemsInternal(_stageId: string, _stageUsage: string, _toolbarUsage: ToolbarUsage, _toolbarOrientation: ToolbarOrientation, _stageAppData?: any): CommonToolbarItem[] {\n return [];\n }\n public provideToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\n } else {\n provideToStage = (stageUsage === StageUsage.General);\n }\n\n return provideToStage ? this.provideToolbarButtonItemsInternal(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData) : [];\n }\n\n public provideStatusBarItemsInternal(_stageId: string, _stageUsage: string, _stageAppData?: any): CommonStatusBarItem[] {\n return [];\n }\n public provideStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\n } else {\n provideToStage = (stageUsage === StageUsage.General);\n }\n\n return provideToStage ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData) : [];\n }\n\n public provideWidgetsInternal(_stageId: string, _stageUsage: string, _location: StagePanelLocation, _section?: StagePanelSection, _zoneLocation?: AbstractZoneLocation, _stageAppData?: any): AbstractWidgetProps[] {\n return [];\n }\n\n public provideWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection,\n _zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\n } else {\n provideToStage = (stageUsage === StageUsage.General);\n }\n\n return provideToStage ? this.provideWidgetsInternal(stageId, stageUsage, location, section, _zoneLocation, stageAppData) : [];\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"BaseUiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;;;OAKG;IACH,YAAsB,WAAmB,EAAS,gBAAmH;QAA/I,gBAAW,GAAX,WAAW,CAAQ;QAAS,qBAAgB,GAAhB,gBAAgB,CAAmG;IAAI,CAAC;IAE1K,IAAW,EAAE,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7C,YAAY,KAAW,CAAC;IAExB,UAAU;QACf,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,oEAAoE;IAC7D,qBAAqB;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,iCAAiC,CAAC,QAAgB,EAAE,WAAmB,EAAE,aAA2B,EAAE,mBAAuC,EAAE,aAAmB;QACvK,OAAO,EAAE,CAAC;IACZ,CAAC;IACM,yBAAyB,CAAC,OAAe,EAAE,UAAkB,EAAE,YAA0B,EAAE,kBAAsC,EAAE,YAAkB;QAC1J,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,cAAc,GAAG,IAA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YAAY,EAAE,IAAI,CAAC,CAAC;SACjF;aAAM;YACL,cAAc,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,CAAC;SACtD;QAED,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChI,CAAC;CACF","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 deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module UiItemsProvider\r\n */\r\n\r\nimport { BackstageItem } from \"./backstage/BackstageItem\";\r\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\r\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\nimport { StageUsage } from \"./items/StageUsage\";\r\nimport { UiItemsProvider } from \"./UiItemsProvider\";\r\nimport { UiItemsManager } from \"./UiItemsManager\";\r\n\r\n/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the\r\n * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.\r\n * @deprecated in 3.6. Use [BaseUiItemsProvider]($appui-react) instead.\r\n * @public\r\n */\r\nexport class BaseUiItemsProvider implements UiItemsProvider {\r\n /*\r\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\r\n * to set up custom stage with their own subset of standard tools.\r\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\r\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\r\n */\r\n constructor(protected _providerId: string, public isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any, provider?: UiItemsProvider) => boolean) { }\r\n\r\n public get id(): string { return this._providerId; }\r\n public onUnregister(): void { }\r\n\r\n public unregister() {\r\n UiItemsManager.unregister(this._providerId);\r\n }\r\n\r\n /** Backstage items are not stage specific so no callback is used */\r\n public provideBackstageItems(): BackstageItem[] {\r\n return [];\r\n }\r\n\r\n public provideToolbarButtonItemsInternal(_stageId: string, _stageUsage: string, _toolbarUsage: ToolbarUsage, _toolbarOrientation: ToolbarOrientation, _stageAppData?: any): CommonToolbarItem[] {\r\n return [];\r\n }\r\n public provideToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\r\n let provideToStage = false;\r\n\r\n if (this.isSupportedStage) {\r\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\r\n } else {\r\n provideToStage = (stageUsage === StageUsage.General);\r\n }\r\n\r\n return provideToStage ? this.provideToolbarButtonItemsInternal(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData) : [];\r\n }\r\n\r\n public provideStatusBarItemsInternal(_stageId: string, _stageUsage: string, _stageAppData?: any): CommonStatusBarItem[] {\r\n return [];\r\n }\r\n public provideStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\r\n let provideToStage = false;\r\n\r\n if (this.isSupportedStage) {\r\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\r\n } else {\r\n provideToStage = (stageUsage === StageUsage.General);\r\n }\r\n\r\n return provideToStage ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData) : [];\r\n }\r\n\r\n public provideWidgetsInternal(_stageId: string, _stageUsage: string, _location: StagePanelLocation, _section?: StagePanelSection, _zoneLocation?: AbstractZoneLocation, _stageAppData?: any): AbstractWidgetProps[] {\r\n return [];\r\n }\r\n\r\n public provideWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection,\r\n _zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\r\n let provideToStage = false;\r\n\r\n if (this.isSupportedStage) {\r\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\r\n } else {\r\n provideToStage = (stageUsage === StageUsage.General);\r\n }\r\n\r\n return provideToStage ? this.provideWidgetsInternal(stageId, stageUsage, location, section, _zoneLocation, stageAppData) : [];\r\n }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UiAdmin.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiAdmin.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAWhD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA+B1C;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,SAA6B;CAAI;AAUrE;;GAEG;AACH,MAAa,OAAO;IAApB;QACU,kBAAa,GAAY,EAAE,CAAC;IA+OtC,CAAC;IA5OC,qDAAqD;IAC9C,MAAM,KAAK,gBAAgB;QAChC,IAAI,CAAC,OAAO,CAAC,iBAAiB;YAC5B,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,kCAAkC,CAAC,CAAC;QAC9E,OAAO,OAAO,CAAC,iBAAiB,CAAC;IACnC,CAAC;IACM,MAAM,KAAK,gBAAgB,CAAC,EAAoB;QACrD,OAAO,CAAC,iBAAiB,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,kDAAkD;IACtF,CAAC;IAEM,kBAAkB,CAAC,OAAgB;QACxC,IAAI,CAAC,aAAa,GAAG,EAAE,GAA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ACI,gBAAgB,CAAC,YAA0B,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,gBAAgB,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEpD,sBAAsB;IACf,MAAM,CAAC,WAAW,CAAC,IAAwB;QAChD,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAID;;;;;;;OAOG;IACI,UAAU,CAAC,eAAyC,EAAE,MAAc,EAAE,QAAiB,EAAE,GAAW,EACzG,cAA4B;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IAClC,WAAW,CAAC,SAAiB,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;;AAjBhE,sBAAsB;AACC,wBAAgB,GAAG,IAAI,cAAc,EAAE,AAAvB,CAAwB;SA/NpD,OAAO","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 UiAdmin\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { AbstractMenuItemProps } from \"./items/AbstractMenuItemProps\";\nimport { AbstractToolbarProps } from \"./items/AbstractToolbarProps\";\nimport { RelativePosition } from \"./items/RelativePosition\";\nimport { PropertyDescription } from \"./properties/Description\";\nimport { Primitives } from \"./properties/PrimitiveTypes\";\nimport { OnCancelFunc, OnItemExecutedFunc, OnNumberCommitFunc, OnValueCommitFunc } from \"./utils/callbacks\";\nimport { PropertyRecord } from \"./properties/Record\";\nimport { UiDataProvider } from \"./dialogs/UiDataProvider\";\nimport { DialogLayoutDataProvider } from \"./dialogs/UiLayoutDataProvider\";\nimport { PointProps } from \"./utils/PointProps\";\nimport { loggerCategory } from \"./utils/misc\";\nimport { MessagePresenter } from \"./notification/MessagePresenter\";\nimport { UiError } from \"./utils/UiError\";\n\n/** The Generic UI Event args contains information useful for any UI message\n * @public\n */\nexport interface GenericUiEventArgs {\n uiComponentId: string;\n}\n\n/** Optional props to pass to the Dialog control that is generated.\n * @public\n */\nexport interface DialogProps {\n /** Indicates whether the user can resize dialog with cursor. */\n resizable?: boolean;\n /** Indicates whether the user can move dialog with cursor.*/\n movable?: boolean;\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n width?: string | number;\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n height?: string | number;\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n minWidth?: string | number;\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n minHeight?: string | number;\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n maxWidth?: string | number;\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n maxHeight?: string | number;\n}\n\n/** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.\n * @public\n */\nexport class GenericUiEvent extends BeUiEvent<GenericUiEventArgs> { }\n\n/** Flags that control enabling/disabling certain UI features\n * @public\n */\nexport interface UiFlags {\n /** if true then Ctrl+F2 will show popup key-in palette */\n allowKeyinPalette?: boolean;\n}\n\n/** The UiAdmin controls various UI components and is callable from IModelApp.uiAdmin in the core-frontend package.\n * @public\n */\nexport class UiAdmin {\n private _featureFlags: UiFlags = {};\n private static _messagePresenter?: MessagePresenter;\n\n /** The MessagePresenter used to display messages. */\n public static get messagePresenter(): MessagePresenter {\n if (!UiAdmin._messagePresenter)\n throw new UiError(loggerCategory(this), \"UiAdmin.messagePresenter not set\");\n return UiAdmin._messagePresenter;\n }\n public static set messagePresenter(mp: MessagePresenter) {\n UiAdmin._messagePresenter = mp;\n }\n\n public get featureFlags(): UiFlags {\n return { ...this._featureFlags }; // return copy so no direct access to modify value\n }\n\n public updateFeatureFlags(uiFlags: UiFlags) {\n this._featureFlags = { ...this._featureFlags, ...uiFlags };\n }\n\n /** @internal */\n public onInitialized() { }\n\n /** Get the cursor X and Y position. */\n public get cursorPosition(): PointProps { return { x: 0, y: 0 }; }\n\n /** Create a PointProps object. */\n public createXAndY(x: number, y: number): PointProps { return { x, y }; }\n\n /** Determines if focus is set to Home */\n public get isFocusOnHome(): boolean { return false; }\n\n /** Sets focus to Home */\n public setFocusToHome(): void { }\n\n /** Show a context menu at a particular location.\n * @param _menuItemsProps Properties of the menu items to display.\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n */\n public showContextMenu(_menuItemsProps: AbstractMenuItemProps[], _location: PointProps, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show a Toolbar at a particular location.\n * @param _toolbarProps Properties of the Toolbar to display.\n * @param _location Location of the Toolbar, relative to the origin of htmlElement or the window.\n * @param _offset Offset of the Toolbar from the location.\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Toolbar\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _htmlElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.\n * @return true if the Toolbar was displayed, false if the Toolbar could not be displayed.\n */\n public showToolbar(\n _toolbarProps: AbstractToolbarProps, _location: PointProps, _offset: PointProps, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the toolbar. */\n public hideToolbar(): boolean { return false; }\n\n /** Show a menu button at a particular location. A menu button opens a context menu.\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\n * @param _menuItemsProps Properties of the menu items to display.\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the button was displayed, false if the button could not be displayed.\n */\n public showMenuButton(_id: string, _menuItemsProps: AbstractMenuItemProps[], _location: PointProps, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides a menu button.\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\n * @return true if the menu was hidden, false if the menu could not be hidden.\n */\n public hideMenuButton(_id: string): boolean { return false; }\n\n /** Show a calculator at a particular location.\n * @param _initialValue Value initially displayed in the calculator.\n * @param _resultIcon Icon displayed to the left of the value.\n * @param _location Location of the calculator, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the calculator was displayed, false if the calculator could not be displayed.\n */\n public showCalculator(_initialValue: number, _resultIcon: string, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the calculator. */\n public hideCalculator(): boolean { return false; }\n\n /** Show an input editor for an angle value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showAngleEditor(_initialValue: number, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show an input editor for a length value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showLengthEditor(_initialValue: number, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show an input editor for a height value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showHeightEditor(_initialValue: number, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show an input editor for a primitive value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _propertyDescription Description of the primitive value property.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showInputEditor(_initialValue: Primitives.Value, _propertyDescription: PropertyDescription, _location: PointProps, _onCommit: OnValueCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the input editor. */\n public hideInputEditor(): boolean { return false; }\n\n /** Show an HTML element at a particular location.\n * @param _displayElement The HTMLElement to display\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\n * @param _offset Offset of the display element from the location\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the display element\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _anchorElement The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window.\n * @return true if the display element was displayed, false if the display element could not be displayed.\n */\n public showHTMLElement(\n _displayElement: HTMLElement, _location: PointProps, _offset: PointProps, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the HTML Element. */\n public hideHTMLElement(): boolean { return false; }\n\n /** Show a Card containing content, a title and a toolbar at a particular location.\n * @param _content The HTMLElement of the content to display\n * @param _title Title to display at the top of the card.\n * @param _toolbarProps Properties of the Toolbar to display.\n * @param _location Location of the Card, relative to the origin of anchorElement or the window.\n * @param _offset Offset of the Card from the location.\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\n * @return true if the Card was displayed, false if the Card could not be displayed.\n */\n public showCard(\n _content: HTMLElement, _title: string | PropertyRecord | undefined, _toolbarProps: AbstractToolbarProps | undefined,\n _location: PointProps, _offset: PointProps, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the Card. */\n public hideCard(): boolean { return false; }\n\n /** Opens a Tool Settings Ui popup at a particular location.\n * @param _dataProvider The UiDataProvider for the tool settings\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\n * @param _offset Offset of the tool settings from the location\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the tool settings\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _anchorElement The HTMLElement that anchors the tool settings. If undefined, the location is relative to the overall window.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public openToolSettingsPopup(\n _dataProvider: UiDataProvider, _location: PointProps, _offset: PointProps, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Closes the Tool Settings Ui popup. */\n public closeToolSettingsPopup(): boolean { return false; }\n\n /** Show the Keyin Palette to display all support Tool key-ins.\n * @param _htmlElement The HTMLElement that anchors the Keyin Palette. If undefined, the location is relative to the overall window.\n * @return true if the Keyin Palette was displayed, false if it could not be displayed.\n */\n public showKeyinPalette(_htmlElement?: HTMLElement): boolean { return false; }\n\n /** Hides the Keyin Palette. */\n public hideKeyinPalette(): boolean { return false; }\n\n /** Send a UI event */\n public static sendUiEvent(args: GenericUiEventArgs) {\n UiAdmin.onGenericUiEvent.emit(args);\n }\n /** GenericUiEvent */\n public static readonly onGenericUiEvent = new GenericUiEvent();\n\n /** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.\n * @param _uiDataProvider The DialogLayoutDataProvider for the dialog\n * @param _title Specify title for dialog.\n * @param _isModal Specify if the dialog is opened as a modal or modeless.\n * @param _id Id of the dialog that is used to close it.\n * @param _optionalProps Optional props for Dialog construction.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public openDialog(_uiDataProvider: DialogLayoutDataProvider, _title: string, _isModal: boolean, _id: string,\n _optionalProps?: DialogProps): boolean {\n return false;\n }\n\n /** Closes the Dialog with a given Id. */\n public closeDialog(_dialogId: string): boolean { return false; }\n}\n"]}
|
1
|
+
{"version":3,"file":"UiAdmin.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiAdmin.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAWhD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA+B1C;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,SAA6B;CAAI;AAUrE;;GAEG;AACH,MAAa,OAAO;IAApB;QACU,kBAAa,GAAY,EAAE,CAAC;IA+OtC,CAAC;IA5OC,qDAAqD;IAC9C,MAAM,KAAK,gBAAgB;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E,MAA2C,EAAE,aAA+C,EACnH,SAAqB,EAAE,OAAmB,EAAE,eAAmC,EAAE,SAAuB,EACxG,iBAAoC,EAAE,cAA4B;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,sBAAsB;IACf,QAAQ,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAE5C;;;;;;;;OAQG;IACI,qBAAqB,CAC1B,aAA6B,EAAE,SAAqB,EAAE,OAAmB,EAAE,SAAuB,EAClG,iBAAoC,EAAE,cAA4B;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IAClC,sBAAsB,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAE1D;;;OAGG;IACI,gBAAgB,CAAC,YAA0B,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,gBAAgB,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEpD,sBAAsB;IACf,MAAM,CAAC,WAAW,CAAC,IAAwB;QAChD,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAID;;;;;;;OAOG;IACI,UAAU,CAAC,eAAyC,EAAE,MAAc,EAAE,QAAiB,EAAE,GAAW,EACzG,cAA4B;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IAClC,WAAW,CAAC,SAAiB,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;;AAjBhE,sBAAsB;AACC,wBAAgB,GAAG,IAAI,cAAc,EAAE,AAAvB,CAAwB;SA/NpD,OAAO","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 UiAdmin\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { AbstractMenuItemProps } from \"./items/AbstractMenuItemProps\";\r\nimport { AbstractToolbarProps } from \"./items/AbstractToolbarProps\";\r\nimport { RelativePosition } from \"./items/RelativePosition\";\r\nimport { PropertyDescription } from \"./properties/Description\";\r\nimport { Primitives } from \"./properties/PrimitiveTypes\";\r\nimport { OnCancelFunc, OnItemExecutedFunc, OnNumberCommitFunc, OnValueCommitFunc } from \"./utils/callbacks\";\r\nimport { PropertyRecord } from \"./properties/Record\";\r\nimport { UiDataProvider } from \"./dialogs/UiDataProvider\";\r\nimport { DialogLayoutDataProvider } from \"./dialogs/UiLayoutDataProvider\";\r\nimport { PointProps } from \"./utils/PointProps\";\r\nimport { loggerCategory } from \"./utils/misc\";\r\nimport { MessagePresenter } from \"./notification/MessagePresenter\";\r\nimport { UiError } from \"./utils/UiError\";\r\n\r\n/** The Generic UI Event args contains information useful for any UI message\r\n * @public\r\n */\r\nexport interface GenericUiEventArgs {\r\n uiComponentId: string;\r\n}\r\n\r\n/** Optional props to pass to the Dialog control that is generated.\r\n * @public\r\n */\r\nexport interface DialogProps {\r\n /** Indicates whether the user can resize dialog with cursor. */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor.*/\r\n movable?: boolean;\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n}\r\n\r\n/** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.\r\n * @public\r\n */\r\nexport class GenericUiEvent extends BeUiEvent<GenericUiEventArgs> { }\r\n\r\n/** Flags that control enabling/disabling certain UI features\r\n * @public\r\n */\r\nexport interface UiFlags {\r\n /** if true then Ctrl+F2 will show popup key-in palette */\r\n allowKeyinPalette?: boolean;\r\n}\r\n\r\n/** The UiAdmin controls various UI components and is callable from IModelApp.uiAdmin in the core-frontend package.\r\n * @public\r\n */\r\nexport class UiAdmin {\r\n private _featureFlags: UiFlags = {};\r\n private static _messagePresenter?: MessagePresenter;\r\n\r\n /** The MessagePresenter used to display messages. */\r\n public static get messagePresenter(): MessagePresenter {\r\n if (!UiAdmin._messagePresenter)\r\n throw new UiError(loggerCategory(this), \"UiAdmin.messagePresenter not set\");\r\n return UiAdmin._messagePresenter;\r\n }\r\n public static set messagePresenter(mp: MessagePresenter) {\r\n UiAdmin._messagePresenter = mp;\r\n }\r\n\r\n public get featureFlags(): UiFlags {\r\n return { ...this._featureFlags }; // return copy so no direct access to modify value\r\n }\r\n\r\n public updateFeatureFlags(uiFlags: UiFlags) {\r\n this._featureFlags = { ...this._featureFlags, ...uiFlags };\r\n }\r\n\r\n /** @internal */\r\n public onInitialized() { }\r\n\r\n /** Get the cursor X and Y position. */\r\n public get cursorPosition(): PointProps { return { x: 0, y: 0 }; }\r\n\r\n /** Create a PointProps object. */\r\n public createXAndY(x: number, y: number): PointProps { return { x, y }; }\r\n\r\n /** Determines if focus is set to Home */\r\n public get isFocusOnHome(): boolean { return false; }\r\n\r\n /** Sets focus to Home */\r\n public setFocusToHome(): void { }\r\n\r\n /** Show a context menu at a particular location.\r\n * @param _menuItemsProps Properties of the menu items to display.\r\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the menu was displayed, false if the menu could not be displayed.\r\n */\r\n public showContextMenu(_menuItemsProps: AbstractMenuItemProps[], _location: PointProps, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show a Toolbar at a particular location.\r\n * @param _toolbarProps Properties of the Toolbar to display.\r\n * @param _location Location of the Toolbar, relative to the origin of htmlElement or the window.\r\n * @param _offset Offset of the Toolbar from the location.\r\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Toolbar\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _htmlElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.\r\n * @return true if the Toolbar was displayed, false if the Toolbar could not be displayed.\r\n */\r\n public showToolbar(\r\n _toolbarProps: AbstractToolbarProps, _location: PointProps, _offset: PointProps, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the toolbar. */\r\n public hideToolbar(): boolean { return false; }\r\n\r\n /** Show a menu button at a particular location. A menu button opens a context menu.\r\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\r\n * @param _menuItemsProps Properties of the menu items to display.\r\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the button was displayed, false if the button could not be displayed.\r\n */\r\n public showMenuButton(_id: string, _menuItemsProps: AbstractMenuItemProps[], _location: PointProps, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides a menu button.\r\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\r\n * @return true if the menu was hidden, false if the menu could not be hidden.\r\n */\r\n public hideMenuButton(_id: string): boolean { return false; }\r\n\r\n /** Show a calculator at a particular location.\r\n * @param _initialValue Value initially displayed in the calculator.\r\n * @param _resultIcon Icon displayed to the left of the value.\r\n * @param _location Location of the calculator, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the calculator was displayed, false if the calculator could not be displayed.\r\n */\r\n public showCalculator(_initialValue: number, _resultIcon: string, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the calculator. */\r\n public hideCalculator(): boolean { return false; }\r\n\r\n /** Show an input editor for an angle value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showAngleEditor(_initialValue: number, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show an input editor for a length value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showLengthEditor(_initialValue: number, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show an input editor for a height value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showHeightEditor(_initialValue: number, _location: PointProps, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show an input editor for a primitive value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _propertyDescription Description of the primitive value property.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showInputEditor(_initialValue: Primitives.Value, _propertyDescription: PropertyDescription, _location: PointProps, _onCommit: OnValueCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the input editor. */\r\n public hideInputEditor(): boolean { return false; }\r\n\r\n /** Show an HTML element at a particular location.\r\n * @param _displayElement The HTMLElement to display\r\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\r\n * @param _offset Offset of the display element from the location\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the display element\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _anchorElement The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window.\r\n * @return true if the display element was displayed, false if the display element could not be displayed.\r\n */\r\n public showHTMLElement(\r\n _displayElement: HTMLElement, _location: PointProps, _offset: PointProps, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the HTML Element. */\r\n public hideHTMLElement(): boolean { return false; }\r\n\r\n /** Show a Card containing content, a title and a toolbar at a particular location.\r\n * @param _content The HTMLElement of the content to display\r\n * @param _title Title to display at the top of the card.\r\n * @param _toolbarProps Properties of the Toolbar to display.\r\n * @param _location Location of the Card, relative to the origin of anchorElement or the window.\r\n * @param _offset Offset of the Card from the location.\r\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\r\n * @return true if the Card was displayed, false if the Card could not be displayed.\r\n */\r\n public showCard(\r\n _content: HTMLElement, _title: string | PropertyRecord | undefined, _toolbarProps: AbstractToolbarProps | undefined,\r\n _location: PointProps, _offset: PointProps, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the Card. */\r\n public hideCard(): boolean { return false; }\r\n\r\n /** Opens a Tool Settings Ui popup at a particular location.\r\n * @param _dataProvider The UiDataProvider for the tool settings\r\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\r\n * @param _offset Offset of the tool settings from the location\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the tool settings\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _anchorElement The HTMLElement that anchors the tool settings. If undefined, the location is relative to the overall window.\r\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\r\n */\r\n public openToolSettingsPopup(\r\n _dataProvider: UiDataProvider, _location: PointProps, _offset: PointProps, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Closes the Tool Settings Ui popup. */\r\n public closeToolSettingsPopup(): boolean { return false; }\r\n\r\n /** Show the Keyin Palette to display all support Tool key-ins.\r\n * @param _htmlElement The HTMLElement that anchors the Keyin Palette. If undefined, the location is relative to the overall window.\r\n * @return true if the Keyin Palette was displayed, false if it could not be displayed.\r\n */\r\n public showKeyinPalette(_htmlElement?: HTMLElement): boolean { return false; }\r\n\r\n /** Hides the Keyin Palette. */\r\n public hideKeyinPalette(): boolean { return false; }\r\n\r\n /** Send a UI event */\r\n public static sendUiEvent(args: GenericUiEventArgs) {\r\n UiAdmin.onGenericUiEvent.emit(args);\r\n }\r\n /** GenericUiEvent */\r\n public static readonly onGenericUiEvent = new GenericUiEvent();\r\n\r\n /** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.\r\n * @param _uiDataProvider The DialogLayoutDataProvider for the dialog\r\n * @param _title Specify title for dialog.\r\n * @param _isModal Specify if the dialog is opened as a modal or modeless.\r\n * @param _id Id of the dialog that is used to close it.\r\n * @param _optionalProps Optional props for Dialog construction.\r\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\r\n */\r\n public openDialog(_uiDataProvider: DialogLayoutDataProvider, _title: string, _isModal: boolean, _id: string,\r\n _optionalProps?: DialogProps): boolean {\r\n return false;\r\n }\r\n\r\n /** Closes the Dialog with a given Id. */\r\n public closeDialog(_dialogId: string): boolean { return false; }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;GAEG;AACH,MAAM,CAAN,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,mCAAmC;IACnC,yEAAK,CAAA;IACL,sCAAsC;IACtC,+EAAQ,CAAA;IACR,wCAAwC;IACxC,2EAAM,CAAA;AACR,CAAC,EAPW,wBAAwB,KAAxB,wBAAwB,QAOnC;AA+CD;;;GAGG;AACH,MAAa,cA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AAI,GAAG,EAA+B,CAAC;AAQtH,wEAAwE;AACjD,0CAA2B,GAAG,IAAI,OAAO,EAAmD,CAAC;SAVzG,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 deprecation/deprecation */\n/** @packageDocumentation\n * @module UiItemsProvider\n */\n\nimport { BeEvent, Logger, MarkRequired } from \"@itwin/core-bentley\";\nimport { BackstageItem } from \"./backstage/BackstageItem\";\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\nimport { loggerCategory } from \"./utils/misc\";\nimport { UiItemsProvider } from \"./UiItemsProvider\";\n\n/** Action taken by the application on item provided by a UiItemsProvider\n * @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.\n */\nexport enum UiItemsApplicationAction {\n /** Allow the change to the item */\n Allow,\n /** Disallow the change to the item */\n Disallow,\n /** Update the item during the change */\n Update,\n}\n\n/** UIProvider Registered Event Args interface.\n * @deprecated in 3.6. Use [UiItemsProviderRegisteredEventArgs]($appui-react) instead.\n * @public\n */\nexport interface UiItemProviderRegisteredEventArgs {\n providerId: string;\n}\n\n/** UiItemProviderOverrides allows the application that registers a provider to limit when it is allowed to provide items\n * @deprecated in 3.6. Use [AllowedUiItemsProviderOverrides]($appui-react) instead.\n * @public\n */\nexport interface AllowedUiItemProviderOverrides {\n /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages\n * @beta\n */\n providerId?: string;\n /** if specified then the current stage's Usage will be compared before allowing any items to be provided\n * @beta\n */\n stageUsages?: string[];\n /** if specified then the current stage's Id will be compared before allowing any items to be provided\n * @beta\n */\n stageIds?: string[];\n}\n\n/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.\n * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's\n * items are allowed.\n * @deprecated in 3.6. Use [UiItemsProviderOverrides]($appui-react) instead.\n * @public\n */\nexport type UiItemProviderOverrides = MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\"> |\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\n MarkRequired<AllowedUiItemProviderOverrides, \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\n MarkRequired<AllowedUiItemProviderOverrides, \"stageUsages\"> | // eslint-disable-line @typescript-eslint/indent\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\" | \"stageIds\">; // eslint-disable-line @typescript-eslint/indent\n\n/** Interface that defines an instance of a UiItemsProvider and its application specified overrides. */\ninterface UiItemProviderEntry {\n provider: UiItemsProvider;\n overrides?: UiItemProviderOverrides;\n}\n\n/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.\n * @deprecated in 3.6. Use [UiItemsManager]($appui-react) instead.\n * @public\n */\nexport class UiItemsManager {\n private static _registeredUiItemsProviders: Map<string, UiItemProviderEntry> = new Map<string, UiItemProviderEntry>();\n\n /** For use in unit testing\n * @internal */\n public static clearAllProviders() {\n UiItemsManager._registeredUiItemsProviders.clear();\n }\n\n /** Event raised any time a UiProvider is registered or unregistered. */\n public static readonly onUiProviderRegisteredEvent = new BeEvent<(ev: UiItemProviderRegisteredEventArgs) => void>();\n\n /** Return number of registered UiProvider. */\n public static get registeredProviderIds() {\n const ids = [...UiItemsManager._registeredUiItemsProviders.keys()];\n return ids;\n }\n\n /** Return true if there is any registered UiProvider. */\n public static get hasRegisteredProviders(): boolean {\n return this._registeredUiItemsProviders.size > 0;\n }\n\n /**\n * Retrieves a previously loaded UiItemsProvider.\n * @param providerId id of the UiItemsProvider to get\n */\n public static getUiItemsProvider(providerId: string): UiItemsProvider | undefined {\n return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;\n }\n\n private static sendRegisteredEvent(ev: UiItemProviderRegisteredEventArgs) {\n UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(ev);\n }\n\n /**\n * Registers a UiItemsProvider with the UiItemsManager.\n * @param uiProvider the UI items provider to register.\n */\n public static register(uiProvider: UiItemsProvider, overrides?: UiItemProviderOverrides): void {\n const providerId = overrides?.providerId ?? uiProvider.id;\n\n if (UiItemsManager.getUiItemsProvider(providerId)) {\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${providerId}) is already loaded`);\n } else {\n UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });\n Logger.logInfo(loggerCategory(this), `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);\n\n UiItemsManager.sendRegisteredEvent({ providerId } as UiItemProviderRegisteredEventArgs);\n }\n }\n\n /** Remove a specific UiItemsProvider from the list of available providers. */\n public static unregister(uiProviderId: string): void {\n const provider = UiItemsManager.getUiItemsProvider(uiProviderId);\n if (!provider)\n return;\n\n provider.onUnregister && provider.onUnregister();\n\n UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProviderId}) unloaded`);\n\n // trigger a refresh of the ui\n UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId } as UiItemProviderRegisteredEventArgs);\n }\n\n private static allowItemsFromProvider(entry: UiItemProviderEntry, stageId?: string, stageUsage?: string) {\n // istanbul ignore else\n const overrides = entry.overrides;\n if (undefined !== stageId && overrides?.stageIds && !(overrides.stageIds.some((value: string) => value === stageId)))\n return false;\n if (undefined !== stageUsage && overrides?.stageUsages && !(overrides.stageUsages.some((value: string) => value === stageUsage)))\n return false;\n return true;\n }\n\n /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute\n * an action or specify a registered ToolId into toolbar.\n * @param stageId a string identifier the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param toolbarUsage usage of the toolbar\n * @param toolbarOrientation orientation of the toolbar\n * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.\n */\n public static getToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\n const buttonItems: CommonToolbarItem[] = [];\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return buttonItems;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n // istanbul ignore else\n if (uiProvider.provideToolbarButtonItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\n uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)\n .forEach((spec: CommonToolbarItem) => {\n // ignore duplicate ids\n if (-1 === buttonItems.findIndex((existingItem)=> spec.id === existingItem.id ))\n buttonItems.push({ ...spec, providerId });\n });\n }\n });\n\n return buttonItems;\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @param stageId a string identifier the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.\n */\n public static getStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\n const statusBarItems: CommonStatusBarItem[] = [];\n\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return statusBarItems;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n\n // istanbul ignore else\n if (uiProvider.provideStatusBarItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\n uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)\n .forEach((item: CommonStatusBarItem) => {\n // ignore duplicate ids\n if (-1 === statusBarItems.findIndex((existingItem)=> item.id === existingItem.id ))\n statusBarItems.push({ ...item, providerId });\n });\n }\n });\n\n return statusBarItems;\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @returns An array of BackstageItem that will be used to create controls for the backstage menu.\n */\n public static getBackstageItems(): BackstageItem[] {\n const backstageItems: BackstageItem[] = [];\n\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return backstageItems;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n\n // istanbul ignore else\n if (uiProvider.provideBackstageItems) { // Note: We do not call this.allowItemsFromProvider here as backstage items\n uiProvider.provideBackstageItems() // should not be considered stage specific. If they need to be hidden\n .forEach((item: BackstageItem) => { // the isHidden property should be set to a ConditionalBooleanValue\n // ignore duplicate ids\n if (-1 === backstageItems.findIndex((existingItem)=> item.id === existingItem.id ))\n backstageItems.push({ ...item, providerId });\n });\n }\n });\n return backstageItems;\n }\n\n /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets\n * @param stageId a string identifier the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param location the location within the stage.\n * @param section the section within location.\n * @returns An array of AbstractWidgetProps that will be used to create widgets.\n */\n public static getWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\n const widgets: AbstractWidgetProps[] = [];\n\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return widgets;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n\n // istanbul ignore else\n if (uiProvider.provideWidgets && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\n uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)\n .forEach((widget: AbstractWidgetProps) => {\n // ignore duplicate ids\n if (-1 === widgets.findIndex((existingItem)=> widget.id === existingItem.id ))\n widgets.push({ ...widget, providerId });\n });\n }\n });\n return widgets;\n }\n\n}\n"]}
|
1
|
+
{"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;GAEG;AACH,MAAM,CAAN,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,mCAAmC;IACnC,yEAAK,CAAA;IACL,sCAAsC;IACtC,+EAAQ,CAAA;IACR,wCAAwC;IACxC,2EAAM,CAAA;AACR,CAAC,EAPW,wBAAwB,KAAxB,wBAAwB,QAOnC;AA+CD;;;GAGG;AACH,MAAa,cAAc;IAGzB;mBACe;IACR,MAAM,CAAC,iBAAiB;QAC7B,cAAc,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC;IACrD,CAAC;IAKD,8CAA8C;IACvC,MAAM,KAAK,qBAAqB;QACrC,MAAM,GAAG,GAAG,CAAC,GAAG,cAAc,CAAC,2BAA2B,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,OAAO,GAAG,CAAC;IACb,CAAC;IAED,yDAAyD;IAClD,MAAM,KAAK,sBAAsB;QACtC,OAAO,IAAI,CAAC,2BAA2B,CAAC,IAAI,GAAG,CAAC,CAAC;IACnD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,kBAAkB,CAAC,UAAkB;QACjD,OAAO,cAAc,CAAC,2BAA2B,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;IAC9E,CAAC;IAEO,MAAM,CAAC,mBAAmB,C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AAK,CAAC,SAAS,EAAE,UAAU,IAAI,UAAU,CAAC,EAAE,CAAC;YAEhE,uBAAuB;YACvB,IAAI,UAAU,CAAC,cAAc,IAAI,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE;gBACxF,UAAU,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,CAAC;qBAC1F,OAAO,CAAC,CAAC,MAA2B,EAAE,EAAE;oBACvC,uBAAuB;oBACvB,IAAI,CAAC,CAAC,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,YAAY,EAAC,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAE;wBAC3E,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;aACN;QACH,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;;AA9Lc,0CAA2B,GAAqC,IAAI,GAAG,EAA+B,CAAC;AAQtH,wEAAwE;AACjD,0CAA2B,GAAG,IAAI,OAAO,EAAmD,CAAC;SAVzG,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 deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module UiItemsProvider\r\n */\r\n\r\nimport { BeEvent, Logger, MarkRequired } from \"@itwin/core-bentley\";\r\nimport { BackstageItem } from \"./backstage/BackstageItem\";\r\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\r\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\nimport { loggerCategory } from \"./utils/misc\";\r\nimport { UiItemsProvider } from \"./UiItemsProvider\";\r\n\r\n/** Action taken by the application on item provided by a UiItemsProvider\r\n * @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.\r\n */\r\nexport enum UiItemsApplicationAction {\r\n /** Allow the change to the item */\r\n Allow,\r\n /** Disallow the change to the item */\r\n Disallow,\r\n /** Update the item during the change */\r\n Update,\r\n}\r\n\r\n/** UIProvider Registered Event Args interface.\r\n * @deprecated in 3.6. Use [UiItemsProviderRegisteredEventArgs]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface UiItemProviderRegisteredEventArgs {\r\n providerId: string;\r\n}\r\n\r\n/** UiItemProviderOverrides allows the application that registers a provider to limit when it is allowed to provide items\r\n * @deprecated in 3.6. Use [AllowedUiItemsProviderOverrides]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AllowedUiItemProviderOverrides {\r\n /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages\r\n * @beta\r\n */\r\n providerId?: string;\r\n /** if specified then the current stage's Usage will be compared before allowing any items to be provided\r\n * @beta\r\n */\r\n stageUsages?: string[];\r\n /** if specified then the current stage's Id will be compared before allowing any items to be provided\r\n * @beta\r\n */\r\n stageIds?: string[];\r\n}\r\n\r\n/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.\r\n * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's\r\n * items are allowed.\r\n * @deprecated in 3.6. Use [UiItemsProviderOverrides]($appui-react) instead.\r\n * @public\r\n */\r\nexport type UiItemProviderOverrides = MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\"> |\r\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\r\n MarkRequired<AllowedUiItemProviderOverrides, \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\r\n MarkRequired<AllowedUiItemProviderOverrides, \"stageUsages\"> | // eslint-disable-line @typescript-eslint/indent\r\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\" | \"stageIds\">; // eslint-disable-line @typescript-eslint/indent\r\n\r\n/** Interface that defines an instance of a UiItemsProvider and its application specified overrides. */\r\ninterface UiItemProviderEntry {\r\n provider: UiItemsProvider;\r\n overrides?: UiItemProviderOverrides;\r\n}\r\n\r\n/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.\r\n * @deprecated in 3.6. Use [UiItemsManager]($appui-react) instead.\r\n * @public\r\n */\r\nexport class UiItemsManager {\r\n private static _registeredUiItemsProviders: Map<string, UiItemProviderEntry> = new Map<string, UiItemProviderEntry>();\r\n\r\n /** For use in unit testing\r\n * @internal */\r\n public static clearAllProviders() {\r\n UiItemsManager._registeredUiItemsProviders.clear();\r\n }\r\n\r\n /** Event raised any time a UiProvider is registered or unregistered. */\r\n public static readonly onUiProviderRegisteredEvent = new BeEvent<(ev: UiItemProviderRegisteredEventArgs) => void>();\r\n\r\n /** Return number of registered UiProvider. */\r\n public static get registeredProviderIds() {\r\n const ids = [...UiItemsManager._registeredUiItemsProviders.keys()];\r\n return ids;\r\n }\r\n\r\n /** Return true if there is any registered UiProvider. */\r\n public static get hasRegisteredProviders(): boolean {\r\n return this._registeredUiItemsProviders.size > 0;\r\n }\r\n\r\n /**\r\n * Retrieves a previously loaded UiItemsProvider.\r\n * @param providerId id of the UiItemsProvider to get\r\n */\r\n public static getUiItemsProvider(providerId: string): UiItemsProvider | undefined {\r\n return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;\r\n }\r\n\r\n private static sendRegisteredEvent(ev: UiItemProviderRegisteredEventArgs) {\r\n UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(ev);\r\n }\r\n\r\n /**\r\n * Registers a UiItemsProvider with the UiItemsManager.\r\n * @param uiProvider the UI items provider to register.\r\n */\r\n public static register(uiProvider: UiItemsProvider, overrides?: UiItemProviderOverrides): void {\r\n const providerId = overrides?.providerId ?? uiProvider.id;\r\n\r\n if (UiItemsManager.getUiItemsProvider(providerId)) {\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${providerId}) is already loaded`);\r\n } else {\r\n UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);\r\n\r\n UiItemsManager.sendRegisteredEvent({ providerId } as UiItemProviderRegisteredEventArgs);\r\n }\r\n }\r\n\r\n /** Remove a specific UiItemsProvider from the list of available providers. */\r\n public static unregister(uiProviderId: string): void {\r\n const provider = UiItemsManager.getUiItemsProvider(uiProviderId);\r\n if (!provider)\r\n return;\r\n\r\n provider.onUnregister && provider.onUnregister();\r\n\r\n UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProviderId}) unloaded`);\r\n\r\n // trigger a refresh of the ui\r\n UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId } as UiItemProviderRegisteredEventArgs);\r\n }\r\n\r\n private static allowItemsFromProvider(entry: UiItemProviderEntry, stageId?: string, stageUsage?: string) {\r\n // istanbul ignore else\r\n const overrides = entry.overrides;\r\n if (undefined !== stageId && overrides?.stageIds && !(overrides.stageIds.some((value: string) => value === stageId)))\r\n return false;\r\n if (undefined !== stageUsage && overrides?.stageUsages && !(overrides.stageUsages.some((value: string) => value === stageUsage)))\r\n return false;\r\n return true;\r\n }\r\n\r\n /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute\r\n * an action or specify a registered ToolId into toolbar.\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @param toolbarUsage usage of the toolbar\r\n * @param toolbarOrientation orientation of the toolbar\r\n * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.\r\n */\r\n public static getToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage,\r\n toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\r\n const buttonItems: CommonToolbarItem[] = [];\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return buttonItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n // istanbul ignore else\r\n if (uiProvider.provideToolbarButtonItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)\r\n .forEach((spec: CommonToolbarItem) => {\r\n // ignore duplicate ids\r\n if (-1 === buttonItems.findIndex((existingItem)=> spec.id === existingItem.id ))\r\n buttonItems.push({ ...spec, providerId });\r\n });\r\n }\r\n });\r\n\r\n return buttonItems;\r\n }\r\n\r\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.\r\n */\r\n public static getStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\r\n const statusBarItems: CommonStatusBarItem[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return statusBarItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideStatusBarItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)\r\n .forEach((item: CommonStatusBarItem) => {\r\n // ignore duplicate ids\r\n if (-1 === statusBarItems.findIndex((existingItem)=> item.id === existingItem.id ))\r\n statusBarItems.push({ ...item, providerId });\r\n });\r\n }\r\n });\r\n\r\n return statusBarItems;\r\n }\r\n\r\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\r\n * @returns An array of BackstageItem that will be used to create controls for the backstage menu.\r\n */\r\n public static getBackstageItems(): BackstageItem[] {\r\n const backstageItems: BackstageItem[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return backstageItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideBackstageItems) { // Note: We do not call this.allowItemsFromProvider here as backstage items\r\n uiProvider.provideBackstageItems() // should not be considered stage specific. If they need to be hidden\r\n .forEach((item: BackstageItem) => { // the isHidden property should be set to a ConditionalBooleanValue\r\n // ignore duplicate ids\r\n if (-1 === backstageItems.findIndex((existingItem)=> item.id === existingItem.id ))\r\n backstageItems.push({ ...item, providerId });\r\n });\r\n }\r\n });\r\n return backstageItems;\r\n }\r\n\r\n /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @param location the location within the stage.\r\n * @param section the section within location.\r\n * @returns An array of AbstractWidgetProps that will be used to create widgets.\r\n */\r\n public static getWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\r\n const widgets: AbstractWidgetProps[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return widgets;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideWidgets && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)\r\n .forEach((widget: AbstractWidgetProps) => {\r\n // ignore duplicate ids\r\n if (-1 === widgets.findIndex((existingItem)=> widget.id === existingItem.id ))\r\n widgets.push({ ...widget, providerId });\r\n });\r\n }\r\n });\r\n return widgets;\r\n }\r\n\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 UiItemsProvider\n */\n\nimport { BackstageItem } from \"./backstage/BackstageItem\";\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\n\n/** Describes interface of objects that want to provide UI component to the running IModelApp.\n * @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.\n * @public\n */\nexport interface UiItemsProvider {\n /** id of provider */\n readonly id: string;\n\n /** UiItemsManager calls following method to get items to populate specific toolbars */\n provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[]; // eslint-disable-line deprecation/deprecation\n /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */\n provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[]; // eslint-disable-line deprecation/deprecation\n /** UiItemsManager calls following method to augment backstage items. */\n provideBackstageItems?: () => BackstageItem[]; // eslint-disable-line deprecation/deprecation\n /** UiItemsManager calls following method to augment Widget lists.\n * @note Returned widgets must provide unique `AbstractWidgetProps[\"id\"]` to correctly save/restore App layout.\n */\n provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line deprecation/deprecation\n zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>; // eslint-disable-line deprecation/deprecation\n /** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */\n onUnregister?: () => void;\n}\n"]}
|
1
|
+
{"version":3,"file":"UiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsProvider.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 UiItemsProvider\r\n */\r\n\r\nimport { BackstageItem } from \"./backstage/BackstageItem\";\r\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\r\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\n\r\n/** Describes interface of objects that want to provide UI component to the running IModelApp.\r\n * @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface UiItemsProvider {\r\n /** id of provider */\r\n readonly id: string;\r\n\r\n /** UiItemsManager calls following method to get items to populate specific toolbars */\r\n provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[]; // eslint-disable-line deprecation/deprecation\r\n /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */\r\n provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[]; // eslint-disable-line deprecation/deprecation\r\n /** UiItemsManager calls following method to augment backstage items. */\r\n provideBackstageItems?: () => BackstageItem[]; // eslint-disable-line deprecation/deprecation\r\n /** UiItemsManager calls following method to augment Widget lists.\r\n * @note Returned widgets must provide unique `AbstractWidgetProps[\"id\"]` to correctly save/restore App layout.\r\n */\r\n provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line deprecation/deprecation\r\n zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>; // eslint-disable-line deprecation/deprecation\r\n /** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */\r\n onUnregister?: () => void;\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AA4DD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC5G,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC/G,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAa,sBAAsB;;AACjC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,EACvG,EAAE,CAAC,CAAC;IAC5B,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,YAAY;IAChB,YAAY;IACZ,KAAK;IACL,OAAO,EAAE,YAAY;IACrB,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,uCAAuC;AACzB,uCAAgB,GAAG,CAC/B,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAsC,EACxH,QAA0C,EAAE,IAAsC,EAAE,SAAwC,EACvG,EAAE,CAAC,CAAC;IACzB,OAAO;IACP,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,MAAM;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;SA/BQ,sBAAsB","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 Backstage\n */\n\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\n\n/** Used to specify the item type added to the backstage menu.\n * @deprecated in 3.6. Use type guards instead.\n * @public\n */\nexport enum BackstageItemType {\n /** Item that executes an action function */\n ActionItem = 1,\n /** Item that activate a stage. */\n StageLauncher = 2,\n}\n\n/** Describes the data needed to insert a button into the backstage menu.\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\n * @public\n */\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Describes badge. Renders no badge if not specified. */\n readonly badgeType?: BadgeType;\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\n * allows extensions enough gaps to insert their own groups.\n */\n readonly groupPriority: number;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\n readonly id: string;\n /** optional data to be used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\n readonly isHidden?: boolean | ConditionalBooleanValue;\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n /** Priority within a group (recommend using values 1 through 100). */\n readonly itemPriority: number;\n /** Label. */\n readonly label: string | ConditionalStringValue;\n /** Subtitle. */\n readonly subtitle?: string | ConditionalStringValue;\n /** Tooltip. */\n readonly tooltip?: string | ConditionalStringValue;\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\n readonly isActive?: boolean | ConditionalBooleanValue;\n}\n\n/** Describes the data needed to insert an action button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\n * @public\n */\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\n readonly execute: () => void;\n}\n\n/** Describes the data needed to insert an action button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\n * @public\n */\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\n readonly stageId: string;\n}\n\n/** Describes the data needed to insert a button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\n * @public\n */\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line deprecation/deprecation\n\n/** BackstageActionItem type guard.\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\n * @public\n */\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line deprecation/deprecation\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\n};\n\n/** BackstageStageLauncher type guard.\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\n * @public\n */\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line deprecation/deprecation\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line deprecation/deprecation\n};\n\n/** Utilities for creating and maintaining backstage items\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\n * @public\n */\nexport class BackstageItemUtilities {\n /** Creates a stage launcher backstage item */\n public static createStageLauncher = (\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>, // eslint-disable-line deprecation/deprecation\n ): BackstageStageLauncher => ({ // eslint-disable-line deprecation/deprecation\n groupPriority,\n icon,\n internalData: overrides?.internalData,\n id: frontstageId,\n itemPriority,\n label,\n stageId: frontstageId,\n subtitle,\n ...overrides,\n });\n\n /** Creates an action backstage item */\n public static createActionItem = (\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>, // eslint-disable-line deprecation/deprecation\n ): BackstageActionItem => ({ // eslint-disable-line deprecation/deprecation\n execute,\n groupPriority,\n icon,\n internalData: overrides?.internalData,\n id: itemId,\n itemPriority,\n label,\n subtitle,\n ...overrides,\n });\n}\n"]}
|
1
|
+
{"version":3,"file":"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IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;SA/BQ,sBAAsB","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 Backstage\r\n */\r\n\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\n\r\n/** Used to specify the item type added to the backstage menu.\r\n * @deprecated in 3.6. Use type guards instead.\r\n * @public\r\n */\r\nexport enum BackstageItemType {\r\n /** Item that executes an action function */\r\n ActionItem = 1,\r\n /** Item that activate a stage. */\r\n StageLauncher = 2,\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Describes badge. Renders no badge if not specified. */\r\n readonly badgeType?: BadgeType;\r\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\r\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\r\n * allows extensions enough gaps to insert their own groups.\r\n */\r\n readonly groupPriority: number;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\r\n readonly id: string;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\r\n readonly isHidden?: boolean | ConditionalBooleanValue;\r\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\r\n readonly isDisabled?: boolean | ConditionalBooleanValue;\r\n /** Priority within a group (recommend using values 1 through 100). */\r\n readonly itemPriority: number;\r\n /** Label. */\r\n readonly label: string | ConditionalStringValue;\r\n /** Subtitle. */\r\n readonly subtitle?: string | ConditionalStringValue;\r\n /** Tooltip. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\r\n readonly isActive?: boolean | ConditionalBooleanValue;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly execute: () => void;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly stageId: string;\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line deprecation/deprecation\r\n\r\n/** BackstageActionItem type guard.\r\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** BackstageStageLauncher type guard.\r\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** Utilities for creating and maintaining backstage items\r\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\r\n * @public\r\n */\r\nexport class BackstageItemUtilities {\r\n /** Creates a stage launcher backstage item */\r\n public static createStageLauncher = (\r\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>, // eslint-disable-line deprecation/deprecation\r\n ): BackstageStageLauncher => ({ // eslint-disable-line deprecation/deprecation\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: frontstageId,\r\n itemPriority,\r\n label,\r\n stageId: frontstageId,\r\n subtitle,\r\n ...overrides,\r\n });\r\n\r\n /** Creates an action backstage item */\r\n public static createActionItem = (\r\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>, // eslint-disable-line deprecation/deprecation\r\n ): BackstageActionItem => ({ // eslint-disable-line deprecation/deprecation\r\n execute,\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: itemId,\r\n itemPriority,\r\n label,\r\n subtitle,\r\n ...overrides,\r\n });\r\n}\r\n"]}
|