@itwin/appui-abstract 4.0.0-dev.54 → 4.0.0-dev.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  2. package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
  3. package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
  4. package/lib/cjs/appui-abstract/UiItemsProvider.js.map +1 -1
  5. package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
  6. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  7. package/lib/cjs/appui-abstract/common/KeyboardKey.js.map +1 -1
  8. package/lib/cjs/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  9. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  10. package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
  11. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  12. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  13. package/lib/cjs/appui-abstract/items/AbstractItemProps.js.map +1 -1
  14. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  15. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  16. package/lib/cjs/appui-abstract/items/BadgeType.js.map +1 -1
  17. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  18. package/lib/cjs/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  19. package/lib/cjs/appui-abstract/items/ProvidedItem.js.map +1 -1
  20. package/lib/cjs/appui-abstract/items/RelativePosition.js.map +1 -1
  21. package/lib/cjs/appui-abstract/items/StageUsage.js.map +1 -1
  22. package/lib/cjs/appui-abstract/notification/MessagePresenter.js.map +1 -1
  23. package/lib/cjs/appui-abstract/notification/MessageSeverity.js.map +1 -1
  24. package/lib/cjs/appui-abstract/properties/Description.js.map +1 -1
  25. package/lib/cjs/appui-abstract/properties/EditorParams.js.map +1 -1
  26. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  27. package/lib/cjs/appui-abstract/properties/Record.js.map +1 -1
  28. package/lib/cjs/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  29. package/lib/cjs/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  30. package/lib/cjs/appui-abstract/properties/Value.js.map +1 -1
  31. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  32. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  33. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  34. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  35. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  36. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  37. package/lib/cjs/appui-abstract/utils/PointProps.js.map +1 -1
  38. package/lib/cjs/appui-abstract/utils/UiError.js.map +1 -1
  39. package/lib/cjs/appui-abstract/utils/UiEvent.js.map +1 -1
  40. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  41. package/lib/cjs/appui-abstract/utils/callbacks.js.map +1 -1
  42. package/lib/cjs/appui-abstract/utils/filter/charCode.js.map +1 -1
  43. package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
  44. package/lib/cjs/appui-abstract/utils/filter/map.js.map +1 -1
  45. package/lib/cjs/appui-abstract/utils/filter/strings.js.map +1 -1
  46. package/lib/cjs/appui-abstract/utils/isLetter.js.map +1 -1
  47. package/lib/cjs/appui-abstract/utils/misc.js.map +1 -1
  48. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  49. package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
  50. package/lib/cjs/appui-abstract/widget/WidgetState.js.map +1 -1
  51. package/lib/cjs/appui-abstract.js.map +1 -1
  52. package/lib/esm/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  53. package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
  54. package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
  55. package/lib/esm/appui-abstract/UiItemsProvider.js.map +1 -1
  56. package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
  57. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  58. package/lib/esm/appui-abstract/common/KeyboardKey.js.map +1 -1
  59. package/lib/esm/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  60. package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  61. package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
  62. package/lib/esm/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  63. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  64. package/lib/esm/appui-abstract/items/AbstractItemProps.js.map +1 -1
  65. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  66. package/lib/esm/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  67. package/lib/esm/appui-abstract/items/BadgeType.js.map +1 -1
  68. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  69. package/lib/esm/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  70. package/lib/esm/appui-abstract/items/ProvidedItem.js.map +1 -1
  71. package/lib/esm/appui-abstract/items/RelativePosition.js.map +1 -1
  72. package/lib/esm/appui-abstract/items/StageUsage.js.map +1 -1
  73. package/lib/esm/appui-abstract/notification/MessagePresenter.js.map +1 -1
  74. package/lib/esm/appui-abstract/notification/MessageSeverity.js.map +1 -1
  75. package/lib/esm/appui-abstract/properties/Description.js.map +1 -1
  76. package/lib/esm/appui-abstract/properties/EditorParams.js.map +1 -1
  77. package/lib/esm/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  78. package/lib/esm/appui-abstract/properties/Record.js.map +1 -1
  79. package/lib/esm/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  80. package/lib/esm/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  81. package/lib/esm/appui-abstract/properties/Value.js.map +1 -1
  82. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  83. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  84. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  85. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  86. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  87. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  88. package/lib/esm/appui-abstract/utils/PointProps.js.map +1 -1
  89. package/lib/esm/appui-abstract/utils/UiError.js.map +1 -1
  90. package/lib/esm/appui-abstract/utils/UiEvent.js.map +1 -1
  91. package/lib/esm/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  92. package/lib/esm/appui-abstract/utils/callbacks.js.map +1 -1
  93. package/lib/esm/appui-abstract/utils/filter/charCode.js.map +1 -1
  94. package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
  95. package/lib/esm/appui-abstract/utils/filter/map.js.map +1 -1
  96. package/lib/esm/appui-abstract/utils/filter/strings.js.map +1 -1
  97. package/lib/esm/appui-abstract/utils/isLetter.js.map +1 -1
  98. package/lib/esm/appui-abstract/utils/misc.js.map +1 -1
  99. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  100. package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
  101. package/lib/esm/appui-abstract/widget/WidgetState.js.map +1 -1
  102. package/lib/esm/appui-abstract.js.map +1 -1
  103. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"PrimitiveTypes.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/PrimitiveTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\n\n/** Primitive Property Value Types.\n * @public\n */\nexport namespace Primitives {\n /** Text type */\n export type Text = string;\n /** String type */\n export type String = string;\n /** DateTime will be formatted as date and time */\n export type DateTime = string | Date;\n /** ShortDate will be formatted as date only and will not include time */\n export type ShortDate = string | Date;\n /** Boolean type */\n export type Boolean = boolean | string | {} | [];\n /** Float type */\n export type Float = number | string;\n /** Int type */\n export type Int = number | string;\n /** Hexadecimal type (number expressed in hex string) */\n export type Hexadecimal = Id64String;\n /** Enum type (enumerated list of values) */\n export type Enum = number | string;\n /** Numeric type (can be float or int) */\n export type Numeric = Float | Int;\n\n /** Point2d type (contains an x and a y coordinate) */\n export type Point2d = string[] | number[] | { x: number, y: number };\n /** Point3d type (contains x,y,and z coordinates) */\n export type Point3d = string[] | number[] | { x: number, y: number, z: number };\n\n /** Point type (can be a 2d or 3d point) */\n export type Point = Point2d | Point3d;\n\n /** CompositePart (ties a raw value of a specific type to a display string) */\n export interface CompositePart {\n displayValue: string;\n rawValue: Value;\n typeName: string;\n }\n /** Composite type (built of one or more CompositePart items) */\n export interface Composite {\n separator: string;\n parts: CompositePart[];\n }\n\n /** Instance key type. */\n export interface InstanceKey {\n className: string;\n id: Id64String;\n }\n\n /** Raw value */\n export type Value = Text | String | ShortDate | Boolean | Numeric | Enum | Point | Composite | InstanceKey;\n}\n"]}
1
+ {"version":3,"file":"PrimitiveTypes.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/PrimitiveTypes.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 Properties\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\n\r\n/** Primitive Property Value Types.\r\n * @public\r\n */\r\nexport namespace Primitives {\r\n /** Text type */\r\n export type Text = string;\r\n /** String type */\r\n export type String = string;\r\n /** DateTime will be formatted as date and time */\r\n export type DateTime = string | Date;\r\n /** ShortDate will be formatted as date only and will not include time */\r\n export type ShortDate = string | Date;\r\n /** Boolean type */\r\n export type Boolean = boolean | string | {} | [];\r\n /** Float type */\r\n export type Float = number | string;\r\n /** Int type */\r\n export type Int = number | string;\r\n /** Hexadecimal type (number expressed in hex string) */\r\n export type Hexadecimal = Id64String;\r\n /** Enum type (enumerated list of values) */\r\n export type Enum = number | string;\r\n /** Numeric type (can be float or int) */\r\n export type Numeric = Float | Int;\r\n\r\n /** Point2d type (contains an x and a y coordinate) */\r\n export type Point2d = string[] | number[] | { x: number, y: number };\r\n /** Point3d type (contains x,y,and z coordinates) */\r\n export type Point3d = string[] | number[] | { x: number, y: number, z: number };\r\n\r\n /** Point type (can be a 2d or 3d point) */\r\n export type Point = Point2d | Point3d;\r\n\r\n /** CompositePart (ties a raw value of a specific type to a display string) */\r\n export interface CompositePart {\r\n displayValue: string;\r\n rawValue: Value;\r\n typeName: string;\r\n }\r\n /** Composite type (built of one or more CompositePart items) */\r\n export interface Composite {\r\n separator: string;\r\n parts: CompositePart[];\r\n }\r\n\r\n /** Instance key type. */\r\n export interface InstanceKey {\r\n className: string;\r\n id: Id64String;\r\n }\r\n\r\n /** Raw value */\r\n export type Value = Text | String | ShortDate | Boolean | Numeric | Enum | Point | Composite | InstanceKey;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Record.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/Record.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OA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,CAAC;SAC3B;IACH,CAAC;IAED,oGAAoG;IAC7F,MAAM,CAAC,UAAU,CAAC,KAAa,EAAE,iBAAgD;QACtF,IAAI,WAAgC,CAAC;QACrC,IAAI,iBAAiB,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;YAC9D,WAAW,GAAG,iBAAiB,CAAC;SACjC;aAAM,IAAI,iBAAiB,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;YACrE,WAAW,GAAG;gBACZ,IAAI,EAAE,iBAAiB;gBACvB,YAAY,EAAE,iBAAiB;gBAC/B,QAAQ,EAAE,iBAAiB,CAAC,MAAM;aACnC,CAAC;SACH;aAAM;YACL,WAAW,GAAG;gBACZ,IAAI,EAAE,cAAc;gBACpB,YAAY,EAAE,cAAc;gBAC5B,QAAQ,EAAE,iBAAiB,CAAC,MAAM;aACnC,CAAC;SACH;QACD,OAAO,IAAI,cAAc,CAAC;YACxB,WAAW,EAAE,mBAAmB,CAAC,SAAS;YAC1C,KAAK;YACL,YAAY,EAAE,KAAK;SACpB,EAAE,WAAW,CAAC,CAAC;IAClB,CAAC;CACF;AAED,SAAS,oBAAoB,CAAmB,MAAS,EAAE,MAAS,EAAE,UAAmB;IACvF,IAAI,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC;QACnC,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport { PropertyDescription } from \"./Description\";\nimport { StandardTypeNames } from \"./StandardTypeNames\";\nimport { PropertyValue, PropertyValueFormat } from \"./Value\";\n\n/** Properties for the [[PropertyRecord]] with link info supplied\n * @public\n */\nexport interface LinkElementsInfo {\n /** Callback to link click event */\n onClick: (text: string) => void;\n /**\n * Function that specifies which parts of display value need to be clickable.\n *\n * Letters will be picked from __start__ index to __end__ index. __end__ index is not included.\n * For a string _\"example\"_ and a match ```{ start: 1, end: 3 }```, _\"xa\"_ will be clickable.\n */\n matcher?: (displayValue: string) => Array<{ start: number, end: number }>;\n}\n\n/**\n * PropertyRecord contains instance information about a Property, including a\n * value that can be edited using a PropertyEditor and converted using a TypeConverter.\n * @public\n */\nexport class PropertyRecord {\n /** Value for the property */\n public readonly value: PropertyValue;\n /** The property description containing metadata for the property */\n public readonly property: PropertyDescription;\n\n /** Description for the property */\n public description?: string;\n /** Indicates if the property is read-only */\n public isReadonly?: boolean;\n /** Indicates if the property is disabled */\n public isDisabled?: boolean;\n /** Indicates if the property record represents merged properties */\n public isMerged?: boolean;\n /** Indicates if the property should be automatically expanded */\n public autoExpand?: boolean;\n /** Map containing any additional data */\n public extendedData?: { [key: string]: any };\n\n /** Properties for link logic */\n public links?: LinkElementsInfo;\n\n /** Constructs a PropertyRecord instance */\n public constructor(value: PropertyValue, property: PropertyDescription) {\n this.value = value;\n this.property = property;\n }\n\n /** Creates a copy of this PropertyRecord with a new value and optionally a new PropertyDescription */\n public copyWithNewValue(newValue: PropertyValue, newDescription?: PropertyDescription): PropertyRecord {\n const rec = new PropertyRecord(newValue, newDescription ? newDescription : this.property);\n assignMemberIfExists(rec, this, \"description\");\n assignMemberIfExists(rec, this, \"isReadonly\");\n assignMemberIfExists(rec, this, \"isDisabled\");\n assignMemberIfExists(rec, this, \"isMerged\");\n assignMemberIfExists(rec, this, \"autoExpand\");\n assignMemberIfExists(rec, this, \"extendedData\");\n assignMemberIfExists(rec, this, \"links\");\n return rec;\n }\n\n /** Gets this property record value children records */\n public getChildrenRecords(): PropertyRecord[] {\n switch (this.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return [];\n case PropertyValueFormat.Struct:\n return Object.values(this.value.members);\n case PropertyValueFormat.Array:\n return this.value.items;\n }\n }\n\n /** Creates a PropertyRecord based on a value string and an optional property description or name */\n public static fromString(value: string, descriptionOrName?: PropertyDescription | string): PropertyRecord {\n let description: PropertyDescription;\n if (descriptionOrName && typeof descriptionOrName === \"object\") {\n description = descriptionOrName;\n } else if (descriptionOrName && typeof descriptionOrName === \"string\") {\n description = {\n name: descriptionOrName,\n displayLabel: descriptionOrName,\n typename: StandardTypeNames.String,\n };\n } else {\n description = {\n name: \"string_value\",\n displayLabel: \"String Value\",\n typename: StandardTypeNames.String,\n };\n }\n return new PropertyRecord({\n valueFormat: PropertyValueFormat.Primitive,\n value,\n displayValue: value,\n }, description);\n }\n}\n\nfunction assignMemberIfExists<T extends Object>(target: T, source: T, memberName: keyof T) {\n if (source.hasOwnProperty(memberName))\n target[memberName] = source[memberName];\n}\n"]}
1
+ {"version":3,"file":"Record.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/Record.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAiB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAiB7D;;;;GAIG;AACH,MAAM,OAAO,cAAc;IAsBzB,2CAA2C;IAC3C,YAAmB,KAAoB,EAAE,QAA6B;QACpE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,sGAAsG;IAC/F,gBAAgB,CAAC,QAAuB,EAAE,cAAoC;QACnF,MAAM,GAAG,GAAG,IAAI,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1F,oBAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;QAC/C,oBAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;QAC9C,oBAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,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1C,KAAK;YACL,YAAY,EAAE,KAAK;SACpB,EAAE,WAAW,CAAC,CAAC;IAClB,CAAC;CACF;AAED,SAAS,oBAAoB,CAAmB,MAAS,EAAE,MAAS,EAAE,UAAmB;IACvF,IAAI,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC;QACnC,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5C,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 Properties\r\n */\r\n\r\nimport { PropertyDescription } from \"./Description\";\r\nimport { StandardTypeNames } from \"./StandardTypeNames\";\r\nimport { PropertyValue, PropertyValueFormat } from \"./Value\";\r\n\r\n/** Properties for the [[PropertyRecord]] with link info supplied\r\n * @public\r\n */\r\nexport interface LinkElementsInfo {\r\n /** Callback to link click event */\r\n onClick: (text: string) => void;\r\n /**\r\n * Function that specifies which parts of display value need to be clickable.\r\n *\r\n * Letters will be picked from __start__ index to __end__ index. __end__ index is not included.\r\n * For a string _\"example\"_ and a match ```{ start: 1, end: 3 }```, _\"xa\"_ will be clickable.\r\n */\r\n matcher?: (displayValue: string) => Array<{ start: number, end: number }>;\r\n}\r\n\r\n/**\r\n * PropertyRecord contains instance information about a Property, including a\r\n * value that can be edited using a PropertyEditor and converted using a TypeConverter.\r\n * @public\r\n */\r\nexport class PropertyRecord {\r\n /** Value for the property */\r\n public readonly value: PropertyValue;\r\n /** The property description containing metadata for the property */\r\n public readonly property: PropertyDescription;\r\n\r\n /** Description for the property */\r\n public description?: string;\r\n /** Indicates if the property is read-only */\r\n public isReadonly?: boolean;\r\n /** Indicates if the property is disabled */\r\n public isDisabled?: boolean;\r\n /** Indicates if the property record represents merged properties */\r\n public isMerged?: boolean;\r\n /** Indicates if the property should be automatically expanded */\r\n public autoExpand?: boolean;\r\n /** Map containing any additional data */\r\n public extendedData?: { [key: string]: any };\r\n\r\n /** Properties for link logic */\r\n public links?: LinkElementsInfo;\r\n\r\n /** Constructs a PropertyRecord instance */\r\n public constructor(value: PropertyValue, property: PropertyDescription) {\r\n this.value = value;\r\n this.property = property;\r\n }\r\n\r\n /** Creates a copy of this PropertyRecord with a new value and optionally a new PropertyDescription */\r\n public copyWithNewValue(newValue: PropertyValue, newDescription?: PropertyDescription): PropertyRecord {\r\n const rec = new PropertyRecord(newValue, newDescription ? newDescription : this.property);\r\n assignMemberIfExists(rec, this, \"description\");\r\n assignMemberIfExists(rec, this, \"isReadonly\");\r\n assignMemberIfExists(rec, this, \"isDisabled\");\r\n assignMemberIfExists(rec, this, \"isMerged\");\r\n assignMemberIfExists(rec, this, \"autoExpand\");\r\n assignMemberIfExists(rec, this, \"extendedData\");\r\n assignMemberIfExists(rec, this, \"links\");\r\n return rec;\r\n }\r\n\r\n /** Gets this property record value children records */\r\n public getChildrenRecords(): PropertyRecord[] {\r\n switch (this.value.valueFormat) {\r\n case PropertyValueFormat.Primitive:\r\n return [];\r\n case PropertyValueFormat.Struct:\r\n return Object.values(this.value.members);\r\n case PropertyValueFormat.Array:\r\n return this.value.items;\r\n }\r\n }\r\n\r\n /** Creates a PropertyRecord based on a value string and an optional property description or name */\r\n public static fromString(value: string, descriptionOrName?: PropertyDescription | string): PropertyRecord {\r\n let description: PropertyDescription;\r\n if (descriptionOrName && typeof descriptionOrName === \"object\") {\r\n description = descriptionOrName;\r\n } else if (descriptionOrName && typeof descriptionOrName === \"string\") {\r\n description = {\r\n name: descriptionOrName,\r\n displayLabel: descriptionOrName,\r\n typename: StandardTypeNames.String,\r\n };\r\n } else {\r\n description = {\r\n name: \"string_value\",\r\n displayLabel: \"String Value\",\r\n typename: StandardTypeNames.String,\r\n };\r\n }\r\n return new PropertyRecord({\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value,\r\n displayValue: value,\r\n }, description);\r\n }\r\n}\r\n\r\nfunction assignMemberIfExists<T extends Object>(target: T, source: T, memberName: keyof T) {\r\n if (source.hasOwnProperty(memberName))\r\n target[memberName] = source[memberName];\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StandardEditorNames.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/StandardEditorNames.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAcX;AAdD,WAAY,mBAAmB;IAC7B,mDAA4B,CAAA;IAC5B,oDAA6B,CAAA;IAC7B,sDAA+B,CAAA;IAC/B,2DAAoC,CAAA;IACpC,iDAA0B,CAAA;IAC1B,+CAAwB,CAAA;IACxB,qDAA8B,CAAA;IAC9B,qDAA8B,CAAA;IAC9B,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,qDAA8B,CAAA;IAC9B,wDAAiC,CAAA;IACjC,iDAA0B,CAAA;AAC5B,CAAC,EAdW,mBAAmB,KAAnB,mBAAmB,QAc9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\n/**\n * Standard Editor Names for property editors.\n * @public\n */\nexport enum StandardEditorNames {\n ColorPicker = \"color-picker\",\n LongDate = \"long-date-picker\",\n ShortDate = \"short-date-picker\",\n EnumButtonGroup = \"enum-buttongroup\",\n IconPicker = \"icon-picker\",\n MultiLine = \"multi-line\",\n NumberCustom = \"number-custom\",\n NumericInput = \"numeric-input\",\n Slider = \"slider\",\n Toggle = \"toggle\",\n WeightPicker = \"weight-picker\",\n ImageCheckBox = \"image-check-box\",\n ThemedEnum = \"themed-enum\",\n}\n"]}
1
+ {"version":3,"file":"StandardEditorNames.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/StandardEditorNames.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAcX;AAdD,WAAY,mBAAmB;IAC7B,mDAA4B,CAAA;IAC5B,oDAA6B,CAAA;IAC7B,sDAA+B,CAAA;IAC/B,2DAAoC,CAAA;IACpC,iDAA0B,CAAA;IAC1B,+CAAwB,CAAA;IACxB,qDAA8B,CAAA;IAC9B,qDAA8B,CAAA;IAC9B,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,qDAA8B,CAAA;IAC9B,wDAAiC,CAAA;IACjC,iDAA0B,CAAA;AAC5B,CAAC,EAdW,mBAAmB,KAAnB,mBAAmB,QAc9B","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 Properties\r\n */\r\n\r\n/**\r\n * Standard Editor Names for property editors.\r\n * @public\r\n */\r\nexport enum StandardEditorNames {\r\n ColorPicker = \"color-picker\",\r\n LongDate = \"long-date-picker\",\r\n ShortDate = \"short-date-picker\",\r\n EnumButtonGroup = \"enum-buttongroup\",\r\n IconPicker = \"icon-picker\",\r\n MultiLine = \"multi-line\",\r\n NumberCustom = \"number-custom\",\r\n NumericInput = \"numeric-input\",\r\n Slider = \"slider\",\r\n Toggle = \"toggle\",\r\n WeightPicker = \"weight-picker\",\r\n ImageCheckBox = \"image-check-box\",\r\n ThemedEnum = \"themed-enum\",\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StandardTypeNames.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/StandardTypeNames.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,0BAA0B;AAE1B;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAsBX;AAtBD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;IACb,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,gCAAW,CAAA;IACX,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,gDAA2B,CAAA;IAC3B,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,8CAAyB,CAAA;IACzB,4CAAuB,CAAA;IACvB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,gCAAW,CAAA;AACb,CAAC,EAtBW,iBAAiB,KAAjB,iBAAiB,QAsB5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\n// cSpell:ignore shortdate\n\n/**\n * Standard Type Names for converters and editors.\n * @public\n */\nexport enum StandardTypeNames {\n Text = \"text\",\n String = \"string\",\n DateTime = \"dateTime\", // locale specific\n ShortDate = \"shortdate\", // locale specific\n Boolean = \"boolean\",\n Bool = \"bool\",\n Float = \"float\",\n Double = \"double\",\n Int = \"int\",\n Integer = \"integer\",\n Number = \"number\",\n Hexadecimal = \"hexadecimal\",\n Hex = \"hex\",\n Enum = \"enum\",\n Point2d = \"point2d\",\n Point3d = \"point3d\",\n Navigation = \"navigation\",\n Composite = \"composite\",\n Array = \"array\",\n Struct = \"struct\",\n URL = \"url\",\n}\n"]}
1
+ {"version":3,"file":"StandardTypeNames.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/StandardTypeNames.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,0BAA0B;AAE1B;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAsBX;AAtBD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;IACb,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,gCAAW,CAAA;IACX,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,gDAA2B,CAAA;IAC3B,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,8CAAyB,CAAA;IACzB,4CAAuB,CAAA;IACvB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,gCAAW,CAAA;AACb,CAAC,EAtBW,iBAAiB,KAAjB,iBAAiB,QAsB5B","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 Properties\r\n */\r\n\r\n// cSpell:ignore shortdate\r\n\r\n/**\r\n * Standard Type Names for converters and editors.\r\n * @public\r\n */\r\nexport enum StandardTypeNames {\r\n Text = \"text\",\r\n String = \"string\",\r\n DateTime = \"dateTime\", // locale specific\r\n ShortDate = \"shortdate\", // locale specific\r\n Boolean = \"boolean\",\r\n Bool = \"bool\",\r\n Float = \"float\",\r\n Double = \"double\",\r\n Int = \"int\",\r\n Integer = \"integer\",\r\n Number = \"number\",\r\n Hexadecimal = \"hexadecimal\",\r\n Hex = \"hex\",\r\n Enum = \"enum\",\r\n Point2d = \"point2d\",\r\n Point3d = \"point3d\",\r\n Navigation = \"navigation\",\r\n Composite = \"composite\",\r\n Array = \"array\",\r\n Struct = \"struct\",\r\n URL = \"url\",\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/Value.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,uEAAS,CAAA;IACT,+DAAK,CAAA;IACL,iEAAM,CAAA;AACR,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport { Primitives } from \"./PrimitiveTypes\";\nimport { PropertyRecord } from \"./Record\";\n\n/**\n * Enumeration for Format of the property value.\n * @public\n */\nexport enum PropertyValueFormat {\n Primitive,\n Array,\n Struct,\n}\n\n/** Base interface for a property value\n * @public\n */\nexport interface BasePropertyValue {\n valueFormat: PropertyValueFormat;\n}\n\n/** Primitive property value\n * @public\n */\nexport interface PrimitiveValue extends BasePropertyValue {\n valueFormat: PropertyValueFormat.Primitive;\n value?: Primitives.Value;\n displayValue?: string;\n}\n\n/** Struct property value\n * @public\n */\nexport interface StructValue extends BasePropertyValue {\n valueFormat: PropertyValueFormat.Struct;\n members: { [name: string]: PropertyRecord };\n}\n\n/** Array property value\n * @public\n */\nexport interface ArrayValue extends BasePropertyValue {\n valueFormat: PropertyValueFormat.Array;\n items: PropertyRecord[];\n itemsTypeName: string;\n}\n\n/** Type for all property values\n * @public\n */\nexport type PropertyValue = PrimitiveValue | StructValue | ArrayValue;\n"]}
1
+ {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/Value.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,uEAAS,CAAA;IACT,+DAAK,CAAA;IACL,iEAAM,CAAA;AACR,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B","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 Properties\r\n */\r\n\r\nimport { Primitives } from \"./PrimitiveTypes\";\r\nimport { PropertyRecord } from \"./Record\";\r\n\r\n/**\r\n * Enumeration for Format of the property value.\r\n * @public\r\n */\r\nexport enum PropertyValueFormat {\r\n Primitive,\r\n Array,\r\n Struct,\r\n}\r\n\r\n/** Base interface for a property value\r\n * @public\r\n */\r\nexport interface BasePropertyValue {\r\n valueFormat: PropertyValueFormat;\r\n}\r\n\r\n/** Primitive property value\r\n * @public\r\n */\r\nexport interface PrimitiveValue extends BasePropertyValue {\r\n valueFormat: PropertyValueFormat.Primitive;\r\n value?: Primitives.Value;\r\n displayValue?: string;\r\n}\r\n\r\n/** Struct property value\r\n * @public\r\n */\r\nexport interface StructValue extends BasePropertyValue {\r\n valueFormat: PropertyValueFormat.Struct;\r\n members: { [name: string]: PropertyRecord };\r\n}\r\n\r\n/** Array property value\r\n * @public\r\n */\r\nexport interface ArrayValue extends BasePropertyValue {\r\n valueFormat: PropertyValueFormat.Array;\r\n items: PropertyRecord[];\r\n itemsTypeName: string;\r\n}\r\n\r\n/** Type for all property values\r\n * @public\r\n */\r\nexport type PropertyValue = PrimitiveValue | StructValue | ArrayValue;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseQuantityDescription.js","sourceRoot":"","sources":["../../../../src/appui-abstract/quantity/BaseQuantityDescription.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAA+D,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACnI,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE;;;GAGG;AACH,MAAM,OAAgB,uBAAuB;IAM3C,YAAY,IAAY,EAAE,YAAoB,EAAE,QAAiB;QA0B1D,WAAM,GAAG,CAAC,WAAmB,EAAU,EAAE;YAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;QAGK,UAAK,GAAG,CAAC,SAAiB,EAAgB,EAAE;YACjD,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC,CAAC;QAhCA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG;YACZ,IAAI,EAAE,mBAAmB,CAAC,YAAY;YACtC,MAAM,EAAE,CAAC;oBACP,IAAI,EAAE,wBAAwB,CAAC,qBAAqB;oBACpD,cAAc,EAAE,IAAI,CAAC,MAAM;oBAC3B,aAAa,EAAE,IAAI,CAAC,KAAK;iBACK;aAC/B;SACF,CAAC;QAEF,uBAAuB;QACvB,IAAI,QAAQ,EAAE;YACZ,MAAM,MAAM,GAAqB;gBAC/B,IAAI,EAAE,wBAAwB,CAAC,IAAI;gBACnC,UAAU,EAAE,EAAE,QAAQ,EAAE;aACzB,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,MAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAClC;IACH,CAAC;CAiBF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport { PropertyDescription, PropertyEditorInfo } from \"../properties/Description\";\nimport { CustomFormattedNumberParams, IconEditorParams, ParseResults, PropertyEditorParamTypes } from \"../properties/EditorParams\";\nimport { StandardTypeNames } from \"../properties/StandardTypeNames\";\nimport { StandardEditorNames } from \"../properties/StandardEditorNames\";\n\n/**\n * Base Quantity Property Description\n * @beta\n */\nexport abstract class BaseQuantityDescription implements PropertyDescription {\n public name: string;\n public displayLabel: string;\n public typename: string;\n public editor: PropertyEditorInfo;\n\n constructor(name: string, displayLabel: string, iconSpec?: string) {\n this.name = name;\n this.displayLabel = displayLabel;\n this.typename = StandardTypeNames.Number;\n this.editor = {\n name: StandardEditorNames.NumberCustom,\n params: [{\n type: PropertyEditorParamTypes.CustomFormattedNumber,\n formatFunction: this.format,\n parseFunction: this.parse,\n } as CustomFormattedNumberParams,\n ],\n };\n\n // istanbul ignore else\n if (iconSpec) {\n const params: IconEditorParams = {\n type: PropertyEditorParamTypes.Icon,\n definition: { iconSpec },\n };\n this.editor.params!.push(params);\n }\n }\n\n protected abstract formatValue(numberValue: number): string;\n\n public format = (numberValue: number): string => {\n return this.formatValue(numberValue);\n };\n protected abstract parseString(userInput: string): ParseResults;\n\n public parse = (userInput: string): ParseResults => {\n return this.parseString(userInput);\n };\n\n public abstract get quantityType(): string;\n\n public abstract get parseError(): string;\n\n}\n"]}
1
+ {"version":3,"file":"BaseQuantityDescription.js","sourceRoot":"","sources":["../../../../src/appui-abstract/quantity/BaseQuantityDescription.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAA+D,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACnI,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE;;;GAGG;AACH,MAAM,OAAgB,uBAAuB;IAM3C,YAAY,IAAY,EAAE,YAAoB,EAAE,QAAiB;QA0B1D,WAAM,GAAG,CAAC,WAAmB,EAAU,EAAE;YAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;QAGK,UAAK,GAAG,CAAC,SAAiB,EAAgB,EAAE;YACjD,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC,CAAC;QAhCA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG;YACZ,IAAI,EAAE,mBAAmB,CAAC,YAAY;YACtC,MAAM,EAAE,CAAC;oBACP,IAAI,EAAE,wBAAwB,CAAC,qBAAqB;oBACpD,cAAc,EAAE,IAAI,CAAC,MAAM;oBAC3B,aAAa,EAAE,IAAI,CAAC,KAAK;iBACK;aAC/B;SACF,CAAC;QAEF,uBAAuB;QACvB,IAAI,QAAQ,EAAE;YACZ,MAAM,MAAM,GAAqB;gBAC/B,IAAI,EAAE,wBAAwB,CAAC,IAAI;gBACnC,UAAU,EAAE,EAAE,QAAQ,EAAE;aACzB,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,MAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAClC;IACH,CAAC;CAiBF","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 Properties\r\n */\r\n\r\nimport { PropertyDescription, PropertyEditorInfo } from \"../properties/Description\";\r\nimport { CustomFormattedNumberParams, IconEditorParams, ParseResults, PropertyEditorParamTypes } from \"../properties/EditorParams\";\r\nimport { StandardTypeNames } from \"../properties/StandardTypeNames\";\r\nimport { StandardEditorNames } from \"../properties/StandardEditorNames\";\r\n\r\n/**\r\n * Base Quantity Property Description\r\n * @beta\r\n */\r\nexport abstract class BaseQuantityDescription implements PropertyDescription {\r\n public name: string;\r\n public displayLabel: string;\r\n public typename: string;\r\n public editor: PropertyEditorInfo;\r\n\r\n constructor(name: string, displayLabel: string, iconSpec?: string) {\r\n this.name = name;\r\n this.displayLabel = displayLabel;\r\n this.typename = StandardTypeNames.Number;\r\n this.editor = {\r\n name: StandardEditorNames.NumberCustom,\r\n params: [{\r\n type: PropertyEditorParamTypes.CustomFormattedNumber,\r\n formatFunction: this.format,\r\n parseFunction: this.parse,\r\n } as CustomFormattedNumberParams,\r\n ],\r\n };\r\n\r\n // istanbul ignore else\r\n if (iconSpec) {\r\n const params: IconEditorParams = {\r\n type: PropertyEditorParamTypes.Icon,\r\n definition: { iconSpec },\r\n };\r\n this.editor.params!.push(params);\r\n }\r\n }\r\n\r\n protected abstract formatValue(numberValue: number): string;\r\n\r\n public format = (numberValue: number): string => {\r\n return this.formatValue(numberValue);\r\n };\r\n protected abstract parseString(userInput: string): ParseResults;\r\n\r\n public parse = (userInput: string): ParseResults => {\r\n return this.parseString(userInput);\r\n };\r\n\r\n public abstract get quantityType(): string;\r\n\r\n public abstract get parseError(): string;\r\n\r\n}\r\n"]}
@@ -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,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,MAAa,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;SAfQ,8BAA8B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\n\n/** Status bar Groups/Sections from Left to Right\n * @deprecated in 3.6. Use [StatusBarSection]($appui-react) instead.\n * @public\n */\nexport enum StatusBarSection {\n /** area for tool assistance and messages */\n Message = 0,\n /** area for tool assistance and messages */\n Left = 0,\n /** items specific to stage/task */\n Stage = 1,\n /** items specific to stage/task */\n Center = 1,\n /** Select scope and selection info */\n Selection = 2,\n /** Select scope and selection info */\n Right = 2,\n /** items that only show based on context */\n Context = 3,\n}\n\n/** Defines which side of Icon where label is placed\n * @deprecated in 3.6. Use [StatusBarLabelSide]($appui-react) instead.\n * @public\n */\nexport enum StatusBarLabelSide {\n /** Label is placed left side of icon. This is the default if not specified */\n Left,\n /** Label is placed on right side of icon. */\n Right,\n}\n\n/** Type for StatusBar Item Id\n * @deprecated in 3.6. Please use `CommonStatusBarItem[\"id\"]` from @itwin/appui-react.\n * @public\n */\nexport type StatusBarItemId = CommonStatusBarItem[\"id\"]; // eslint-disable-line deprecation/deprecation\n\n/** Describes the data needed to insert a button into the status bar.\n * @deprecated in 3.6. Use [CommonStatusBarItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Describes badge. Renders no badge if not specified. */\n readonly badgeType?: BadgeType;\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\n readonly id: string;\n /** optional data to used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\n readonly isHidden?: boolean | ConditionalBooleanValue;\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n /** Priority within a section (recommend using values 1 through 100). */\n readonly itemPriority: number;\n /** status bar section */\n readonly section: StatusBarSection; // eslint-disable-line deprecation/deprecation\n}\n\n/** Describes the data needed to insert an action item into the status bar.\n * @deprecated in 3.6. Use [StatusBarActionItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarActionItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\n /** method to execute when icon is pressed */\n readonly execute: () => void;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Label. */\n readonly label?: string | ConditionalStringValue;\n /** tooltip. */\n readonly tooltip?: string | ConditionalStringValue;\n}\n\n/** Describes the data needed to insert a label item with an optional icon into the status bar.\n * @deprecated in 3.6. Use [StatusBarLabelItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarLabelItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Label. */\n readonly label: string | ConditionalStringValue;\n /** Defines which side of icon to display label if icon is defined. */\n readonly labelSide?: StatusBarLabelSide; // eslint-disable-line deprecation/deprecation\n}\n\n/** Describes the data needed to insert a custom item into the status bar. This is used to allow extension\n * implementer to create a framework specific component.\n * @deprecated in 3.6. Use [StatusBarCustomItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarCustomItem extends AbstractStatusBarItem { // eslint-disable-line deprecation/deprecation\n readonly isCustom: true;\n}\n\n/** Describes the data needed to insert a button into the status bar.\n * @deprecated in 3.6. Use [StatusBarItem]($appui-react) instead.\n * @public\n */\nexport type CommonStatusBarItem = AbstractStatusBarActionItem | AbstractStatusBarLabelItem | AbstractStatusBarCustomItem; // eslint-disable-line deprecation/deprecation\n\n/** AbstractStatusBarActionItem type guard.\n * @deprecated in 3.6. Use [isStatusBarActionItem]($appui-react) instead.\n * @public\n */\nexport const isAbstractStatusBarActionItem = (item: CommonStatusBarItem): item is AbstractStatusBarActionItem => { // eslint-disable-line deprecation/deprecation\n return (item as AbstractStatusBarActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\n};\n\n/** AbstractStatusBarLabelItem type guard.\n * @deprecated in 3.6. Use [isStatusBarLabelItem]($appui-react) instead.\n * @public\n */\nexport const isAbstractStatusBarLabelItem = (item: CommonStatusBarItem): item is AbstractStatusBarLabelItem => { // eslint-disable-line deprecation/deprecation\n return (item as AbstractStatusBarLabelItem).label !== undefined && (item as AbstractStatusBarActionItem).execute === undefined; // eslint-disable-line deprecation/deprecation\n};\n\n/** AbstractStatusBarCustomItem type guard.\n * @deprecated in 3.6. Use [isStatusBarCustomItem]($appui-react) instead.\n * @public\n */\nexport const isAbstractStatusBarCustomItem = (item: CommonStatusBarItem): item is AbstractStatusBarCustomItem => { // eslint-disable-line deprecation/deprecation\n return !!(item as AbstractStatusBarCustomItem).isCustom; // eslint-disable-line deprecation/deprecation\n};\n\n/** Helper class to create Abstract StatusBar Item definitions.\n * @deprecated in 3.6. Use [StatusBarItemUtilities]($appui-react) instead.\n * @public\n */\nexport class AbstractStatusBarItemUtilities {\n /** Creates a StatusBar item to perform an action */\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\n id, section, itemPriority,\n icon, tooltip,\n execute,\n ...overrides,\n });\n\n /** Creates a StatusBar item to display a label */\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\n id, section, itemPriority,\n icon, label,\n labelSide,\n ...overrides,\n });\n}\n"]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ACtC,+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;SAfQ,8BAA8B","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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-abstract/statusbar/StatusBarItemsManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA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,KAAK,EAAE;YACxB,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAEhC,KAAK,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;gBACnD,IAAI,KAAK,YAAY,uBAAuB,EAAE;oBAC5C,uBAAuB;oBACvB,IAAI,uBAAuB,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC;wBACvD,cAAc,GAAG,IAAI,CAAC;iBACzB;qBAAM,0BAA0B,CAAC,IAAI,KAAK,YAAY,sBAAsB,EAAE;oBAC7E,uBAAuB;oBACvB,IAAI,sBAAsB,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC;wBACtD,cAAc,GAAG,IAAI,CAAC;iBACzB;aACF;YAED,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5B;QAED,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;IAClE,CAAC;IAEM,oBAAoB,CAAC,QAAqB;QAC/C,uBAAuB;QACvB,IAAI,CAAC,KAAK,QAAQ,CAAC,IAAI;YACrB,OAAO;QAET,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAE/F,uBAAuB;QACvB,IAAI,YAAY;YACd,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { CommonStatusBarItem, StatusBarItemId } from \"./StatusBarItem\";\n\n/* eslint-disable deprecation/deprecation */\n\ntype InstanceOrArray<T> = T | ReadonlyArray<T>;\n\nconst isInstance = <T>(args: InstanceOrArray<T>): args is T => {\n return !Array.isArray(args);\n};\n\n/** Arguments of [[StatusBarItemsManager.onChanged]] event.\n * @internal\n */\nexport interface StatusBarItemsChangedArgs {\n readonly items: ReadonlyArray<CommonStatusBarItem>;\n}\n\n/**\n * Controls status bar items.\n * @internal\n */\nexport class StatusBarItemsManager {\n private _items: ReadonlyArray<CommonStatusBarItem> = [];\n\n constructor(items?: ReadonlyArray<CommonStatusBarItem>) {\n if (items)\n this.loadItemsInternal(items, true, false);\n }\n\n /** Event raised when StatusBar items are changed.\n * @internal\n */\n public readonly onItemsChanged = new BeEvent<(args: StatusBarItemsChangedArgs) => void>();\n\n private loadItemsInternal(items: ReadonlyArray<CommonStatusBarItem>, processConditions: boolean, sendItemChanged: boolean) {\n if (processConditions && items) {\n const eventIds = StatusBarItemsManager.getSyncIdsOfInterest(items);\n if (0 !== eventIds.length) {\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(items, new Set(eventIds));\n\n // istanbul ignore else\n if (itemsUpdated)\n items = updatedItems;\n }\n }\n\n this._items = items;\n if (sendItemChanged)\n this.onItemsChanged.raiseEvent({ items });\n }\n\n /** load items but do not fire onItemsChanged\n * @internal\n */\n public loadItems(items: ReadonlyArray<CommonStatusBarItem>) {\n this.loadItemsInternal(items, true, false);\n }\n\n /** Get an array of the StatusBar items */\n public get items(): ReadonlyArray<CommonStatusBarItem> {\n return this._items;\n }\n\n public set items(items: ReadonlyArray<CommonStatusBarItem>) {\n // istanbul ignore else\n if (items !== this._items)\n this.loadItemsInternal(items, true, true);\n }\n\n public add(itemOrItems: CommonStatusBarItem | ReadonlyArray<CommonStatusBarItem>) {\n let itemsToAdd;\n if (isInstance(itemOrItems))\n itemsToAdd = [itemOrItems];\n else {\n itemsToAdd = itemOrItems.filter((itemToAdd, index) => itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index);\n }\n itemsToAdd = itemsToAdd.filter((itemToAdd) => this._items.find((item) => item.id === itemToAdd.id) === undefined);\n if (itemsToAdd.length === 0)\n return;\n const items = [\n ...this._items,\n ...itemsToAdd,\n ];\n this.items = items;\n }\n\n /** Remove StatusBar items based on id */\n public remove(itemIdOrItemIds: StatusBarItemId | ReadonlyArray<StatusBarItemId\n >) {\n const items = this._items.filter((item) => {\n return isInstance(itemIdOrItemIds) ? item.id !== itemIdOrItemIds : !itemIdOrItemIds.find((itemId) => itemId === item.id);\n });\n this.items = items;\n }\n\n /** @internal */\n public removeAll() {\n this._items = [];\n }\n\n public static getSyncIdsOfInterest(items: readonly CommonStatusBarItem[]): string[] {\n const eventIds = new Set<string>();\n items.forEach((item) => {\n for (const [, entry] of Object.entries(item)) {\n if (entry instanceof ConditionalBooleanValue) {\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\n }\n }\n });\n return [...eventIds.values()];\n }\n\n private internalRefreshAffectedItems(items: readonly CommonStatusBarItem[], eventIds: Set<string>): { itemsUpdated: boolean, updatedItems: CommonStatusBarItem[] } {\n // istanbul ignore next\n if (0 === eventIds.size)\n return { itemsUpdated: false, updatedItems: [] };\n\n let updateRequired = false;\n\n const newItems: CommonStatusBarItem[] = [];\n for (const item of items) {\n const updatedItem = { ...item };\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n // istanbul ignore else\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n // istanbul ignore else\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n updateRequired = true;\n }\n }\n\n newItems.push(updatedItem);\n }\n\n return { itemsUpdated: updateRequired, updatedItems: newItems };\n }\n\n public refreshAffectedItems(eventIds: Set<string>) {\n // istanbul ignore next\n if (0 === eventIds.size)\n return;\n\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(this.items, eventIds);\n\n // istanbul ignore else\n if (itemsUpdated)\n this.loadItemsInternal(updatedItems, false, true);\n }\n}\n"]}
1
+ {"version":3,"file":"StatusBarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-abstract/statusbar/StatusBarItemsManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAOzE,MAAM,UAAU,GAAG,CAAI,IAAwB,EAAa,EAAE;IAC5D,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AASF;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAGhC,YAAY,KAA0C;QAF9C,WAAM,GAAuC,EAAE,CAAC;QAOxD;;WAEG;QACa,mBAAc,GAAG,IAAI,OAAO,EAA6C,CAAC;QAPxF,IAAI,KAAK;YACP,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAOO,iBAAiB,CAAC,KAAyC,EAAE,iBAA0B,EAAE,eAAwB;QACvH,IAAI,iBAAiB,IAAI,KAAK,EAAE;YAC9B,MAAM,QAAQ,GAAG,qBAAqB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACnE,IAAI,CAAC,KAAK,QAAQ,CAAC,MAAM,EAAE;gBACzB,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,4BAA4B,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,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,CAAC,CAAC;QAE/F,uBAAuB;QACvB,IAAI,YAAY;YACd,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACtD,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 StatusBar\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { CommonStatusBarItem, StatusBarItemId } from \"./StatusBarItem\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\ntype InstanceOrArray<T> = T | ReadonlyArray<T>;\r\n\r\nconst isInstance = <T>(args: InstanceOrArray<T>): args is T => {\r\n return !Array.isArray(args);\r\n};\r\n\r\n/** Arguments of [[StatusBarItemsManager.onChanged]] event.\r\n * @internal\r\n */\r\nexport interface StatusBarItemsChangedArgs {\r\n readonly items: ReadonlyArray<CommonStatusBarItem>;\r\n}\r\n\r\n/**\r\n * Controls status bar items.\r\n * @internal\r\n */\r\nexport class StatusBarItemsManager {\r\n private _items: ReadonlyArray<CommonStatusBarItem> = [];\r\n\r\n constructor(items?: ReadonlyArray<CommonStatusBarItem>) {\r\n if (items)\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n /** Event raised when StatusBar items are changed.\r\n * @internal\r\n */\r\n public readonly onItemsChanged = new BeEvent<(args: StatusBarItemsChangedArgs) => void>();\r\n\r\n private loadItemsInternal(items: ReadonlyArray<CommonStatusBarItem>, processConditions: boolean, sendItemChanged: boolean) {\r\n if (processConditions && items) {\r\n const eventIds = StatusBarItemsManager.getSyncIdsOfInterest(items);\r\n if (0 !== eventIds.length) {\r\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(items, new Set(eventIds));\r\n\r\n // istanbul ignore else\r\n if (itemsUpdated)\r\n items = updatedItems;\r\n }\r\n }\r\n\r\n this._items = items;\r\n if (sendItemChanged)\r\n this.onItemsChanged.raiseEvent({ items });\r\n }\r\n\r\n /** load items but do not fire onItemsChanged\r\n * @internal\r\n */\r\n public loadItems(items: ReadonlyArray<CommonStatusBarItem>) {\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n /** Get an array of the StatusBar items */\r\n public get items(): ReadonlyArray<CommonStatusBarItem> {\r\n return this._items;\r\n }\r\n\r\n public set items(items: ReadonlyArray<CommonStatusBarItem>) {\r\n // istanbul ignore else\r\n if (items !== this._items)\r\n this.loadItemsInternal(items, true, true);\r\n }\r\n\r\n public add(itemOrItems: CommonStatusBarItem | ReadonlyArray<CommonStatusBarItem>) {\r\n let itemsToAdd;\r\n if (isInstance(itemOrItems))\r\n itemsToAdd = [itemOrItems];\r\n else {\r\n itemsToAdd = itemOrItems.filter((itemToAdd, index) => itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index);\r\n }\r\n itemsToAdd = itemsToAdd.filter((itemToAdd) => this._items.find((item) => item.id === itemToAdd.id) === undefined);\r\n if (itemsToAdd.length === 0)\r\n return;\r\n const items = [\r\n ...this._items,\r\n ...itemsToAdd,\r\n ];\r\n this.items = items;\r\n }\r\n\r\n /** Remove StatusBar items based on id */\r\n public remove(itemIdOrItemIds: StatusBarItemId | ReadonlyArray<StatusBarItemId\r\n >) {\r\n const items = this._items.filter((item) => {\r\n return isInstance(itemIdOrItemIds) ? item.id !== itemIdOrItemIds : !itemIdOrItemIds.find((itemId) => itemId === item.id);\r\n });\r\n this.items = items;\r\n }\r\n\r\n /** @internal */\r\n public removeAll() {\r\n this._items = [];\r\n }\r\n\r\n public static getSyncIdsOfInterest(items: readonly CommonStatusBarItem[]): string[] {\r\n const eventIds = new Set<string>();\r\n items.forEach((item) => {\r\n for (const [, entry] of Object.entries(item)) {\r\n if (entry instanceof ConditionalBooleanValue) {\r\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\r\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\r\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\r\n }\r\n }\r\n });\r\n return [...eventIds.values()];\r\n }\r\n\r\n private internalRefreshAffectedItems(items: readonly CommonStatusBarItem[], eventIds: Set<string>): { itemsUpdated: boolean, updatedItems: CommonStatusBarItem[] } {\r\n // istanbul ignore next\r\n if (0 === eventIds.size)\r\n return { itemsUpdated: false, updatedItems: [] };\r\n\r\n let updateRequired = false;\r\n\r\n const newItems: CommonStatusBarItem[] = [];\r\n for (const item of items) {\r\n const updatedItem = { ...item };\r\n\r\n for (const [, entry] of Object.entries(updatedItem)) {\r\n if (entry instanceof ConditionalBooleanValue) {\r\n // istanbul ignore else\r\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\r\n updateRequired = true;\r\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\r\n // istanbul ignore else\r\n if (ConditionalStringValue.refreshValue(entry, eventIds))\r\n updateRequired = true;\r\n }\r\n }\r\n\r\n newItems.push(updatedItem);\r\n }\r\n\r\n return { itemsUpdated: updateRequired, updatedItems: newItems };\r\n }\r\n\r\n public refreshAffectedItems(eventIds: Set<string>) {\r\n // istanbul ignore next\r\n if (0 === eventIds.size)\r\n return;\r\n\r\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(this.items, eventIds);\r\n\r\n // istanbul ignore else\r\n if (itemsUpdated)\r\n this.loadItemsInternal(updatedItems, false, true);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,4GAA4G;IAC5G,6EAAuB,CAAA;IACvB,iFAAiF;IACjF,mEAAkB,CAAA;AACpB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,0BAA0B;IAC1B,uEAAc,CAAA;IACd,wBAAwB;IACxB,mEAAY,CAAA;AACd,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAuFD;;GAEG;AACH,MAAa,oBAAoB;IAiB/B,+BAA+B;IACxB,MAAM,CAAC,cAAc,CAAC,IAAuB;QAClD,OAAQ,IAAqB,CAAC,OAAO,KAAK,SAAS,CAAC;IACtD,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,aAAa,CAAC,IAAuB;QACjD,OAAQ,IAAoB,CAAC,KAAK,KAAK,SAAS,CAAC;IACnD,CAAC;IAED,yCAAyC;IAClC,MAAM,CAAC,kBAAkB,CAAC,IAAuB;QACtD,OAAO,CAAC,CAAE,IAA+B,CAAC,QAAQ,CAAC;IACrD,CAAC;;AA7BD,+BAA+B;AACjB,uCAAkB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,OAAmB,EAAE,SAAiC,EAAgB,EAAE,CAAC,CAAC;IAC7N,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,KAAK;IACX,OAAO;IACP,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,8BAA8B;AAChB,sCAAiB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,KAAgD,EAAE,SAAgC,EAAe,EAAE,CAAC,CAAC;IACvP,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,KAAK;IACX,KAAK;IACL,GAAG,SAAS;CACb,CAAC,CAAC;SAfQ,oBAAoB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\n\n/** Used to specify the usage of the toolbar which determine the toolbar position.\n * @deprecated in 3.6. Use [ToolbarUsage]($appui-react) instead.\n * @public\n */\nexport enum ToolbarUsage {\n /** Contains tools to Create Update and Delete content - in ninezone this is in top left of content area. */\n ContentManipulation = 0,\n /** Manipulate view/camera - in ninezone this is in top right of content area. */\n ViewNavigation = 1,\n}\n\n/** Used to specify the orientation of the toolbar.\n * @deprecated in 3.6. Use [ToolbarOrientation]($appui-react) instead.\n * @public\n */\nexport enum ToolbarOrientation {\n /** Horizontal toolbar. */\n Horizontal = 0,\n /** Vertical toolbar. */\n Vertical = 1,\n}\n\n/** Describes the data needed to insert a UI items into an existing set of UI items.\n * @public\n */\nexport interface ToolbarItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\n /** can be used by application to store miscellaneous data. */\n readonly applicationData?: any;\n /** Describes badge. Renders no badge if not specified. */\n readonly badgeType?: BadgeType;\n /** Optional description */\n readonly description?: string | ConditionalStringValue;\n /** Require uniqueId for the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\n readonly id: string;\n /** optional data to used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Defines if the item is active (shown with an active stripe/bar). */\n readonly isActive?: boolean;\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\n readonly isHidden?: boolean | ConditionalBooleanValue;\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n /** Describes if the item should appear pressed (used for displaying toggle state). This property is NOT used by Toolbars\n * constructed using the `ToolbarWithOverflow` component, which are used in AppUi 2.0 and later. For these later toolbars\n * the icon is usually changed to denote the state of a toggle.\n */\n readonly isPressed?: boolean;\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\n * allows extensions enough gaps to insert their own groups. If the value is not specified a groupPriority of 0 is used.\n */\n readonly groupPriority?: number;\n /** Priority within a toolbar or group. */\n readonly itemPriority: number;\n /** Optional parent tool group to add tool. */\n readonly parentToolGroupId?: string;\n}\n\n/** Describes the data needed to insert an action button into a toolbar.\n * @public\n */\nexport interface ActionButton extends ToolbarItem {\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon: string | ConditionalStringValue;\n /** label, shown as tool tip on a button or an item label in a group. */\n readonly label: string | ConditionalStringValue;\n /** function to run when the button is pressed. */\n readonly execute: () => void;\n}\n\n/** Describes the data needed to insert a group button into a toolbar.\n * @public\n */\nexport interface GroupButton extends ToolbarItem {\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon: string | ConditionalStringValue;\n /** label, shown as tool tip on group button or a group button label in a group panel. */\n readonly label: string | ConditionalStringValue;\n /** label shown as the title in at top of group panel. */\n readonly panelLabel?: string | ConditionalStringValue;\n /** children of the group */\n readonly items: ReadonlyArray<ActionButton | GroupButton>; // eslint-disable-line deprecation/deprecation\n}\n\n/** Describes the data needed to insert a custom button into a toolbar.\n * @public\n */\nexport interface CustomButtonDefinition extends ToolbarItem {\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** label, shown as tool tip on group button or a group button label in a group panel. */\n readonly label?: string | ConditionalStringValue;\n /** parameter that marks data as being a custom definition. */\n readonly isCustom: true;\n}\n\n/** Any Button Type that can be inserted into a toolbar.\n * @public\n */\nexport type CommonToolbarItem = ActionButton | GroupButton | CustomButtonDefinition;\n\n/** Type for Toolbar Item Id\n * @deprecated in 3.6. Please use `ToolbarItem[\"id\"]` from @itwin/appui-react.\n * @public\n */\nexport type ToolbarItemId = CommonToolbarItem[\"id\"]; // eslint-disable-line deprecation/deprecation\n\n/** Helper class to create Abstract StatusBar Item definitions.\n * @public\n */\nexport class ToolbarItemUtilities {\n /** Creates an Action Button */\n public static createActionButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, execute: () => void, overrides?: Partial<ActionButton>): ActionButton => ({\n id, itemPriority,\n icon, label,\n execute,\n ...overrides,\n });\n\n /** Creates a Group button. */\n public static createGroupButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, items: ReadonlyArray<ActionButton | GroupButton>, overrides?: Partial<GroupButton>): GroupButton => ({\n id, itemPriority,\n icon, label,\n items,\n ...overrides,\n });\n\n /** ActionButton type guard. */\n public static isActionButton(item: CommonToolbarItem): item is ActionButton {\n return (item as ActionButton).execute !== undefined;\n }\n\n /** GroupButton type guard. */\n public static isGroupButton(item: CommonToolbarItem): item is GroupButton {\n return (item as GroupButton).items !== undefined;\n }\n\n /** CustomButtonDefinition type guard. */\n public static isCustomDefinition(item: CommonToolbarItem): item is CustomButtonDefinition {\n return !!(item as CustomButtonDefinition).isCustom;\n }\n}\n"]}
1
+ {"version":3,"file":"ToolbarItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,4GAA4G;IAC5G,6EAAuB,CAAA;IACvB,iFAAiF;IACjF,mEAAkB,CAAA;AACpB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,0BAA0B;IAC1B,uEAAc,CAAA;IACd,wBAAwB;IACxB,mEAAY,CAAA;AACd,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAuFD;;GAEG;AACH,MAAa,oBAAoB;IAiB/B,+BAA+B;IACxB,MAAM,CAAC,cAAc,CAAC,IAAuB;QAClD,OAAQ,IAAqB,CAAC,OAAO,KAAK,SAAS,CAAC;IACtD,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,aAAa,CAAC,IAAuB;QACjD,OAAQ,IAAoB,CAAC,KAAK,KAAK,SAAS,CAAC;IACnD,CAAC;IAED,yCAAyC;IAClC,MAAM,CAAC,kBAAkB,CAAC,IAAuB;QACtD,OAAO,CAAC,CAAE,IAA+B,CAAC,QAAQ,CAAC;IACrD,CAAC;;AA7BD,+BAA+B;AACjB,uCAAkB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,OAAmB,EAAE,SAAiC,EAAgB,EAAE,CAAC,CAAC;IAC7N,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,KAAK;IACX,OAAO;IACP,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,8BAA8B;AAChB,sCAAiB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,KAAgD,EAAE,SAAgC,EAAe,EAAE,CAAC,CAAC;IACvP,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,KAAK;IACX,KAAK;IACL,GAAG,SAAS;CACb,CAAC,CAAC;SAfQ,oBAAoB","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 Toolbar\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 usage of the toolbar which determine the toolbar position.\r\n * @deprecated in 3.6. Use [ToolbarUsage]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum ToolbarUsage {\r\n /** Contains tools to Create Update and Delete content - in ninezone this is in top left of content area. */\r\n ContentManipulation = 0,\r\n /** Manipulate view/camera - in ninezone this is in top right of content area. */\r\n ViewNavigation = 1,\r\n}\r\n\r\n/** Used to specify the orientation of the toolbar.\r\n * @deprecated in 3.6. Use [ToolbarOrientation]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum ToolbarOrientation {\r\n /** Horizontal toolbar. */\r\n Horizontal = 0,\r\n /** Vertical toolbar. */\r\n Vertical = 1,\r\n}\r\n\r\n/** Describes the data needed to insert a UI items into an existing set of UI items.\r\n * @public\r\n */\r\nexport interface ToolbarItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** can be used by application to store miscellaneous data. */\r\n readonly applicationData?: any;\r\n /** Describes badge. Renders no badge if not specified. */\r\n readonly badgeType?: BadgeType;\r\n /** Optional description */\r\n readonly description?: string | ConditionalStringValue;\r\n /** Require uniqueId for 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 /** Defines if the item is active (shown with an active stripe/bar). */\r\n readonly isActive?: boolean;\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 /** Describes if the item should appear pressed (used for displaying toggle state). This property is NOT used by Toolbars\r\n * constructed using the `ToolbarWithOverflow` component, which are used in AppUi 2.0 and later. For these later toolbars\r\n * the icon is usually changed to denote the state of a toggle.\r\n */\r\n readonly isPressed?: boolean;\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. If the value is not specified a groupPriority of 0 is used.\r\n */\r\n readonly groupPriority?: number;\r\n /** Priority within a toolbar or group. */\r\n readonly itemPriority: number;\r\n /** Optional parent tool group to add tool. */\r\n readonly parentToolGroupId?: string;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into a toolbar.\r\n * @public\r\n */\r\nexport interface ActionButton extends ToolbarItem {\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, shown as tool tip on a button or an item label in a group. */\r\n readonly label: string | ConditionalStringValue;\r\n /** function to run when the button is pressed. */\r\n readonly execute: () => void;\r\n}\r\n\r\n/** Describes the data needed to insert a group button into a toolbar.\r\n * @public\r\n */\r\nexport interface GroupButton extends ToolbarItem {\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, shown as tool tip on group button or a group button label in a group panel. */\r\n readonly label: string | ConditionalStringValue;\r\n /** label shown as the title in at top of group panel. */\r\n readonly panelLabel?: string | ConditionalStringValue;\r\n /** children of the group */\r\n readonly items: ReadonlyArray<ActionButton | GroupButton>; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Describes the data needed to insert a custom button into a toolbar.\r\n * @public\r\n */\r\nexport interface CustomButtonDefinition extends ToolbarItem {\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, shown as tool tip on group button or a group button label in a group panel. */\r\n readonly label?: string | ConditionalStringValue;\r\n /** parameter that marks data as being a custom definition. */\r\n readonly isCustom: true;\r\n}\r\n\r\n/** Any Button Type that can be inserted into a toolbar.\r\n * @public\r\n */\r\nexport type CommonToolbarItem = ActionButton | GroupButton | CustomButtonDefinition;\r\n\r\n/** Type for Toolbar Item Id\r\n * @deprecated in 3.6. Please use `ToolbarItem[\"id\"]` from @itwin/appui-react.\r\n * @public\r\n */\r\nexport type ToolbarItemId = CommonToolbarItem[\"id\"]; // eslint-disable-line deprecation/deprecation\r\n\r\n/** Helper class to create Abstract StatusBar Item definitions.\r\n * @public\r\n */\r\nexport class ToolbarItemUtilities {\r\n /** Creates an Action Button */\r\n public static createActionButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, execute: () => void, overrides?: Partial<ActionButton>): ActionButton => ({\r\n id, itemPriority,\r\n icon, label,\r\n execute,\r\n ...overrides,\r\n });\r\n\r\n /** Creates a Group button. */\r\n public static createGroupButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, items: ReadonlyArray<ActionButton | GroupButton>, overrides?: Partial<GroupButton>): GroupButton => ({\r\n id, itemPriority,\r\n icon, label,\r\n items,\r\n ...overrides,\r\n });\r\n\r\n /** ActionButton type guard. */\r\n public static isActionButton(item: CommonToolbarItem): item is ActionButton {\r\n return (item as ActionButton).execute !== undefined;\r\n }\r\n\r\n /** GroupButton type guard. */\r\n public static isGroupButton(item: CommonToolbarItem): item is GroupButton {\r\n return (item as GroupButton).items !== undefined;\r\n }\r\n\r\n /** CustomButtonDefinition type guard. */\r\n public static isCustomDefinition(item: CommonToolbarItem): item is CustomButtonDefinition {\r\n return !!(item as CustomButtonDefinition).isCustom;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItemsManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAA+D,oBAAoB,EAAE,MAAM,eAAe,CAAC;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AG,EAAE,GAAG,IAAI,EAAE,CAAC;YAEhC,IAAI,oBAAoB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;gBACnD,WAAW,CAAC,KAAK,GAAG,mBAAmB,CAAC,+BAA+B,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC9F;YAED,WAAW,CAAC,QAAQ,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;YACnD,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC/B;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEM,eAAe,CAAC,MAAc;QACnC,gDAAgD;QAChD,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;YAC7C,OAAO;QAET,MAAM,QAAQ,GAAwB,EAAE,CAAC;QACzC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YAC7B,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAEhC,IAAI,oBAAoB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;gBACnD,WAAW,CAAC,KAAK,GAAG,mBAAmB,CAAC,+BAA+B,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC9F;YAED,WAAW,CAAC,QAAQ,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5B;QAED,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,CAAC;CAEF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ActionButton, CommonToolbarItem, GroupButton, ToolbarItemId, ToolbarItemUtilities } from \"./ToolbarItem\";\n\n/* eslint-disable deprecation/deprecation */\n\ntype InstanceOrArray<T> = T | ReadonlyArray<T>;\n\nconst isInstance = <T>(args: InstanceOrArray<T>): args is T => {\n return !Array.isArray(args);\n};\n\n/** Arguments of [[ToolbarItemsManager.onChanged]] event.\n * @internal\n */\nexport interface ToolbarItemsChangedArgs {\n readonly items: ReadonlyArray<CommonToolbarItem>;\n}\n\n/**\n * Controls status bar items.\n * @internal\n */\nexport class ToolbarItemsManager {\n protected _items: ReadonlyArray<CommonToolbarItem> = [];\n\n constructor(items?: ReadonlyArray<CommonToolbarItem>) {\n if (items)\n this.loadItemsInternal(items, true, false);\n }\n\n /** Event raised when Toolbar items are changed.\n * @internal\n */\n public readonly onItemsChanged = new BeEvent<(args: ToolbarItemsChangedArgs) => void>();\n\n private loadItemsInternal(items: ReadonlyArray<CommonToolbarItem>, processConditions: boolean, sendItemChanged: boolean) {\n if (processConditions && items) {\n const eventIds = ToolbarItemsManager.getSyncIdsOfInterest(items);\n if (0 !== eventIds.length) {\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(items, new Set(eventIds));\n\n // istanbul ignore else\n if (itemsUpdated)\n items = updatedItems;\n }\n }\n\n this._items = items;\n if (sendItemChanged)\n this.onItemsChanged.raiseEvent({ items });\n }\n\n /** load items but do not fire onItemsChanged\n * @internal\n */\n public loadItems(items: ReadonlyArray<CommonToolbarItem>) {\n this.loadItemsInternal(items, true, false);\n }\n\n /** Get an array of the Toolbar items */\n public get items(): ReadonlyArray<CommonToolbarItem> {\n return this._items;\n }\n\n public set items(items: ReadonlyArray<CommonToolbarItem>) {\n // istanbul ignore else\n if (items !== this._items)\n this.loadItemsInternal(items, true, true);\n }\n\n public add(itemOrItems: CommonToolbarItem | ReadonlyArray<CommonToolbarItem>) {\n let itemsToAdd;\n if (isInstance(itemOrItems))\n itemsToAdd = [itemOrItems];\n else {\n itemsToAdd = itemOrItems.filter((itemToAdd, index) => itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index);\n }\n itemsToAdd = itemsToAdd.filter((itemToAdd) => this._items.find((item) => item.id === itemToAdd.id) === undefined);\n if (itemsToAdd.length === 0)\n return;\n const items = [\n ...this._items,\n ...itemsToAdd,\n ];\n this.items = items;\n }\n\n /** Remove Toolbar items based on id */\n public remove(itemIdOrItemIds: ToolbarItemId | ReadonlyArray<ToolbarItemId\n >) {\n const items = this._items.filter((item) => {\n return isInstance(itemIdOrItemIds) ? item.id !== itemIdOrItemIds : !itemIdOrItemIds.find((itemId) => itemId === item.id);\n });\n this.items = items;\n }\n\n /** @internal */\n public removeAll() {\n this._items = [];\n }\n\n private static gatherSyncIds(eventIds: Set<string>, items: readonly CommonToolbarItem[]) {\n for (const item of items) {\n for (const [, entry] of Object.entries(item)) {\n if (entry instanceof ConditionalBooleanValue) {\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\n }\n }\n\n // istanbul ignore else\n if (ToolbarItemUtilities.isGroupButton(item)) {\n this.gatherSyncIds(eventIds, item.items);\n }\n }\n }\n\n public static getSyncIdsOfInterest(items: readonly CommonToolbarItem[]): string[] {\n const eventIds = new Set<string>();\n this.gatherSyncIds(eventIds, items);\n return [...eventIds.values()];\n }\n\n private static refreshChildItems(parentItem: GroupButton, eventIds: Set<string>): { childrenUpdated: boolean, childItems: ReadonlyArray<ActionButton | GroupButton> } {\n const updatedItems: Array<ActionButton | GroupButton> = [];\n let itemsUpdated = false;\n\n for (const item of parentItem.items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n const { childrenUpdated, childItems } = this.refreshChildItems(updatedItem, eventIds);\n // istanbul ignore else\n if (childrenUpdated) {\n updatedItem.items = childItems;\n itemsUpdated = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n // istanbul ignore else\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n // istanbul ignore else\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n }\n }\n\n updatedItems.push(updatedItem);\n }\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\n }\n\n private internalRefreshAffectedItems(items: readonly CommonToolbarItem[], eventIds: Set<string>): { itemsUpdated: boolean, updatedItems: CommonToolbarItem[] } {\n // istanbul ignore next\n if (0 === eventIds.size)\n return { itemsUpdated: false, updatedItems: [] };\n\n let updateRequired = false;\n\n const newItems: CommonToolbarItem[] = [];\n for (const item of items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n const { childrenUpdated, childItems } = ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\n // istanbul ignore else\n if (childrenUpdated) {\n updatedItem.items = childItems;\n updateRequired = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n // istanbul ignore else\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n // istanbul ignore else\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n updateRequired = true;\n }\n }\n\n newItems.push(updatedItem);\n }\n\n return { itemsUpdated: updateRequired, updatedItems: newItems };\n }\n\n public refreshAffectedItems(eventIds: Set<string>) {\n // istanbul ignore next\n if (0 === eventIds.size)\n return;\n\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(this.items, eventIds);\n\n // istanbul ignore else\n if (itemsUpdated)\n this.loadItemsInternal(updatedItems, false, true);\n }\n\n private static isActiveToolIdRefreshRequiredForChildren(children: ReadonlyArray<ActionButton | GroupButton>, toolId: string): boolean {\n for (const item of children) {\n if (ToolbarItemUtilities.isGroupButton(item)) {\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\n return true;\n }\n }\n return false;\n }\n\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\n for (const item of this.items) {\n if (ToolbarItemUtilities.isGroupButton(item)) {\n if (ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\n return true;\n }\n }\n\n return false;\n }\n\n private static refreshActiveToolIdInChildItems(parentItem: GroupButton, toolId: string): Array<ActionButton | GroupButton> {\n const newChildren: Array<ActionButton | GroupButton> = [];\n for (const item of parentItem.items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\n }\n\n updatedItem.isActive = (updatedItem.id === toolId);\n newChildren.push(updatedItem);\n }\n return newChildren;\n }\n\n public setActiveToolId(toolId: string) {\n // first see if any updates are really necessary\n if (!this.isActiveToolIdRefreshRequired(toolId))\n return;\n\n const newItems: CommonToolbarItem[] = [];\n for (const item of this.items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\n }\n\n updatedItem.isActive = (updatedItem.id === toolId);\n newItems.push(updatedItem);\n }\n\n this.items = newItems;\n }\n\n}\n"]}
1
+ {"version":3,"file":"ToolbarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItemsManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,O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AAC,+BAA+B,CAAC,UAAuB,EAAE,MAAc;QACpF,MAAM,WAAW,GAAsC,EAAE,CAAC;QAC1D,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE;YACnC,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAEhC,IAAI,oBAAoB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;gBACnD,WAAW,CAAC,KAAK,GAAG,mBAAmB,CAAC,+BAA+B,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC9F;YAED,WAAW,CAAC,QAAQ,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;YACnD,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC/B;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEM,eAAe,CAAC,MAAc;QACnC,gDAAgD;QAChD,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;YAC7C,OAAO;QAET,MAAM,QAAQ,GAAwB,EAAE,CAAC;QACzC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YAC7B,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAEhC,IAAI,oBAAoB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;gBACnD,WAAW,CAAC,KAAK,GAAG,mBAAmB,CAAC,+BAA+B,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC9F;YAED,WAAW,CAAC,QAAQ,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5B;QAED,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,CAAC;CAEF","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 Toolbar\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { ActionButton, CommonToolbarItem, GroupButton, ToolbarItemId, ToolbarItemUtilities } from \"./ToolbarItem\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\ntype InstanceOrArray<T> = T | ReadonlyArray<T>;\r\n\r\nconst isInstance = <T>(args: InstanceOrArray<T>): args is T => {\r\n return !Array.isArray(args);\r\n};\r\n\r\n/** Arguments of [[ToolbarItemsManager.onChanged]] event.\r\n * @internal\r\n */\r\nexport interface ToolbarItemsChangedArgs {\r\n readonly items: ReadonlyArray<CommonToolbarItem>;\r\n}\r\n\r\n/**\r\n * Controls status bar items.\r\n * @internal\r\n */\r\nexport class ToolbarItemsManager {\r\n protected _items: ReadonlyArray<CommonToolbarItem> = [];\r\n\r\n constructor(items?: ReadonlyArray<CommonToolbarItem>) {\r\n if (items)\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n /** Event raised when Toolbar items are changed.\r\n * @internal\r\n */\r\n public readonly onItemsChanged = new BeEvent<(args: ToolbarItemsChangedArgs) => void>();\r\n\r\n private loadItemsInternal(items: ReadonlyArray<CommonToolbarItem>, processConditions: boolean, sendItemChanged: boolean) {\r\n if (processConditions && items) {\r\n const eventIds = ToolbarItemsManager.getSyncIdsOfInterest(items);\r\n if (0 !== eventIds.length) {\r\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(items, new Set(eventIds));\r\n\r\n // istanbul ignore else\r\n if (itemsUpdated)\r\n items = updatedItems;\r\n }\r\n }\r\n\r\n this._items = items;\r\n if (sendItemChanged)\r\n this.onItemsChanged.raiseEvent({ items });\r\n }\r\n\r\n /** load items but do not fire onItemsChanged\r\n * @internal\r\n */\r\n public loadItems(items: ReadonlyArray<CommonToolbarItem>) {\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n /** Get an array of the Toolbar items */\r\n public get items(): ReadonlyArray<CommonToolbarItem> {\r\n return this._items;\r\n }\r\n\r\n public set items(items: ReadonlyArray<CommonToolbarItem>) {\r\n // istanbul ignore else\r\n if (items !== this._items)\r\n this.loadItemsInternal(items, true, true);\r\n }\r\n\r\n public add(itemOrItems: CommonToolbarItem | ReadonlyArray<CommonToolbarItem>) {\r\n let itemsToAdd;\r\n if (isInstance(itemOrItems))\r\n itemsToAdd = [itemOrItems];\r\n else {\r\n itemsToAdd = itemOrItems.filter((itemToAdd, index) => itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index);\r\n }\r\n itemsToAdd = itemsToAdd.filter((itemToAdd) => this._items.find((item) => item.id === itemToAdd.id) === undefined);\r\n if (itemsToAdd.length === 0)\r\n return;\r\n const items = [\r\n ...this._items,\r\n ...itemsToAdd,\r\n ];\r\n this.items = items;\r\n }\r\n\r\n /** Remove Toolbar items based on id */\r\n public remove(itemIdOrItemIds: ToolbarItemId | ReadonlyArray<ToolbarItemId\r\n >) {\r\n const items = this._items.filter((item) => {\r\n return isInstance(itemIdOrItemIds) ? item.id !== itemIdOrItemIds : !itemIdOrItemIds.find((itemId) => itemId === item.id);\r\n });\r\n this.items = items;\r\n }\r\n\r\n /** @internal */\r\n public removeAll() {\r\n this._items = [];\r\n }\r\n\r\n private static gatherSyncIds(eventIds: Set<string>, items: readonly CommonToolbarItem[]) {\r\n for (const item of items) {\r\n for (const [, entry] of Object.entries(item)) {\r\n if (entry instanceof ConditionalBooleanValue) {\r\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\r\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\r\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\r\n }\r\n }\r\n\r\n // istanbul ignore else\r\n if (ToolbarItemUtilities.isGroupButton(item)) {\r\n this.gatherSyncIds(eventIds, item.items);\r\n }\r\n }\r\n }\r\n\r\n public static getSyncIdsOfInterest(items: readonly CommonToolbarItem[]): string[] {\r\n const eventIds = new Set<string>();\r\n this.gatherSyncIds(eventIds, items);\r\n return [...eventIds.values()];\r\n }\r\n\r\n private static refreshChildItems(parentItem: GroupButton, eventIds: Set<string>): { childrenUpdated: boolean, childItems: ReadonlyArray<ActionButton | GroupButton> } {\r\n const updatedItems: Array<ActionButton | GroupButton> = [];\r\n let itemsUpdated = false;\r\n\r\n for (const item of parentItem.items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n const { childrenUpdated, childItems } = this.refreshChildItems(updatedItem, eventIds);\r\n // istanbul ignore else\r\n if (childrenUpdated) {\r\n updatedItem.items = childItems;\r\n itemsUpdated = true;\r\n }\r\n }\r\n\r\n for (const [, entry] of Object.entries(updatedItem)) {\r\n if (entry instanceof ConditionalBooleanValue) {\r\n // istanbul ignore else\r\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\r\n itemsUpdated = true;\r\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\r\n // istanbul ignore else\r\n if (ConditionalStringValue.refreshValue(entry, eventIds))\r\n itemsUpdated = true;\r\n }\r\n }\r\n\r\n updatedItems.push(updatedItem);\r\n }\r\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\r\n }\r\n\r\n private internalRefreshAffectedItems(items: readonly CommonToolbarItem[], eventIds: Set<string>): { itemsUpdated: boolean, updatedItems: CommonToolbarItem[] } {\r\n // istanbul ignore next\r\n if (0 === eventIds.size)\r\n return { itemsUpdated: false, updatedItems: [] };\r\n\r\n let updateRequired = false;\r\n\r\n const newItems: CommonToolbarItem[] = [];\r\n for (const item of items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n const { childrenUpdated, childItems } = ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\r\n // istanbul ignore else\r\n if (childrenUpdated) {\r\n updatedItem.items = childItems;\r\n updateRequired = true;\r\n }\r\n }\r\n\r\n for (const [, entry] of Object.entries(updatedItem)) {\r\n if (entry instanceof ConditionalBooleanValue) {\r\n // istanbul ignore else\r\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\r\n updateRequired = true;\r\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\r\n // istanbul ignore else\r\n if (ConditionalStringValue.refreshValue(entry, eventIds))\r\n updateRequired = true;\r\n }\r\n }\r\n\r\n newItems.push(updatedItem);\r\n }\r\n\r\n return { itemsUpdated: updateRequired, updatedItems: newItems };\r\n }\r\n\r\n public refreshAffectedItems(eventIds: Set<string>) {\r\n // istanbul ignore next\r\n if (0 === eventIds.size)\r\n return;\r\n\r\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(this.items, eventIds);\r\n\r\n // istanbul ignore else\r\n if (itemsUpdated)\r\n this.loadItemsInternal(updatedItems, false, true);\r\n }\r\n\r\n private static isActiveToolIdRefreshRequiredForChildren(children: ReadonlyArray<ActionButton | GroupButton>, toolId: string): boolean {\r\n for (const item of children) {\r\n if (ToolbarItemUtilities.isGroupButton(item)) {\r\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\r\n return true;\r\n } else {\r\n const isActive = !!item.isActive;\r\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\r\n for (const item of this.items) {\r\n if (ToolbarItemUtilities.isGroupButton(item)) {\r\n if (ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\r\n return true;\r\n } else {\r\n const isActive = !!item.isActive;\r\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private static refreshActiveToolIdInChildItems(parentItem: GroupButton, toolId: string): Array<ActionButton | GroupButton> {\r\n const newChildren: Array<ActionButton | GroupButton> = [];\r\n for (const item of parentItem.items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\r\n }\r\n\r\n updatedItem.isActive = (updatedItem.id === toolId);\r\n newChildren.push(updatedItem);\r\n }\r\n return newChildren;\r\n }\r\n\r\n public setActiveToolId(toolId: string) {\r\n // first see if any updates are really necessary\r\n if (!this.isActiveToolIdRefreshRequired(toolId))\r\n return;\r\n\r\n const newItems: CommonToolbarItem[] = [];\r\n for (const item of this.items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\r\n }\r\n\r\n updatedItem.isActive = (updatedItem.id === toolId);\r\n newItems.push(updatedItem);\r\n }\r\n\r\n this.items = newItems;\r\n }\r\n\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IconSpecUtilities.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAa,iBAAiB;IAK5B;;;MAGE;IACK,MAAM,CAAC,iBAAiB,CAAC,MAAc;QAC5C,OAAO,GAAG,iBAAiB,CAAC,UAAU,GAAG,MAAM,EAAE,CAAC;IACpD,CAAC;IACD;;MAEE;IACK,MAAM,CAAC,0BAA0B,CAAC,SAAiB;QACxD,OAAO,GAAG,iBAAiB,CAAC,oBAAoB,GAAG,SAAS,EAAE,CAAC;IACjE,CAAC;IAED;;;MAGE;IACK,MAAM,CAAC,YAAY,CAAC,QAAgB;QACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5E,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;MAEE;IAEK,MAAM,CAAC,qBAAqB,CAAC,QAAgB;QAClD,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACtF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IAEnB,CAAC;;AAxCD,+DAA+D;AACxC,4BAAU,GAAG,MAAM,CAAC;AACpB,sCAAoB,GAAG,SAAS,CAAC;SAH7C,iBAAiB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.\n * @public\n */\nexport class IconSpecUtilities {\n /** Prefix for an SVG IconSpec loaded with the Sprite loader */\n public static readonly SVG_PREFIX = \"svg:\";\n public static readonly WEB_COMPONENT_PREFIX = \"webSvg:\";\n\n /** Create an IconSpec for an SVG loaded into web component with sprite loader\n * This method is deprecated -- use createWebComponentIconSpec()\n * @public @deprecated in 3.2. Please avoid using the Sprite loader and use IconSpecUtilities.createWebComponentIconSpec() instead.\n */\n public static createSvgIconSpec(svgSrc: string): string {\n return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;\n }\n /** Create an IconSpec for an SVG loaded into web component with svg-loader\n * @public\n */\n public static createWebComponentIconSpec(srcString: string): string {\n return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;\n }\n\n /** Get the SVG Source from an sprite IconSpec\n * This method is deprecated -- use getWebComponentSource()\n * @public @deprecated in 3.2. avoid using the Sprite loader and use IconSpecUtilities.getWebComponentSource() instead.\n */\n public static getSvgSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(IconSpecUtilities.SVG_PREFIX) && iconSpec.length > 4) {\n return iconSpec.slice(4);\n }\n\n return undefined;\n }\n /** Get the SVG Source from an svg-loader IconSpec\n * @public\n */\n\n public static getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n\n }\n}\n"]}
1
+ {"version":3,"file":"IconSpecUtilities.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAa,iBAAiB;IAK5B;;;MAGE;IACK,MAAM,CAAC,iBAAiB,CAAC,MAAc;QAC5C,OAAO,GAAG,iBAAiB,CAAC,UAAU,GAAG,MAAM,EAAE,CAAC;IACpD,CAAC;IACD;;MAEE;IACK,MAAM,CAAC,0BAA0B,CAAC,SAAiB;QACxD,OAAO,GAAG,iBAAiB,CAAC,oBAAoB,GAAG,SAAS,EAAE,CAAC;IACjE,CAAC;IAED;;;MAGE;IACK,MAAM,CAAC,YAAY,CAAC,QAAgB;QACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5E,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;MAEE;IAEK,MAAM,CAAC,qBAAqB,CAAC,QAAgB;QAClD,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACtF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IAEnB,CAAC;;AAxCD,+DAA+D;AACxC,4BAAU,GAAG,MAAM,CAAC;AACpB,sCAAoB,GAAG,SAAS,CAAC;SAH7C,iBAAiB","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/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.\r\n * @public\r\n */\r\nexport class IconSpecUtilities {\r\n /** Prefix for an SVG IconSpec loaded with the Sprite loader */\r\n public static readonly SVG_PREFIX = \"svg:\";\r\n public static readonly WEB_COMPONENT_PREFIX = \"webSvg:\";\r\n\r\n /** Create an IconSpec for an SVG loaded into web component with sprite loader\r\n * This method is deprecated -- use createWebComponentIconSpec()\r\n * @public @deprecated in 3.2. Please avoid using the Sprite loader and use IconSpecUtilities.createWebComponentIconSpec() instead.\r\n */\r\n public static createSvgIconSpec(svgSrc: string): string {\r\n return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;\r\n }\r\n /** Create an IconSpec for an SVG loaded into web component with svg-loader\r\n * @public\r\n */\r\n public static createWebComponentIconSpec(srcString: string): string {\r\n return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;\r\n }\r\n\r\n /** Get the SVG Source from an sprite IconSpec\r\n * This method is deprecated -- use getWebComponentSource()\r\n * @public @deprecated in 3.2. avoid using the Sprite loader and use IconSpecUtilities.getWebComponentSource() instead.\r\n */\r\n public static getSvgSource(iconSpec: string): string | undefined {\r\n if (iconSpec.startsWith(IconSpecUtilities.SVG_PREFIX) && iconSpec.length > 4) {\r\n return iconSpec.slice(4);\r\n }\r\n\r\n return undefined;\r\n }\r\n /** Get the SVG Source from an svg-loader IconSpec\r\n * @public\r\n */\r\n\r\n public static getWebComponentSource(iconSpec: string): string | undefined {\r\n if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {\r\n return iconSpec.slice(7);\r\n }\r\n\r\n return undefined;\r\n\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/PointProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Describes 2d points.\n * @public\n */\nexport interface PointProps {\n readonly x: number;\n readonly y: number;\n}\n"]}
1
+ {"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/PointProps.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 Utilities\r\n */\r\n\r\n/** Describes 2d points.\r\n * @public\r\n */\r\nexport interface PointProps {\r\n readonly x: number;\r\n readonly y: number;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiError.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiError.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAuB,MAAM,qBAAqB,CAAC;AAEvF;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,YAAY;IAEvC,6CAA6C;IAC7C,YAA0B,QAAgB,EAAE,OAAe,EAAE,cAAsB,aAAa,CAAC,KAAK,EAAE,WAAiC;QACvI,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QADjB,aAAQ,GAAR,QAAQ,CAAQ;IAE1C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { BentleyError, BentleyStatus, GetMetaDataFunction } from \"@itwin/core-bentley\";\n\n/** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.\n * @public\n */\nexport class UiError extends BentleyError {\n\n /** Constructs UiError using BentleyError. */\n public constructor(public category: string, message: string, errorNumber: number = BentleyStatus.ERROR, getMetaData?: GetMetaDataFunction) {\n super(errorNumber, message, getMetaData);\n }\n}\n"]}
1
+ {"version":3,"file":"UiError.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiError.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAuB,MAAM,qBAAqB,CAAC;AAEvF;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,YAAY;IAEvC,6CAA6C;IAC7C,YAA0B,QAAgB,EAAE,OAAe,EAAE,cAAsB,aAAa,CAAC,KAAK,EAAE,WAAiC;QACvI,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QADjB,aAAQ,GAAR,QAAQ,CAAQ;IAE1C,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 Utilities\r\n */\r\n\r\nimport { BentleyError, BentleyStatus, GetMetaDataFunction } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.\r\n * @public\r\n */\r\nexport class UiError extends BentleyError {\r\n\r\n /** Constructs UiError using BentleyError. */\r\n public constructor(public category: string, message: string, errorNumber: number = BentleyStatus.ERROR, getMetaData?: GetMetaDataFunction) {\r\n super(errorNumber, message, getMetaData);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEvent.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,OAAoB,SAAQ,SAAqB;CAAI","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\n\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\n * @public\n */\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\n"]}
1
+ {"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEvent.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,OAAoB,SAAQ,SAAqB;CAAI","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 { BeUiEvent } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\r\n * @public\r\n */\r\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\r\n"]}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,GAAG,EAAE,GAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA,CAAC,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;IAClH,CAAC;IAED,kFAAkF;IAC3E,kBAAkB,CAAC,QAAqB,EAAE,aAAuB;QACtE,0BAA0B;QAC1B,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACjH,OAAO,IAAI,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n// cSpell:ignore configurableui\nimport { UiEvent } from \"./UiEvent\";\n\n/** UiSync Event arguments. Contains a set of lower case event Ids.\n * @public\n */\nexport interface UiSyncEventArgs {\n eventIds: Set<string>;\n}\n\n/** UiSync Event class.\n * @public\n */\nexport class UiSyncEvent extends UiEvent<UiSyncEventArgs> { }\n\n/** This class is used to send eventIds to interested UI components so the component can determine if it needs\n * to refresh its display by calling setState on itself.\n * @public\n */\nexport class UiEventDispatcher {\n private _syncEventTimerId: number | undefined;\n private _eventIds: Set<string>;\n private _eventIdAdded;\n private _uiSyncEvent: UiSyncEvent;\n private _timeoutPeriod;\n private _secondaryTimeoutPeriod;\n\n constructor() {\n this._eventIds = new Set<string>();\n this._eventIdAdded = false;\n this._uiSyncEvent = new UiSyncEvent();\n this._timeoutPeriod = 100;\n this._secondaryTimeoutPeriod = this._timeoutPeriod / 2;\n }\n\n /** @internal - used for testing only */\n /* istanbul ignore next */\n public setTimeoutPeriod(period: number): void {\n this._timeoutPeriod = period;\n this._secondaryTimeoutPeriod = Math.floor(this._timeoutPeriod / 2);\n if (this._secondaryTimeoutPeriod < 1)\n this._secondaryTimeoutPeriod = 1;\n if (this._syncEventTimerId) {\n window.clearTimeout(this._syncEventTimerId);\n this._syncEventTimerId = undefined;\n }\n if (this._eventIds)\n this._eventIds.clear();\n\n this._eventIdAdded = false;\n }\n\n /** The current timeout period */\n public get timeoutPeriod(): number {\n return this._timeoutPeriod;\n }\n /** Return set of event ids that will be sent to listeners/. */\n public get syncEventIds(): Set<string> {\n return this._eventIds;\n }\n\n /** Return UiSyncEvent so callers can register an event callback. */\n public get onSyncUiEvent(): UiSyncEvent {\n return this._uiSyncEvent;\n }\n\n /** Immediately trigger sync event processing. */\n public dispatchImmediateSyncUiEvent(eventId: string): void {\n const eventIds = new Set<string>();\n eventIds.add(eventId.toLowerCase());\n this.onSyncUiEvent.emit({ eventIds });\n }\n\n /** Save eventId in Set for processing. */\n public dispatchSyncUiEvent(eventId: string): void {\n // istanbul ignore if\n if (0 === this._timeoutPeriod) {\n return;\n }\n\n this.syncEventIds.add(eventId.toLowerCase());\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._timeoutPeriod);\n } else {\n this._eventIdAdded = true;\n }\n }\n\n /** Save multiple eventIds in Set for processing. */\n public dispatchSyncUiEvents(eventIds: string[]): void {\n // istanbul ignore if\n if (0 === this._timeoutPeriod) {\n return;\n }\n\n eventIds.forEach((id) => this.syncEventIds.add(id.toLowerCase()));\n // istanbul ignore else\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._timeoutPeriod);\n } else {\n this._eventIdAdded = true;\n }\n }\n\n /** Trigger registered event processing when timer has expired and no addition eventId are added. */\n public checkForAdditionalIds() {\n /* istanbul ignore else */\n if (!this._eventIdAdded) {\n // istanbul ignore else\n if (this._syncEventTimerId) {\n window.clearTimeout(this._syncEventTimerId);\n this._syncEventTimerId = undefined;\n }\n this._eventIdAdded = false;\n // istanbul ignore else\n if (this.syncEventIds.size > 0) {\n const eventIds = new Set<string>();\n this.syncEventIds.forEach((value) => eventIds.add(value));\n this._eventIds.clear();\n this.onSyncUiEvent.emit({ eventIds });\n }\n return;\n }\n\n // istanbul ignore next\n if (this._syncEventTimerId) {\n window.clearTimeout(this._syncEventTimerId);\n this._syncEventTimerId = undefined;\n }\n // istanbul ignore next\n this._eventIdAdded = false;\n // if events have been added before the initial timer expired wait half that time to see if events are still being added.\n // istanbul ignore next\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._secondaryTimeoutPeriod);\n }\n\n /** Checks to see if an eventId of interest is contained in the set of eventIds */\n public hasEventOfInterest(eventIds: Set<string>, idsOfInterest: string[]) {\n /* istanbul ignore else */\n if ((idsOfInterest.length > 0) && idsOfInterest.some((value: string): boolean => eventIds.has(value.toLowerCase())))\n return true;\n return false;\n }\n}\n"]}
1
+ {"version":3,"file":"UiEventDispatcher.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEventDispatcher.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,+BAA+B;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAwB;CAAI;AAE7D;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAQ5B;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC;QACtC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;QAC1B,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;IACzD,CAAC;IAED,wCAAwC;IACxC,0BAA0B;IACnB,gBAAgB,CAAC,MAAc;QACpC,IAAI,CAAC,cAAc,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AI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC1D,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;gBACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;aACvC;YACD,OAAO;SACR;QAED,uBAAuB;QACvB,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAC5C,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;SACpC;QACD,uBAAuB;QACvB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,yHAAyH;QACzH,uBAAuB;QACvB,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA,CAAC,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;IAClH,CAAC;IAED,kFAAkF;IAC3E,kBAAkB,CAAC,QAAqB,EAAE,aAAuB;QACtE,0BAA0B;QAC1B,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACjH,OAAO,IAAI,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n// cSpell:ignore configurableui\r\nimport { UiEvent } from \"./UiEvent\";\r\n\r\n/** UiSync Event arguments. Contains a set of lower case event Ids.\r\n * @public\r\n */\r\nexport interface UiSyncEventArgs {\r\n eventIds: Set<string>;\r\n}\r\n\r\n/** UiSync Event class.\r\n * @public\r\n */\r\nexport class UiSyncEvent extends UiEvent<UiSyncEventArgs> { }\r\n\r\n/** This class is used to send eventIds to interested UI components so the component can determine if it needs\r\n * to refresh its display by calling setState on itself.\r\n * @public\r\n */\r\nexport class UiEventDispatcher {\r\n private _syncEventTimerId: number | undefined;\r\n private _eventIds: Set<string>;\r\n private _eventIdAdded;\r\n private _uiSyncEvent: UiSyncEvent;\r\n private _timeoutPeriod;\r\n private _secondaryTimeoutPeriod;\r\n\r\n constructor() {\r\n this._eventIds = new Set<string>();\r\n this._eventIdAdded = false;\r\n this._uiSyncEvent = new UiSyncEvent();\r\n this._timeoutPeriod = 100;\r\n this._secondaryTimeoutPeriod = this._timeoutPeriod / 2;\r\n }\r\n\r\n /** @internal - used for testing only */\r\n /* istanbul ignore next */\r\n public setTimeoutPeriod(period: number): void {\r\n this._timeoutPeriod = period;\r\n this._secondaryTimeoutPeriod = Math.floor(this._timeoutPeriod / 2);\r\n if (this._secondaryTimeoutPeriod < 1)\r\n this._secondaryTimeoutPeriod = 1;\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n if (this._eventIds)\r\n this._eventIds.clear();\r\n\r\n this._eventIdAdded = false;\r\n }\r\n\r\n /** The current timeout period */\r\n public get timeoutPeriod(): number {\r\n return this._timeoutPeriod;\r\n }\r\n /** Return set of event ids that will be sent to listeners/. */\r\n public get syncEventIds(): Set<string> {\r\n return this._eventIds;\r\n }\r\n\r\n /** Return UiSyncEvent so callers can register an event callback. */\r\n public get onSyncUiEvent(): UiSyncEvent {\r\n return this._uiSyncEvent;\r\n }\r\n\r\n /** Immediately trigger sync event processing. */\r\n public dispatchImmediateSyncUiEvent(eventId: string): void {\r\n const eventIds = new Set<string>();\r\n eventIds.add(eventId.toLowerCase());\r\n this.onSyncUiEvent.emit({ eventIds });\r\n }\r\n\r\n /** Save eventId in Set for processing. */\r\n public dispatchSyncUiEvent(eventId: string): void {\r\n // istanbul ignore if\r\n if (0 === this._timeoutPeriod) {\r\n return;\r\n }\r\n\r\n this.syncEventIds.add(eventId.toLowerCase());\r\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\r\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._timeoutPeriod);\r\n } else {\r\n this._eventIdAdded = true;\r\n }\r\n }\r\n\r\n /** Save multiple eventIds in Set for processing. */\r\n public dispatchSyncUiEvents(eventIds: string[]): void {\r\n // istanbul ignore if\r\n if (0 === this._timeoutPeriod) {\r\n return;\r\n }\r\n\r\n eventIds.forEach((id) => this.syncEventIds.add(id.toLowerCase()));\r\n // istanbul ignore else\r\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\r\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._timeoutPeriod);\r\n } else {\r\n this._eventIdAdded = true;\r\n }\r\n }\r\n\r\n /** Trigger registered event processing when timer has expired and no addition eventId are added. */\r\n public checkForAdditionalIds() {\r\n /* istanbul ignore else */\r\n if (!this._eventIdAdded) {\r\n // istanbul ignore else\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n this._eventIdAdded = false;\r\n // istanbul ignore else\r\n if (this.syncEventIds.size > 0) {\r\n const eventIds = new Set<string>();\r\n this.syncEventIds.forEach((value) => eventIds.add(value));\r\n this._eventIds.clear();\r\n this.onSyncUiEvent.emit({ eventIds });\r\n }\r\n return;\r\n }\r\n\r\n // istanbul ignore next\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n // istanbul ignore next\r\n this._eventIdAdded = false;\r\n // if events have been added before the initial timer expired wait half that time to see if events are still being added.\r\n // istanbul ignore next\r\n this._syncEventTimerId = window.setTimeout(() => {this.checkForAdditionalIds();}, this._secondaryTimeoutPeriod);\r\n }\r\n\r\n /** Checks to see if an eventId of interest is contained in the set of eventIds */\r\n public hasEventOfInterest(eventIds: Set<string>, idsOfInterest: string[]) {\r\n /* istanbul ignore else */\r\n if ((idsOfInterest.length > 0) && idsOfInterest.some((value: string): boolean => eventIds.has(value.toLowerCase())))\r\n return true;\r\n return false;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/callbacks.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { Primitives } from \"../properties/PrimitiveTypes\";\n\n/** Signature for number onCommit function.\n * @public\n */\nexport type OnNumberCommitFunc = (value: number) => void;\n\n/** Signature for value onCommit function.\n * @public\n */\nexport type OnValueCommitFunc = (value: Primitives.Value) => void;\n\n/** Signature for onCancel function.\n * @public\n */\nexport type OnCancelFunc = () => void;\n\n/** Signature for onItemExecuted function.\n * @public\n */\nexport type OnItemExecutedFunc = (item: any) => void;\n"]}
1
+ {"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/callbacks.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 Utilities\r\n */\r\n\r\nimport { Primitives } from \"../properties/PrimitiveTypes\";\r\n\r\n/** Signature for number onCommit function.\r\n * @public\r\n */\r\nexport type OnNumberCommitFunc = (value: number) => void;\r\n\r\n/** Signature for value onCommit function.\r\n * @public\r\n */\r\nexport type OnValueCommitFunc = (value: Primitives.Value) => void;\r\n\r\n/** Signature for onCancel function.\r\n * @public\r\n */\r\nexport type OnCancelFunc = () => void;\r\n\r\n/** Signature for onItemExecuted function.\r\n * @public\r\n */\r\nexport type OnItemExecutedFunc = (item: any) => void;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"charCode.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/charCode.ts"],"names":[],"mappings":"AAAA;;;+FAG+F","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/charCode.ts\n/* eslint-disable no-restricted-syntax */\n\n// Names from https://blog.codinghorror.com/ascii-pronunciation-rules-for-programmers/\n\n/**\n * An inlined enum containing useful character codes (to be used with String.charCodeAt).\n * Please leave the const keyword such that it gets inlined when compiled to JavaScript!\n * @internal\n */\nexport const enum CharCode {\n Null = 0,\n /**\n * The `\\b` character.\n */\n Backspace = 8,\n /**\n * The `\\t` character.\n */\n Tab = 9,\n /**\n * The `\\n` character.\n */\n LineFeed = 10,\n /**\n * The `\\r` character.\n */\n CarriageReturn = 13,\n Space = 32,\n /**\n * The `!` character.\n */\n ExclamationMark = 33,\n /**\n * The `\"` character.\n */\n DoubleQuote = 34,\n /**\n * The `#` character.\n */\n Hash = 35,\n /**\n * The `$` character.\n */\n DollarSign = 36,\n /**\n * The `%` character.\n */\n PercentSign = 37,\n /**\n * The `&` character.\n */\n Ampersand = 38,\n /**\n * The `'` character.\n */\n SingleQuote = 39,\n /**\n * The `(` character.\n */\n OpenParen = 40,\n /**\n * The `)` character.\n */\n CloseParen = 41,\n /**\n * The `*` character.\n */\n Asterisk = 42,\n /**\n * The `+` character.\n */\n Plus = 43,\n /**\n * The `,` character.\n */\n Comma = 44,\n /**\n * The `-` character.\n */\n Dash = 45,\n /**\n * The `.` character.\n */\n Period = 46,\n /**\n * The `/` character.\n */\n Slash = 47,\n\n Digit0 = 48,\n Digit1 = 49,\n Digit2 = 50,\n Digit3 = 51,\n Digit4 = 52,\n Digit5 = 53,\n Digit6 = 54,\n Digit7 = 55,\n Digit8 = 56,\n Digit9 = 57,\n\n /**\n * The `:` character.\n */\n Colon = 58,\n /**\n * The `;` character.\n */\n Semicolon = 59,\n /**\n * The `<` character.\n */\n LessThan = 60,\n /**\n * The `=` character.\n */\n Equals = 61,\n /**\n * The `>` character.\n */\n GreaterThan = 62,\n /**\n * The `?` character.\n */\n QuestionMark = 63,\n /**\n * The `@` character.\n */\n AtSign = 64,\n\n A = 65,\n B = 66,\n C = 67,\n D = 68,\n E = 69,\n F = 70,\n G = 71,\n H = 72,\n I = 73,\n J = 74,\n K = 75,\n L = 76,\n M = 77,\n N = 78,\n O = 79,\n P = 80,\n Q = 81,\n R = 82,\n S = 83,\n T = 84,\n U = 85,\n V = 86,\n W = 87,\n X = 88,\n Y = 89,\n Z = 90,\n\n /**\n * The `[` character.\n */\n OpenSquareBracket = 91,\n /**\n * The `\\` character.\n */\n Backslash = 92,\n /**\n * The `]` character.\n */\n CloseSquareBracket = 93,\n /**\n * The `^` character.\n */\n Caret = 94,\n /**\n * The `_` character.\n */\n Underline = 95,\n /**\n * The ``(`)`` character.\n */\n BackTick = 96,\n\n a = 97,\n b = 98,\n c = 99,\n d = 100,\n e = 101,\n f = 102,\n g = 103,\n h = 104,\n i = 105,\n j = 106,\n k = 107,\n l = 108,\n m = 109,\n n = 110,\n o = 111,\n p = 112,\n q = 113,\n r = 114,\n s = 115,\n t = 116,\n u = 117,\n v = 118,\n w = 119,\n x = 120,\n y = 121,\n z = 122,\n\n /**\n * The `{` character.\n */\n OpenCurlyBrace = 123,\n /**\n * The `|` character.\n */\n Pipe = 124,\n /**\n * The `}` character.\n */\n CloseCurlyBrace = 125,\n /**\n * The `~` character.\n */\n Tilde = 126,\n\n U_Combining_Grave_Accent = 0x0300,// U+0300Combining Grave Accent\n U_Combining_Acute_Accent = 0x0301,// U+0301Combining Acute Accent\n U_Combining_Circumflex_Accent = 0x0302,// U+0302Combining Circumflex Accent\n U_Combining_Tilde = 0x0303,// U+0303Combining Tilde\n U_Combining_Macron = 0x0304,// U+0304Combining Macron\n U_Combining_Overline = 0x0305,// U+0305Combining Overline\n U_Combining_Breve = 0x0306,// U+0306Combining Breve\n U_Combining_Dot_Above = 0x0307,// U+0307Combining Dot Above\n U_Combining_Diaeresis = 0x0308,// U+0308Combining Diaeresis\n U_Combining_Hook_Above = 0x0309,// U+0309Combining Hook Above\n U_Combining_Ring_Above = 0x030A,// U+030ACombining Ring Above\n U_Combining_Double_Acute_Accent = 0x030B,// U+030BCombining Double Acute Accent\n U_Combining_Caron = 0x030C,// U+030CCombining Caron\n U_Combining_Vertical_Line_Above = 0x030D,// U+030DCombining Vertical Line Above\n U_Combining_Double_Vertical_Line_Above = 0x030E,// U+030ECombining Double Vertical Line Above\n U_Combining_Double_Grave_Accent = 0x030F,// U+030FCombining Double Grave Accent\n U_Combining_Candrabindu = 0x0310,// U+0310Combining Candrabindu\n U_Combining_Inverted_Breve = 0x0311,// U+0311Combining Inverted Breve\n U_Combining_Turned_Comma_Above = 0x0312,// U+0312Combining Turned Comma Above\n U_Combining_Comma_Above = 0x0313,// U+0313Combining Comma Above\n U_Combining_Reversed_Comma_Above = 0x0314,// U+0314Combining Reversed Comma Above\n U_Combining_Comma_Above_Right = 0x0315,// U+0315Combining Comma Above Right\n U_Combining_Grave_Accent_Below = 0x0316,// U+0316Combining Grave Accent Below\n U_Combining_Acute_Accent_Below = 0x0317,// U+0317Combining Acute Accent Below\n U_Combining_Left_Tack_Below = 0x0318,// U+0318Combining Left Tack Below\n U_Combining_Right_Tack_Below = 0x0319,// U+0319Combining Right Tack Below\n U_Combining_Left_Angle_Above = 0x031A,// U+031ACombining Left Angle Above\n U_Combining_Horn = 0x031B,// U+031BCombining Horn\n U_Combining_Left_Half_Ring_Below = 0x031C,// U+031CCombining Left Half Ring Below\n U_Combining_Up_Tack_Below = 0x031D,// U+031DCombining Up Tack Below\n U_Combining_Down_Tack_Below = 0x031E,// U+031ECombining Down Tack Below\n U_Combining_Plus_Sign_Below = 0x031F,// U+031FCombining Plus Sign Below\n U_Combining_Minus_Sign_Below = 0x0320,// U+0320Combining Minus Sign Below\n U_Combining_Palatalized_Hook_Below = 0x0321,// U+0321Combining Palatalized Hook Below\n U_Combining_Retroflex_Hook_Below = 0x0322,// U+0322Combining Retroflex Hook Below\n U_Combining_Dot_Below = 0x0323,// U+0323Combining Dot Below\n U_Combining_Diaeresis_Below = 0x0324,// U+0324Combining Diaeresis Below\n U_Combining_Ring_Below = 0x0325,// U+0325Combining Ring Below\n U_Combining_Comma_Below = 0x0326,// U+0326Combining Comma Below\n U_Combining_Cedilla = 0x0327,// U+0327Combining Cedilla\n U_Combining_Ogonek = 0x0328,// U+0328Combining Ogonek\n U_Combining_Vertical_Line_Below = 0x0329,// U+0329Combining Vertical Line Below\n U_Combining_Bridge_Below = 0x032A,// U+032ACombining Bridge Below\n U_Combining_Inverted_Double_Arch_Below = 0x032B,// U+032BCombining Inverted Double Arch Below\n U_Combining_Caron_Below = 0x032C,// U+032CCombining Caron Below\n U_Combining_Circumflex_Accent_Below = 0x032D,// U+032DCombining Circumflex Accent Below\n U_Combining_Breve_Below = 0x032E,// U+032ECombining Breve Below\n U_Combining_Inverted_Breve_Below = 0x032F,// U+032FCombining Inverted Breve Below\n U_Combining_Tilde_Below = 0x0330,// U+0330Combining Tilde Below\n U_Combining_Macron_Below = 0x0331,// U+0331Combining Macron Below\n U_Combining_Low_Line = 0x0332,// U+0332Combining Low Line\n U_Combining_Double_Low_Line = 0x0333,// U+0333Combining Double Low Line\n U_Combining_Tilde_Overlay = 0x0334,// U+0334Combining Tilde Overlay\n U_Combining_Short_Stroke_Overlay = 0x0335,// U+0335Combining Short Stroke Overlay\n U_Combining_Long_Stroke_Overlay = 0x0336,// U+0336Combining Long Stroke Overlay\n U_Combining_Short_Solidus_Overlay = 0x0337,// U+0337Combining Short Solidus Overlay\n U_Combining_Long_Solidus_Overlay = 0x0338,// U+0338Combining Long Solidus Overlay\n U_Combining_Right_Half_Ring_Below = 0x0339,// U+0339Combining Right Half Ring Below\n U_Combining_Inverted_Bridge_Below = 0x033A,// U+033ACombining Inverted Bridge Below\n U_Combining_Square_Below = 0x033B,// U+033BCombining Square Below\n U_Combining_Seagull_Below = 0x033C,// U+033CCombining Seagull Below\n U_Combining_X_Above = 0x033D,// U+033DCombining X Above\n U_Combining_Vertical_Tilde = 0x033E,// U+033ECombining Vertical Tilde\n U_Combining_Double_Overline = 0x033F,// U+033FCombining Double Overline\n U_Combining_Grave_Tone_Mark = 0x0340,// U+0340Combining Grave Tone Mark\n U_Combining_Acute_Tone_Mark = 0x0341,// U+0341Combining Acute Tone Mark\n U_Combining_Greek_Perispomeni = 0x0342,// U+0342Combining Greek Perispomeni\n U_Combining_Greek_Koronis = 0x0343,// U+0343Combining Greek Koronis\n U_Combining_Greek_Dialytika_Tonos = 0x0344,// U+0344Combining Greek Dialytika Tonos\n U_Combining_Greek_Ypogegrammeni = 0x0345,// U+0345Combining Greek Ypogegrammeni\n U_Combining_Bridge_Above = 0x0346,// U+0346Combining Bridge Above\n U_Combining_Equals_Sign_Below = 0x0347,// U+0347Combining Equals Sign Below\n U_Combining_Double_Vertical_Line_Below = 0x0348,// U+0348Combining Double Vertical Line Below\n U_Combining_Left_Angle_Below = 0x0349,// U+0349Combining Left Angle Below\n U_Combining_Not_Tilde_Above = 0x034A,// U+034ACombining Not Tilde Above\n U_Combining_Homothetic_Above = 0x034B,// U+034BCombining Homothetic Above\n U_Combining_Almost_Equal_To_Above = 0x034C,// U+034CCombining Almost Equal To Above\n U_Combining_Left_Right_Arrow_Below = 0x034D,// U+034DCombining Left Right Arrow Below\n U_Combining_Upwards_Arrow_Below = 0x034E,// U+034ECombining Upwards Arrow Below\n U_Combining_Grapheme_Joiner = 0x034F,// U+034FCombining Grapheme Joiner\n U_Combining_Right_Arrowhead_Above = 0x0350,// U+0350Combining Right Arrowhead Above\n U_Combining_Left_Half_Ring_Above = 0x0351,// U+0351Combining Left Half Ring Above\n U_Combining_Fermata = 0x0352,// U+0352Combining Fermata\n U_Combining_X_Below = 0x0353,// U+0353Combining X Below\n U_Combining_Left_Arrowhead_Below = 0x0354,// U+0354Combining Left Arrowhead Below\n U_Combining_Right_Arrowhead_Below = 0x0355,// U+0355Combining Right Arrowhead Below\n U_Combining_Right_Arrowhead_And_Up_Arrowhead_Below = 0x0356,// U+0356Combining Right Arrowhead And Up Arrowhead Below\n U_Combining_Right_Half_Ring_Above = 0x0357,// U+0357Combining Right Half Ring Above\n U_Combining_Dot_Above_Right = 0x0358,// U+0358Combining Dot Above Right\n U_Combining_Asterisk_Below = 0x0359,// U+0359Combining Asterisk Below\n U_Combining_Double_Ring_Below = 0x035A,// U+035ACombining Double Ring Below\n U_Combining_Zigzag_Above = 0x035B,// U+035BCombining Zigzag Above\n U_Combining_Double_Breve_Below = 0x035C,// U+035CCombining Double Breve Below\n U_Combining_Double_Breve = 0x035D,// U+035DCombining Double Breve\n U_Combining_Double_Macron = 0x035E,// U+035ECombining Double Macron\n U_Combining_Double_Macron_Below = 0x035F,// U+035FCombining Double Macron Below\n U_Combining_Double_Tilde = 0x0360,// U+0360Combining Double Tilde\n U_Combining_Double_Inverted_Breve = 0x0361,// U+0361Combining Double Inverted Breve\n U_Combining_Double_Rightwards_Arrow_Below = 0x0362,// U+0362Combining Double Rightwards Arrow Below\n U_Combining_Latin_Small_Letter_A = 0x0363, // U+0363Combining Latin Small Letter A\n U_Combining_Latin_Small_Letter_E = 0x0364, // U+0364Combining Latin Small Letter E\n U_Combining_Latin_Small_Letter_I = 0x0365, // U+0365Combining Latin Small Letter I\n U_Combining_Latin_Small_Letter_O = 0x0366, // U+0366Combining Latin Small Letter O\n U_Combining_Latin_Small_Letter_U = 0x0367, // U+0367Combining Latin Small Letter U\n U_Combining_Latin_Small_Letter_C = 0x0368, // U+0368Combining Latin Small Letter C\n U_Combining_Latin_Small_Letter_D = 0x0369, // U+0369Combining Latin Small Letter D\n U_Combining_Latin_Small_Letter_H = 0x036A, // U+036ACombining Latin Small Letter H\n U_Combining_Latin_Small_Letter_M = 0x036B, // U+036BCombining Latin Small Letter M\n U_Combining_Latin_Small_Letter_R = 0x036C, // U+036CCombining Latin Small Letter R\n U_Combining_Latin_Small_Letter_T = 0x036D, // U+036DCombining Latin Small Letter T\n U_Combining_Latin_Small_Letter_V = 0x036E, // U+036ECombining Latin Small Letter V\n U_Combining_Latin_Small_Letter_X = 0x036F, // U+036FCombining Latin Small Letter X\n\n /**\n * Unicode Character 'LINE SEPARATOR' (U+2028)\n * http://www.fileformat.info/info/unicode/char/2028/index.htm\n */\n LINE_SEPARATOR = 0x2028,\n /**\n * Unicode Character 'PARAGRAPH SEPARATOR' (U+2029)\n * http://www.fileformat.info/info/unicode/char/2029/index.htm\n */\n PARAGRAPH_SEPARATOR = 0x2029,\n /**\n * Unicode Character 'NEXT LINE' (U+0085)\n * http://www.fileformat.info/info/unicode/char/0085/index.htm\n */\n NEXT_LINE = 0x0085,\n\n // http://www.fileformat.info/info/unicode/category/Sk/list.htm\n U_CIRCUMFLEX = 0x005E,// U+005ECIRCUMFLEX\n U_GRAVE_ACCENT = 0x0060,// U+0060GRAVE ACCENT\n U_DIAERESIS = 0x00A8,// U+00A8DIAERESIS\n U_MACRON = 0x00AF,// U+00AFMACRON\n U_ACUTE_ACCENT = 0x00B4,// U+00B4ACUTE ACCENT\n U_CEDILLA = 0x00B8,// U+00B8CEDILLA\n U_MODIFIER_LETTER_LEFT_ARROWHEAD = 0x02C2,// U+02C2MODIFIER LETTER LEFT ARROWHEAD\n U_MODIFIER_LETTER_RIGHT_ARROWHEAD = 0x02C3,// U+02C3MODIFIER LETTER RIGHT ARROWHEAD\n U_MODIFIER_LETTER_UP_ARROWHEAD = 0x02C4,// U+02C4MODIFIER LETTER UP ARROWHEAD\n U_MODIFIER_LETTER_DOWN_ARROWHEAD = 0x02C5,// U+02C5MODIFIER LETTER DOWN ARROWHEAD\n U_MODIFIER_LETTER_CENTRED_RIGHT_HALF_RING = 0x02D2,// U+02D2MODIFIER LETTER CENTRED RIGHT HALF RING\n U_MODIFIER_LETTER_CENTRED_LEFT_HALF_RING = 0x02D3,// U+02D3MODIFIER LETTER CENTRED LEFT HALF RING\n U_MODIFIER_LETTER_UP_TACK = 0x02D4,// U+02D4MODIFIER LETTER UP TACK\n U_MODIFIER_LETTER_DOWN_TACK = 0x02D5,// U+02D5MODIFIER LETTER DOWN TACK\n U_MODIFIER_LETTER_PLUS_SIGN = 0x02D6,// U+02D6MODIFIER LETTER PLUS SIGN\n U_MODIFIER_LETTER_MINUS_SIGN = 0x02D7,// U+02D7MODIFIER LETTER MINUS SIGN\n U_BREVE = 0x02D8,// U+02D8BREVE\n U_DOT_ABOVE = 0x02D9,// U+02D9DOT ABOVE\n U_RING_ABOVE = 0x02DA,// U+02DARING ABOVE\n U_OGONEK = 0x02DB,// U+02DBOGONEK\n U_SMALL_TILDE = 0x02DC,// U+02DCSMALL TILDE\n U_DOUBLE_ACUTE_ACCENT = 0x02DD,// U+02DDDOUBLE ACUTE ACCENT\n U_MODIFIER_LETTER_RHOTIC_HOOK = 0x02DE,// U+02DEMODIFIER LETTER RHOTIC HOOK\n U_MODIFIER_LETTER_CROSS_ACCENT = 0x02DF,// U+02DFMODIFIER LETTER CROSS ACCENT\n U_MODIFIER_LETTER_EXTRA_HIGH_TONE_BAR = 0x02E5,// U+02E5MODIFIER LETTER EXTRA-HIGH TONE BAR\n U_MODIFIER_LETTER_HIGH_TONE_BAR = 0x02E6,// U+02E6MODIFIER LETTER HIGH TONE BAR\n U_MODIFIER_LETTER_MID_TONE_BAR = 0x02E7,// U+02E7MODIFIER LETTER MID TONE BAR\n U_MODIFIER_LETTER_LOW_TONE_BAR = 0x02E8,// U+02E8MODIFIER LETTER LOW TONE BAR\n U_MODIFIER_LETTER_EXTRA_LOW_TONE_BAR = 0x02E9,// U+02E9MODIFIER LETTER EXTRA-LOW TONE BAR\n U_MODIFIER_LETTER_YIN_DEPARTING_TONE_MARK = 0x02EA,// U+02EAMODIFIER LETTER YIN DEPARTING TONE MARK\n U_MODIFIER_LETTER_YANG_DEPARTING_TONE_MARK = 0x02EB,// U+02EBMODIFIER LETTER YANG DEPARTING TONE MARK\n U_MODIFIER_LETTER_UNASPIRATED = 0x02ED,// U+02EDMODIFIER LETTER UNASPIRATED\n U_MODIFIER_LETTER_LOW_DOWN_ARROWHEAD = 0x02EF,// U+02EFMODIFIER LETTER LOW DOWN ARROWHEAD\n U_MODIFIER_LETTER_LOW_UP_ARROWHEAD = 0x02F0,// U+02F0MODIFIER LETTER LOW UP ARROWHEAD\n U_MODIFIER_LETTER_LOW_LEFT_ARROWHEAD = 0x02F1,// U+02F1MODIFIER LETTER LOW LEFT ARROWHEAD\n U_MODIFIER_LETTER_LOW_RIGHT_ARROWHEAD = 0x02F2,// U+02F2MODIFIER LETTER LOW RIGHT ARROWHEAD\n U_MODIFIER_LETTER_LOW_RING = 0x02F3,// U+02F3MODIFIER LETTER LOW RING\n U_MODIFIER_LETTER_MIDDLE_GRAVE_ACCENT = 0x02F4,// U+02F4MODIFIER LETTER MIDDLE GRAVE ACCENT\n U_MODIFIER_LETTER_MIDDLE_DOUBLE_GRAVE_ACCENT = 0x02F5,// U+02F5MODIFIER LETTER MIDDLE DOUBLE GRAVE ACCENT\n U_MODIFIER_LETTER_MIDDLE_DOUBLE_ACUTE_ACCENT = 0x02F6,// U+02F6MODIFIER LETTER MIDDLE DOUBLE ACUTE ACCENT\n U_MODIFIER_LETTER_LOW_TILDE = 0x02F7,// U+02F7MODIFIER LETTER LOW TILDE\n U_MODIFIER_LETTER_RAISED_COLON = 0x02F8,// U+02F8MODIFIER LETTER RAISED COLON\n U_MODIFIER_LETTER_BEGIN_HIGH_TONE = 0x02F9,// U+02F9MODIFIER LETTER BEGIN HIGH TONE\n U_MODIFIER_LETTER_END_HIGH_TONE = 0x02FA,// U+02FAMODIFIER LETTER END HIGH TONE\n U_MODIFIER_LETTER_BEGIN_LOW_TONE = 0x02FB,// U+02FBMODIFIER LETTER BEGIN LOW TONE\n U_MODIFIER_LETTER_END_LOW_TONE = 0x02FC,// U+02FCMODIFIER LETTER END LOW TONE\n U_MODIFIER_LETTER_SHELF = 0x02FD,// U+02FDMODIFIER LETTER SHELF\n U_MODIFIER_LETTER_OPEN_SHELF = 0x02FE,// U+02FEMODIFIER LETTER OPEN SHELF\n U_MODIFIER_LETTER_LOW_LEFT_ARROW = 0x02FF,// U+02FFMODIFIER LETTER LOW LEFT ARROW\n U_GREEK_LOWER_NUMERAL_SIGN = 0x0375,// U+0375GREEK LOWER NUMERAL SIGN\n U_GREEK_TONOS = 0x0384,// U+0384GREEK TONOS\n U_GREEK_DIALYTIKA_TONOS = 0x0385,// U+0385GREEK DIALYTIKA TONOS\n U_GREEK_KORONIS = 0x1FBD,// U+1FBDGREEK KORONIS\n U_GREEK_PSILI = 0x1FBF,// U+1FBFGREEK PSILI\n U_GREEK_PERISPOMENI = 0x1FC0,// U+1FC0GREEK PERISPOMENI\n U_GREEK_DIALYTIKA_AND_PERISPOMENI = 0x1FC1,// U+1FC1GREEK DIALYTIKA AND PERISPOMENI\n U_GREEK_PSILI_AND_VARIA = 0x1FCD,// U+1FCDGREEK PSILI AND VARIA\n U_GREEK_PSILI_AND_OXIA = 0x1FCE,// U+1FCEGREEK PSILI AND OXIA\n U_GREEK_PSILI_AND_PERISPOMENI = 0x1FCF,// U+1FCFGREEK PSILI AND PERISPOMENI\n U_GREEK_DASIA_AND_VARIA = 0x1FDD,// U+1FDDGREEK DASIA AND VARIA\n U_GREEK_DASIA_AND_OXIA = 0x1FDE,// U+1FDEGREEK DASIA AND OXIA\n U_GREEK_DASIA_AND_PERISPOMENI = 0x1FDF,// U+1FDFGREEK DASIA AND PERISPOMENI\n U_GREEK_DIALYTIKA_AND_VARIA = 0x1FED,// U+1FEDGREEK DIALYTIKA AND VARIA\n U_GREEK_DIALYTIKA_AND_OXIA = 0x1FEE,// U+1FEEGREEK DIALYTIKA AND OXIA\n U_GREEK_VARIA = 0x1FEF,// U+1FEFGREEK VARIA\n U_GREEK_OXIA = 0x1FFD,// U+1FFDGREEK OXIA\n U_GREEK_DASIA = 0x1FFE,// U+1FFEGREEK DASIA\n\n U_OVERLINE = 0x203E, // Unicode Character 'OVERLINE'\n\n /**\n * UTF-8 BOM\n * Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF)\n * http://www.fileformat.info/info/unicode/char/feff/index.htm\n */\n UTF8_BOM = 65279\n}\n"]}
1
+ {"version":3,"file":"charCode.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/charCode.ts"],"names":[],"mappings":"AAAA;;;+FAG+F","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// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/charCode.ts\r\n/* eslint-disable no-restricted-syntax */\r\n\r\n// Names from https://blog.codinghorror.com/ascii-pronunciation-rules-for-programmers/\r\n\r\n/**\r\n * An inlined enum containing useful character codes (to be used with String.charCodeAt).\r\n * Please leave the const keyword such that it gets inlined when compiled to JavaScript!\r\n * @internal\r\n */\r\nexport const enum CharCode {\r\n Null = 0,\r\n /**\r\n * The `\\b` character.\r\n */\r\n Backspace = 8,\r\n /**\r\n * The `\\t` character.\r\n */\r\n Tab = 9,\r\n /**\r\n * The `\\n` character.\r\n */\r\n LineFeed = 10,\r\n /**\r\n * The `\\r` character.\r\n */\r\n CarriageReturn = 13,\r\n Space = 32,\r\n /**\r\n * The `!` character.\r\n */\r\n ExclamationMark = 33,\r\n /**\r\n * The `\"` character.\r\n */\r\n DoubleQuote = 34,\r\n /**\r\n * The `#` character.\r\n */\r\n Hash = 35,\r\n /**\r\n * The `$` character.\r\n */\r\n DollarSign = 36,\r\n /**\r\n * The `%` character.\r\n */\r\n PercentSign = 37,\r\n /**\r\n * The `&` character.\r\n */\r\n Ampersand = 38,\r\n /**\r\n * The `'` character.\r\n */\r\n SingleQuote = 39,\r\n /**\r\n * The `(` character.\r\n */\r\n OpenParen = 40,\r\n /**\r\n * The `)` character.\r\n */\r\n CloseParen = 41,\r\n /**\r\n * The `*` character.\r\n */\r\n Asterisk = 42,\r\n /**\r\n * The `+` character.\r\n */\r\n Plus = 43,\r\n /**\r\n * The `,` character.\r\n */\r\n Comma = 44,\r\n /**\r\n * The `-` character.\r\n */\r\n Dash = 45,\r\n /**\r\n * The `.` character.\r\n */\r\n Period = 46,\r\n /**\r\n * The `/` character.\r\n */\r\n Slash = 47,\r\n\r\n Digit0 = 48,\r\n Digit1 = 49,\r\n Digit2 = 50,\r\n Digit3 = 51,\r\n Digit4 = 52,\r\n Digit5 = 53,\r\n Digit6 = 54,\r\n Digit7 = 55,\r\n Digit8 = 56,\r\n Digit9 = 57,\r\n\r\n /**\r\n * The `:` character.\r\n */\r\n Colon = 58,\r\n /**\r\n * The `;` character.\r\n */\r\n Semicolon = 59,\r\n /**\r\n * The `<` character.\r\n */\r\n LessThan = 60,\r\n /**\r\n * The `=` character.\r\n */\r\n Equals = 61,\r\n /**\r\n * The `>` character.\r\n */\r\n GreaterThan = 62,\r\n /**\r\n * The `?` character.\r\n */\r\n QuestionMark = 63,\r\n /**\r\n * The `@` character.\r\n */\r\n AtSign = 64,\r\n\r\n A = 65,\r\n B = 66,\r\n C = 67,\r\n D = 68,\r\n E = 69,\r\n F = 70,\r\n G = 71,\r\n H = 72,\r\n I = 73,\r\n J = 74,\r\n K = 75,\r\n L = 76,\r\n M = 77,\r\n N = 78,\r\n O = 79,\r\n P = 80,\r\n Q = 81,\r\n R = 82,\r\n S = 83,\r\n T = 84,\r\n U = 85,\r\n V = 86,\r\n W = 87,\r\n X = 88,\r\n Y = 89,\r\n Z = 90,\r\n\r\n /**\r\n * The `[` character.\r\n */\r\n OpenSquareBracket = 91,\r\n /**\r\n * The `\\` character.\r\n */\r\n Backslash = 92,\r\n /**\r\n * The `]` character.\r\n */\r\n CloseSquareBracket = 93,\r\n /**\r\n * The `^` character.\r\n */\r\n Caret = 94,\r\n /**\r\n * The `_` character.\r\n */\r\n Underline = 95,\r\n /**\r\n * The ``(`)`` character.\r\n */\r\n BackTick = 96,\r\n\r\n a = 97,\r\n b = 98,\r\n c = 99,\r\n d = 100,\r\n e = 101,\r\n f = 102,\r\n g = 103,\r\n h = 104,\r\n i = 105,\r\n j = 106,\r\n k = 107,\r\n l = 108,\r\n m = 109,\r\n n = 110,\r\n o = 111,\r\n p = 112,\r\n q = 113,\r\n r = 114,\r\n s = 115,\r\n t = 116,\r\n u = 117,\r\n v = 118,\r\n w = 119,\r\n x = 120,\r\n y = 121,\r\n z = 122,\r\n\r\n /**\r\n * The `{` character.\r\n */\r\n OpenCurlyBrace = 123,\r\n /**\r\n * The `|` character.\r\n */\r\n Pipe = 124,\r\n /**\r\n * The `}` character.\r\n */\r\n CloseCurlyBrace = 125,\r\n /**\r\n * The `~` character.\r\n */\r\n Tilde = 126,\r\n\r\n U_Combining_Grave_Accent = 0x0300,// U+0300Combining Grave Accent\r\n U_Combining_Acute_Accent = 0x0301,// U+0301Combining Acute Accent\r\n U_Combining_Circumflex_Accent = 0x0302,// U+0302Combining Circumflex Accent\r\n U_Combining_Tilde = 0x0303,// U+0303Combining Tilde\r\n U_Combining_Macron = 0x0304,// U+0304Combining Macron\r\n U_Combining_Overline = 0x0305,// U+0305Combining Overline\r\n U_Combining_Breve = 0x0306,// U+0306Combining Breve\r\n U_Combining_Dot_Above = 0x0307,// U+0307Combining Dot Above\r\n U_Combining_Diaeresis = 0x0308,// U+0308Combining Diaeresis\r\n U_Combining_Hook_Above = 0x0309,// U+0309Combining Hook Above\r\n U_Combining_Ring_Above = 0x030A,// U+030ACombining Ring Above\r\n U_Combining_Double_Acute_Accent = 0x030B,// U+030BCombining Double Acute Accent\r\n U_Combining_Caron = 0x030C,// U+030CCombining Caron\r\n U_Combining_Vertical_Line_Above = 0x030D,// U+030DCombining Vertical Line Above\r\n U_Combining_Double_Vertical_Line_Above = 0x030E,// U+030ECombining Double Vertical Line Above\r\n U_Combining_Double_Grave_Accent = 0x030F,// U+030FCombining Double Grave Accent\r\n U_Combining_Candrabindu = 0x0310,// U+0310Combining Candrabindu\r\n U_Combining_Inverted_Breve = 0x0311,// U+0311Combining Inverted Breve\r\n U_Combining_Turned_Comma_Above = 0x0312,// U+0312Combining Turned Comma Above\r\n U_Combining_Comma_Above = 0x0313,// U+0313Combining Comma Above\r\n U_Combining_Reversed_Comma_Above = 0x0314,// U+0314Combining Reversed Comma Above\r\n U_Combining_Comma_Above_Right = 0x0315,// U+0315Combining Comma Above Right\r\n U_Combining_Grave_Accent_Below = 0x0316,// U+0316Combining Grave Accent Below\r\n U_Combining_Acute_Accent_Below = 0x0317,// U+0317Combining Acute Accent Below\r\n U_Combining_Left_Tack_Below = 0x0318,// U+0318Combining Left Tack Below\r\n U_Combining_Right_Tack_Below = 0x0319,// U+0319Combining Right Tack Below\r\n U_Combining_Left_Angle_Above = 0x031A,// U+031ACombining Left Angle Above\r\n U_Combining_Horn = 0x031B,// U+031BCombining Horn\r\n U_Combining_Left_Half_Ring_Below = 0x031C,// U+031CCombining Left Half Ring Below\r\n U_Combining_Up_Tack_Below = 0x031D,// U+031DCombining Up Tack Below\r\n U_Combining_Down_Tack_Below = 0x031E,// U+031ECombining Down Tack Below\r\n U_Combining_Plus_Sign_Below = 0x031F,// U+031FCombining Plus Sign Below\r\n U_Combining_Minus_Sign_Below = 0x0320,// U+0320Combining Minus Sign Below\r\n U_Combining_Palatalized_Hook_Below = 0x0321,// U+0321Combining Palatalized Hook Below\r\n U_Combining_Retroflex_Hook_Below = 0x0322,// U+0322Combining Retroflex Hook Below\r\n U_Combining_Dot_Below = 0x0323,// U+0323Combining Dot Below\r\n U_Combining_Diaeresis_Below = 0x0324,// U+0324Combining Diaeresis Below\r\n U_Combining_Ring_Below = 0x0325,// U+0325Combining Ring Below\r\n U_Combining_Comma_Below = 0x0326,// U+0326Combining Comma Below\r\n U_Combining_Cedilla = 0x0327,// U+0327Combining Cedilla\r\n U_Combining_Ogonek = 0x0328,// U+0328Combining Ogonek\r\n U_Combining_Vertical_Line_Below = 0x0329,// U+0329Combining Vertical Line Below\r\n U_Combining_Bridge_Below = 0x032A,// U+032ACombining Bridge Below\r\n U_Combining_Inverted_Double_Arch_Below = 0x032B,// U+032BCombining Inverted Double Arch Below\r\n U_Combining_Caron_Below = 0x032C,// U+032CCombining Caron Below\r\n U_Combining_Circumflex_Accent_Below = 0x032D,// U+032DCombining Circumflex Accent Below\r\n U_Combining_Breve_Below = 0x032E,// U+032ECombining Breve Below\r\n U_Combining_Inverted_Breve_Below = 0x032F,// U+032FCombining Inverted Breve Below\r\n U_Combining_Tilde_Below = 0x0330,// U+0330Combining Tilde Below\r\n U_Combining_Macron_Below = 0x0331,// U+0331Combining Macron Below\r\n U_Combining_Low_Line = 0x0332,// U+0332Combining Low Line\r\n U_Combining_Double_Low_Line = 0x0333,// U+0333Combining Double Low Line\r\n U_Combining_Tilde_Overlay = 0x0334,// U+0334Combining Tilde Overlay\r\n U_Combining_Short_Stroke_Overlay = 0x0335,// U+0335Combining Short Stroke Overlay\r\n U_Combining_Long_Stroke_Overlay = 0x0336,// U+0336Combining Long Stroke Overlay\r\n U_Combining_Short_Solidus_Overlay = 0x0337,// U+0337Combining Short Solidus Overlay\r\n U_Combining_Long_Solidus_Overlay = 0x0338,// U+0338Combining Long Solidus Overlay\r\n U_Combining_Right_Half_Ring_Below = 0x0339,// U+0339Combining Right Half Ring Below\r\n U_Combining_Inverted_Bridge_Below = 0x033A,// U+033ACombining Inverted Bridge Below\r\n U_Combining_Square_Below = 0x033B,// U+033BCombining Square Below\r\n U_Combining_Seagull_Below = 0x033C,// U+033CCombining Seagull Below\r\n U_Combining_X_Above = 0x033D,// U+033DCombining X Above\r\n U_Combining_Vertical_Tilde = 0x033E,// U+033ECombining Vertical Tilde\r\n U_Combining_Double_Overline = 0x033F,// U+033FCombining Double Overline\r\n U_Combining_Grave_Tone_Mark = 0x0340,// U+0340Combining Grave Tone Mark\r\n U_Combining_Acute_Tone_Mark = 0x0341,// U+0341Combining Acute Tone Mark\r\n U_Combining_Greek_Perispomeni = 0x0342,// U+0342Combining Greek Perispomeni\r\n U_Combining_Greek_Koronis = 0x0343,// U+0343Combining Greek Koronis\r\n U_Combining_Greek_Dialytika_Tonos = 0x0344,// U+0344Combining Greek Dialytika Tonos\r\n U_Combining_Greek_Ypogegrammeni = 0x0345,// U+0345Combining Greek Ypogegrammeni\r\n U_Combining_Bridge_Above = 0x0346,// U+0346Combining Bridge Above\r\n U_Combining_Equals_Sign_Below = 0x0347,// U+0347Combining Equals Sign Below\r\n U_Combining_Double_Vertical_Line_Below = 0x0348,// U+0348Combining Double Vertical Line Below\r\n U_Combining_Left_Angle_Below = 0x0349,// U+0349Combining Left Angle Below\r\n U_Combining_Not_Tilde_Above = 0x034A,// U+034ACombining Not Tilde Above\r\n U_Combining_Homothetic_Above = 0x034B,// U+034BCombining Homothetic Above\r\n U_Combining_Almost_Equal_To_Above = 0x034C,// U+034CCombining Almost Equal To Above\r\n U_Combining_Left_Right_Arrow_Below = 0x034D,// U+034DCombining Left Right Arrow Below\r\n U_Combining_Upwards_Arrow_Below = 0x034E,// U+034ECombining Upwards Arrow Below\r\n U_Combining_Grapheme_Joiner = 0x034F,// U+034FCombining Grapheme Joiner\r\n U_Combining_Right_Arrowhead_Above = 0x0350,// U+0350Combining Right Arrowhead Above\r\n U_Combining_Left_Half_Ring_Above = 0x0351,// U+0351Combining Left Half Ring Above\r\n U_Combining_Fermata = 0x0352,// U+0352Combining Fermata\r\n U_Combining_X_Below = 0x0353,// U+0353Combining X Below\r\n U_Combining_Left_Arrowhead_Below = 0x0354,// U+0354Combining Left Arrowhead Below\r\n U_Combining_Right_Arrowhead_Below = 0x0355,// U+0355Combining Right Arrowhead Below\r\n U_Combining_Right_Arrowhead_And_Up_Arrowhead_Below = 0x0356,// U+0356Combining Right Arrowhead And Up Arrowhead Below\r\n U_Combining_Right_Half_Ring_Above = 0x0357,// U+0357Combining Right Half Ring Above\r\n U_Combining_Dot_Above_Right = 0x0358,// U+0358Combining Dot Above Right\r\n U_Combining_Asterisk_Below = 0x0359,// U+0359Combining Asterisk Below\r\n U_Combining_Double_Ring_Below = 0x035A,// U+035ACombining Double Ring Below\r\n U_Combining_Zigzag_Above = 0x035B,// U+035BCombining Zigzag Above\r\n U_Combining_Double_Breve_Below = 0x035C,// U+035CCombining Double Breve Below\r\n U_Combining_Double_Breve = 0x035D,// U+035DCombining Double Breve\r\n U_Combining_Double_Macron = 0x035E,// U+035ECombining Double Macron\r\n U_Combining_Double_Macron_Below = 0x035F,// U+035FCombining Double Macron Below\r\n U_Combining_Double_Tilde = 0x0360,// U+0360Combining Double Tilde\r\n U_Combining_Double_Inverted_Breve = 0x0361,// U+0361Combining Double Inverted Breve\r\n U_Combining_Double_Rightwards_Arrow_Below = 0x0362,// U+0362Combining Double Rightwards Arrow Below\r\n U_Combining_Latin_Small_Letter_A = 0x0363, // U+0363Combining Latin Small Letter A\r\n U_Combining_Latin_Small_Letter_E = 0x0364, // U+0364Combining Latin Small Letter E\r\n U_Combining_Latin_Small_Letter_I = 0x0365, // U+0365Combining Latin Small Letter I\r\n U_Combining_Latin_Small_Letter_O = 0x0366, // U+0366Combining Latin Small Letter O\r\n U_Combining_Latin_Small_Letter_U = 0x0367, // U+0367Combining Latin Small Letter U\r\n U_Combining_Latin_Small_Letter_C = 0x0368, // U+0368Combining Latin Small Letter C\r\n U_Combining_Latin_Small_Letter_D = 0x0369, // U+0369Combining Latin Small Letter D\r\n U_Combining_Latin_Small_Letter_H = 0x036A, // U+036ACombining Latin Small Letter H\r\n U_Combining_Latin_Small_Letter_M = 0x036B, // U+036BCombining Latin Small Letter M\r\n U_Combining_Latin_Small_Letter_R = 0x036C, // U+036CCombining Latin Small Letter R\r\n U_Combining_Latin_Small_Letter_T = 0x036D, // U+036DCombining Latin Small Letter T\r\n U_Combining_Latin_Small_Letter_V = 0x036E, // U+036ECombining Latin Small Letter V\r\n U_Combining_Latin_Small_Letter_X = 0x036F, // U+036FCombining Latin Small Letter X\r\n\r\n /**\r\n * Unicode Character 'LINE SEPARATOR' (U+2028)\r\n * http://www.fileformat.info/info/unicode/char/2028/index.htm\r\n */\r\n LINE_SEPARATOR = 0x2028,\r\n /**\r\n * Unicode Character 'PARAGRAPH SEPARATOR' (U+2029)\r\n * http://www.fileformat.info/info/unicode/char/2029/index.htm\r\n */\r\n PARAGRAPH_SEPARATOR = 0x2029,\r\n /**\r\n * Unicode Character 'NEXT LINE' (U+0085)\r\n * http://www.fileformat.info/info/unicode/char/0085/index.htm\r\n */\r\n NEXT_LINE = 0x0085,\r\n\r\n // http://www.fileformat.info/info/unicode/category/Sk/list.htm\r\n U_CIRCUMFLEX = 0x005E,// U+005ECIRCUMFLEX\r\n U_GRAVE_ACCENT = 0x0060,// U+0060GRAVE ACCENT\r\n U_DIAERESIS = 0x00A8,// U+00A8DIAERESIS\r\n U_MACRON = 0x00AF,// U+00AFMACRON\r\n U_ACUTE_ACCENT = 0x00B4,// U+00B4ACUTE ACCENT\r\n U_CEDILLA = 0x00B8,// U+00B8CEDILLA\r\n U_MODIFIER_LETTER_LEFT_ARROWHEAD = 0x02C2,// U+02C2MODIFIER LETTER LEFT ARROWHEAD\r\n U_MODIFIER_LETTER_RIGHT_ARROWHEAD = 0x02C3,// U+02C3MODIFIER LETTER RIGHT ARROWHEAD\r\n U_MODIFIER_LETTER_UP_ARROWHEAD = 0x02C4,// U+02C4MODIFIER LETTER UP ARROWHEAD\r\n U_MODIFIER_LETTER_DOWN_ARROWHEAD = 0x02C5,// U+02C5MODIFIER LETTER DOWN ARROWHEAD\r\n U_MODIFIER_LETTER_CENTRED_RIGHT_HALF_RING = 0x02D2,// U+02D2MODIFIER LETTER CENTRED RIGHT HALF RING\r\n U_MODIFIER_LETTER_CENTRED_LEFT_HALF_RING = 0x02D3,// U+02D3MODIFIER LETTER CENTRED LEFT HALF RING\r\n U_MODIFIER_LETTER_UP_TACK = 0x02D4,// U+02D4MODIFIER LETTER UP TACK\r\n U_MODIFIER_LETTER_DOWN_TACK = 0x02D5,// U+02D5MODIFIER LETTER DOWN TACK\r\n U_MODIFIER_LETTER_PLUS_SIGN = 0x02D6,// U+02D6MODIFIER LETTER PLUS SIGN\r\n U_MODIFIER_LETTER_MINUS_SIGN = 0x02D7,// U+02D7MODIFIER LETTER MINUS SIGN\r\n U_BREVE = 0x02D8,// U+02D8BREVE\r\n U_DOT_ABOVE = 0x02D9,// U+02D9DOT ABOVE\r\n U_RING_ABOVE = 0x02DA,// U+02DARING ABOVE\r\n U_OGONEK = 0x02DB,// U+02DBOGONEK\r\n U_SMALL_TILDE = 0x02DC,// U+02DCSMALL TILDE\r\n U_DOUBLE_ACUTE_ACCENT = 0x02DD,// U+02DDDOUBLE ACUTE ACCENT\r\n U_MODIFIER_LETTER_RHOTIC_HOOK = 0x02DE,// U+02DEMODIFIER LETTER RHOTIC HOOK\r\n U_MODIFIER_LETTER_CROSS_ACCENT = 0x02DF,// U+02DFMODIFIER LETTER CROSS ACCENT\r\n U_MODIFIER_LETTER_EXTRA_HIGH_TONE_BAR = 0x02E5,// U+02E5MODIFIER LETTER EXTRA-HIGH TONE BAR\r\n U_MODIFIER_LETTER_HIGH_TONE_BAR = 0x02E6,// U+02E6MODIFIER LETTER HIGH TONE BAR\r\n U_MODIFIER_LETTER_MID_TONE_BAR = 0x02E7,// U+02E7MODIFIER LETTER MID TONE BAR\r\n U_MODIFIER_LETTER_LOW_TONE_BAR = 0x02E8,// U+02E8MODIFIER LETTER LOW TONE BAR\r\n U_MODIFIER_LETTER_EXTRA_LOW_TONE_BAR = 0x02E9,// U+02E9MODIFIER LETTER EXTRA-LOW TONE BAR\r\n U_MODIFIER_LETTER_YIN_DEPARTING_TONE_MARK = 0x02EA,// U+02EAMODIFIER LETTER YIN DEPARTING TONE MARK\r\n U_MODIFIER_LETTER_YANG_DEPARTING_TONE_MARK = 0x02EB,// U+02EBMODIFIER LETTER YANG DEPARTING TONE MARK\r\n U_MODIFIER_LETTER_UNASPIRATED = 0x02ED,// U+02EDMODIFIER LETTER UNASPIRATED\r\n U_MODIFIER_LETTER_LOW_DOWN_ARROWHEAD = 0x02EF,// U+02EFMODIFIER LETTER LOW DOWN ARROWHEAD\r\n U_MODIFIER_LETTER_LOW_UP_ARROWHEAD = 0x02F0,// U+02F0MODIFIER LETTER LOW UP ARROWHEAD\r\n U_MODIFIER_LETTER_LOW_LEFT_ARROWHEAD = 0x02F1,// U+02F1MODIFIER LETTER LOW LEFT ARROWHEAD\r\n U_MODIFIER_LETTER_LOW_RIGHT_ARROWHEAD = 0x02F2,// U+02F2MODIFIER LETTER LOW RIGHT ARROWHEAD\r\n U_MODIFIER_LETTER_LOW_RING = 0x02F3,// U+02F3MODIFIER LETTER LOW RING\r\n U_MODIFIER_LETTER_MIDDLE_GRAVE_ACCENT = 0x02F4,// U+02F4MODIFIER LETTER MIDDLE GRAVE ACCENT\r\n U_MODIFIER_LETTER_MIDDLE_DOUBLE_GRAVE_ACCENT = 0x02F5,// U+02F5MODIFIER LETTER MIDDLE DOUBLE GRAVE ACCENT\r\n U_MODIFIER_LETTER_MIDDLE_DOUBLE_ACUTE_ACCENT = 0x02F6,// U+02F6MODIFIER LETTER MIDDLE DOUBLE ACUTE ACCENT\r\n U_MODIFIER_LETTER_LOW_TILDE = 0x02F7,// U+02F7MODIFIER LETTER LOW TILDE\r\n U_MODIFIER_LETTER_RAISED_COLON = 0x02F8,// U+02F8MODIFIER LETTER RAISED COLON\r\n U_MODIFIER_LETTER_BEGIN_HIGH_TONE = 0x02F9,// U+02F9MODIFIER LETTER BEGIN HIGH TONE\r\n U_MODIFIER_LETTER_END_HIGH_TONE = 0x02FA,// U+02FAMODIFIER LETTER END HIGH TONE\r\n U_MODIFIER_LETTER_BEGIN_LOW_TONE = 0x02FB,// U+02FBMODIFIER LETTER BEGIN LOW TONE\r\n U_MODIFIER_LETTER_END_LOW_TONE = 0x02FC,// U+02FCMODIFIER LETTER END LOW TONE\r\n U_MODIFIER_LETTER_SHELF = 0x02FD,// U+02FDMODIFIER LETTER SHELF\r\n U_MODIFIER_LETTER_OPEN_SHELF = 0x02FE,// U+02FEMODIFIER LETTER OPEN SHELF\r\n U_MODIFIER_LETTER_LOW_LEFT_ARROW = 0x02FF,// U+02FFMODIFIER LETTER LOW LEFT ARROW\r\n U_GREEK_LOWER_NUMERAL_SIGN = 0x0375,// U+0375GREEK LOWER NUMERAL SIGN\r\n U_GREEK_TONOS = 0x0384,// U+0384GREEK TONOS\r\n U_GREEK_DIALYTIKA_TONOS = 0x0385,// U+0385GREEK DIALYTIKA TONOS\r\n U_GREEK_KORONIS = 0x1FBD,// U+1FBDGREEK KORONIS\r\n U_GREEK_PSILI = 0x1FBF,// U+1FBFGREEK PSILI\r\n U_GREEK_PERISPOMENI = 0x1FC0,// U+1FC0GREEK PERISPOMENI\r\n U_GREEK_DIALYTIKA_AND_PERISPOMENI = 0x1FC1,// U+1FC1GREEK DIALYTIKA AND PERISPOMENI\r\n U_GREEK_PSILI_AND_VARIA = 0x1FCD,// U+1FCDGREEK PSILI AND VARIA\r\n U_GREEK_PSILI_AND_OXIA = 0x1FCE,// U+1FCEGREEK PSILI AND OXIA\r\n U_GREEK_PSILI_AND_PERISPOMENI = 0x1FCF,// U+1FCFGREEK PSILI AND PERISPOMENI\r\n U_GREEK_DASIA_AND_VARIA = 0x1FDD,// U+1FDDGREEK DASIA AND VARIA\r\n U_GREEK_DASIA_AND_OXIA = 0x1FDE,// U+1FDEGREEK DASIA AND OXIA\r\n U_GREEK_DASIA_AND_PERISPOMENI = 0x1FDF,// U+1FDFGREEK DASIA AND PERISPOMENI\r\n U_GREEK_DIALYTIKA_AND_VARIA = 0x1FED,// U+1FEDGREEK DIALYTIKA AND VARIA\r\n U_GREEK_DIALYTIKA_AND_OXIA = 0x1FEE,// U+1FEEGREEK DIALYTIKA AND OXIA\r\n U_GREEK_VARIA = 0x1FEF,// U+1FEFGREEK VARIA\r\n U_GREEK_OXIA = 0x1FFD,// U+1FFDGREEK OXIA\r\n U_GREEK_DASIA = 0x1FFE,// U+1FFEGREEK DASIA\r\n\r\n U_OVERLINE = 0x203E, // Unicode Character 'OVERLINE'\r\n\r\n /**\r\n * UTF-8 BOM\r\n * Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF)\r\n * http://www.fileformat.info/info/unicode/char/feff/index.htm\r\n */\r\n UTF8_BOM = 65279\r\n}\r\n"]}