@itwin/appui-abstract 4.0.0-dev.4 → 4.0.0-dev.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +15 -3
  2. package/lib/cjs/appui-abstract/UiItemsManager.js +8 -14
  3. package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
  4. package/lib/cjs/appui-abstract/backstage/BackstageItem.js +2 -2
  5. package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
  6. package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts +1 -1
  7. package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
  8. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts +2 -2
  9. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  10. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts +1 -1
  11. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  12. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.d.ts +2 -2
  13. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js +2 -2
  14. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  15. package/lib/cjs/appui-abstract/utils/filter/map.js +2 -4
  16. package/lib/cjs/appui-abstract/utils/filter/map.js.map +1 -1
  17. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts +3 -3
  18. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  19. package/lib/cjs/appui-abstract/widget/StagePanel.d.ts +3 -3
  20. package/lib/cjs/appui-abstract/widget/StagePanel.d.ts.map +1 -1
  21. package/lib/cjs/appui-abstract/widget/StagePanel.js +3 -3
  22. package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
  23. package/lib/esm/appui-abstract/UiItemsManager.js +8 -14
  24. package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
  25. package/lib/esm/appui-abstract/backstage/BackstageItem.js +2 -2
  26. package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
  27. package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts +1 -1
  28. package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
  29. package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts +2 -2
  30. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  31. package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts +1 -1
  32. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  33. package/lib/esm/appui-abstract/utils/IconSpecUtilities.d.ts +2 -2
  34. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js +2 -2
  35. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  36. package/lib/esm/appui-abstract/utils/filter/map.js +2 -4
  37. package/lib/esm/appui-abstract/utils/filter/map.js.map +1 -1
  38. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts +3 -3
  39. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  40. package/lib/esm/appui-abstract/widget/StagePanel.d.ts +3 -3
  41. package/lib/esm/appui-abstract/widget/StagePanel.d.ts.map +1 -1
  42. package/lib/esm/appui-abstract/widget/StagePanel.js +3 -3
  43. package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
  44. package/package.json +6 -6
@@ -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;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AAO,IAAI,CAAC,MAAM,CAAC;IACrB,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,qBAA0B;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,eAAa,CAAC;IACpC,CAAC;IAEQ,GAAG,CAAC,GAAM,EAAE,KAAQ;QAC3B,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,gBAAc,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":["/*---------------------------------------------------------------------------------------------\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
+ {"version":3,"file":"map.js","sourceR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AAM,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"]}
@@ -6,7 +6,7 @@ import { BadgeType } from "../items/BadgeType";
6
6
  import { ProvidedItem } from "../items/ProvidedItem";
7
7
  import { WidgetState } from "./WidgetState";
8
8
  /** Properties for a Widget.
9
- * @deprecated in 3.6. Use [CommonWidgetProps]($appui-react) instead.
9
+ * @deprecated in 3.6. Use [WidgetProps]($appui-react) instead.
10
10
  * @public
11
11
  */
12
12
  export interface AbstractWidgetProps extends ProvidedItem {
@@ -25,7 +25,7 @@ export interface AbstractWidgetProps extends ProvidedItem {
25
25
  /** used to explicitly set the tooltip shown by a component. */
26
26
  readonly tooltip?: string | ConditionalStringValue;
27
27
  /** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false.
28
- * @deprecated in 3.0.
28
+ * @deprecated in 3.0. Free-form widgets are obsolete.
29
29
  * */
30
30
  readonly isFreeform?: boolean;
31
31
  /** Application data attached to the Widget. */
@@ -58,7 +58,7 @@ export interface AbstractWidgetProps extends ProvidedItem {
58
58
  readonly syncEventIds?: string[];
59
59
  /** Function executed to determine the state of the widget.
60
60
  * Used by UI 1.0 widgets ONLY.
61
- * @deprecated in 3.3.
61
+ * @deprecated in 3.3. UI 1.0 support will be removed in AppUi 4.0.
62
62
  */
63
63
  readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState;
64
64
  /** Badge to be overlaid on the widget tab. */
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @deprecated in 3.6. Use [CommonWidgetProps]($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.\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.\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
+ {"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 [WidgetProps]($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"]}
@@ -2,7 +2,7 @@
2
2
  * @module Widget
3
3
  */
4
4
  /** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].
5
- * @public @deprecated in 3.0.
5
+ * @public @deprecated in 3.0. UI 1.0 support will be removed in AppUi 4.0.
6
6
  */
7
7
  export declare enum AbstractZoneLocation {
8
8
  CenterLeft = 4,
@@ -16,12 +16,12 @@ export declare enum AbstractZoneLocation {
16
16
  */
17
17
  export declare enum StagePanelLocation {
18
18
  Top = 101,
19
- /** @deprecated Used in UI1.0 only. */
19
+ /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */
20
20
  TopMost = 102,
21
21
  Left = 103,
22
22
  Right = 104,
23
23
  Bottom = 105,
24
- /** @deprecated Used in UI1.0 only. */
24
+ /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */
25
25
  BottomMost = 106
26
26
  }
27
27
  /** Enum for Stage Panel Sections
@@ -1 +1 @@
1
- {"version":3,"file":"StagePanel.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/StagePanel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,UAAU,IAAI;IACd,WAAW,IAAI;IACf,UAAU,IAAI;IACd,WAAW,IAAI;CAChB;AAED;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,GAAG,MAAM;IACT,sCAAsC;IACtC,OAAO,MAAA;IACP,IAAI,MAAA;IACJ,KAAK,MAAA;IACL,MAAM,MAAA;IACN,sCAAsC;IACtC,UAAU,MAAA;CACX;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,KAAK,IAAA;IACL,mGAAmG;IACnG,MAAM,IAAA;IACN,GAAG,IAAA;CACJ"}
1
+ {"version":3,"file":"StagePanel.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/StagePanel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,UAAU,IAAI;IACd,WAAW,IAAI;IACf,UAAU,IAAI;IACd,WAAW,IAAI;CAChB;AAED;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,GAAG,MAAM;IACT,sEAAsE;IACtE,OAAO,MAAA;IACP,IAAI,MAAA;IACJ,KAAK,MAAA;IACL,MAAM,MAAA;IACN,sEAAsE;IACtE,UAAU,MAAA;CACX;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,KAAK,IAAA;IACL,mGAAmG;IACnG,MAAM,IAAA;IACN,GAAG,IAAA;CACJ"}
@@ -9,7 +9,7 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.StagePanelSection = exports.StagePanelLocation = exports.AbstractZoneLocation = void 0;
11
11
  /** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].
12
- * @public @deprecated in 3.0.
12
+ * @public @deprecated in 3.0. UI 1.0 support will be removed in AppUi 4.0.
13
13
  */
14
14
  var AbstractZoneLocation;
15
15
  (function (AbstractZoneLocation) {
@@ -25,12 +25,12 @@ var AbstractZoneLocation;
25
25
  var StagePanelLocation;
26
26
  (function (StagePanelLocation) {
27
27
  StagePanelLocation[StagePanelLocation["Top"] = 101] = "Top";
28
- /** @deprecated Used in UI1.0 only. */
28
+ /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */
29
29
  StagePanelLocation[StagePanelLocation["TopMost"] = 102] = "TopMost";
30
30
  StagePanelLocation[StagePanelLocation["Left"] = 103] = "Left";
31
31
  StagePanelLocation[StagePanelLocation["Right"] = 104] = "Right";
32
32
  StagePanelLocation[StagePanelLocation["Bottom"] = 105] = "Bottom";
33
- /** @deprecated Used in UI1.0 only. */
33
+ /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */
34
34
  StagePanelLocation[StagePanelLocation["BottomMost"] = 106] = "BottomMost";
35
35
  })(StagePanelLocation = exports.StagePanelLocation || (exports.StagePanelLocation = {}));
36
36
  /** Enum for Stage Panel Sections
@@ -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,sCAAsC;IACtC,mEAAO,CAAA;IACP,6DAAI,CAAA;IACJ,+DAAK,CAAA;IACL,iEAAM,CAAA;IACN,sCAAsC;IACtC,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.\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 Used in UI1.0 only. */\r\n TopMost,\r\n Left,\r\n Right,\r\n Bottom,\r\n /** @deprecated Used in UI1.0 only. */\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
+ {"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"]}
@@ -44,8 +44,7 @@ export class UiItemsManager {
44
44
  * @param providerId id of the UiItemsProvider to get
45
45
  */
46
46
  static getUiItemsProvider(providerId) {
47
- var _a;
48
- return (_a = UiItemsManager._registeredUiItemsProviders.get(providerId)) === null || _a === void 0 ? void 0 : _a.provider;
47
+ return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;
49
48
  }
50
49
  static sendRegisteredEvent(ev) {
51
50
  UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(ev);
@@ -55,8 +54,7 @@ export class UiItemsManager {
55
54
  * @param uiProvider the UI items provider to register.
56
55
  */
57
56
  static register(uiProvider, overrides) {
58
- var _a;
59
- const providerId = (_a = overrides === null || overrides === void 0 ? void 0 : overrides.providerId) !== null && _a !== void 0 ? _a : uiProvider.id;
57
+ const providerId = overrides?.providerId ?? uiProvider.id;
60
58
  if (UiItemsManager.getUiItemsProvider(providerId)) {
61
59
  Logger.logInfo(loggerCategory(this), `UiItemsProvider (${providerId}) is already loaded`);
62
60
  }
@@ -80,9 +78,9 @@ export class UiItemsManager {
80
78
  static allowItemsFromProvider(entry, stageId, stageUsage) {
81
79
  // istanbul ignore else
82
80
  const overrides = entry.overrides;
83
- if (undefined !== stageId && (overrides === null || overrides === void 0 ? void 0 : overrides.stageIds) && !(overrides.stageIds.some((value) => value === stageId)))
81
+ if (undefined !== stageId && overrides?.stageIds && !(overrides.stageIds.some((value) => value === stageId)))
84
82
  return false;
85
- if (undefined !== stageUsage && (overrides === null || overrides === void 0 ? void 0 : overrides.stageUsages) && !(overrides.stageUsages.some((value) => value === stageUsage)))
83
+ if (undefined !== stageUsage && overrides?.stageUsages && !(overrides.stageUsages.some((value) => value === stageUsage)))
86
84
  return false;
87
85
  return true;
88
86
  }
@@ -99,9 +97,8 @@ export class UiItemsManager {
99
97
  if (0 === UiItemsManager._registeredUiItemsProviders.size)
100
98
  return buttonItems;
101
99
  UiItemsManager._registeredUiItemsProviders.forEach((entry) => {
102
- var _a, _b;
103
100
  const uiProvider = entry.provider;
104
- const providerId = (_b = (_a = entry.overrides) === null || _a === void 0 ? void 0 : _a.providerId) !== null && _b !== void 0 ? _b : uiProvider.id;
101
+ const providerId = entry.overrides?.providerId ?? uiProvider.id;
105
102
  // istanbul ignore else
106
103
  if (uiProvider.provideToolbarButtonItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {
107
104
  uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)
@@ -124,9 +121,8 @@ export class UiItemsManager {
124
121
  if (0 === UiItemsManager._registeredUiItemsProviders.size)
125
122
  return statusBarItems;
126
123
  UiItemsManager._registeredUiItemsProviders.forEach((entry) => {
127
- var _a, _b;
128
124
  const uiProvider = entry.provider;
129
- const providerId = (_b = (_a = entry.overrides) === null || _a === void 0 ? void 0 : _a.providerId) !== null && _b !== void 0 ? _b : uiProvider.id;
125
+ const providerId = entry.overrides?.providerId ?? uiProvider.id;
130
126
  // istanbul ignore else
131
127
  if (uiProvider.provideStatusBarItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {
132
128
  uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)
@@ -147,9 +143,8 @@ export class UiItemsManager {
147
143
  if (0 === UiItemsManager._registeredUiItemsProviders.size)
148
144
  return backstageItems;
149
145
  UiItemsManager._registeredUiItemsProviders.forEach((entry) => {
150
- var _a, _b;
151
146
  const uiProvider = entry.provider;
152
- const providerId = (_b = (_a = entry.overrides) === null || _a === void 0 ? void 0 : _a.providerId) !== null && _b !== void 0 ? _b : uiProvider.id;
147
+ const providerId = entry.overrides?.providerId ?? uiProvider.id;
153
148
  // istanbul ignore else
154
149
  if (uiProvider.provideBackstageItems) { // Note: We do not call this.allowItemsFromProvider here as backstage items
155
150
  uiProvider.provideBackstageItems() // should not be considered stage specific. If they need to be hidden
@@ -174,9 +169,8 @@ export class UiItemsManager {
174
169
  if (0 === UiItemsManager._registeredUiItemsProviders.size)
175
170
  return widgets;
176
171
  UiItemsManager._registeredUiItemsProviders.forEach((entry) => {
177
- var _a, _b;
178
172
  const uiProvider = entry.provider;
179
- const providerId = (_b = (_a = entry.overrides) === null || _a === void 0 ? void 0 : _a.providerId) !== null && _b !== void 0 ? _b : uiProvider.id;
173
+ const providerId = entry.overrides?.providerId ?? uiProvider.id;
180
174
  // istanbul ignore else
181
175
  if (uiProvider.provideWidgets && this.allowItemsFromProvider(entry, stageId, stageUsage)) {
182
176
  uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)
@@ -1 +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SAAS,0CAAE,UAAU,mCAAI,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","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
+ {"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,MAAM,OAAO,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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AAE;YAChF,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC;YAClC,MAAM,UAAU,GAAG,KAAK,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","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"]}
@@ -41,7 +41,7 @@ BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemP
41
41
  ) => ({
42
42
  groupPriority,
43
43
  icon,
44
- internalData: overrides === null || overrides === void 0 ? void 0 : overrides.internalData,
44
+ internalData: overrides?.internalData,
45
45
  id: frontstageId,
46
46
  itemPriority,
47
47
  label,
@@ -55,7 +55,7 @@ BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority,
55
55
  execute,
56
56
  groupPriority,
57
57
  icon,
58
- internalData: overrides === null || overrides === void 0 ? void 0 : overrides.internalData,
58
+ internalData: overrides?.internalData,
59
59
  id: itemId,
60
60
  itemPriority,
61
61
  label,
@@ -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,MAAM,OAAO,sBAAsB;;AACjC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,CAAC,8CAA8C;EACtJ,EAAE,CAAC,CAAC;IAC5B,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,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,CAAC,8CAA8C;EACtJ,EAAE,CAAC,CAAC;IACzB,OAAO;IACP,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY;IACrC,EAAE,EAAE,MAAM;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @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"]}
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,MAAM,OAAO,sBAAsB;;AACjC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,CAAC,8CAA8C;EACtJ,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,CAAC,8CAA8C;EACtJ,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","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"]}
@@ -18,7 +18,7 @@ export interface EditorPosition {
18
18
  /** Determines the column position for the type editor */
19
19
  columnIndex: number;
20
20
  /** Number of columns to occupy. Defaults to 1
21
- * @deprecated in 2.x.
21
+ * @deprecated in 2.19. No longer necessary, ignored.
22
22
  */
23
23
  columnSpan?: number;
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DialogItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AA0DH;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,YAAmB,WAAgC,EAAU,MAAS,EAAU,aAAsB,EAAU,WAAqB;QAAlH,gBAAW,GAAX,WAAW,CAAqB;QAAU,WAAM,GAAN,MAAM,CAAG;QAAU,kBAAa,GAAb,aAAa,CAAS;QAAU,gBAAW,GAAX,WAAW,CAAU;IAAI,CAAC;IAE1I,IAAW,UAAU;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAW,UAAU,CAAC,GAAY;QAChC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;IACzB,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,KAAK,CAAC,GAAM;QACrB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;IACpB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED,IAAW,YAAY,CAAC,GAAuB;QAC7C,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC;IAC3B,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAW,eAAe;QACxB,uBAAuB;QACvB,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,WAAW,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,YAAY,IAAI;YAC7K,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,MAAM;gBAClB,YAAY,EAAE,IAAI,CAAC,aAAa;aACd,CAAC;QACvB,uBAAuB;QACvB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,eAAe,CAAC,GAAoB;QAC7C,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,KAAqB,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC;IACxC,CAAC;IAED,IAAW,QAAQ;QACjB,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,CAAC;IAC9E,CAAC;IAED,IAAW,IAAI;QACb,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;IAClE,CAAC;IAEM,YAAY,CAAC,cAA8B,EAAE,YAAyB;QAC3E,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC;IACjI,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/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { PropertyDescription } from \"../properties/Description\";\r\n\r\n/** [[DialogItemValue]] Interface of PrimitiveValue types that have type editor support for use in dialogs.\r\n * @public\r\n */\r\nexport interface DialogItemValue {\r\n value?: number | string | boolean | Date;\r\n displayValue?: string;\r\n}\r\n/** [[EditorPosition]] Interface used to identify the location of the item a DialogItem property value.\r\n * @public\r\n */\r\nexport interface EditorPosition {\r\n /** Determine the order the row is shown in UI */\r\n rowPriority: number;\r\n /** Determines the column position for the type editor */\r\n columnIndex: number;\r\n /** Number of columns to occupy. Defaults to 1\r\n * @deprecated in 2.x.\r\n */\r\n columnSpan?: number;\r\n}\r\n\r\n/** [[BaseDialogItem]] contains only the members necessary to create a PropertyRecord.\r\n * @public\r\n */\r\nexport interface BaseDialogItem {\r\n readonly value: DialogItemValue;\r\n readonly property: PropertyDescription;\r\n readonly isDisabled?: boolean;\r\n}\r\n/** [[DialogItem]] is the specification that the display engine turns into a UI item.\r\n * @see See learning documentation [DialogItem]($docs/learning/ui/abstract/dialogitem.md)\r\n * @public\r\n */\r\nexport interface DialogItem extends BaseDialogItem {\r\n readonly editorPosition: EditorPosition;\r\n readonly lockProperty?: BaseDialogItem;\r\n}\r\n\r\n/** [[DialogPropertyItem]] us the specification to use if you are defining the components directly, e.g., in React\r\n * @public\r\n */\r\nexport interface DialogPropertyItem {\r\n readonly value: DialogItemValue;\r\n readonly propertyName: string;\r\n}\r\n\r\n/** [[DialogPropertySyncItem]] is used to pass sync messages for DialogPropertyItems\r\n * @public\r\n */\r\nexport interface DialogPropertySyncItem extends DialogPropertyItem {\r\n readonly isDisabled?: boolean;\r\n readonly property?: PropertyDescription;\r\n}\r\n\r\n/** [[DialogProperty]] is a generic helper class that assists working with properties used by UiLayoutDataProvider implementations (i.e. Tool Settings and Dynamic Dialogs).\r\n * @public\r\n */\r\nexport class DialogProperty<T> {\r\n constructor(public description: PropertyDescription, private _value: T, private _displayValue?: string, private _isDisabled?: boolean) { }\r\n\r\n public get isDisabled() {\r\n return !!this._isDisabled;\r\n }\r\n\r\n public set isDisabled(val: boolean) {\r\n this._isDisabled = val;\r\n }\r\n\r\n public get value() {\r\n return this._value;\r\n }\r\n\r\n public set value(val: T) {\r\n this._value = val;\r\n }\r\n\r\n public get name() {\r\n return this.description.name;\r\n }\r\n\r\n public set displayValue(val: string | undefined) {\r\n this._displayValue = val;\r\n }\r\n\r\n public get displayValue() {\r\n return this._displayValue;\r\n }\r\n\r\n public get dialogItemValue() {\r\n // istanbul ignore else\r\n if (typeof this._value === \"string\" || typeof this._value === \"number\" || typeof this._value === \"undefined\" || typeof this._value === \"boolean\" || this._value instanceof Date)\r\n return {\r\n value: this._value,\r\n displayValue: this._displayValue,\r\n } as DialogItemValue;\r\n // istanbul ignore next\r\n throw new Error(\"Not valid primitive type\");\r\n }\r\n\r\n public set dialogItemValue(val: DialogItemValue) {\r\n this._value = val.value as unknown as T;\r\n this._displayValue = val.displayValue;\r\n }\r\n\r\n public get syncItem(): DialogPropertySyncItem {\r\n const isDisabled = this._isDisabled;\r\n return { propertyName: this.name, value: this.dialogItemValue, isDisabled };\r\n }\r\n\r\n public get item(): DialogPropertyItem {\r\n return { propertyName: this.name, value: this.dialogItemValue };\r\n }\r\n\r\n public toDialogItem(editorPosition: EditorPosition, lockProperty?: DialogItem): DialogItem {\r\n return { value: this.dialogItemValue, property: this.description, editorPosition, isDisabled: this._isDisabled, lockProperty };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"DialogItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AA0DH;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,YAAmB,WAAgC,EAAU,MAAS,EAAU,aAAsB,EAAU,WAAqB;QAAlH,gBAAW,GAAX,WAAW,CA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,QAAQ;QACjB,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,CAAC;IAC9E,CAAC;IAED,IAAW,IAAI;QACb,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;IAClE,CAAC;IAEM,YAAY,CAAC,cAA8B,EAAE,YAAyB;QAC3E,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC;IACjI,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/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { PropertyDescription } from \"../properties/Description\";\r\n\r\n/** [[DialogItemValue]] Interface of PrimitiveValue types that have type editor support for use in dialogs.\r\n * @public\r\n */\r\nexport interface DialogItemValue {\r\n value?: number | string | boolean | Date;\r\n displayValue?: string;\r\n}\r\n/** [[EditorPosition]] Interface used to identify the location of the item a DialogItem property value.\r\n * @public\r\n */\r\nexport interface EditorPosition {\r\n /** Determine the order the row is shown in UI */\r\n rowPriority: number;\r\n /** Determines the column position for the type editor */\r\n columnIndex: number;\r\n /** Number of columns to occupy. Defaults to 1\r\n * @deprecated in 2.19. No longer necessary, ignored.\r\n */\r\n columnSpan?: number;\r\n}\r\n\r\n/** [[BaseDialogItem]] contains only the members necessary to create a PropertyRecord.\r\n * @public\r\n */\r\nexport interface BaseDialogItem {\r\n readonly value: DialogItemValue;\r\n readonly property: PropertyDescription;\r\n readonly isDisabled?: boolean;\r\n}\r\n/** [[DialogItem]] is the specification that the display engine turns into a UI item.\r\n * @see See learning documentation [DialogItem]($docs/learning/ui/abstract/dialogitem.md)\r\n * @public\r\n */\r\nexport interface DialogItem extends BaseDialogItem {\r\n readonly editorPosition: EditorPosition;\r\n readonly lockProperty?: BaseDialogItem;\r\n}\r\n\r\n/** [[DialogPropertyItem]] us the specification to use if you are defining the components directly, e.g., in React\r\n * @public\r\n */\r\nexport interface DialogPropertyItem {\r\n readonly value: DialogItemValue;\r\n readonly propertyName: string;\r\n}\r\n\r\n/** [[DialogPropertySyncItem]] is used to pass sync messages for DialogPropertyItems\r\n * @public\r\n */\r\nexport interface DialogPropertySyncItem extends DialogPropertyItem {\r\n readonly isDisabled?: boolean;\r\n readonly property?: PropertyDescription;\r\n}\r\n\r\n/** [[DialogProperty]] is a generic helper class that assists working with properties used by UiLayoutDataProvider implementations (i.e. Tool Settings and Dynamic Dialogs).\r\n * @public\r\n */\r\nexport class DialogProperty<T> {\r\n constructor(public description: PropertyDescription, private _value: T, private _displayValue?: string, private _isDisabled?: boolean) { }\r\n\r\n public get isDisabled() {\r\n return !!this._isDisabled;\r\n }\r\n\r\n public set isDisabled(val: boolean) {\r\n this._isDisabled = val;\r\n }\r\n\r\n public get value() {\r\n return this._value;\r\n }\r\n\r\n public set value(val: T) {\r\n this._value = val;\r\n }\r\n\r\n public get name() {\r\n return this.description.name;\r\n }\r\n\r\n public set displayValue(val: string | undefined) {\r\n this._displayValue = val;\r\n }\r\n\r\n public get displayValue() {\r\n return this._displayValue;\r\n }\r\n\r\n public get dialogItemValue() {\r\n // istanbul ignore else\r\n if (typeof this._value === \"string\" || typeof this._value === \"number\" || typeof this._value === \"undefined\" || typeof this._value === \"boolean\" || this._value instanceof Date)\r\n return {\r\n value: this._value,\r\n displayValue: this._displayValue,\r\n } as DialogItemValue;\r\n // istanbul ignore next\r\n throw new Error(\"Not valid primitive type\");\r\n }\r\n\r\n public set dialogItemValue(val: DialogItemValue) {\r\n this._value = val.value as unknown as T;\r\n this._displayValue = val.displayValue;\r\n }\r\n\r\n public get syncItem(): DialogPropertySyncItem {\r\n const isDisabled = this._isDisabled;\r\n return { propertyName: this.name, value: this.dialogItemValue, isDisabled };\r\n }\r\n\r\n public get item(): DialogPropertyItem {\r\n return { propertyName: this.name, value: this.dialogItemValue };\r\n }\r\n\r\n public toDialogItem(editorPosition: EditorPosition, lockProperty?: DialogItem): DialogItem {\r\n return { value: this.dialogItemValue, property: this.description, editorPosition, isDisabled: this._isDisabled, lockProperty };\r\n }\r\n}\r\n"]}
@@ -36,7 +36,7 @@ export declare enum StatusBarLabelSide {
36
36
  Right = 1
37
37
  }
38
38
  /** Type for StatusBar Item Id
39
- * @deprecated in 3.6.
39
+ * @deprecated in 3.6. Please use `CommonStatusBarItem["id"]` from @itwin/appui-react.
40
40
  * @public
41
41
  */
42
42
  export declare type StatusBarItemId = CommonStatusBarItem["id"];
@@ -97,7 +97,7 @@ export interface AbstractStatusBarCustomItem extends AbstractStatusBarItem {
97
97
  readonly isCustom: true;
98
98
  }
99
99
  /** Describes the data needed to insert a button into the status bar.
100
- * @deprecated in 3.6. Use [AnyStatusBarItem]($appui-react) instead.
100
+ * @deprecated in 3.6. Use [StatusBarItem]($appui-react) instead.
101
101
  * @public
102
102
  */
103
103
  export declare type CommonStatusBarItem = AbstractStatusBarActionItem | AbstractStatusBarLabelItem | AbstractStatusBarCustomItem;
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBarItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/statusbar/StatusBarItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IAC1B,4CAA4C;IAC5C,6DAAW,CAAA;IACX,4CAA4C;IAC5C,uDAAQ,CAAA;IACR,mCAAmC;IACnC,yDAAS,CAAA;IACT,mCAAmC;IACnC,2DAAU,CAAA;IACV,sCAAs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AAsC,EAAE,SAAS,GAAG,kBAAkB,CAAC,KAAK,EAAE,SAA+C,EAA8B,EAAE,CAAC,CAAC;IAClS,EAAE,EAAE,OAAO,EAAE,YAAY;IACzB,IAAI,EAAE,KAAK;IACX,SAAS;IACT,GAAG,SAAS;CACb,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\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/** Status bar Groups/Sections from Left to Right\r\n * @deprecated in 3.6. Use [StatusBarSection]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StatusBarSection {\r\n /** area for tool assistance and messages */\r\n Message = 0,\r\n /** area for tool assistance and messages */\r\n Left = 0,\r\n /** items specific to stage/task */\r\n Stage = 1,\r\n /** items specific to stage/task */\r\n Center = 1,\r\n /** Select scope and selection info */\r\n Selection = 2,\r\n /** Select scope and selection info */\r\n Right = 2,\r\n /** items that only show based on context */\r\n Context = 3,\r\n}\r\n\r\n/** Defines which side of Icon where label is placed\r\n * @deprecated in 3.6. Use [StatusBarLabelSide]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StatusBarLabelSide {\r\n /** Label is placed left side of icon. This is the default if not specified */\r\n Left,\r\n /** Label is placed on right side of icon. */\r\n Right,\r\n}\r\n\r\n/** Type for StatusBar Item Id\r\n * @deprecated in 3.6.\r\n * @public\r\n */\r\nexport type StatusBarItemId = CommonStatusBarItem[\"id\"]; // eslint-disable-line deprecation/deprecation\r\n\r\n/** Describes the data needed to insert a button into the status bar.\r\n * @deprecated in 3.6. Use [CommonStatusBarItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarItem 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 /** 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 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 section (recommend using values 1 through 100). */\r\n readonly itemPriority: number;\r\n /** status bar section */\r\n readonly section: StatusBarSection; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Describes the data needed to insert an action item into the status bar.\r\n * @deprecated in 3.6. Use [StatusBarActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarActionItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\r\n /** method to execute when icon is pressed */\r\n readonly execute: () => void;\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 /** Label. */\r\n readonly label?: string | ConditionalStringValue;\r\n /** tooltip. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n}\r\n\r\n/** Describes the data needed to insert a label item with an optional icon into the status bar.\r\n * @deprecated in 3.6. Use [StatusBarLabelItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarLabelItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\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 /** Label. */\r\n readonly label: string | ConditionalStringValue;\r\n /** Defines which side of icon to display label if icon is defined. */\r\n readonly labelSide?: StatusBarLabelSide; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Describes the data needed to insert a custom item into the status bar. This is used to allow extension\r\n * implementer to create a framework specific component.\r\n * @deprecated in 3.6. Use [StatusBarCustomItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarCustomItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\r\n readonly isCustom: true;\r\n}\r\n\r\n/** Describes the data needed to insert a button into the status bar.\r\n * @deprecated in 3.6. Use [AnyStatusBarItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport type CommonStatusBarItem = AbstractStatusBarActionItem | AbstractStatusBarLabelItem | AbstractStatusBarCustomItem; // eslint-disable-line deprecation/deprecation\r\n\r\n/** AbstractStatusBarActionItem type guard.\r\n * @deprecated in 3.6. Use [isStatusBarActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isAbstractStatusBarActionItem = (item: CommonStatusBarItem): item is AbstractStatusBarActionItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as AbstractStatusBarActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** AbstractStatusBarLabelItem type guard.\r\n * @deprecated in 3.6. Use [isStatusBarLabelItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isAbstractStatusBarLabelItem = (item: CommonStatusBarItem): item is AbstractStatusBarLabelItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as AbstractStatusBarLabelItem).label !== undefined && (item as AbstractStatusBarActionItem).execute === undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** AbstractStatusBarCustomItem type guard.\r\n * @deprecated in 3.6. Use [isStatusBarCustomItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isAbstractStatusBarCustomItem = (item: CommonStatusBarItem): item is AbstractStatusBarCustomItem => { // eslint-disable-line deprecation/deprecation\r\n return !!(item as AbstractStatusBarCustomItem).isCustom; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** Helper class to create Abstract StatusBar Item definitions.\r\n * @deprecated in 3.6. Use [StatusBarItemUtilities]($appui-react) instead.\r\n * @public\r\n */\r\nexport class AbstractStatusBarItemUtilities {\r\n /** Creates a StatusBar item to perform an action */\r\n public static createActionItem = (id: string, section: StatusBarSection, itemPriority: number, icon: string | ConditionalStringValue, tooltip: string | ConditionalStringValue, execute: () => void, overrides?: Partial<AbstractStatusBarCustomItem>): AbstractStatusBarActionItem => ({ // eslint-disable-line deprecation/deprecation\r\n id, section, itemPriority,\r\n icon, tooltip,\r\n execute,\r\n ...overrides,\r\n });\r\n\r\n /** Creates a StatusBar item to display a label */\r\n public static createLabelItem = (id: string, section: StatusBarSection, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, labelSide = StatusBarLabelSide.Right, overrides?: Partial<AbstractStatusBarLabelItem>): AbstractStatusBarLabelItem => ({ // eslint-disable-line deprecation/deprecation\r\n id, section, itemPriority,\r\n icon, label,\r\n labelSide,\r\n ...overrides,\r\n });\r\n}\r\n"]}
1
+ {"version":3,"file":"StatusBarItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/statusbar/StatusBarItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IAC1B,4CAA4C;IAC5C,6DAAW,CAAA;IACX,4CAA4C;IAC5C,uDAAQ,CAAA;IACR,mCAAmC;IACnC,yDAAS,CAAA;IACT,mCAAmC;IACnC,2DAAU,CAAA;IACV,sCAAsC;IACtC,iEAAa,CAAA;IACb,sCAAsC;IACtC,yDAAS,CAAA;IACT,4CAA4C;IAC5C,6DAAW,CAAA;AACb,CAAC,EAfW,gBAAgB,KAAhB,gBAAgB,QAe3B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,8EAA8E;IAC9E,2DAAI,CAAA;IACJ,6CAA6C;IAC7C,6DAAK,CAAA;AACP,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AA0ED;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,IAAyB,EAAuC,EAAE;IAC9G,OAAQ,IAAoC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AACpH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,IAAyB,EAAsC,EAAE;IAC5G,OAAQ,IAAmC,CAAC,KAAK,KAAK,SAAS,IAAK,IAAoC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAChL,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,IAAyB,EAAuC,EAAE;IAC9G,OAAO,CAAC,CAAE,IAAoC,CAAC,QAAQ,CAAC,CAAC,8CAA8C;AACzG,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,8BAA8B;;AACzC,oDAAoD;AACtC,+CAAgB,GAAG,CAAC,EAAU,EAAE,OAAyB,EAAE,YAAoB,EAAE,IAAqC,EAAE,OAAwC,EAAE,OAAmB,EAAE,SAAgD,EAA+B,EAAE,CAAC,CAAC;IACtR,EAAE,EAAE,OAAO,EAAE,YAAY;IACzB,IAAI,EAAE,OAAO;IACb,OAAO;IACP,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,kDAAkD;AACpC,8CAAe,GAAG,CAAC,EAAU,EAAE,OAAyB,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,SAAS,GAAG,kBAAkB,CAAC,KAAK,EAAE,SAA+C,EAA8B,EAAE,CAAC,CAAC;IAClS,EAAE,EAAE,OAAO,EAAE,YAAY;IACzB,IAAI,EAAE,KAAK;IACX,SAAS;IACT,GAAG,SAAS;CACb,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\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/** Status bar Groups/Sections from Left to Right\r\n * @deprecated in 3.6. Use [StatusBarSection]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StatusBarSection {\r\n /** area for tool assistance and messages */\r\n Message = 0,\r\n /** area for tool assistance and messages */\r\n Left = 0,\r\n /** items specific to stage/task */\r\n Stage = 1,\r\n /** items specific to stage/task */\r\n Center = 1,\r\n /** Select scope and selection info */\r\n Selection = 2,\r\n /** Select scope and selection info */\r\n Right = 2,\r\n /** items that only show based on context */\r\n Context = 3,\r\n}\r\n\r\n/** Defines which side of Icon where label is placed\r\n * @deprecated in 3.6. Use [StatusBarLabelSide]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StatusBarLabelSide {\r\n /** Label is placed left side of icon. This is the default if not specified */\r\n Left,\r\n /** Label is placed on right side of icon. */\r\n Right,\r\n}\r\n\r\n/** Type for StatusBar Item Id\r\n * @deprecated in 3.6. Please use `CommonStatusBarItem[\"id\"]` from @itwin/appui-react.\r\n * @public\r\n */\r\nexport type StatusBarItemId = CommonStatusBarItem[\"id\"]; // eslint-disable-line deprecation/deprecation\r\n\r\n/** Describes the data needed to insert a button into the status bar.\r\n * @deprecated in 3.6. Use [CommonStatusBarItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarItem 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 /** 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 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 section (recommend using values 1 through 100). */\r\n readonly itemPriority: number;\r\n /** status bar section */\r\n readonly section: StatusBarSection; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Describes the data needed to insert an action item into the status bar.\r\n * @deprecated in 3.6. Use [StatusBarActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarActionItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\r\n /** method to execute when icon is pressed */\r\n readonly execute: () => void;\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 /** Label. */\r\n readonly label?: string | ConditionalStringValue;\r\n /** tooltip. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n}\r\n\r\n/** Describes the data needed to insert a label item with an optional icon into the status bar.\r\n * @deprecated in 3.6. Use [StatusBarLabelItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarLabelItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\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 /** Label. */\r\n readonly label: string | ConditionalStringValue;\r\n /** Defines which side of icon to display label if icon is defined. */\r\n readonly labelSide?: StatusBarLabelSide; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Describes the data needed to insert a custom item into the status bar. This is used to allow extension\r\n * implementer to create a framework specific component.\r\n * @deprecated in 3.6. Use [StatusBarCustomItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractStatusBarCustomItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\r\n readonly isCustom: true;\r\n}\r\n\r\n/** Describes the data needed to insert a button into the status bar.\r\n * @deprecated in 3.6. Use [StatusBarItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport type CommonStatusBarItem = AbstractStatusBarActionItem | AbstractStatusBarLabelItem | AbstractStatusBarCustomItem; // eslint-disable-line deprecation/deprecation\r\n\r\n/** AbstractStatusBarActionItem type guard.\r\n * @deprecated in 3.6. Use [isStatusBarActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isAbstractStatusBarActionItem = (item: CommonStatusBarItem): item is AbstractStatusBarActionItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as AbstractStatusBarActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** AbstractStatusBarLabelItem type guard.\r\n * @deprecated in 3.6. Use [isStatusBarLabelItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isAbstractStatusBarLabelItem = (item: CommonStatusBarItem): item is AbstractStatusBarLabelItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as AbstractStatusBarLabelItem).label !== undefined && (item as AbstractStatusBarActionItem).execute === undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** AbstractStatusBarCustomItem type guard.\r\n * @deprecated in 3.6. Use [isStatusBarCustomItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isAbstractStatusBarCustomItem = (item: CommonStatusBarItem): item is AbstractStatusBarCustomItem => { // eslint-disable-line deprecation/deprecation\r\n return !!(item as AbstractStatusBarCustomItem).isCustom; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** Helper class to create Abstract StatusBar Item definitions.\r\n * @deprecated in 3.6. Use [StatusBarItemUtilities]($appui-react) instead.\r\n * @public\r\n */\r\nexport class AbstractStatusBarItemUtilities {\r\n /** Creates a StatusBar item to perform an action */\r\n public static createActionItem = (id: string, section: StatusBarSection, itemPriority: number, icon: string | ConditionalStringValue, tooltip: string | ConditionalStringValue, execute: () => void, overrides?: Partial<AbstractStatusBarCustomItem>): AbstractStatusBarActionItem => ({ // eslint-disable-line deprecation/deprecation\r\n id, section, itemPriority,\r\n icon, tooltip,\r\n execute,\r\n ...overrides,\r\n });\r\n\r\n /** Creates a StatusBar item to display a label */\r\n public static createLabelItem = (id: string, section: StatusBarSection, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, labelSide = StatusBarLabelSide.Right, overrides?: Partial<AbstractStatusBarLabelItem>): AbstractStatusBarLabelItem => ({ // eslint-disable-line deprecation/deprecation\r\n id, section, itemPriority,\r\n icon, label,\r\n labelSide,\r\n ...overrides,\r\n });\r\n}\r\n"]}
@@ -100,7 +100,7 @@ export interface CustomButtonDefinition extends ToolbarItem {
100
100
  */
101
101
  export declare type CommonToolbarItem = ActionButton | GroupButton | CustomButtonDefinition;
102
102
  /** Type for Toolbar Item Id
103
- * @deprecated in 3.6.
103
+ * @deprecated in 3.6. Please use `ToolbarItem["id"]` from @itwin/appui-react.
104
104
  * @public
105
105
  */
106
106
  export declare type ToolbarItemId = CommonToolbarItem["id"];