@itwin/appui-abstract 3.0.0-dev.92 → 3.0.0-dev.96

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 (46) hide show
  1. package/lib/cjs/appui-abstract/UiAdmin.d.ts +5 -0
  2. package/lib/cjs/appui-abstract/UiAdmin.d.ts.map +1 -1
  3. package/lib/cjs/appui-abstract/UiAdmin.js +11 -0
  4. package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
  5. package/lib/cjs/appui-abstract/UiItemsManager.d.ts.map +1 -1
  6. package/lib/cjs/appui-abstract/UiItemsManager.js +4 -4
  7. package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
  8. package/lib/cjs/appui-abstract/utils/misc.d.ts +12 -0
  9. package/lib/cjs/appui-abstract/utils/misc.d.ts.map +1 -0
  10. package/lib/cjs/appui-abstract/utils/{getClassName.js → misc.js} +11 -2
  11. package/lib/cjs/appui-abstract/utils/misc.js.map +1 -0
  12. package/lib/cjs/appui-abstract.d.ts +1 -2
  13. package/lib/cjs/appui-abstract.d.ts.map +1 -1
  14. package/lib/cjs/appui-abstract.js +1 -2
  15. package/lib/cjs/appui-abstract.js.map +1 -1
  16. package/lib/esm/appui-abstract/UiAdmin.d.ts +5 -0
  17. package/lib/esm/appui-abstract/UiAdmin.d.ts.map +1 -1
  18. package/lib/esm/appui-abstract/UiAdmin.js +11 -0
  19. package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
  20. package/lib/esm/appui-abstract/UiItemsManager.d.ts.map +1 -1
  21. package/lib/esm/appui-abstract/UiItemsManager.js +4 -4
  22. package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
  23. package/lib/esm/appui-abstract/utils/misc.d.ts +12 -0
  24. package/lib/esm/appui-abstract/utils/misc.d.ts.map +1 -0
  25. package/lib/esm/appui-abstract/utils/{getClassName.js → misc.js} +9 -1
  26. package/lib/esm/appui-abstract/utils/misc.js.map +1 -0
  27. package/lib/esm/appui-abstract.d.ts +1 -2
  28. package/lib/esm/appui-abstract.d.ts.map +1 -1
  29. package/lib/esm/appui-abstract.js +1 -2
  30. package/lib/esm/appui-abstract.js.map +1 -1
  31. package/package.json +9 -10
  32. package/lib/cjs/appui-abstract/UiAbstract.d.ts +0 -39
  33. package/lib/cjs/appui-abstract/UiAbstract.d.ts.map +0 -1
  34. package/lib/cjs/appui-abstract/UiAbstract.js +0 -79
  35. package/lib/cjs/appui-abstract/UiAbstract.js.map +0 -1
  36. package/lib/cjs/appui-abstract/utils/getClassName.d.ts +0 -8
  37. package/lib/cjs/appui-abstract/utils/getClassName.d.ts.map +0 -1
  38. package/lib/cjs/appui-abstract/utils/getClassName.js.map +0 -1
  39. package/lib/esm/appui-abstract/UiAbstract.d.ts +0 -39
  40. package/lib/esm/appui-abstract/UiAbstract.d.ts.map +0 -1
  41. package/lib/esm/appui-abstract/UiAbstract.js +0 -75
  42. package/lib/esm/appui-abstract/UiAbstract.js.map +0 -1
  43. package/lib/esm/appui-abstract/utils/getClassName.d.ts +0 -8
  44. package/lib/esm/appui-abstract/utils/getClassName.d.ts.map +0 -1
  45. package/lib/esm/appui-abstract/utils/getClassName.js.map +0 -1
  46. package/lib/public/locales/en/UiAbstract.json +0 -12
@@ -1 +1 @@
1
- {"version":3,"file":"UiItemsManager.d.ts","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBA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WpD;;;;;;;OAOG;WACW,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EACjG,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,iBAAiB,EAAE;IAgBlF;;;;OAIG;WACW,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,mBAAmB,EAAE;IAgB/G;;OAEG;WACW,iBAAiB,IAAI,aAAa,EAAE;IAgBlD;;;;;;OAMG;WACW,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,aAAa,CAAC,mBAAmB,CAAC;CAgBtN"}
@@ -6,7 +6,7 @@
6
6
  * @module UiItemsProvider
7
7
  */
8
8
  import { BeEvent, Logger } from "@itwin/core-bentley";
9
- import { UiAbstract } from "./UiAbstract";
9
+ import { loggerCategory } from "./utils/misc";
10
10
  /** Action taken by the application on item provided by a UiItemsProvider
11
11
  * @public
12
12
  */
@@ -49,11 +49,11 @@ export class UiItemsManager {
49
49
  */
50
50
  static register(uiProvider) {
51
51
  if (UiItemsManager.getUiItemsProvider(uiProvider.id)) {
52
- Logger.logInfo(UiAbstract.loggerCategory(this), `UiItemsProvider (${uiProvider.id}) is already loaded`);
52
+ Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProvider.id}) is already loaded`);
53
53
  }
54
54
  else {
55
55
  UiItemsManager._registeredUiItemsProviders.set(uiProvider.id, uiProvider);
56
- Logger.logInfo(UiAbstract.loggerCategory(this), `UiItemsProvider (${uiProvider.id}) loaded`);
56
+ Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProvider.id}) loaded`);
57
57
  UiItemsManager.sendRegisteredEvent({ providerId: uiProvider.id });
58
58
  }
59
59
  }
@@ -62,7 +62,7 @@ export class UiItemsManager {
62
62
  if (!UiItemsManager.getUiItemsProvider(uiProviderId))
63
63
  return;
64
64
  UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);
65
- Logger.logInfo(UiAbstract.loggerCategory(this), `UiItemsProvider (${uiProviderId}) unloaded`);
65
+ Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProviderId}) unloaded`);
66
66
  // trigger a refresh of the ui
67
67
  UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId });
68
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C;;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;AAqCD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMzB,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,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AAO,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/** @packageDocumentation\r\n * @module UiItemsProvider\r\n */\r\n\r\nimport { BeEvent, Logger } 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 { UiAbstract } from \"./UiAbstract\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\n\r\n/** Action taken by the application on item provided by a UiItemsProvider\r\n * @public\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/** Describes interface of objects that want to provide UI component to the running IModelApp.\r\n * @public\r\n */\r\nexport interface UiItemsProvider {\r\n /** id of provider */\r\n readonly id: string;\r\n\r\n /** UiItemsManager calls following method to get items to populate specific toolbars */\r\n provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[];\r\n /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */\r\n provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[];\r\n /** UiItemsManager calls following method to augment backstage items. */\r\n provideBackstageItems?: () => BackstageItem[];\r\n /** UiItemsManager calls following method to augment Widget lists.\r\n * @note Returned widgets must provide unique `AbstractWidgetProps[\"id\"]` to correctly save/restore App layout.\r\n */\r\n provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection,\r\n zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>;\r\n /** Called if the application changed the Toolbar button item */\r\n onToolbarButtonItemArbiterChange?: (item: CommonToolbarItem, action: UiItemsApplicationAction) => void;\r\n /** Called if the application changed the StatusBar item */\r\n onStatusBarItemArbiterChange?: (item: CommonStatusBarItem, action: UiItemsApplicationAction) => void;\r\n /** Called if the application changed the Backstage item */\r\n onBackstageItemArbiterChange?: (item: BackstageItem, action: UiItemsApplicationAction) => void;\r\n /** Called if the application changed the Widget */\r\n onWidgetArbiterChange?: (widget: AbstractWidgetProps, action: UiItemsApplicationAction) => void;\r\n}\r\n\r\n/** UIProvider Registered Event Args interface.\r\n * @public\r\n */\r\nexport interface UiItemProviderRegisteredEventArgs {\r\n providerId: string;\r\n}\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 * @public\r\n */\r\nexport class UiItemsManager {\r\n private static _registeredUiItemsProviders: Map<string, UiItemsProvider> = new Map<string, UiItemsProvider>();\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);\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): void {\r\n if (UiItemsManager.getUiItemsProvider(uiProvider.id)) {\r\n Logger.logInfo(UiAbstract.loggerCategory(this), `UiItemsProvider (${uiProvider.id}) is already loaded`);\r\n } else {\r\n UiItemsManager._registeredUiItemsProviders.set(uiProvider.id, uiProvider);\r\n Logger.logInfo(UiAbstract.loggerCategory(this), `UiItemsProvider (${uiProvider.id}) loaded`);\r\n\r\n UiItemsManager.sendRegisteredEvent({ providerId: uiProvider.id } 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 if (!UiItemsManager.getUiItemsProvider(uiProviderId))\r\n return;\r\n\r\n UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);\r\n Logger.logInfo(UiAbstract.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 /** 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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideToolbarButtonItems) {\r\n uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)\r\n .forEach((spec: CommonToolbarItem) => buttonItems.push({ ...spec, providerId: uiProvider.id }));\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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideStatusBarItems) {\r\n uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)\r\n .forEach((item: CommonStatusBarItem) => statusBarItems.push({ ...item, providerId: uiProvider.id }));\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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideBackstageItems) {\r\n uiProvider.provideBackstageItems()\r\n .forEach((item: BackstageItem) => backstageItems.push({ ...item, providerId: uiProvider.id }));\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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideWidgets) {\r\n uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)\r\n .forEach((widget: AbstractWidgetProps) => widgets.push({ ...widget, providerId: uiProvider.id }));\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;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMtD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;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;AAqCD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMzB,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;IA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C;aACrG;QACH,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;;AA7Ic,0CAA2B,GAAiC,IAAI,GAAG,EAA2B,CAAC;AAE9G,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/** @packageDocumentation\r\n * @module UiItemsProvider\r\n */\r\n\r\nimport { BeEvent, Logger } 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\n\r\n/** Action taken by the application on item provided by a UiItemsProvider\r\n * @public\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/** Describes interface of objects that want to provide UI component to the running IModelApp.\r\n * @public\r\n */\r\nexport interface UiItemsProvider {\r\n /** id of provider */\r\n readonly id: string;\r\n\r\n /** UiItemsManager calls following method to get items to populate specific toolbars */\r\n provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[];\r\n /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */\r\n provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[];\r\n /** UiItemsManager calls following method to augment backstage items. */\r\n provideBackstageItems?: () => BackstageItem[];\r\n /** UiItemsManager calls following method to augment Widget lists.\r\n * @note Returned widgets must provide unique `AbstractWidgetProps[\"id\"]` to correctly save/restore App layout.\r\n */\r\n provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection,\r\n zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>;\r\n /** Called if the application changed the Toolbar button item */\r\n onToolbarButtonItemArbiterChange?: (item: CommonToolbarItem, action: UiItemsApplicationAction) => void;\r\n /** Called if the application changed the StatusBar item */\r\n onStatusBarItemArbiterChange?: (item: CommonStatusBarItem, action: UiItemsApplicationAction) => void;\r\n /** Called if the application changed the Backstage item */\r\n onBackstageItemArbiterChange?: (item: BackstageItem, action: UiItemsApplicationAction) => void;\r\n /** Called if the application changed the Widget */\r\n onWidgetArbiterChange?: (widget: AbstractWidgetProps, action: UiItemsApplicationAction) => void;\r\n}\r\n\r\n/** UIProvider Registered Event Args interface.\r\n * @public\r\n */\r\nexport interface UiItemProviderRegisteredEventArgs {\r\n providerId: string;\r\n}\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 * @public\r\n */\r\nexport class UiItemsManager {\r\n private static _registeredUiItemsProviders: Map<string, UiItemsProvider> = new Map<string, UiItemsProvider>();\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);\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): void {\r\n if (UiItemsManager.getUiItemsProvider(uiProvider.id)) {\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProvider.id}) is already loaded`);\r\n } else {\r\n UiItemsManager._registeredUiItemsProviders.set(uiProvider.id, uiProvider);\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProvider.id}) loaded`);\r\n\r\n UiItemsManager.sendRegisteredEvent({ providerId: uiProvider.id } 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 if (!UiItemsManager.getUiItemsProvider(uiProviderId))\r\n return;\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 /** 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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideToolbarButtonItems) {\r\n uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)\r\n .forEach((spec: CommonToolbarItem) => buttonItems.push({ ...spec, providerId: uiProvider.id }));\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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideStatusBarItems) {\r\n uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)\r\n .forEach((item: CommonStatusBarItem) => statusBarItems.push({ ...item, providerId: uiProvider.id }));\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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideBackstageItems) {\r\n uiProvider.provideBackstageItems()\r\n .forEach((item: BackstageItem) => backstageItems.push({ ...item, providerId: uiProvider.id }));\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((uiProvider: UiItemsProvider) => {\r\n // istanbul ignore else\r\n if (uiProvider.provideWidgets) {\r\n uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)\r\n .forEach((widget: AbstractWidgetProps) => widgets.push({ ...widget, providerId: uiProvider.id }));\r\n }\r\n });\r\n return widgets;\r\n }\r\n\r\n}\r\n"]}
@@ -0,0 +1,12 @@
1
+ /** @packageDocumentation
2
+ * @module Utilities
3
+ */
4
+ /** Gets the class name for an object.
5
+ * @internal
6
+ */
7
+ export declare const getClassName: (obj: any) => string;
8
+ /** Gets category to use for adding Log entries
9
+ * @internal
10
+ */
11
+ export declare const loggerCategory: (obj: any) => string;
12
+ //# sourceMappingURL=misc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/misc.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,QAAS,GAAG,KAAG,MAcvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,QAAS,GAAG,KAAG,MAIzC,CAAC"}
@@ -21,4 +21,12 @@ export const getClassName = (obj) => {
21
21
  }
22
22
  return className;
23
23
  };
24
- //# sourceMappingURL=getClassName.js.map
24
+ /** Gets category to use for adding Log entries
25
+ * @internal
26
+ */
27
+ export const loggerCategory = (obj) => {
28
+ const className = getClassName(obj);
29
+ const category = `appui-abstract${(className ? `.${className}` : "")}`;
30
+ return category;
31
+ };
32
+ //# sourceMappingURL=misc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/misc.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAU,EAAE;IAC/C,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,GAAG,EAAE;QACP,IAAI,GAAG,CAAC,IAAI;YACV,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAClB;YACH,uBAAuB;YACvB,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI;gBACzC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;SACpC;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAU,EAAE;IACjD,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACvE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Gets the class name for an object.\r\n * @internal\r\n */\r\nexport const getClassName = (obj: any): string => {\r\n let className = \"\";\r\n\r\n if (obj) {\r\n if (obj.name)\r\n className = obj.name;\r\n else {\r\n // istanbul ignore else\r\n if (obj.constructor && obj.constructor.name)\r\n className = obj.constructor.name;\r\n }\r\n }\r\n\r\n return className;\r\n};\r\n\r\n/** Gets category to use for adding Log entries\r\n * @internal\r\n */\r\nexport const loggerCategory = (obj: any): string => {\r\n const className = getClassName(obj);\r\n const category = `appui-abstract${(className ? `.${className}` : \"\")}`;\r\n return category;\r\n};\r\n\r\n"]}
@@ -1,4 +1,3 @@
1
- export * from "./appui-abstract/UiAbstract";
2
1
  export * from "./appui-abstract/UiAdmin";
3
2
  export * from "./appui-abstract/UiItemsManager";
4
3
  export * from "./appui-abstract/backstage/BackstageItem";
@@ -37,7 +36,7 @@ export * from "./appui-abstract/toolbars/ToolbarItemsManager";
37
36
  export * from "./appui-abstract/statusbar/StatusBarItem";
38
37
  export * from "./appui-abstract/statusbar/StatusBarItemsManager";
39
38
  export * from "./appui-abstract/utils/callbacks";
40
- export * from "./appui-abstract/utils/getClassName";
39
+ export * from "./appui-abstract/utils/misc";
41
40
  export * from "./appui-abstract/utils/isLetter";
42
41
  export * from "./appui-abstract/utils/IconSpecUtilities";
43
42
  export * from "./appui-abstract/utils/PointProps";
@@ -1 +1 @@
1
- {"version":3,"file":"appui-abstract.d.ts","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":"AAKA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,qCAAqC,CAAC;AAEpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAEhE,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AAExD,cAAc,0CAA0C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gC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AAEpD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- export * from "./appui-abstract/UiAbstract";
6
5
  export * from "./appui-abstract/UiAdmin";
7
6
  export * from "./appui-abstract/UiItemsManager";
8
7
  export * from "./appui-abstract/backstage/BackstageItem";
@@ -41,7 +40,7 @@ export * from "./appui-abstract/toolbars/ToolbarItemsManager";
41
40
  export * from "./appui-abstract/statusbar/StatusBarItem";
42
41
  export * from "./appui-abstract/statusbar/StatusBarItemsManager";
43
42
  export * from "./appui-abstract/utils/callbacks";
44
- export * from "./appui-abstract/utils/getClassName";
43
+ export * from "./appui-abstract/utils/misc";
45
44
  export * from "./appui-abstract/utils/isLetter";
46
45
  export * from "./appui-abstract/utils/IconSpecUtilities";
47
46
  export * from "./appui-abstract/utils/PointProps";
@@ -1 +1 @@
1
- {"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,qCAAqC,CAAC;AAEpD,cAAc,6C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;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./appui-abstract/UiAbstract\";\r\nexport * from \"./appui-abstract/UiAdmin\";\r\nexport * from \"./appui-abstract/UiItemsManager\";\r\n\r\nexport * from \"./appui-abstract/backstage/BackstageItem\";\r\nexport * from \"./appui-abstract/backstage/BackstageItemsManager\";\r\n\r\nexport * from \"./appui-abstract/common/KeyboardKey\";\r\n\r\nexport * from \"./appui-abstract/content/ContentLayoutProps\";\r\nexport * from \"./appui-abstract/content/StandardContentLayouts\";\r\n\r\nexport * from \"./appui-abstract/dialogs/DialogItem\";\r\nexport * from \"./appui-abstract/dialogs/UiLayoutDataProvider\";\r\nexport * from \"./appui-abstract/dialogs/UiDataProvider\";\r\n\r\nexport * from \"./appui-abstract/items/AbstractItemProps\";\r\nexport * from \"./appui-abstract/items/AbstractMenuItemProps\";\r\nexport * from \"./appui-abstract/items/ProvidedItem\";\r\nexport * from \"./appui-abstract/items/AbstractToolbarProps\";\r\nexport * from \"./appui-abstract/items/BadgeType\";\r\n\r\nexport * from \"./appui-abstract/items/ConditionalBooleanValue\";\r\nexport * from \"./appui-abstract/items/ConditionalStringValue\";\r\nexport * from \"./appui-abstract/items/RelativePosition\";\r\nexport * from \"./appui-abstract/items/ProvidedItem\";\r\nexport * from \"./appui-abstract/items/RelativePosition\";\r\nexport * from \"./appui-abstract/items/StageUsage\";\r\n\r\nexport * from \"./appui-abstract/notification/MessagePresenter\";\r\nexport * from \"./appui-abstract/notification/MessageSeverity\";\r\n\r\nexport * from \"./appui-abstract/properties/Description\";\r\nexport * from \"./appui-abstract/properties/EditorParams\";\r\nexport * from \"./appui-abstract/properties/PrimitiveTypes\";\r\nexport * from \"./appui-abstract/properties/Record\";\r\nexport * from \"./appui-abstract/properties/StandardEditorNames\";\r\nexport * from \"./appui-abstract/properties/StandardTypeNames\";\r\nexport * from \"./appui-abstract/properties/Value\";\r\n\r\nexport * from \"./appui-abstract/quantity/BaseQuantityDescription\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/toolbars/ToolbarItem\";\r\nexport * from \"./appui-abstract/toolbars/ToolbarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/utils/callbacks\";\r\nexport * from \"./appui-abstract/utils/getClassName\";\r\nexport * from \"./appui-abstract/utils/isLetter\";\r\nexport * from \"./appui-abstract/utils/IconSpecUtilities\";\r\nexport * from \"./appui-abstract/utils/PointProps\";\r\nexport * from \"./appui-abstract/utils/UiError\";\r\nexport * from \"./appui-abstract/utils/filter/charCode\";\r\nexport * from \"./appui-abstract/utils/filter/filters\";\r\nexport * from \"./appui-abstract/utils/filter/strings\";\r\n\r\nexport * from \"./appui-abstract/widget/AbstractWidgetProps\";\r\nexport * from \"./appui-abstract/widget/StagePanel\";\r\nexport * from \"./appui-abstract/widget/WidgetState\";\r\n\r\n/** @docs-package-description\r\n * The appui-abstract package contains abstractions for UI controls, such as toolbars, buttons and menus.\r\n * For more information, see [learning about appui-abstract]($docs/learning/ui/abstract/index.md).\r\n */\r\n/**\r\n * @docs-group-description Backstage\r\n * Abstractions used by appui-react package to create and manage the display Backstage menu items.\r\n */\r\n/**\r\n * @docs-group-description Common\r\n * Common enums and functions used throughout the UI packages.\r\n */\r\n/**\r\n * @docs-group-description ContentView\r\n * Classes and interfaces used with Content Layouts.\r\n */\r\n/**\r\n * @docs-group-description Dialog\r\n * Interfaces and classes for generating UI items for Dialogs.\r\n */\r\n/**\r\n * @docs-group-description Item\r\n * Classes for working with an Item in a Toolbar, Widget, Backstage or Context Menu\r\n */\r\n/**\r\n * @docs-group-description Notification\r\n * Interfaces and enums for working with a message\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Properties system for data input and formatting.\r\n */\r\n/**\r\n * @docs-group-description StatusBar\r\n * Classes for creating and managing items in the status bar.\r\n */\r\n/**\r\n * @docs-group-description Toolbar\r\n * Classes for creating and managing items in a toolbar.\r\n */\r\n/**\r\n * @docs-group-description StandardContentLayouts\r\n * Class that contains standard layout definitions for frontstage content/views.\r\n */\r\n/**\r\n * @docs-group-description UiAdmin\r\n * Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.\r\n */\r\n/**\r\n * @docs-group-description UiItemsProvider\r\n * Interface for specifying UI items to be inserted at runtime.\r\n */\r\n/**\r\n * @docs-group-description Utilities\r\n * Various utility classes for working with a UI.\r\n */\r\n/**\r\n * @docs-group-description Widget\r\n * Classes for creating and providing Widgets.\r\n */\r\n"]}
1
+ {"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,qCAAqC,CAAC;AAEpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAEhE,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AAExD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAElD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+CAA+C,CAAC;AAE9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAElD,cAAc,mDAAmD,CAAC;AAClE,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAE9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AAEpD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./appui-abstract/UiAdmin\";\r\nexport * from \"./appui-abstract/UiItemsManager\";\r\n\r\nexport * from \"./appui-abstract/backstage/BackstageItem\";\r\nexport * from \"./appui-abstract/backstage/BackstageItemsManager\";\r\n\r\nexport * from \"./appui-abstract/common/KeyboardKey\";\r\n\r\nexport * from \"./appui-abstract/content/ContentLayoutProps\";\r\nexport * from \"./appui-abstract/content/StandardContentLayouts\";\r\n\r\nexport * from \"./appui-abstract/dialogs/DialogItem\";\r\nexport * from \"./appui-abstract/dialogs/UiLayoutDataProvider\";\r\nexport * from \"./appui-abstract/dialogs/UiDataProvider\";\r\n\r\nexport * from \"./appui-abstract/items/AbstractItemProps\";\r\nexport * from \"./appui-abstract/items/AbstractMenuItemProps\";\r\nexport * from \"./appui-abstract/items/ProvidedItem\";\r\nexport * from \"./appui-abstract/items/AbstractToolbarProps\";\r\nexport * from \"./appui-abstract/items/BadgeType\";\r\n\r\nexport * from \"./appui-abstract/items/ConditionalBooleanValue\";\r\nexport * from \"./appui-abstract/items/ConditionalStringValue\";\r\nexport * from \"./appui-abstract/items/RelativePosition\";\r\nexport * from \"./appui-abstract/items/ProvidedItem\";\r\nexport * from \"./appui-abstract/items/RelativePosition\";\r\nexport * from \"./appui-abstract/items/StageUsage\";\r\n\r\nexport * from \"./appui-abstract/notification/MessagePresenter\";\r\nexport * from \"./appui-abstract/notification/MessageSeverity\";\r\n\r\nexport * from \"./appui-abstract/properties/Description\";\r\nexport * from \"./appui-abstract/properties/EditorParams\";\r\nexport * from \"./appui-abstract/properties/PrimitiveTypes\";\r\nexport * from \"./appui-abstract/properties/Record\";\r\nexport * from \"./appui-abstract/properties/StandardEditorNames\";\r\nexport * from \"./appui-abstract/properties/StandardTypeNames\";\r\nexport * from \"./appui-abstract/properties/Value\";\r\n\r\nexport * from \"./appui-abstract/quantity/BaseQuantityDescription\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/toolbars/ToolbarItem\";\r\nexport * from \"./appui-abstract/toolbars/ToolbarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/utils/callbacks\";\r\nexport * from \"./appui-abstract/utils/misc\";\r\nexport * from \"./appui-abstract/utils/isLetter\";\r\nexport * from \"./appui-abstract/utils/IconSpecUtilities\";\r\nexport * from \"./appui-abstract/utils/PointProps\";\r\nexport * from \"./appui-abstract/utils/UiError\";\r\nexport * from \"./appui-abstract/utils/filter/charCode\";\r\nexport * from \"./appui-abstract/utils/filter/filters\";\r\nexport * from \"./appui-abstract/utils/filter/strings\";\r\n\r\nexport * from \"./appui-abstract/widget/AbstractWidgetProps\";\r\nexport * from \"./appui-abstract/widget/StagePanel\";\r\nexport * from \"./appui-abstract/widget/WidgetState\";\r\n\r\n/** @docs-package-description\r\n * The appui-abstract package contains abstractions for UI controls, such as toolbars, buttons and menus.\r\n * For more information, see [learning about appui-abstract]($docs/learning/ui/abstract/index.md).\r\n */\r\n/**\r\n * @docs-group-description Backstage\r\n * Abstractions used by appui-react package to create and manage the display Backstage menu items.\r\n */\r\n/**\r\n * @docs-group-description Common\r\n * Common enums and functions used throughout the UI packages.\r\n */\r\n/**\r\n * @docs-group-description ContentView\r\n * Classes and interfaces used with Content Layouts.\r\n */\r\n/**\r\n * @docs-group-description Dialog\r\n * Interfaces and classes for generating UI items for Dialogs.\r\n */\r\n/**\r\n * @docs-group-description Item\r\n * Classes for working with an Item in a Toolbar, Widget, Backstage or Context Menu\r\n */\r\n/**\r\n * @docs-group-description Notification\r\n * Interfaces and enums for working with a message\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Properties system for data input and formatting.\r\n */\r\n/**\r\n * @docs-group-description StatusBar\r\n * Classes for creating and managing items in the status bar.\r\n */\r\n/**\r\n * @docs-group-description Toolbar\r\n * Classes for creating and managing items in a toolbar.\r\n */\r\n/**\r\n * @docs-group-description StandardContentLayouts\r\n * Class that contains standard layout definitions for frontstage content/views.\r\n */\r\n/**\r\n * @docs-group-description UiAdmin\r\n * Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.\r\n */\r\n/**\r\n * @docs-group-description UiItemsProvider\r\n * Interface for specifying UI items to be inserted at runtime.\r\n */\r\n/**\r\n * @docs-group-description Utilities\r\n * Various utility classes for working with a UI.\r\n */\r\n/**\r\n * @docs-group-description Widget\r\n * Classes for creating and providing Widgets.\r\n */\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/appui-abstract",
3
- "version": "3.0.0-dev.92",
3
+ "version": "3.0.0-dev.96",
4
4
  "description": "iModel.js UI abstractions",
5
5
  "main": "lib/cjs/appui-abstract.js",
6
6
  "module": "lib/esm/appui-abstract.js",
@@ -9,7 +9,7 @@
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/imodeljs/imodeljs/tree/master/ui/abstract"
12
+ "url": "https://github.com/imodeljs/imodeljs/tree/master/ui/appui-abstract"
13
13
  },
14
14
  "keywords": [
15
15
  "Bentley",
@@ -21,19 +21,18 @@
21
21
  "url": "http://www.bentley.com"
22
22
  },
23
23
  "peerDependencies": {
24
- "@itwin/core-bentley": "^3.0.0-dev.92",
25
- "@itwin/core-i18n": "^3.0.0-dev.92"
24
+ "@itwin/core-bentley": "^3.0.0-dev.96"
26
25
  },
27
26
  "//devDependencies": [
28
27
  "NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install",
29
28
  "NOTE: All tools used by scripts in this package must be listed as devDependencies"
30
29
  ],
31
30
  "devDependencies": {
32
- "@itwin/core-bentley": "3.0.0-dev.92",
33
- "@itwin/core-common": "3.0.0-dev.92",
34
- "@itwin/build-tools": "3.0.0-dev.92",
35
- "@itwin/eslint-plugin": "3.0.0-dev.92",
36
- "@itwin/core-i18n": "3.0.0-dev.92",
31
+ "@itwin/core-bentley": "3.0.0-dev.96",
32
+ "@itwin/core-common": "3.0.0-dev.96",
33
+ "@itwin/build-tools": "3.0.0-dev.96",
34
+ "@itwin/eslint-plugin": "3.0.0-dev.96",
35
+ "@itwin/core-i18n": "3.0.0-dev.96",
37
36
  "@types/chai": "^4.1.4",
38
37
  "@types/chai-as-promised": "^7",
39
38
  "@types/chai-jest-snapshot": "^1.3.0",
@@ -93,7 +92,7 @@
93
92
  ]
94
93
  },
95
94
  "scripts": {
96
- "build": "npm run -s copy:locale && npm run -s build:cjs",
95
+ "build": "npm run -s build:cjs",
97
96
  "build:ci": "npm run -s build && npm run -s build:esm",
98
97
  "build:cjs": "tsc 1>&2 --outDir lib/cjs",
99
98
  "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm",
@@ -1,39 +0,0 @@
1
- /** @packageDocumentation
2
- * @module Utilities
3
- */
4
- import { Localization } from "@itwin/core-common";
5
- import { MessagePresenter } from "./notification/MessagePresenter";
6
- /**
7
- * Entry point for static initialization required by various components used in the package.
8
- * @public
9
- */
10
- export declare class UiAbstract {
11
- private static _initialized;
12
- private static _localization?;
13
- private static _messagePresenter?;
14
- /**
15
- * Registers the Localization service namespace for UiAbstract
16
- * @param localization The internationalization service created by the application.
17
- */
18
- static initialize(localization: Localization): Promise<void>;
19
- /** Unregisters the UiAbstract internationalization service namespace */
20
- static terminate(): void;
21
- /** Determines if UiAbstract has been initialized */
22
- static get initialized(): boolean;
23
- /** The internationalization service created by the application. */
24
- static get localization(): Localization;
25
- /** The internationalization service namespace. */
26
- static get localizationNamespace(): string;
27
- /** Calls localization.getLocalizedStringWithNamespace with the "UiAbstract" namespace. Do NOT include the namespace in the key.
28
- * @internal
29
- */
30
- static translate(key: string | string[]): string;
31
- /** @internal */
32
- static get packageName(): string;
33
- /** @internal */
34
- static loggerCategory(obj: any): string;
35
- /** The MessagePresenter used to display messages. */
36
- static get messagePresenter(): MessagePresenter;
37
- static set messagePresenter(mp: MessagePresenter);
38
- }
39
- //# sourceMappingURL=UiAbstract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UiAbstract.d.ts","sourceRoot":"","sources":["../../../src/appui-abstract/UiAbstract.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IACpC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAe;IAC5C,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAmB;IAEpD;;;OAGG;WACiB,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAWzE,wEAAwE;WAC1D,SAAS;IAOvB,oDAAoD;IACpD,WAAkB,WAAW,IAAI,OAAO,CAAoC;IAE5E,mEAAmE;IACnE,WAAkB,YAAY,IAAI,YAAY,CAI7C;IAED,kDAAkD;IAClD,WAAkB,qBAAqB,IAAI,MAAM,CAEhD;IAED;;OAEG;WACW,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAIvD,gBAAgB;IAChB,WAAkB,WAAW,IAAI,MAAM,CAEtC;IAED,gBAAgB;WACF,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;IAM9C,qDAAqD;IACrD,WAAkB,gBAAgB,IAAI,gBAAgB,CAIrD;IACD,WAAkB,gBAAgB,CAAC,EAAE,EAAE,gBAAgB,EAEtD;CAEF"}
@@ -1,79 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Utilities
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.UiAbstract = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const getClassName_1 = require("./utils/getClassName");
13
- const UiError_1 = require("./utils/UiError");
14
- /**
15
- * Entry point for static initialization required by various components used in the package.
16
- * @public
17
- */
18
- class UiAbstract {
19
- /**
20
- * Registers the Localization service namespace for UiAbstract
21
- * @param localization The internationalization service created by the application.
22
- */
23
- static async initialize(localization) {
24
- if (UiAbstract._initialized) {
25
- core_bentley_1.Logger.logInfo(UiAbstract.loggerCategory(UiAbstract), `UiAbstract.initialize already called`);
26
- return;
27
- }
28
- UiAbstract._localization = localization;
29
- await UiAbstract._localization.registerNamespace(UiAbstract.localizationNamespace);
30
- UiAbstract._initialized = true;
31
- }
32
- /** Unregisters the UiAbstract internationalization service namespace */
33
- static terminate() {
34
- if (UiAbstract._localization)
35
- UiAbstract._localization.unregisterNamespace(UiAbstract.localizationNamespace);
36
- UiAbstract._localization = undefined;
37
- UiAbstract._initialized = false;
38
- }
39
- /** Determines if UiAbstract has been initialized */
40
- static get initialized() { return UiAbstract._initialized; }
41
- /** The internationalization service created by the application. */
42
- static get localization() {
43
- if (!UiAbstract._localization)
44
- throw new UiError_1.UiError(UiAbstract.loggerCategory(this), "UiAbstract not initialized");
45
- return UiAbstract._localization;
46
- }
47
- /** The internationalization service namespace. */
48
- static get localizationNamespace() {
49
- return "UiAbstract";
50
- }
51
- /** Calls localization.getLocalizedStringWithNamespace with the "UiAbstract" namespace. Do NOT include the namespace in the key.
52
- * @internal
53
- */
54
- static translate(key) {
55
- return UiAbstract.localization.getLocalizedStringWithNamespace(UiAbstract.localizationNamespace, key);
56
- }
57
- /** @internal */
58
- static get packageName() {
59
- return "appui-abstract";
60
- }
61
- /** @internal */
62
- static loggerCategory(obj) {
63
- const className = (0, getClassName_1.getClassName)(obj);
64
- const category = UiAbstract.packageName + (className ? `.${className}` : "");
65
- return category;
66
- }
67
- /** The MessagePresenter used to display messages. */
68
- static get messagePresenter() {
69
- if (!UiAbstract._messagePresenter)
70
- throw new UiError_1.UiError(UiAbstract.loggerCategory(this), "UiAbstract.MessagePresenter not set");
71
- return UiAbstract._messagePresenter;
72
- }
73
- static set messagePresenter(mp) {
74
- UiAbstract._messagePresenter = mp;
75
- }
76
- }
77
- exports.UiAbstract = UiAbstract;
78
- UiAbstract._initialized = false;
79
- //# sourceMappingURL=UiAbstract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UiAbstract.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiAbstract.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAG7C,uDAAoD;AACpD,6CAA0C;AAE1C;;;GAGG;AACH,MAAa,UAAU;IAKrB;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI,UAAU,CAAC,YAAY,EAAE;YAC3B,qBAAM,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,sCAAsC,CAAC,CAAC;YAC9F,OAAO;SACR;QAED,UAAU,CAAC,aAAa,GAAG,YAAY,CAAC;QACxC,MAAM,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;QACnF,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;IACjC,CAAC;IAED,wEAAwE;IACjE,MAAM,CAAC,SAAS;QACrB,IAAI,UAAU,CAAC,aAAa;YAC1B,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;QACjF,UAAU,CAAC,aAAa,GAAG,SAAS,CAAC;QACrC,UAAU,CAAC,YAAY,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,oDAAoD;IAC7C,MAAM,KAAK,WAAW,KAAc,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE5E,mEAAmE;IAC5D,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,UAAU,CAAC,aAAa;YAC3B,MAAM,IAAI,iBAAO,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,4BAA4B,CAAC,CAAC;QACnF,OAAO,UAAU,CAAC,aAAa,CAAC;IAClC,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,OAAO,UAAU,CAAC,YAAY,CAAC,+BAA+B,CAAC,UAAU,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;IACxG,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,IAAA,2BAAY,EAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7E,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,qDAAqD;IAC9C,MAAM,KAAK,gBAAgB;QAChC,IAAI,CAAC,UAAU,CAAC,iBAAiB;YAC/B,MAAM,IAAI,iBAAO,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,qCAAqC,CAAC,CAAC;QAC5F,OAAO,UAAU,CAAC,iBAAiB,CAAC;IACtC,CAAC;IACM,MAAM,KAAK,gBAAgB,CAAC,EAAoB;QACrD,UAAU,CAAC,iBAAiB,GAAG,EAAE,CAAC;IACpC,CAAC;;AAtEH,gCAwEC;AAvEgB,uBAAY,GAAG,KAAK,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 Utilities\r\n */\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { Localization } from \"@itwin/core-common\";\r\nimport { MessagePresenter } from \"./notification/MessagePresenter\";\r\nimport { getClassName } from \"./utils/getClassName\";\r\nimport { UiError } from \"./utils/UiError\";\r\n\r\n/**\r\n * Entry point for static initialization required by various components used in the package.\r\n * @public\r\n */\r\nexport class UiAbstract {\r\n private static _initialized = false;\r\n private static _localization?: Localization;\r\n private static _messagePresenter?: MessagePresenter;\r\n\r\n /**\r\n * Registers the Localization service namespace for UiAbstract\r\n * @param localization The internationalization service created by the application.\r\n */\r\n public static async initialize(localization: Localization): Promise<void> {\r\n if (UiAbstract._initialized) {\r\n Logger.logInfo(UiAbstract.loggerCategory(UiAbstract), `UiAbstract.initialize already called`);\r\n return;\r\n }\r\n\r\n UiAbstract._localization = localization;\r\n await UiAbstract._localization.registerNamespace(UiAbstract.localizationNamespace);\r\n UiAbstract._initialized = true;\r\n }\r\n\r\n /** Unregisters the UiAbstract internationalization service namespace */\r\n public static terminate() {\r\n if (UiAbstract._localization)\r\n UiAbstract._localization.unregisterNamespace(UiAbstract.localizationNamespace);\r\n UiAbstract._localization = undefined;\r\n UiAbstract._initialized = false;\r\n }\r\n\r\n /** Determines if UiAbstract has been initialized */\r\n public static get initialized(): boolean { return UiAbstract._initialized; }\r\n\r\n /** The internationalization service created by the application. */\r\n public static get localization(): Localization {\r\n if (!UiAbstract._localization)\r\n throw new UiError(UiAbstract.loggerCategory(this), \"UiAbstract not initialized\");\r\n return UiAbstract._localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiAbstract\";\r\n }\r\n\r\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiAbstract\" namespace. Do NOT include the namespace in the key.\r\n * @internal\r\n */\r\n public static translate(key: string | string[]): string {\r\n return UiAbstract.localization.getLocalizedStringWithNamespace(UiAbstract.localizationNamespace, key);\r\n }\r\n\r\n /** @internal */\r\n public static get packageName(): string {\r\n return \"appui-abstract\";\r\n }\r\n\r\n /** @internal */\r\n public static loggerCategory(obj: any): string {\r\n const className = getClassName(obj);\r\n const category = UiAbstract.packageName + (className ? `.${className}` : \"\");\r\n return category;\r\n }\r\n\r\n /** The MessagePresenter used to display messages. */\r\n public static get messagePresenter(): MessagePresenter {\r\n if (!UiAbstract._messagePresenter)\r\n throw new UiError(UiAbstract.loggerCategory(this), \"UiAbstract.MessagePresenter not set\");\r\n return UiAbstract._messagePresenter;\r\n }\r\n public static set messagePresenter(mp: MessagePresenter) {\r\n UiAbstract._messagePresenter = mp;\r\n }\r\n\r\n}\r\n"]}
@@ -1,8 +0,0 @@
1
- /** @packageDocumentation
2
- * @module Utilities
3
- */
4
- /** Gets the class name for an object.
5
- * @internal
6
- */
7
- export declare const getClassName: (obj: any) => string;
8
- //# sourceMappingURL=getClassName.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getClassName.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/getClassName.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,QAAS,GAAG,KAAG,MAcvC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getClassName.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/getClassName.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACI,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAU,EAAE;IAC/C,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,GAAG,EAAE;QACP,IAAI,GAAG,CAAC,IAAI;YACV,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAClB;YACH,uBAAuB;YACvB,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI;gBACzC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;SACpC;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Gets the class name for an object.\r\n * @internal\r\n */\r\nexport const getClassName = (obj: any): string => {\r\n let className = \"\";\r\n\r\n if (obj) {\r\n if (obj.name)\r\n className = obj.name;\r\n else {\r\n // istanbul ignore else\r\n if (obj.constructor && obj.constructor.name)\r\n className = obj.constructor.name;\r\n }\r\n }\r\n\r\n return className;\r\n};\r\n"]}
@@ -1,39 +0,0 @@
1
- /** @packageDocumentation
2
- * @module Utilities
3
- */
4
- import { Localization } from "@itwin/core-common";
5
- import { MessagePresenter } from "./notification/MessagePresenter";
6
- /**
7
- * Entry point for static initialization required by various components used in the package.
8
- * @public
9
- */
10
- export declare class UiAbstract {
11
- private static _initialized;
12
- private static _localization?;
13
- private static _messagePresenter?;
14
- /**
15
- * Registers the Localization service namespace for UiAbstract
16
- * @param localization The internationalization service created by the application.
17
- */
18
- static initialize(localization: Localization): Promise<void>;
19
- /** Unregisters the UiAbstract internationalization service namespace */
20
- static terminate(): void;
21
- /** Determines if UiAbstract has been initialized */
22
- static get initialized(): boolean;
23
- /** The internationalization service created by the application. */
24
- static get localization(): Localization;
25
- /** The internationalization service namespace. */
26
- static get localizationNamespace(): string;
27
- /** Calls localization.getLocalizedStringWithNamespace with the "UiAbstract" namespace. Do NOT include the namespace in the key.
28
- * @internal
29
- */
30
- static translate(key: string | string[]): string;
31
- /** @internal */
32
- static get packageName(): string;
33
- /** @internal */
34
- static loggerCategory(obj: any): string;
35
- /** The MessagePresenter used to display messages. */
36
- static get messagePresenter(): MessagePresenter;
37
- static set messagePresenter(mp: MessagePresenter);
38
- }
39
- //# sourceMappingURL=UiAbstract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UiAbstract.d.ts","sourceRoot":"","sources":["../../../src/appui-abstract/UiAbstract.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IACpC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAe;IAC5C,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAmB;IAEpD;;;OAGG;WACiB,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAWzE,wEAAwE;WAC1D,SAAS;IAOvB,oDAAoD;IACpD,WAAkB,WAAW,IAAI,OAAO,CAAoC;IAE5E,mEAAmE;IACnE,WAAkB,YAAY,IAAI,YAAY,CAI7C;IAED,kDAAkD;IAClD,WAAkB,qBAAqB,IAAI,MAAM,CAEhD;IAED;;OAEG;WACW,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAIvD,gBAAgB;IAChB,WAAkB,WAAW,IAAI,MAAM,CAEtC;IAED,gBAAgB;WACF,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;IAM9C,qDAAqD;IACrD,WAAkB,gBAAgB,IAAI,gBAAgB,CAIrD;IACD,WAAkB,gBAAgB,CAAC,EAAE,EAAE,gBAAgB,EAEtD;CAEF"}
@@ -1,75 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Utilities
7
- */
8
- import { Logger } from "@itwin/core-bentley";
9
- import { getClassName } from "./utils/getClassName";
10
- import { UiError } from "./utils/UiError";
11
- /**
12
- * Entry point for static initialization required by various components used in the package.
13
- * @public
14
- */
15
- export class UiAbstract {
16
- /**
17
- * Registers the Localization service namespace for UiAbstract
18
- * @param localization The internationalization service created by the application.
19
- */
20
- static async initialize(localization) {
21
- if (UiAbstract._initialized) {
22
- Logger.logInfo(UiAbstract.loggerCategory(UiAbstract), `UiAbstract.initialize already called`);
23
- return;
24
- }
25
- UiAbstract._localization = localization;
26
- await UiAbstract._localization.registerNamespace(UiAbstract.localizationNamespace);
27
- UiAbstract._initialized = true;
28
- }
29
- /** Unregisters the UiAbstract internationalization service namespace */
30
- static terminate() {
31
- if (UiAbstract._localization)
32
- UiAbstract._localization.unregisterNamespace(UiAbstract.localizationNamespace);
33
- UiAbstract._localization = undefined;
34
- UiAbstract._initialized = false;
35
- }
36
- /** Determines if UiAbstract has been initialized */
37
- static get initialized() { return UiAbstract._initialized; }
38
- /** The internationalization service created by the application. */
39
- static get localization() {
40
- if (!UiAbstract._localization)
41
- throw new UiError(UiAbstract.loggerCategory(this), "UiAbstract not initialized");
42
- return UiAbstract._localization;
43
- }
44
- /** The internationalization service namespace. */
45
- static get localizationNamespace() {
46
- return "UiAbstract";
47
- }
48
- /** Calls localization.getLocalizedStringWithNamespace with the "UiAbstract" namespace. Do NOT include the namespace in the key.
49
- * @internal
50
- */
51
- static translate(key) {
52
- return UiAbstract.localization.getLocalizedStringWithNamespace(UiAbstract.localizationNamespace, key);
53
- }
54
- /** @internal */
55
- static get packageName() {
56
- return "appui-abstract";
57
- }
58
- /** @internal */
59
- static loggerCategory(obj) {
60
- const className = getClassName(obj);
61
- const category = UiAbstract.packageName + (className ? `.${className}` : "");
62
- return category;
63
- }
64
- /** The MessagePresenter used to display messages. */
65
- static get messagePresenter() {
66
- if (!UiAbstract._messagePresenter)
67
- throw new UiError(UiAbstract.loggerCategory(this), "UiAbstract.MessagePresenter not set");
68
- return UiAbstract._messagePresenter;
69
- }
70
- static set messagePresenter(mp) {
71
- UiAbstract._messagePresenter = mp;
72
- }
73
- }
74
- UiAbstract._initialized = false;
75
- //# sourceMappingURL=UiAbstract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UiAbstract.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiAbstract.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C;;;GAGG;AACH,MAAM,OAAO,UAAU;IAKrB;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI,UAAU,CAAC,YAAY,EAAE;YAC3B,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,sCAAsC,CAAC,CAAC;YAC9F,OAAO;SACR;QAED,UAAU,CAAC,aAAa,GAAG,YAAY,CAAC;QACxC,MAAM,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;QACnF,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;IACjC,CAAC;IAED,wEAAwE;IACjE,MAAM,CAAC,SAAS;QACrB,IAAI,UAAU,CAAC,aAAa;YAC1B,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;QACjF,UAAU,CAAC,aAAa,GAAG,SAAS,CAAC;QACrC,UAAU,CAAC,YAAY,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,oDAAoD;IAC7C,MAAM,KAAK,WAAW,KAAc,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE5E,mEAAmE;IAC5D,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,UAAU,CAAC,aAAa;YAC3B,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,4BAA4B,CAAC,CAAC;QACnF,OAAO,UAAU,CAAC,aAAa,CAAC;IAClC,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,OAAO,UAAU,CAAC,YAAY,CAAC,+BAA+B,CAAC,UAAU,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;IACxG,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7E,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,qDAAqD;IAC9C,MAAM,KAAK,gBAAgB;QAChC,IAAI,CAAC,UAAU,CAAC,iBAAiB;YAC/B,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,qCAAqC,CAAC,CAAC;QAC5F,OAAO,UAAU,CAAC,iBAAiB,CAAC;IACtC,CAAC;IACM,MAAM,KAAK,gBAAgB,CAAC,EAAoB;QACrD,UAAU,CAAC,iBAAiB,GAAG,EAAE,CAAC;IACpC,CAAC;;AArEc,uBAAY,GAAG,KAAK,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 Utilities\r\n */\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { Localization } from \"@itwin/core-common\";\r\nimport { MessagePresenter } from \"./notification/MessagePresenter\";\r\nimport { getClassName } from \"./utils/getClassName\";\r\nimport { UiError } from \"./utils/UiError\";\r\n\r\n/**\r\n * Entry point for static initialization required by various components used in the package.\r\n * @public\r\n */\r\nexport class UiAbstract {\r\n private static _initialized = false;\r\n private static _localization?: Localization;\r\n private static _messagePresenter?: MessagePresenter;\r\n\r\n /**\r\n * Registers the Localization service namespace for UiAbstract\r\n * @param localization The internationalization service created by the application.\r\n */\r\n public static async initialize(localization: Localization): Promise<void> {\r\n if (UiAbstract._initialized) {\r\n Logger.logInfo(UiAbstract.loggerCategory(UiAbstract), `UiAbstract.initialize already called`);\r\n return;\r\n }\r\n\r\n UiAbstract._localization = localization;\r\n await UiAbstract._localization.registerNamespace(UiAbstract.localizationNamespace);\r\n UiAbstract._initialized = true;\r\n }\r\n\r\n /** Unregisters the UiAbstract internationalization service namespace */\r\n public static terminate() {\r\n if (UiAbstract._localization)\r\n UiAbstract._localization.unregisterNamespace(UiAbstract.localizationNamespace);\r\n UiAbstract._localization = undefined;\r\n UiAbstract._initialized = false;\r\n }\r\n\r\n /** Determines if UiAbstract has been initialized */\r\n public static get initialized(): boolean { return UiAbstract._initialized; }\r\n\r\n /** The internationalization service created by the application. */\r\n public static get localization(): Localization {\r\n if (!UiAbstract._localization)\r\n throw new UiError(UiAbstract.loggerCategory(this), \"UiAbstract not initialized\");\r\n return UiAbstract._localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiAbstract\";\r\n }\r\n\r\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiAbstract\" namespace. Do NOT include the namespace in the key.\r\n * @internal\r\n */\r\n public static translate(key: string | string[]): string {\r\n return UiAbstract.localization.getLocalizedStringWithNamespace(UiAbstract.localizationNamespace, key);\r\n }\r\n\r\n /** @internal */\r\n public static get packageName(): string {\r\n return \"appui-abstract\";\r\n }\r\n\r\n /** @internal */\r\n public static loggerCategory(obj: any): string {\r\n const className = getClassName(obj);\r\n const category = UiAbstract.packageName + (className ? `.${className}` : \"\");\r\n return category;\r\n }\r\n\r\n /** The MessagePresenter used to display messages. */\r\n public static get messagePresenter(): MessagePresenter {\r\n if (!UiAbstract._messagePresenter)\r\n throw new UiError(UiAbstract.loggerCategory(this), \"UiAbstract.MessagePresenter not set\");\r\n return UiAbstract._messagePresenter;\r\n }\r\n public static set messagePresenter(mp: MessagePresenter) {\r\n UiAbstract._messagePresenter = mp;\r\n }\r\n\r\n}\r\n"]}
@@ -1,8 +0,0 @@
1
- /** @packageDocumentation
2
- * @module Utilities
3
- */
4
- /** Gets the class name for an object.
5
- * @internal
6
- */
7
- export declare const getClassName: (obj: any) => string;
8
- //# sourceMappingURL=getClassName.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getClassName.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/getClassName.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,QAAS,GAAG,KAAG,MAcvC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getClassName.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/getClassName.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAU,EAAE;IAC/C,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,GAAG,EAAE;QACP,IAAI,GAAG,CAAC,IAAI;YACV,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAClB;YACH,uBAAuB;YACvB,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI;gBACzC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;SACpC;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Gets the class name for an object.\r\n * @internal\r\n */\r\nexport const getClassName = (obj: any): string => {\r\n let className = \"\";\r\n\r\n if (obj) {\r\n if (obj.name)\r\n className = obj.name;\r\n else {\r\n // istanbul ignore else\r\n if (obj.constructor && obj.constructor.name)\r\n className = obj.constructor.name;\r\n }\r\n }\r\n\r\n return className;\r\n};\r\n"]}