@itwin/core-react 3.0.0-extension.0 → 3.1.0-dev.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG.md +78 -1
  2. package/ContributeGuidelines.md +1 -1
  3. package/LICENSE.md +1 -1
  4. package/lib/cjs/core-react/UiCore.d.ts +1 -1
  5. package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
  6. package/lib/cjs/core-react/UiCore.js.map +1 -1
  7. package/lib/cjs/core-react/_z-index.scss +2 -0
  8. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +1 -1
  9. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  10. package/lib/cjs/core-react/dialog/Dialog.d.ts +2 -0
  11. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  12. package/lib/cjs/core-react/dialog/Dialog.js +33 -0
  13. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  14. package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +3 -3
  15. package/lib/cjs/core-react/dialog/DialogButtonDef.js +2 -2
  16. package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +1 -1
  17. package/lib/cjs/core-react/expandable/ExpandableList.scss +0 -3
  18. package/lib/cjs/core-react/form/Field.d.ts +2 -2
  19. package/lib/cjs/core-react/form/Field.d.ts.map +1 -1
  20. package/lib/cjs/core-react/form/Field.js +4 -3
  21. package/lib/cjs/core-react/form/Field.js.map +1 -1
  22. package/lib/cjs/core-react/form/Form.d.ts +7 -7
  23. package/lib/cjs/core-react/form/Form.d.ts.map +1 -1
  24. package/lib/cjs/core-react/form/Form.js +3 -2
  25. package/lib/cjs/core-react/form/Form.js.map +1 -1
  26. package/lib/cjs/core-react/icons/IconComponent.scss +5 -0
  27. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  28. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +3 -2
  29. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  30. package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +13 -0
  31. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  32. package/lib/cjs/core-react/messagebox/MessageBox.js +3 -0
  33. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  34. package/lib/cjs/core-react/messagebox/MessageBox.scss +2 -0
  35. package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +1 -1
  36. package/lib/cjs/core-react/messagebox/MessageSeverity.js +1 -1
  37. package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +1 -1
  38. package/lib/cjs/core-react/popup/Popup.d.ts +6 -1
  39. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  40. package/lib/cjs/core-react/popup/Popup.js +13 -4
  41. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  42. package/lib/cjs/core-react/popup/Popup.scss +11 -2
  43. package/lib/cjs/core-react/select/ThemedSelect.d.ts +1 -1
  44. package/lib/cjs/core-react/select/ThemedSelect.js +1 -1
  45. package/lib/cjs/core-react/select/ThemedSelect.js.map +1 -1
  46. package/lib/cjs/core-react/style/itwinui-overrides.scss +0 -68
  47. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  48. package/lib/cjs/core-react/tree/Node.js +1 -3
  49. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  50. package/lib/cjs/core-react/tree/Node.scss +14 -7
  51. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts +17 -0
  52. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts.map +1 -0
  53. package/lib/cjs/core-react/{uisettings/LocalSettingsStorage.js → uistate/LocalStateStorage.js} +14 -20
  54. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -0
  55. package/lib/{esm/core-react/uisettings/UiSetting.d.ts → cjs/core-react/uistate/UiStateEntry.d.ts} +15 -15
  56. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -0
  57. package/lib/cjs/core-react/{uisettings/UiSetting.js → uistate/UiStateEntry.js} +16 -16
  58. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -0
  59. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts +29 -0
  60. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts.map +1 -0
  61. package/lib/cjs/core-react/uistate/UiStateStorage.js +22 -0
  62. package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -0
  63. package/lib/cjs/core-react/utils/UiEvent.d.ts +2 -2
  64. package/lib/cjs/core-react/utils/UiEvent.js +2 -2
  65. package/lib/cjs/core-react/utils/UiEvent.js.map +1 -1
  66. package/lib/cjs/core-react.d.ts +4 -5
  67. package/lib/cjs/core-react.d.ts.map +1 -1
  68. package/lib/cjs/core-react.js +4 -5
  69. package/lib/cjs/core-react.js.map +1 -1
  70. package/lib/esm/core-react/UiCore.d.ts +1 -1
  71. package/lib/esm/core-react/UiCore.d.ts.map +1 -1
  72. package/lib/esm/core-react/UiCore.js.map +1 -1
  73. package/lib/esm/core-react/_z-index.scss +2 -0
  74. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +1 -1
  75. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  76. package/lib/esm/core-react/dialog/Dialog.d.ts +2 -0
  77. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  78. package/lib/esm/core-react/dialog/Dialog.js +33 -0
  79. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  80. package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +3 -3
  81. package/lib/esm/core-react/dialog/DialogButtonDef.js +2 -2
  82. package/lib/esm/core-react/dialog/DialogButtonDef.js.map +1 -1
  83. package/lib/esm/core-react/expandable/ExpandableList.scss +0 -3
  84. package/lib/esm/core-react/form/Field.d.ts +2 -2
  85. package/lib/esm/core-react/form/Field.d.ts.map +1 -1
  86. package/lib/esm/core-react/form/Field.js +4 -3
  87. package/lib/esm/core-react/form/Field.js.map +1 -1
  88. package/lib/esm/core-react/form/Form.d.ts +7 -7
  89. package/lib/esm/core-react/form/Form.d.ts.map +1 -1
  90. package/lib/esm/core-react/form/Form.js +3 -2
  91. package/lib/esm/core-react/form/Form.js.map +1 -1
  92. package/lib/esm/core-react/icons/IconComponent.scss +5 -0
  93. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  94. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +3 -2
  95. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  96. package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +13 -0
  97. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  98. package/lib/esm/core-react/messagebox/MessageBox.js +3 -0
  99. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  100. package/lib/esm/core-react/messagebox/MessageBox.scss +2 -0
  101. package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +1 -1
  102. package/lib/esm/core-react/messagebox/MessageSeverity.js +1 -1
  103. package/lib/esm/core-react/messagebox/MessageSeverity.js.map +1 -1
  104. package/lib/esm/core-react/popup/Popup.d.ts +6 -1
  105. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  106. package/lib/esm/core-react/popup/Popup.js +13 -4
  107. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  108. package/lib/esm/core-react/popup/Popup.scss +11 -2
  109. package/lib/esm/core-react/select/ThemedSelect.d.ts +1 -1
  110. package/lib/esm/core-react/select/ThemedSelect.js +1 -1
  111. package/lib/esm/core-react/select/ThemedSelect.js.map +1 -1
  112. package/lib/esm/core-react/style/itwinui-overrides.scss +0 -68
  113. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  114. package/lib/esm/core-react/tree/Node.js +1 -3
  115. package/lib/esm/core-react/tree/Node.js.map +1 -1
  116. package/lib/esm/core-react/tree/Node.scss +14 -7
  117. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts +17 -0
  118. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts.map +1 -0
  119. package/lib/esm/core-react/{uisettings/LocalSettingsStorage.js → uistate/LocalStateStorage.js} +12 -17
  120. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -0
  121. package/lib/{cjs/core-react/uisettings/UiSetting.d.ts → esm/core-react/uistate/UiStateEntry.d.ts} +15 -15
  122. package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -0
  123. package/lib/esm/core-react/{uisettings/UiSetting.js → uistate/UiStateEntry.js} +14 -14
  124. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -0
  125. package/lib/esm/core-react/uistate/UiStateStorage.d.ts +29 -0
  126. package/lib/esm/core-react/uistate/UiStateStorage.d.ts.map +1 -0
  127. package/lib/esm/core-react/uistate/UiStateStorage.js +19 -0
  128. package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -0
  129. package/lib/esm/core-react/utils/UiEvent.d.ts +2 -2
  130. package/lib/esm/core-react/utils/UiEvent.js +2 -2
  131. package/lib/esm/core-react/utils/UiEvent.js.map +1 -1
  132. package/lib/esm/core-react.d.ts +4 -5
  133. package/lib/esm/core-react.d.ts.map +1 -1
  134. package/lib/esm/core-react.js +4 -5
  135. package/lib/esm/core-react.js.map +1 -1
  136. package/package.json +20 -22
  137. package/lib/cjs/core-react/uisettings/LocalSettingsStorage.d.ts +0 -24
  138. package/lib/cjs/core-react/uisettings/LocalSettingsStorage.d.ts.map +0 -1
  139. package/lib/cjs/core-react/uisettings/LocalSettingsStorage.js.map +0 -1
  140. package/lib/cjs/core-react/uisettings/SessionSettingsStorage.d.ts +0 -24
  141. package/lib/cjs/core-react/uisettings/SessionSettingsStorage.d.ts.map +0 -1
  142. package/lib/cjs/core-react/uisettings/SessionSettingsStorage.js +0 -56
  143. package/lib/cjs/core-react/uisettings/SessionSettingsStorage.js.map +0 -1
  144. package/lib/cjs/core-react/uisettings/UiSetting.d.ts.map +0 -1
  145. package/lib/cjs/core-react/uisettings/UiSetting.js.map +0 -1
  146. package/lib/cjs/core-react/uisettings/UiSettingsStorage.d.ts +0 -33
  147. package/lib/cjs/core-react/uisettings/UiSettingsStorage.d.ts.map +0 -1
  148. package/lib/cjs/core-react/uisettings/UiSettingsStorage.js +0 -22
  149. package/lib/cjs/core-react/uisettings/UiSettingsStorage.js.map +0 -1
  150. package/lib/esm/core-react/uisettings/LocalSettingsStorage.d.ts +0 -24
  151. package/lib/esm/core-react/uisettings/LocalSettingsStorage.d.ts.map +0 -1
  152. package/lib/esm/core-react/uisettings/LocalSettingsStorage.js.map +0 -1
  153. package/lib/esm/core-react/uisettings/SessionSettingsStorage.d.ts +0 -24
  154. package/lib/esm/core-react/uisettings/SessionSettingsStorage.d.ts.map +0 -1
  155. package/lib/esm/core-react/uisettings/SessionSettingsStorage.js +0 -51
  156. package/lib/esm/core-react/uisettings/SessionSettingsStorage.js.map +0 -1
  157. package/lib/esm/core-react/uisettings/UiSetting.d.ts.map +0 -1
  158. package/lib/esm/core-react/uisettings/UiSetting.js.map +0 -1
  159. package/lib/esm/core-react/uisettings/UiSettingsStorage.d.ts +0 -33
  160. package/lib/esm/core-react/uisettings/UiSettingsStorage.d.ts.map +0 -1
  161. package/lib/esm/core-react/uisettings/UiSettingsStorage.js +0 -19
  162. package/lib/esm/core-react/uisettings/UiSettingsStorage.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/Dialog.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmB,gBAAgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;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BACR,KAAK,gBAAgB,CAAC,IAAI;wBACxB,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;wBAC7C,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC;wBACvE,MAAM;oBACR,KAAK,gBAAgB,CAAC,QAAQ;wBAC5B,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;wBACjD,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC;wBACvE,MAAM;iBACT;gBAED,IAAI,MAAM,CAAC,KAAK;oBACd,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;gBAE5B,OAAO,CAAC,IAAI,CAAC,oBAAC,MAAM,IAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,IAAG,UAAU,CAAU,CAAC,CAAC;YACjJ,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AAvRa,mBAAY,GAAyB;IACjD,SAAS,EAAE,eAAe,CAAC,MAAM;IACjC,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;CACjB,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 Dialog\r\n */\r\n\r\nimport \"./Dialog.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, DialogButtonType, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cspell:ignore focustrap\r\n\r\n/** Enum for dialog alignment\r\n * @public\r\n */\r\nexport enum DialogAlignment {\r\n TopLeft = \"top-left\", Top = \"top\", TopRight = \"top-right\",\r\n Left = \"left\", Center = \"center\", Right = \"right\",\r\n BottomLeft = \"bottom-left\", Bottom = \"bottom\", BottomRight = \"bottom-right\",\r\n}\r\n\r\n/** Properties for the [[Dialog]] component\r\n * @public\r\n */\r\nexport interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"title\">, CommonProps {\r\n /** Indicates whether to show dialog or not */\r\n opened: boolean;\r\n\r\n /** Indicates whether the user can resize dialog with cursor. Default: false */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor. Default: false */\r\n movable?: boolean;\r\n /** Indicates whether the content should be inset. Default: true */\r\n inset?: boolean;\r\n /** Indicates whether the focus should be trapped within the dialog. Default: false */\r\n trapFocus?: boolean;\r\n\r\n /** Whether the hide the header. Default: false */\r\n hideHeader?: boolean;\r\n /** Override for the header */\r\n header?: React.ReactNode;\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\r\n /** Footer to show at bottom of dialog. Note: will override buttonCluster */\r\n footer?: string | JSX.Element;\r\n /** List of DialogButtonDef objects specifying buttons and associated onClick events */\r\n buttonCluster?: DialogButtonDef[];\r\n\r\n /** Default alignment of dialog. Default: DialogAlignment.Center */\r\n alignment?: DialogAlignment;\r\n /** Initial x/left position of dialog in px. */\r\n x?: number;\r\n /** Initial y/top position of dialog in px. */\r\n y?: number;\r\n\r\n /** onClick event for X button for dialog */\r\n onClose?: () => void;\r\n /** 'keyup' event for Esc key */\r\n onEscape?: () => void;\r\n /** Triggered when a click is triggered outside of this dialog. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: \"50%\" */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 300px */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n\r\n /** Whether to show background overlay. Default: true.\r\n * @note Modeless dialogs require an id and an implementation of onModelessPointerDown.\r\n */\r\n modal?: boolean;\r\n /** An id for a modeless dialog */\r\n modelessId?: string;\r\n /** Pointer Down event handler when modeless (modal = false) */\r\n onModelessPointerDown?: (event: React.PointerEvent, id: string) => void;\r\n\r\n /** Custom CSS Style for overlay */\r\n backgroundStyle?: React.CSSProperties;\r\n /** Custom CSS Style for title */\r\n titleStyle?: React.CSSProperties;\r\n /** Custom CSS Style for footer */\r\n footerStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the content */\r\n contentClassName?: string;\r\n /** Custom CSS Style for the content */\r\n contentStyle?: React.CSSProperties;\r\n}\r\n\r\n/** @internal */\r\ninterface DialogState {\r\n rightResizing: boolean;\r\n downResizing: boolean;\r\n moving: boolean;\r\n grabOffsetX: number;\r\n grabOffsetY: number;\r\n x?: number;\r\n y?: number;\r\n width?: number;\r\n height?: number;\r\n positionSet: boolean;\r\n}\r\n\r\n/**\r\n * Dialog React component with optional resizing and dragging functionality\r\n * @public\r\n */\r\nexport class Dialog extends React.Component<DialogProps, DialogState> {\r\n private _parentDocument = document;\r\n private _containerRef = React.createRef<HTMLDivElement>();\r\n public static defaultProps: Partial<DialogProps> = {\r\n alignment: DialogAlignment.Center,\r\n minWidth: 300,\r\n minHeight: 100,\r\n width: \"50%\",\r\n hideHeader: false,\r\n resizable: false,\r\n movable: false,\r\n modal: true,\r\n inset: true,\r\n trapFocus: false,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<DialogState>;\r\n\r\n constructor(props: DialogProps) {\r\n super(props);\r\n this.state = {\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n positionSet: props.x !== undefined || props.y !== undefined,\r\n };\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this._parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointerup\", this._handlePointerUp, true);\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n this._parentDocument.removeEventListener(\"keyup\", this._handleKeyUp, true);\r\n }\r\n\r\n public override componentDidMount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointerup\", this._handlePointerUp, true);\r\n this._parentDocument.addEventListener(\"keyup\", this._handleKeyUp, true);\r\n }\r\n\r\n public handleRefSet = (containerDiv: HTMLDivElement | null) => {\r\n if (containerDiv)\r\n this._parentDocument = containerDiv.ownerDocument;\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, title, footer, buttonCluster, onClose, onEscape, onOutsideClick, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n minWidth, minHeight, x, y, width, height, maxHeight, maxWidth,\r\n backgroundStyle, titleStyle, footerStyle, style, contentStyle, contentClassName,\r\n modal, resizable, movable, className, alignment, inset, trapFocus, modelessId, onModelessPointerDown, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n hideHeader, header, ...props } = this.props;\r\n\r\n const containerStyle: React.CSSProperties = {\r\n margin: \"\",\r\n left: x, top: y,\r\n width, height,\r\n };\r\n\r\n if (this.state.x !== undefined || this.state.y !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.x !== undefined) {\r\n containerStyle.marginLeft = \"0\";\r\n containerStyle.marginRight = \"0\";\r\n containerStyle.left = this.state.x;\r\n }\r\n // istanbul ignore else\r\n if (this.state.y !== undefined) {\r\n containerStyle.marginTop = \"0\";\r\n containerStyle.marginBottom = \"0\";\r\n containerStyle.top = this.state.y;\r\n }\r\n }\r\n\r\n if (this.state.width !== undefined || this.state.height !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.width !== undefined)\r\n containerStyle.width = this.state.width;\r\n // istanbul ignore else\r\n if (this.state.height !== undefined)\r\n containerStyle.height = this.state.height;\r\n }\r\n\r\n const minMaxStyle: React.CSSProperties = {};\r\n minMaxStyle.minWidth = (typeof minWidth === \"number\") ? `${minWidth}px` : minWidth;\r\n minMaxStyle.minHeight = (typeof minHeight === \"number\") ? `${minHeight}px` : minHeight;\r\n if (maxWidth !== undefined)\r\n minMaxStyle.maxWidth = (typeof maxWidth === \"number\") ? `${maxWidth}px` : maxWidth;\r\n if (maxHeight !== undefined)\r\n minMaxStyle.maxHeight = (typeof maxHeight === \"number\") ? `${maxHeight}px` : maxHeight;\r\n\r\n const buttons = this.getFooterButtons(this.props);\r\n\r\n const footerElement: React.ReactNode = footer || (buttons.length > 0 && <div className={\"core-dialog-buttons\"}>{buttons}</div>);\r\n\r\n const divStyle: React.CSSProperties = {\r\n ...backgroundStyle,\r\n ...style,\r\n };\r\n\r\n const headerElement = header || (\r\n <div\r\n className={classnames(\r\n \"core-dialog-head\",\r\n { \"core-dialog-movable\": movable },\r\n { \"core-dialog-modal\": modal }\r\n )}\r\n data-testid=\"core-dialog-head\"\r\n onPointerDown={this._handleStartMove}>\r\n <div className={\"core-dialog-title\"} data-testid=\"core-dialog-title\" style={titleStyle}>{title}</div>\r\n <button\r\n className={\"core-focus-trap-ignore-initial core-dialog-close icon icon-close\"}\r\n data-testid=\"core-dialog-close\"\r\n onClick={onClose}\r\n />\r\n </div>\r\n );\r\n\r\n return (\r\n <div ref={this.handleRefSet}\r\n className={classnames(\r\n \"core-dialog\",\r\n !modal && \"core-dialog-hidden\",\r\n opened && \"core-dialog-opened\",\r\n className,\r\n )}\r\n style={divStyle}\r\n data-testid=\"core-dialog-root\"\r\n {...props}\r\n >\r\n { opened &&\r\n <DivWithOutsideClick onOutsideClick={onOutsideClick}>\r\n <FocusTrap active={trapFocus && modal} returnFocusOnDeactivate={true}>\r\n <div\r\n className={classnames(\"core-dialog-container\", this.getCSSClassNameFromAlignment(alignment))}\r\n style={{ ...containerStyle, ...minMaxStyle }}\r\n data-testid=\"core-dialog-container\"\r\n onPointerDown={this._handleContainerPointerDown}\r\n >\r\n <div className={\"core-dialog-area\"} ref={this._containerRef} style={minMaxStyle}>\r\n {!hideHeader &&\r\n headerElement\r\n }\r\n <div\r\n className={classnames(\r\n \"core-dialog-content\",\r\n { \"core-dialog-content-no-inset\": !inset },\r\n contentClassName)}\r\n style={contentStyle}>\r\n {this.props.children}\r\n </div>\r\n {footerElement &&\r\n <div className={\"core-dialog-footer\"} style={footerStyle}>\r\n {footerElement}\r\n </div>\r\n }\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-right\"\r\n onPointerDown={this._handleStartResizeRight}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-mid\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom\"\r\n onPointerDown={this._handleStartResizeDown}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom-right\"\r\n onPointerDown={this._handleStartResizeDownRight}\r\n />\r\n </div>\r\n </div>\r\n </FocusTrap>\r\n </DivWithOutsideClick>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private getCSSClassNameFromAlignment(alignment?: DialogAlignment): string {\r\n let className = \"\";\r\n\r\n // Drop the alignment CSS class if the Dialog has been sized or moved.\r\n if (this.state.positionSet)\r\n return \"\";\r\n\r\n // istanbul ignore next\r\n if (!alignment)\r\n alignment = DialogAlignment.Center;\r\n\r\n switch (alignment) {\r\n case DialogAlignment.TopLeft:\r\n className = \"core-dialog-top-left\";\r\n break;\r\n case DialogAlignment.Top:\r\n className = \"core-dialog-top\";\r\n break;\r\n case DialogAlignment.TopRight:\r\n className = \"core-dialog-top-right\";\r\n break;\r\n case DialogAlignment.Left:\r\n className = \"core-dialog-left\";\r\n break;\r\n case DialogAlignment.Center:\r\n className = \"core-dialog-center\";\r\n break;\r\n case DialogAlignment.Right:\r\n className = \"core-dialog-right\";\r\n break;\r\n case DialogAlignment.BottomLeft:\r\n className = \"core-dialog-bottom-left\";\r\n break;\r\n case DialogAlignment.Bottom:\r\n className = \"core-dialog-bottom\";\r\n break;\r\n case DialogAlignment.BottomRight:\r\n className = \"core-dialog-bottom-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n }\r\n\r\n private getFooterButtons(props: DialogProps) {\r\n const buttons: React.ReactNode[] = [];\r\n if (props.buttonCluster) {\r\n props.buttonCluster.forEach((button: DialogButtonDef, index: number) => {\r\n let buttonText = \"\";\r\n let buttonClass = classnames(\"core-dialog-button\", `dialog-button-${button.type}`, button.className);\r\n\r\n switch (button.type) {\r\n case DialogButtonType.OK:\r\n buttonText = UiCore.translate(\"dialog.ok\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Retry:\r\n buttonText = UiCore.translate(\"dialog.retry\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Yes:\r\n buttonText = UiCore.translate(\"dialog.yes\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.No:\r\n buttonText = UiCore.translate(\"dialog.no\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Cancel:\r\n buttonText = UiCore.translate(\"dialog.cancel\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Close:\r\n buttonText = UiCore.translate(\"dialog.close\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Next:\r\n buttonText = UiCore.translate(\"dialog.next\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Previous:\r\n buttonText = UiCore.translate(\"dialog.previous\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n }\r\n\r\n if (button.label)\r\n buttonText = button.label;\r\n\r\n buttons.push(<Button className={buttonClass} disabled={button.disabled} key={index.toString()} onClick={button.onClick}>{buttonText}</Button>);\r\n });\r\n }\r\n return buttons;\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.opened && this.props.onEscape) {\r\n this.props.onEscape();\r\n }\r\n };\r\n\r\n private _handleContainerPointerDown = (event: React.PointerEvent): void => {\r\n if (!this.props.modal) {\r\n if (this.props.onModelessPointerDown && this.props.modelessId)\r\n this.props.onModelessPointerDown(event, this.props.modelessId);\r\n }\r\n };\r\n\r\n private _handleStartResizeRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDown = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDownRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true, rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartMove = (event: React.PointerEvent): void => {\r\n if (!this.props.movable)\r\n return;\r\n\r\n event.preventDefault();\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n const grabOffsetX = event.clientX - rect.left;\r\n const grabOffsetY = event.clientY - rect.top;\r\n this.setState({\r\n grabOffsetX,\r\n grabOffsetY,\r\n moving: true,\r\n });\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n }\r\n };\r\n\r\n private _handlePointerMove = (event: PointerEvent): void => {\r\n if ((!this.props.resizable && !this.props.movable) || !this._containerRef.current)\r\n return;\r\n\r\n const { minWidth, maxWidth, minHeight, maxHeight, movable } = this.props;\r\n let { x, y, width, height } = this.state;\r\n\r\n // istanbul ignore else\r\n if (x === undefined) { // if x is undefined, so is y, width, and height\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n width = rect.width, height = rect.height, x = rect.left, y = rect.top;\r\n }\r\n\r\n if (this.props.resizable) {\r\n if (this.state.rightResizing) {\r\n const pointerX = event.clientX;\r\n width = pointerX - x;\r\n // istanbul ignore else\r\n if (typeof minWidth === \"number\")\r\n width = Math.max(width, minWidth);\r\n if (maxWidth !== undefined && typeof maxWidth === \"number\")\r\n width = Math.min(width, maxWidth);\r\n }\r\n\r\n if (this.state.downResizing) {\r\n const pointerY = event.clientY;\r\n height = pointerY - y!;\r\n // istanbul ignore else\r\n if (typeof minHeight === \"number\")\r\n height = Math.max(height, minHeight);\r\n if (maxHeight !== undefined && typeof maxHeight === \"number\")\r\n height = Math.min(height, maxHeight);\r\n }\r\n\r\n this.setState({ width, height });\r\n }\r\n\r\n if (movable && this.state.moving) {\r\n x = event.clientX - this.state.grabOffsetX;\r\n y = event.clientY - this.state.grabOffsetY;\r\n this.setState({ x, y, positionSet: true });\r\n }\r\n };\r\n\r\n private _handlePointerUp = (_event: PointerEvent): void => {\r\n if (!this.props.movable && !this.props.resizable)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n this.setState({\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n });\r\n }\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/Dialog.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmB,gBAAgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,uCAAoB,CAAA;IAAE,8BAAW,CAAA;IAAE,yCAAsB,CAAA;IACzD,gCAAa,CAAA;IAAE,oCAAiB,CAAA;IAAE,kCAAe,CAAA;IACjD,6CAA0B,CAAA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C;wBAC9C,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;wBAC1D,MAAM;oBACR,KAAK,gBAAgB,CAAC,IAAI;wBACxB,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;wBAC7C,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC;wBACvE,MAAM;oBACR,KAAK,gBAAgB,CAAC,QAAQ;wBAC5B,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;wBACjD,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC;wBACvE,MAAM;iBACT;gBAED,IAAI,MAAM,CAAC,KAAK;oBACd,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;gBAE5B,OAAO,CAAC,IAAI,CAAC,oBAAC,MAAM,IAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,IAAG,UAAU,CAAU,CAAC,CAAC;YACjJ,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AA/Sa,mBAAY,GAAyB;IACjD,SAAS,EAAE,eAAe,CAAC,MAAM;IACjC,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;CACjB,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 Dialog\r\n */\r\n\r\nimport \"./Dialog.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, DialogButtonType, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cspell:ignore focustrap\r\n\r\n/** Enum for dialog alignment\r\n * @public\r\n */\r\nexport enum DialogAlignment {\r\n TopLeft = \"top-left\", Top = \"top\", TopRight = \"top-right\",\r\n Left = \"left\", Center = \"center\", Right = \"right\",\r\n BottomLeft = \"bottom-left\", Bottom = \"bottom\", BottomRight = \"bottom-right\",\r\n}\r\n\r\n/** Properties for the [[Dialog]] component\r\n * @public\r\n */\r\nexport interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"title\">, CommonProps {\r\n /** Indicates whether to show dialog or not */\r\n opened: boolean;\r\n\r\n /** Indicates whether the user can resize dialog with cursor. Default: false */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor. Default: false */\r\n movable?: boolean;\r\n /** Indicates whether the content should be inset. Default: true */\r\n inset?: boolean;\r\n /** Indicates whether the focus should be trapped within the dialog. Default: false */\r\n trapFocus?: boolean;\r\n\r\n /** Whether the hide the header. Default: false */\r\n hideHeader?: boolean;\r\n /** Override for the header */\r\n header?: React.ReactNode;\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\r\n /** Footer to show at bottom of dialog. Note: will override buttonCluster */\r\n footer?: string | JSX.Element;\r\n /** List of DialogButtonDef objects specifying buttons and associated onClick events */\r\n buttonCluster?: DialogButtonDef[];\r\n\r\n /** Default alignment of dialog. Default: DialogAlignment.Center */\r\n alignment?: DialogAlignment;\r\n /** Initial x/left position of dialog in px. */\r\n x?: number;\r\n /** Initial y/top position of dialog in px. */\r\n y?: number;\r\n\r\n /** onClick event for X button for dialog */\r\n onClose?: () => void;\r\n /** 'keyup' event for Esc key */\r\n onEscape?: () => void;\r\n /** Triggered when a click is triggered outside of this dialog. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: \"50%\" */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 300px */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n\r\n /** Whether to show background overlay. Default: true.\r\n * @note Modeless dialogs require an id and an implementation of onModelessPointerDown.\r\n */\r\n modal?: boolean;\r\n /** An id for a modeless dialog */\r\n modelessId?: string;\r\n /** Pointer Down event handler when modeless (modal = false) */\r\n onModelessPointerDown?: (event: React.PointerEvent, id: string) => void;\r\n\r\n /** Custom CSS Style for overlay */\r\n backgroundStyle?: React.CSSProperties;\r\n /** Custom CSS Style for title */\r\n titleStyle?: React.CSSProperties;\r\n /** Custom CSS Style for footer */\r\n footerStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the content */\r\n contentClassName?: string;\r\n /** Custom CSS Style for the content */\r\n contentStyle?: React.CSSProperties;\r\n}\r\n\r\n/** @internal */\r\ninterface DialogState {\r\n rightResizing: boolean;\r\n downResizing: boolean;\r\n moving: boolean;\r\n grabOffsetX: number;\r\n grabOffsetY: number;\r\n x?: number;\r\n y?: number;\r\n width?: number;\r\n height?: number;\r\n positionSet: boolean;\r\n}\r\n\r\n/**\r\n * Dialog React component with optional resizing and dragging functionality\r\n * @public\r\n */\r\nexport class Dialog extends React.Component<DialogProps, DialogState> {\r\n private _parentDocument = document;\r\n private _containerRef = React.createRef<HTMLDivElement>();\r\n public static defaultProps: Partial<DialogProps> = {\r\n alignment: DialogAlignment.Center,\r\n minWidth: 300,\r\n minHeight: 100,\r\n width: \"50%\",\r\n hideHeader: false,\r\n resizable: false,\r\n movable: false,\r\n modal: true,\r\n inset: true,\r\n trapFocus: false,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<DialogState>;\r\n\r\n constructor(props: DialogProps) {\r\n super(props);\r\n this.state = {\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n positionSet: props.x !== undefined || props.y !== undefined,\r\n };\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this._parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointerup\", this._handlePointerUp, true);\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n this._parentDocument.removeEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n /** Keep title bar of movable Dialog at least partially visible */\r\n // istanbul ignore next\r\n private _handleAppWindowResize = (): void => {\r\n if (!this._containerRef.current || !this.props.movable)\r\n return;\r\n\r\n const parentWindow = this.getParentWindow();\r\n const { x, y } = this.state;\r\n let newX: number | undefined;\r\n let newY: number | undefined;\r\n\r\n if (undefined !== y && undefined !== x) {\r\n if (y > parentWindow.innerHeight - 32)\r\n newY = parentWindow.innerHeight - 32;\r\n if (x > parentWindow.innerWidth - 32)\r\n newX = parentWindow.innerWidth - 32;\r\n }\r\n\r\n if (newX !== undefined || newY !== undefined)\r\n this.setState({ x: newX !== undefined ? newX : x, y: newY !== undefined ? newY : y, positionSet: true });\r\n };\r\n\r\n public override componentDidMount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointerup\", this._handlePointerUp, true);\r\n this._parentDocument.addEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n public handleRefSet = (containerDiv: HTMLDivElement | null) => {\r\n if (containerDiv)\r\n this._parentDocument = containerDiv.ownerDocument;\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, title, footer, buttonCluster, onClose, onEscape, onOutsideClick, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n minWidth, minHeight, x, y, width, height, maxHeight, maxWidth,\r\n backgroundStyle, titleStyle, footerStyle, style, contentStyle, contentClassName,\r\n modal, resizable, movable, className, alignment, inset, trapFocus, modelessId, onModelessPointerDown, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n hideHeader, header, ...props } = this.props;\r\n\r\n const containerStyle: React.CSSProperties = {\r\n margin: \"\",\r\n left: x, top: y,\r\n width, height,\r\n };\r\n\r\n if (this.state.x !== undefined || this.state.y !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.x !== undefined) {\r\n containerStyle.marginLeft = \"0\";\r\n containerStyle.marginRight = \"0\";\r\n containerStyle.left = this.state.x;\r\n }\r\n // istanbul ignore else\r\n if (this.state.y !== undefined) {\r\n containerStyle.marginTop = \"0\";\r\n containerStyle.marginBottom = \"0\";\r\n containerStyle.top = this.state.y;\r\n }\r\n }\r\n\r\n if (this.state.width !== undefined || this.state.height !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.width !== undefined)\r\n containerStyle.width = this.state.width;\r\n // istanbul ignore else\r\n if (this.state.height !== undefined)\r\n containerStyle.height = this.state.height;\r\n }\r\n\r\n const minMaxStyle: React.CSSProperties = {};\r\n minMaxStyle.minWidth = (typeof minWidth === \"number\") ? `${minWidth}px` : minWidth;\r\n minMaxStyle.minHeight = (typeof minHeight === \"number\") ? `${minHeight}px` : minHeight;\r\n if (maxWidth !== undefined)\r\n minMaxStyle.maxWidth = (typeof maxWidth === \"number\") ? `${maxWidth}px` : maxWidth;\r\n if (maxHeight !== undefined)\r\n minMaxStyle.maxHeight = (typeof maxHeight === \"number\") ? `${maxHeight}px` : maxHeight;\r\n\r\n const buttons = this.getFooterButtons(this.props);\r\n\r\n const footerElement: React.ReactNode = footer || (buttons.length > 0 && <div className={\"core-dialog-buttons\"}>{buttons}</div>);\r\n\r\n const divStyle: React.CSSProperties = {\r\n ...backgroundStyle,\r\n ...style,\r\n };\r\n\r\n const headerElement = header || (\r\n <div\r\n className={classnames(\r\n \"core-dialog-head\",\r\n { \"core-dialog-movable\": movable },\r\n { \"core-dialog-modal\": modal }\r\n )}\r\n data-testid=\"core-dialog-head\"\r\n onPointerDown={this._handleStartMove}>\r\n <div className={\"core-dialog-title\"} data-testid=\"core-dialog-title\" style={titleStyle}>{title}</div>\r\n <button\r\n className={\"core-focus-trap-ignore-initial core-dialog-close icon icon-close\"}\r\n data-testid=\"core-dialog-close\"\r\n onClick={onClose}\r\n />\r\n </div>\r\n );\r\n\r\n return (\r\n <div ref={this.handleRefSet}\r\n className={classnames(\r\n \"core-dialog\",\r\n !modal && \"core-dialog-hidden\",\r\n opened && \"core-dialog-opened\",\r\n className,\r\n )}\r\n style={divStyle}\r\n data-testid=\"core-dialog-root\"\r\n {...props}\r\n >\r\n {opened &&\r\n <DivWithOutsideClick onOutsideClick={onOutsideClick}>\r\n <FocusTrap active={trapFocus && modal} returnFocusOnDeactivate={true}>\r\n <div\r\n className={classnames(\"core-dialog-container\", this.getCSSClassNameFromAlignment(alignment))}\r\n style={{ ...containerStyle, ...minMaxStyle }}\r\n data-testid=\"core-dialog-container\"\r\n onPointerDown={this._handleContainerPointerDown}\r\n >\r\n <div className={\"core-dialog-area\"} ref={this._containerRef} style={minMaxStyle}>\r\n {!hideHeader &&\r\n headerElement\r\n }\r\n <div\r\n className={classnames(\r\n \"core-dialog-content\",\r\n { \"core-dialog-content-no-inset\": !inset },\r\n contentClassName)}\r\n style={contentStyle}>\r\n {this.props.children}\r\n </div>\r\n {footerElement &&\r\n <div className={\"core-dialog-footer\"} style={footerStyle}>\r\n {footerElement}\r\n </div>\r\n }\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-right\"\r\n onPointerDown={this._handleStartResizeRight}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-mid\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom\"\r\n onPointerDown={this._handleStartResizeDown}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom-right\"\r\n onPointerDown={this._handleStartResizeDownRight}\r\n />\r\n </div>\r\n </div>\r\n </FocusTrap>\r\n </DivWithOutsideClick>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private getCSSClassNameFromAlignment(alignment?: DialogAlignment): string {\r\n let className = \"\";\r\n\r\n // Drop the alignment CSS class if the Dialog has been sized or moved.\r\n if (this.state.positionSet)\r\n return \"\";\r\n\r\n // istanbul ignore next\r\n if (!alignment)\r\n alignment = DialogAlignment.Center;\r\n\r\n switch (alignment) {\r\n case DialogAlignment.TopLeft:\r\n className = \"core-dialog-top-left\";\r\n break;\r\n case DialogAlignment.Top:\r\n className = \"core-dialog-top\";\r\n break;\r\n case DialogAlignment.TopRight:\r\n className = \"core-dialog-top-right\";\r\n break;\r\n case DialogAlignment.Left:\r\n className = \"core-dialog-left\";\r\n break;\r\n case DialogAlignment.Center:\r\n className = \"core-dialog-center\";\r\n break;\r\n case DialogAlignment.Right:\r\n className = \"core-dialog-right\";\r\n break;\r\n case DialogAlignment.BottomLeft:\r\n className = \"core-dialog-bottom-left\";\r\n break;\r\n case DialogAlignment.Bottom:\r\n className = \"core-dialog-bottom\";\r\n break;\r\n case DialogAlignment.BottomRight:\r\n className = \"core-dialog-bottom-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n }\r\n\r\n private getFooterButtons(props: DialogProps) {\r\n const buttons: React.ReactNode[] = [];\r\n if (props.buttonCluster) {\r\n props.buttonCluster.forEach((button: DialogButtonDef, index: number) => {\r\n let buttonText = \"\";\r\n let buttonClass = classnames(\"core-dialog-button\", `dialog-button-${button.type}`, button.className);\r\n\r\n switch (button.type) {\r\n case DialogButtonType.OK:\r\n buttonText = UiCore.translate(\"dialog.ok\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Retry:\r\n buttonText = UiCore.translate(\"dialog.retry\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Yes:\r\n buttonText = UiCore.translate(\"dialog.yes\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.No:\r\n buttonText = UiCore.translate(\"dialog.no\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Cancel:\r\n buttonText = UiCore.translate(\"dialog.cancel\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Close:\r\n buttonText = UiCore.translate(\"dialog.close\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Next:\r\n buttonText = UiCore.translate(\"dialog.next\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n case DialogButtonType.Previous:\r\n buttonText = UiCore.translate(\"dialog.previous\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle || \"iui-cta\");\r\n break;\r\n }\r\n\r\n if (button.label)\r\n buttonText = button.label;\r\n\r\n buttons.push(<Button className={buttonClass} disabled={button.disabled} key={index.toString()} onClick={button.onClick}>{buttonText}</Button>);\r\n });\r\n }\r\n return buttons;\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.opened && this.props.onEscape) {\r\n this.props.onEscape();\r\n }\r\n };\r\n\r\n private _handleContainerPointerDown = (event: React.PointerEvent): void => {\r\n if (!this.props.modal) {\r\n if (this.props.onModelessPointerDown && this.props.modelessId)\r\n this.props.onModelessPointerDown(event, this.props.modelessId);\r\n }\r\n };\r\n\r\n private _handleStartResizeRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDown = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDownRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true, rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartMove = (event: React.PointerEvent): void => {\r\n if (!this.props.movable)\r\n return;\r\n\r\n event.preventDefault();\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n const grabOffsetX = event.clientX - rect.left;\r\n const grabOffsetY = event.clientY - rect.top;\r\n this.setState({\r\n grabOffsetX,\r\n grabOffsetY,\r\n moving: true,\r\n });\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n }\r\n };\r\n\r\n private _handlePointerMove = (event: PointerEvent): void => {\r\n if ((!this.props.resizable && !this.props.movable) || !this._containerRef.current)\r\n return;\r\n\r\n const { minWidth, maxWidth, minHeight, maxHeight, movable } = this.props;\r\n let { x, y, width, height } = this.state;\r\n\r\n // istanbul ignore else\r\n if (x === undefined) { // if x is undefined, so is y, width, and height\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n width = rect.width, height = rect.height, x = rect.left, y = rect.top;\r\n }\r\n\r\n if (this.props.resizable) {\r\n if (this.state.rightResizing) {\r\n const pointerX = event.clientX;\r\n width = pointerX - x;\r\n // istanbul ignore else\r\n if (typeof minWidth === \"number\")\r\n width = Math.max(width, minWidth);\r\n if (maxWidth !== undefined && typeof maxWidth === \"number\")\r\n width = Math.min(width, maxWidth);\r\n }\r\n\r\n if (this.state.downResizing) {\r\n const pointerY = event.clientY;\r\n height = pointerY - y!;\r\n // istanbul ignore else\r\n if (typeof minHeight === \"number\")\r\n height = Math.max(height, minHeight);\r\n if (maxHeight !== undefined && typeof maxHeight === \"number\")\r\n height = Math.min(height, maxHeight);\r\n }\r\n\r\n this.setState({ width, height });\r\n }\r\n\r\n // istanbul ignore next\r\n if (movable && this.state.moving) {\r\n x = event.clientX - this.state.grabOffsetX;\r\n y = event.clientY - this.state.grabOffsetY;\r\n if (y < 0)\r\n y = 0;\r\n if (event.view) {\r\n if (y > event.view.innerHeight - 32)\r\n y = event.view.innerHeight - 32;\r\n if (x > event.view.innerWidth - 32)\r\n x = event.view.innerWidth - 32;\r\n if (width) {\r\n if (x < (0 - width + 32))\r\n x = 0 - width + 32;\r\n }\r\n }\r\n\r\n this.setState({ x, y, positionSet: true });\r\n }\r\n };\r\n\r\n private _handlePointerUp = (_event: PointerEvent): void => {\r\n if (!this.props.movable && !this.props.resizable)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n this.setState({\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n });\r\n }\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /** Enum for button types. Determines button label, and default button style.
5
5
  * @public
6
- * @deprecated Use DialogButtonType in bentley/appui-abstract instead
6
+ * @deprecated Use [DialogButtonType]($appui-abstract) instead
7
7
  */
8
8
  export declare enum DialogButtonType {
9
9
  None = "",
@@ -18,7 +18,7 @@ export declare enum DialogButtonType {
18
18
  }
19
19
  /** Enum for button style.
20
20
  * @public
21
- * @deprecated Use DialogButtonStyle in bentley/appui-abstract instead
21
+ * @deprecated Use [DialogButtonStyle]($appui-abstract) instead
22
22
  */
23
23
  export declare enum DialogButtonStyle {
24
24
  None = "",
@@ -28,7 +28,7 @@ export declare enum DialogButtonStyle {
28
28
  }
29
29
  /** Interface for a dialog button in a button cluster
30
30
  * @public
31
- * @deprecated Use DialogButtonDef in bentley/appui-abstract instead
31
+ * @deprecated Use [DialogButtonDef]($appui-abstract) instead
32
32
  */
33
33
  export interface DialogButtonDef {
34
34
  /** type of button */
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /** Enum for button types. Determines button label, and default button style.
9
9
  * @public
10
- * @deprecated Use DialogButtonType in bentley/appui-abstract instead
10
+ * @deprecated Use [DialogButtonType]($appui-abstract) instead
11
11
  */
12
12
  export var DialogButtonType;
13
13
  (function (DialogButtonType) {
@@ -23,7 +23,7 @@ export var DialogButtonType;
23
23
  })(DialogButtonType || (DialogButtonType = {}));
24
24
  /** Enum for button style.
25
25
  * @public
26
- * @deprecated Use DialogButtonStyle in bentley/appui-abstract instead
26
+ * @deprecated Use [DialogButtonStyle]($appui-abstract) instead
27
27
  */
28
28
  export var DialogButtonStyle;
29
29
  (function (DialogButtonStyle) {
@@ -1 +1 @@
1
- {"version":3,"file":"DialogButtonDef.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/DialogButtonDef.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAED;;;IAGI;AACJ,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\n/** Enum for button types. Determines button label, and default button style.\r\n * @public\r\n * @deprecated Use DialogButtonType in bentley/appui-abstract instead\r\n */\r\nexport enum DialogButtonType {\r\n None = \"\",\r\n Close = \"close\",\r\n OK = \"ok\",\r\n Cancel = \"cancel\",\r\n Yes = \"yes\",\r\n No = \"no\",\r\n Retry = \"retry\",\r\n Next = \"next\",\r\n Previous = \"previous\"\r\n}\r\n\r\n/** Enum for button style.\r\n * @public\r\n * @deprecated Use DialogButtonStyle in bentley/appui-abstract instead\r\n */\r\nexport enum DialogButtonStyle {\r\n None = \"\",\r\n Primary = \"iui-cta\",\r\n Hollow = \"iui-default\",\r\n Blue = \"iui-high-visibility\",\r\n}\r\n\r\n/** Interface for a dialog button in a button cluster\r\n * @public\r\n * @deprecated Use DialogButtonDef in bentley/appui-abstract instead\r\n */\r\nexport interface DialogButtonDef {\r\n /** type of button */\r\n type: DialogButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Triggered on button click */\r\n onClick: () => void;\r\n /** Which button style to decorate button width */\r\n buttonStyle?: DialogButtonStyle; // eslint-disable-line deprecation/deprecation\r\n /** Disable the button */\r\n disabled?: boolean;\r\n /** Custom label */\r\n label?: string;\r\n /** Custom CSS class */\r\n className?: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"DialogButtonDef.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/DialogButtonDef.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;IAGI;AACJ,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAED;;;IAGI;AACJ,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\n/** Enum for button types. Determines button label, and default button style.\r\n * @public\r\n * @deprecated Use [DialogButtonType]($appui-abstract) instead\r\n */\r\nexport enum DialogButtonType {\r\n None = \"\",\r\n Close = \"close\",\r\n OK = \"ok\",\r\n Cancel = \"cancel\",\r\n Yes = \"yes\",\r\n No = \"no\",\r\n Retry = \"retry\",\r\n Next = \"next\",\r\n Previous = \"previous\"\r\n}\r\n\r\n/** Enum for button style.\r\n * @public\r\n * @deprecated Use [DialogButtonStyle]($appui-abstract) instead\r\n */\r\nexport enum DialogButtonStyle {\r\n None = \"\",\r\n Primary = \"iui-cta\",\r\n Hollow = \"iui-default\",\r\n Blue = \"iui-high-visibility\",\r\n}\r\n\r\n/** Interface for a dialog button in a button cluster\r\n * @public\r\n * @deprecated Use [DialogButtonDef]($appui-abstract) instead\r\n */\r\nexport interface DialogButtonDef {\r\n /** type of button */\r\n type: DialogButtonType; // eslint-disable-line deprecation/deprecation\r\n /** Triggered on button click */\r\n onClick: () => void;\r\n /** Which button style to decorate button width */\r\n buttonStyle?: DialogButtonStyle; // eslint-disable-line deprecation/deprecation\r\n /** Disable the button */\r\n disabled?: boolean;\r\n /** Custom label */\r\n label?: string;\r\n /** Custom CSS class */\r\n className?: string;\r\n}\r\n"]}
@@ -3,10 +3,7 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  @import "./list.scss";
6
- @import "~@itwin/core-react/lib/cjs/core-react/style/itwinui-overrides";
7
6
 
8
7
  .uicore-expandable-blocks-list {
9
8
  @include uicore-expandable-blocks-list;
10
-
11
- @include small-itwinui-expandable-block;
12
9
  }
@@ -4,13 +4,13 @@
4
4
  import * as React from "react";
5
5
  import { FieldDef } from "./Form";
6
6
  /** Properties used to create a [[Field]] in a [[Form]]
7
- * @public
7
+ * @public @deprecated
8
8
  */
9
9
  export interface FieldProps extends FieldDef {
10
10
  id: string;
11
11
  }
12
12
  /** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.
13
- * @public
13
+ * @public @deprecated
14
14
  */
15
15
  export declare class Field extends React.Component<FieldProps> {
16
16
  constructor(props: FieldProps);
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../src/core-react/form/Field.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAiC,MAAM,QAAQ,CAAC;AAIjE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,QAAQ;IAE1C,EAAE,EAAE,MAAM,CAAC;CACZ;AAID;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;gBACxC,KAAK,EAAE,UAAU;IAI7B,OAAO,CAAC,sBAAsB,CAc5B;IAEc,MAAM;CAgDvB"}
1
+ {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../src/core-react/form/Field.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAiC,MAAM,QAAQ,CAAC;AAIjE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,QAAQ;IAE1C,EAAE,EAAE,MAAM,CAAC;CACZ;AAID;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;gBACxC,KAAK,EAAE,UAAU;IAI7B,OAAO,CAAC,sBAAsB,CAc5B;IAEc,MAAM;CAkDvB"}
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
+ /* eslint-disable deprecation/deprecation */
5
6
  /** @packageDocumentation
6
7
  * @module Form
7
8
  */
@@ -9,7 +10,7 @@ import * as React from "react";
9
10
  import { Checkbox, Input, Select, Textarea } from "@itwin/itwinui-react";
10
11
  import { FormContext } from "./Form";
11
12
  /** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.
12
- * @public
13
+ * @public @deprecated
13
14
  */
14
15
  export class Field extends React.Component {
15
16
  constructor(props) {
@@ -29,12 +30,12 @@ export class Field extends React.Component {
29
30
  const selectOptions = this._generateSelectOptions(this.props.options);
30
31
  return (React.createElement(FormContext.Consumer, null, (context) => (React.createElement("div", { className: "core-form-group" },
31
32
  this.props.editor.toLowerCase() !== "checkbox" && this.props.label && React.createElement("label", { className: "core-form-label", htmlFor: this.props.id }, this.props.label),
32
- this.props.editor.toLowerCase() === "textbox" && (React.createElement(Input, { id: this.props.id, value: context.values[this.props.id], onChange: (event) => context.setValues({ [this.props.id]: event.currentTarget.value }), className: "core-form-input" })),
33
+ this.props.editor.toLowerCase() === "textbox" && (React.createElement(Input, { id: this.props.id, value: context.values[this.props.id], onChange: (event) => context.setValues({ [this.props.id]: event.currentTarget.value }), className: "core-form-input", size: "small" })),
33
34
  this.props.editor.toLowerCase() === "checkbox" && (React.createElement(Checkbox, { label: this.props.label, id: this.props.id, checked: context.values[this.props.id], onChange: () => context.setValues({ [this.props.id]: !context.values[this.props.id] }) })),
34
35
  this.props.editor.toLowerCase() === "multilinetextbox" && (React.createElement(Textarea, { id: this.props.id, value: context.values[this.props.id], onChange: (event) => context.setValues({ [this.props.id]: event.currentTarget.value }), className: "core-form-textarea" })),
35
36
  this.props.editor.toLowerCase() === "dropdown" && this.props.options && (React.createElement(Select, { id: this.props.id,
36
37
  // name={this.props.id}
37
- value: context.values[this.props.id], onChange: (newValue) => context.setValues({ [this.props.id]: newValue }), options: selectOptions, className: "core-form-select" }))))));
38
+ value: context.values[this.props.id], onChange: (newValue) => context.setValues({ [this.props.id]: newValue }), options: selectOptions, className: "core-form-select", size: "small" }))))));
38
39
  }
39
40
  }
40
41
  //# sourceMappingURL=Field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../src/core-react/form/Field.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAgB,QAAQ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EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,EAC/H,SAAS,EAAC,oBAAoB,GAC9B,CACH;YACA,IAAI,CAAC,KAAK,CAAC,MAAO,CAAC,WAAW,EAAE,KAAK,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CACxE,oBAAC,MAAM,IACL,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;gBACjB,uBAAuB;gBACvB,KAAK,EAAE,OAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EACrC,QAAQ,EAAE,CAAC,QAAa,EAAE,EAAE,CAAC,OAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAC9E,OAAO,EAAE,aAAa,EACtB,SAAS,EAAC,kBAAkB,GAC5B,CACH,CACG,CACP,CACoB,CACxB,CAAC;IACJ,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 Form\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Checkbox, Input, Select, SelectOption, Textarea } from \"@itwin/itwinui-react\";\r\nimport { FieldDef, FormContext, FormContextState } from \"./Form\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** Properties used to create a [[Field]] in a [[Form]]\r\n * @public\r\n */\r\nexport interface FieldProps extends FieldDef {\r\n /* The unique field name */\r\n id: string;\r\n}\r\n\r\ntype FieldDefOptions = FieldDef[\"options\"];\r\n\r\n/** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.\r\n * @public\r\n */\r\nexport class Field extends React.Component<FieldProps> {\r\n constructor(props: FieldProps) {\r\n super(props);\r\n }\r\n\r\n private _generateSelectOptions = (propOptions: FieldDefOptions): SelectOption<string>[] => {\r\n let selectOptions: SelectOption<string>[] = [];\r\n\r\n if (propOptions instanceof Array) {\r\n selectOptions = propOptions.map((option: string) => (\r\n { value: option, label: option }\r\n ));\r\n } else if (propOptions !== undefined) {\r\n selectOptions = Object.keys(propOptions).map((key) => (\r\n { value: key, label: propOptions[key] }\r\n ));\r\n }\r\n\r\n return selectOptions;\r\n };\r\n\r\n public override render() {\r\n const selectOptions = this._generateSelectOptions(this.props.options);\r\n\r\n return (\r\n <FormContext.Consumer>\r\n {(context: FormContextState | undefined) => (\r\n <div className=\"core-form-group\">\r\n {this.props.editor!.toLowerCase() !== \"checkbox\" && this.props.label && <label className=\"core-form-label\" htmlFor={this.props.id}>{this.props.label}</label>}\r\n\r\n {this.props.editor!.toLowerCase() === \"textbox\" && (\r\n <Input\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-input\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"checkbox\" && (\r\n <Checkbox\r\n label={this.props.label}\r\n id={this.props.id}\r\n checked={context!.values[this.props.id]}\r\n onChange={() => context!.setValues({ [this.props.id]: !context!.values[this.props.id] })}\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"multilinetextbox\" && (\r\n <Textarea\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-textarea\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"dropdown\" && this.props.options && (\r\n <Select\r\n id={this.props.id}\r\n // name={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(newValue: any) => context!.setValues({ [this.props.id]: newValue })}\r\n options={selectOptions}\r\n className=\"core-form-select\"\r\n />\r\n )}\r\n </div>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MAAO,CAAC,WAAW,EAAE,KAAK,kBAAkB,IAAI,CAC1D,oBAAC,QAAQ,IACP,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EACjB,KAAK,EAAE,OAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EACrC,QAAQ,EAAE,CAAC,KAA6C,EAAE,EAAE,CAAC,OAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,EAC/H,SAAS,EAAC,oBAAoB,GAC9B,CACH;YACA,IAAI,CAAC,KAAK,CAAC,MAAO,CAAC,WAAW,EAAE,KAAK,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CACxE,oBAAC,MAAM,IACL,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;gBACjB,uBAAuB;gBACvB,KAAK,EAAE,OAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EACrC,QAAQ,EAAE,CAAC,QAAa,EAAE,EAAE,CAAC,OAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAC9E,OAAO,EAAE,aAAa,EACtB,SAAS,EAAC,kBAAkB,EAC5B,IAAI,EAAC,OAAO,GACZ,CACH,CACG,CACP,CACoB,CACxB,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Form\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Checkbox, Input, Select, SelectOption, Textarea } from \"@itwin/itwinui-react\";\r\nimport { FieldDef, FormContext, FormContextState } from \"./Form\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** Properties used to create a [[Field]] in a [[Form]]\r\n * @public @deprecated\r\n */\r\nexport interface FieldProps extends FieldDef {\r\n /* The unique field name */\r\n id: string;\r\n}\r\n\r\ntype FieldDefOptions = FieldDef[\"options\"];\r\n\r\n/** Component that represents a single field in an input form. Only four type of editors are supported. Field gets/sets state data from/to the context control by the form.\r\n * @public @deprecated\r\n */\r\nexport class Field extends React.Component<FieldProps> {\r\n constructor(props: FieldProps) {\r\n super(props);\r\n }\r\n\r\n private _generateSelectOptions = (propOptions: FieldDefOptions): SelectOption<string>[] => {\r\n let selectOptions: SelectOption<string>[] = [];\r\n\r\n if (propOptions instanceof Array) {\r\n selectOptions = propOptions.map((option: string) => (\r\n { value: option, label: option }\r\n ));\r\n } else if (propOptions !== undefined) {\r\n selectOptions = Object.keys(propOptions).map((key) => (\r\n { value: key, label: propOptions[key] }\r\n ));\r\n }\r\n\r\n return selectOptions;\r\n };\r\n\r\n public override render() {\r\n const selectOptions = this._generateSelectOptions(this.props.options);\r\n\r\n return (\r\n <FormContext.Consumer>\r\n {(context: FormContextState | undefined) => (\r\n <div className=\"core-form-group\">\r\n {this.props.editor!.toLowerCase() !== \"checkbox\" && this.props.label && <label className=\"core-form-label\" htmlFor={this.props.id}>{this.props.label}</label>}\r\n\r\n {this.props.editor!.toLowerCase() === \"textbox\" && (\r\n <Input\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-input\"\r\n size=\"small\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"checkbox\" && (\r\n <Checkbox\r\n label={this.props.label}\r\n id={this.props.id}\r\n checked={context!.values[this.props.id]}\r\n onChange={() => context!.setValues({ [this.props.id]: !context!.values[this.props.id] })}\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"multilinetextbox\" && (\r\n <Textarea\r\n id={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) => context!.setValues({ [this.props.id]: event.currentTarget.value })}\r\n className=\"core-form-textarea\"\r\n />\r\n )}\r\n {this.props.editor!.toLowerCase() === \"dropdown\" && this.props.options && (\r\n <Select\r\n id={this.props.id}\r\n // name={this.props.id}\r\n value={context!.values[this.props.id]}\r\n onChange={(newValue: any) => context!.setValues({ [this.props.id]: newValue })}\r\n options={selectOptions}\r\n className=\"core-form-select\"\r\n size=\"small\"\r\n />\r\n )}\r\n </div>\r\n )}\r\n </FormContext.Consumer>\r\n );\r\n }\r\n}\r\n"]}
@@ -4,11 +4,11 @@
4
4
  import "./Form.scss";
5
5
  import * as React from "react";
6
6
  /** The available editors for the fields in a [[Form]].
7
- * @public
7
+ * @public @deprecated
8
8
  */
9
9
  export declare type FieldEditor = "textbox" | "multilinetextbox" | "dropdown" | "checkbox";
10
10
  /** Interface used to define each [[Field]] in a [[Form]]
11
- * @public
11
+ * @public @deprecated
12
12
  */
13
13
  export interface FieldDef {
14
14
  label?: string;
@@ -19,13 +19,13 @@ export interface FieldDef {
19
19
  value?: any;
20
20
  }
21
21
  /** Key/value pairs for all the field values with key being the field HTML Id.
22
- * @public
22
+ * @public @deprecated
23
23
  */
24
24
  export interface FieldValues {
25
25
  [key: string]: any;
26
26
  }
27
27
  /** The state data used by [[Form]] to hold state of each [[Field]] and the result of submit button processing.
28
- * @public
28
+ * @public @deprecated
29
29
  */
30
30
  interface FormState {
31
31
  values: FieldValues;
@@ -34,13 +34,13 @@ interface FormState {
34
34
  }
35
35
  /**
36
36
  * FormContextState combines the Form's state data with the callbacks used to update the value of the state data.
37
- * @public
37
+ * @public @deprecate
38
38
  */
39
39
  export interface FormContextState extends FormState {
40
40
  setValues: (values: FieldValues) => void;
41
41
  }
42
42
  /** React context used by Form as a Provider and by the Fields as Consumers and updaters.
43
- * @public
43
+ * @public @deprecated
44
44
  */
45
45
  export declare const FormContext: React.Context<FormContextState | undefined>;
46
46
  /** Key/value pairs for all the field definitions to be displayed in a [[Form]].
@@ -112,7 +112,7 @@ export interface FormProps {
112
112
  * </div >
113
113
  * );
114
114
  * }
115
- * @public
115
+ * @public @deprecate
116
116
  */
117
117
  export declare class Form extends React.Component<FormProps, FormState> {
118
118
  private _submitButtonLabel;
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../src/core-react/form/Form.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;GAEG;AACH,oBAAY,WAAW,GAAG,SAAS,GAAG,kBAAkB,GAAG,UAAU,GAAG,UAAU,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,QAAQ;IAEvB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,WAAW,CAAC;IAGrB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAG/C,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,SAAS;IAEjB,MAAM,EAAE,WAAW,CAAC;IAGpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AAEH,eAAO,MAAM,WAAW,6CAA+D,CAAC;AAGxF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,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,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,SAAS;IAEjB,MAAM,EAAE,WAAW,CAAC;IAGpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AAEH,eAAO,MAAM,WAAW,6CAA+D,CAAC;AAGxF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,iHAAiH;IACjH,gBAAgB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,wDAAwD;IACxD,MAAM,EAAE,gBAAgB,CAAC;IACzB,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IAC7D,OAAO,CAAC,kBAAkB,CAA8C;IACxE,OAAO,CAAC,YAAY,CAAwC;IAC5D,OAAO,CAAC,YAAY,CAAwC;gBAEhD,KAAK,EAAE,SAAS;IAa5B;;;OAGG;IACH,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,UAAU,CAEhB;IAEF,OAAO,CAAC,aAAa,CAgBnB;IAEc,MAAM;CA2BvB"}
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
+ /* eslint-disable deprecation/deprecation */
5
6
  /** @packageDocumentation
6
7
  * @module Form
7
8
  */
@@ -11,7 +12,7 @@ import { UiCore } from "../UiCore";
11
12
  import { Field } from "./Field";
12
13
  import { Button } from "@itwin/itwinui-react";
13
14
  /** React context used by Form as a Provider and by the Fields as Consumers and updaters.
14
- * @public
15
+ * @public @deprecated
15
16
  */
16
17
  // eslint-disable-next-line @typescript-eslint/naming-convention
17
18
  export const FormContext = React.createContext(undefined);
@@ -68,7 +69,7 @@ FormContext.displayName = "core-react:FormContext";
68
69
  * </div >
69
70
  * );
70
71
  * }
71
- * @public
72
+ * @public @deprecate
72
73
  */
73
74
  export class Form extends React.Component {
74
75
  constructor(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/core-react/form/Form.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAuD9C;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAA+B,SAAS,CAAC,CAAC;AACxF,WAAW,CAAC,WAAW,GAAG,wBAAwB,CAAC;AAqBnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,OAAO,IAAK,SAAQ,KAAK,CAAC,SAA+B;IAK7D,YAAY,KAAgB;QAC1B,KAAK,CAAC,KAAK,CAAC,CAAC;QALP,uBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QAChE,iBAAY,GAAG,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACpD,iBAAY,GAAG,MAAM,CAAC,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AG,IAAI,CAAC,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE,CAAO,CAC9G,CACG,CACF,CACD,CACH,CACe,CACxB,CAAC;IACJ,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 Form\r\n */\r\n\r\nimport \"./Form.scss\";\r\nimport * as React from \"react\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { Field } from \"./Field\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** The available editors for the fields in a [[Form]].\r\n * @public\r\n */\r\nexport type FieldEditor = \"textbox\" | \"multilinetextbox\" | \"dropdown\" | \"checkbox\";\r\n\r\n/** Interface used to define each [[Field]] in a [[Form]]\r\n * @public\r\n */\r\nexport interface FieldDef {\r\n /* The label text for the field */\r\n label?: string;\r\n\r\n /* The editor for the field */\r\n editor?: FieldEditor;\r\n\r\n /* The drop down items for the field */\r\n options?: string[] | { [key: string]: string };\r\n\r\n /* The initial field value */\r\n value?: any;\r\n}\r\n\r\n/** Key/value pairs for all the field values with key being the field HTML Id.\r\n * @public\r\n */\r\nexport interface FieldValues {\r\n [key: string]: any;\r\n}\r\n\r\n/** The state data used by [[Form]] to hold state of each [[Field]] and the result of submit button processing.\r\n * @public\r\n */\r\ninterface FormState {\r\n /* The field values */\r\n values: FieldValues;\r\n\r\n /* The errorMsg message return in catch of async submit button processing */\r\n errorMsg: string;\r\n\r\n /* Whether the form has been successfully submitted */\r\n submitSuccess?: boolean;\r\n}\r\n\r\n/**\r\n * FormContextState combines the Form's state data with the callbacks used to update the value of the state data.\r\n * @public\r\n */\r\nexport interface FormContextState extends FormState {\r\n setValues: (values: FieldValues) => void;\r\n}\r\n\r\n/** React context used by Form as a Provider and by the Fields as Consumers and updaters.\r\n * @public\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const FormContext = React.createContext<FormContextState | undefined>(undefined);\r\nFormContext.displayName = \"core-react:FormContext\";\r\n\r\n/** Key/value pairs for all the field definitions to be displayed in a [[Form]].\r\n * @public\r\n */\r\nexport interface FieldDefinitions {\r\n [key: string]: FieldDef;\r\n}\r\n\r\n/** Properties that define [[Form]] including the callback to be called when the Submit button is pressed.\r\n * @public\r\n */\r\nexport interface FormProps {\r\n /** Required async callback the processes the Form data and throws and Error if the data cannot be processed. */\r\n handleFormSubmit: (values: FieldValues) => Promise<void>;\r\n /** Definition used to create each Field in the Form. */\r\n fields: FieldDefinitions;\r\n /** Optional label which will override default Submit button label. */\r\n submitButtonLabel?: string;\r\n}\r\n\r\n/** Component used to create a Form using supplied properties to specify the fields of the Form.\r\n * @example\r\n * // Example of using a form as contents of a modal dialog.\r\n * export class ExampleForm extends React.Component {\r\n * public static open() {\r\n * const form = new ExampleForm({});\r\n * ModalDialogManager.openDialog(form.render());\r\n * }\r\n *\r\n * protected async handleSubmit(values: FieldValues): Promise<void> {\r\n * await this.processFormSubmission(values);\r\n * ModalDialogManager.closeDialog();\r\n * const msg = JSON.stringify(values);\r\n * IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Form Submitted\", msg));\r\n * }\r\n *\r\n * protected async processFormSubmission(values: FieldValues): Promise<void> {\r\n * // if error occurs during async processing throw an Error and return error message back to form.\r\n * throw new Error(\"Error processing form\");\r\n * }\r\n *\r\n * protected handleCancel() {\r\n * ModalDialogManager.closeDialog();\r\n * }\r\n *\r\n * public render() {\r\n * const fields: FieldDefinitions = {\r\n * Name: {\r\n * label: this._nameLabel,\r\n * editor: \"textbox\",\r\n * value: \"John Smith\",\r\n * },\r\n * PickList: {\r\n * label: this._pickListLabel,\r\n * editor: \"dropdown\",\r\n * value: \"one\",\r\n * options: [\"one\", \"two\", \"three\", \"four\"],\r\n * },\r\n * };\r\n *\r\n * return (\r\n * <div>\r\n * <Dialog title=\"Example Form\"\r\n * opened={true}\r\n * onClose={() => this.handleCancel()}>\r\n * <Form handleFormSubmit={(values: FieldValues) => this.handleSubmit(values)}\r\n * fields={fields}\r\n * />\r\n * </Dialog>\r\n * </div >\r\n * );\r\n * }\r\n * @public\r\n */\r\nexport class Form extends React.Component<FormProps, FormState> {\r\n private _submitButtonLabel = UiCore.translate(\"form.submitButtonLabel\");\r\n private _errorPrefix = UiCore.translate(\"form.errorPrefix\");\r\n private _errorSuffix = UiCore.translate(\"form.errorSuffix\");\r\n\r\n constructor(props: FormProps) {\r\n super(props);\r\n\r\n // set initial values for field values\r\n const values: FieldValues = {};\r\n Object.keys(props.fields).forEach((key) => values[key] = props.fields[key].value);\r\n\r\n this.state = {\r\n errorMsg: \"\",\r\n values,\r\n };\r\n }\r\n\r\n /**\r\n * Returns whether there is an errorMsg message in the state/context\r\n * @param errorMsg - The form errorMsg\r\n */\r\n private haveError(errorMsg: string) {\r\n return errorMsg && errorMsg.length;\r\n }\r\n\r\n private _setValues = (values: FieldValues) => {\r\n this.setState((prevState) => ({ values: { ...prevState.values, ...values } }));\r\n };\r\n\r\n private _handleSubmit = (event: React.FormEvent<HTMLFormElement>, values: FieldValues) => {\r\n event.preventDefault();\r\n\r\n // istanbul ignore next\r\n if (!this.props.handleFormSubmit || !values || 0 === values.length)\r\n throw new Error(\"A handleFormSubmit function and values must be defined\");\r\n\r\n this.props.handleFormSubmit(values)\r\n .then(() => {\r\n // Currently we don't need to do anything if successful. Typically the hosting dialog will close when the\r\n // submission is successful.\r\n // console.log(rtnMsg);\r\n })\r\n .catch((reason: Error) => {\r\n this.setState({ submitSuccess: false, errorMsg: reason.message });\r\n });\r\n };\r\n\r\n public override render() {\r\n const { submitSuccess, errorMsg } = this.state;\r\n const { fields, submitButtonLabel } = this.props;\r\n const context: FormContextState = { ...this.state, setValues: this._setValues };\r\n\r\n return (\r\n <FormContext.Provider value={context}>\r\n <div className=\"core-form-wrapper\">\r\n <form onSubmit={(event: React.FormEvent<HTMLFormElement>) => this._handleSubmit(event, this.state.values)} noValidate={true}>\r\n <div className=\"core-form-container\">\r\n {Object.keys(fields).map((key) => <Field key={key} id={key} {...this.props.fields[key]} />)}\r\n <div className=\"core-form-footer\">\r\n <div className=\"core-form-buttons\">\r\n <Button type=\"submit\" styleType=\"high-visibility\">\r\n {submitButtonLabel ? submitButtonLabel : this._submitButtonLabel}\r\n </Button>\r\n </div>\r\n {submitSuccess === false && this.haveError(errorMsg) && (\r\n <div className=\"core-form-alert\" role=\"alert\">{`${this._errorPrefix}-${errorMsg} ${this._errorSuffix}`}</div>\r\n )}\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </FormContext.Provider>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/core-react/form/Form.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAuD9C;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAA+B,SAAS,CAAC,CAAC;AACxF,WAAW,CAAC,WAAW,GAAG,wBAAwB,CAAC;AAqBnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,OAAO,IAAK,SAAQ,KAAK,CAAC,SAA+B;IAK7D,YAAY,KAAgB;QAC1B,KAAK,CAAC,KAAK,CAAC,CAAC;QALP,uBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QAChE,iB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,QAAQ,CAAC,IAAI,CACtD,6BAAK,SAAS,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,IAAE,GAAG,IAAI,CAAC,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE,CAAO,CAC9G,CACG,CACF,CACD,CACH,CACe,CACxB,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Form\r\n */\r\n\r\nimport \"./Form.scss\";\r\nimport * as React from \"react\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { Field } from \"./Field\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\n\r\n// cSpell:ignore multilinetextbox\r\n\r\n/** The available editors for the fields in a [[Form]].\r\n * @public @deprecated\r\n */\r\nexport type FieldEditor = \"textbox\" | \"multilinetextbox\" | \"dropdown\" | \"checkbox\";\r\n\r\n/** Interface used to define each [[Field]] in a [[Form]]\r\n * @public @deprecated\r\n */\r\nexport interface FieldDef {\r\n /* The label text for the field */\r\n label?: string;\r\n\r\n /* The editor for the field */\r\n editor?: FieldEditor;\r\n\r\n /* The drop down items for the field */\r\n options?: string[] | { [key: string]: string };\r\n\r\n /* The initial field value */\r\n value?: any;\r\n}\r\n\r\n/** Key/value pairs for all the field values with key being the field HTML Id.\r\n * @public @deprecated\r\n */\r\nexport interface FieldValues {\r\n [key: string]: any;\r\n}\r\n\r\n/** The state data used by [[Form]] to hold state of each [[Field]] and the result of submit button processing.\r\n * @public @deprecated\r\n */\r\ninterface FormState {\r\n /* The field values */\r\n values: FieldValues;\r\n\r\n /* The errorMsg message return in catch of async submit button processing */\r\n errorMsg: string;\r\n\r\n /* Whether the form has been successfully submitted */\r\n submitSuccess?: boolean;\r\n}\r\n\r\n/**\r\n * FormContextState combines the Form's state data with the callbacks used to update the value of the state data.\r\n * @public @deprecate\r\n */\r\nexport interface FormContextState extends FormState {\r\n setValues: (values: FieldValues) => void;\r\n}\r\n\r\n/** React context used by Form as a Provider and by the Fields as Consumers and updaters.\r\n * @public @deprecated\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const FormContext = React.createContext<FormContextState | undefined>(undefined);\r\nFormContext.displayName = \"core-react:FormContext\";\r\n\r\n/** Key/value pairs for all the field definitions to be displayed in a [[Form]].\r\n * @public\r\n */\r\nexport interface FieldDefinitions {\r\n [key: string]: FieldDef;\r\n}\r\n\r\n/** Properties that define [[Form]] including the callback to be called when the Submit button is pressed.\r\n * @public\r\n */\r\nexport interface FormProps {\r\n /** Required async callback the processes the Form data and throws and Error if the data cannot be processed. */\r\n handleFormSubmit: (values: FieldValues) => Promise<void>;\r\n /** Definition used to create each Field in the Form. */\r\n fields: FieldDefinitions;\r\n /** Optional label which will override default Submit button label. */\r\n submitButtonLabel?: string;\r\n}\r\n\r\n/** Component used to create a Form using supplied properties to specify the fields of the Form.\r\n * @example\r\n * // Example of using a form as contents of a modal dialog.\r\n * export class ExampleForm extends React.Component {\r\n * public static open() {\r\n * const form = new ExampleForm({});\r\n * ModalDialogManager.openDialog(form.render());\r\n * }\r\n *\r\n * protected async handleSubmit(values: FieldValues): Promise<void> {\r\n * await this.processFormSubmission(values);\r\n * ModalDialogManager.closeDialog();\r\n * const msg = JSON.stringify(values);\r\n * IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Form Submitted\", msg));\r\n * }\r\n *\r\n * protected async processFormSubmission(values: FieldValues): Promise<void> {\r\n * // if error occurs during async processing throw an Error and return error message back to form.\r\n * throw new Error(\"Error processing form\");\r\n * }\r\n *\r\n * protected handleCancel() {\r\n * ModalDialogManager.closeDialog();\r\n * }\r\n *\r\n * public render() {\r\n * const fields: FieldDefinitions = {\r\n * Name: {\r\n * label: this._nameLabel,\r\n * editor: \"textbox\",\r\n * value: \"John Smith\",\r\n * },\r\n * PickList: {\r\n * label: this._pickListLabel,\r\n * editor: \"dropdown\",\r\n * value: \"one\",\r\n * options: [\"one\", \"two\", \"three\", \"four\"],\r\n * },\r\n * };\r\n *\r\n * return (\r\n * <div>\r\n * <Dialog title=\"Example Form\"\r\n * opened={true}\r\n * onClose={() => this.handleCancel()}>\r\n * <Form handleFormSubmit={(values: FieldValues) => this.handleSubmit(values)}\r\n * fields={fields}\r\n * />\r\n * </Dialog>\r\n * </div >\r\n * );\r\n * }\r\n * @public @deprecate\r\n */\r\nexport class Form extends React.Component<FormProps, FormState> {\r\n private _submitButtonLabel = UiCore.translate(\"form.submitButtonLabel\");\r\n private _errorPrefix = UiCore.translate(\"form.errorPrefix\");\r\n private _errorSuffix = UiCore.translate(\"form.errorSuffix\");\r\n\r\n constructor(props: FormProps) {\r\n super(props);\r\n\r\n // set initial values for field values\r\n const values: FieldValues = {};\r\n Object.keys(props.fields).forEach((key) => values[key] = props.fields[key].value);\r\n\r\n this.state = {\r\n errorMsg: \"\",\r\n values,\r\n };\r\n }\r\n\r\n /**\r\n * Returns whether there is an errorMsg message in the state/context\r\n * @param errorMsg - The form errorMsg\r\n */\r\n private haveError(errorMsg: string) {\r\n return errorMsg && errorMsg.length;\r\n }\r\n\r\n private _setValues = (values: FieldValues) => {\r\n this.setState((prevState) => ({ values: { ...prevState.values, ...values } }));\r\n };\r\n\r\n private _handleSubmit = (event: React.FormEvent<HTMLFormElement>, values: FieldValues) => {\r\n event.preventDefault();\r\n\r\n // istanbul ignore next\r\n if (!this.props.handleFormSubmit || !values || 0 === values.length)\r\n throw new Error(\"A handleFormSubmit function and values must be defined\");\r\n\r\n this.props.handleFormSubmit(values)\r\n .then(() => {\r\n // Currently we don't need to do anything if successful. Typically the hosting dialog will close when the\r\n // submission is successful.\r\n // console.log(rtnMsg);\r\n })\r\n .catch((reason: Error) => {\r\n this.setState({ submitSuccess: false, errorMsg: reason.message });\r\n });\r\n };\r\n\r\n public override render() {\r\n const { submitSuccess, errorMsg } = this.state;\r\n const { fields, submitButtonLabel } = this.props;\r\n const context: FormContextState = { ...this.state, setValues: this._setValues };\r\n\r\n return (\r\n <FormContext.Provider value={context}>\r\n <div className=\"core-form-wrapper\">\r\n <form onSubmit={(event: React.FormEvent<HTMLFormElement>) => this._handleSubmit(event, this.state.values)} noValidate={true}>\r\n <div className=\"core-form-container\">\r\n {Object.keys(fields).map((key) => <Field key={key} id={key} {...this.props.fields[key]} />)}\r\n <div className=\"core-form-footer\">\r\n <div className=\"core-form-buttons\">\r\n <Button type=\"submit\" styleType=\"high-visibility\">\r\n {submitButtonLabel ? submitButtonLabel : this._submitButtonLabel}\r\n </Button>\r\n </div>\r\n {submitSuccess === false && this.haveError(errorMsg) && (\r\n <div className=\"core-form-alert\" role=\"alert\">{`${this._errorPrefix}-${errorMsg} ${this._errorSuffix}`}</div>\r\n )}\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </FormContext.Provider>\r\n );\r\n }\r\n}\r\n"]}
@@ -7,4 +7,9 @@
7
7
  .core-svg-icon {
8
8
  width: $uicore-icons-small;
9
9
  height: $uicore-icons-small;
10
+ svg {
11
+ width: $uicore-icons-small;
12
+ height: $uicore-icons-small;
13
+ fill: currentColor;
14
+ }
10
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/inputs/numberinput/NumberInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIzD;;GAEG;AACH,oBAAY,gBAAgB,GAAG,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,UAAU,E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,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACnC;AAwKD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,GAAG,CAAC,OAAO,GAAG,IAA4B,CAAC"}
@@ -129,9 +129,10 @@ const ForwardRefNumberInput = React.forwardRef(function ForwardRefNumberInput(pr
129
129
  const handleFocus = React.useCallback((event) => {
130
130
  event.currentTarget.select();
131
131
  }, []);
132
- const containerClasses = classnames("core-number-input-container", containerClassName, showTouchButtons && "core-number-buttons-for-touch");
132
+ const isDisabled = !!otherProps.disabled;
133
+ const containerClasses = classnames("core-number-input-container", containerClassName, showTouchButtons && "core-number-buttons-for-touch", isDisabled && "core-number-input-disabled");
133
134
  return (React.createElement("div", { className: containerClasses, style: containerStyle },
134
- React.createElement(Input, { ref: ref, value: formattedValue, onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur, ...otherProps }),
135
+ React.createElement(Input, { ref: ref, value: formattedValue, onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur, size: "small", ...otherProps }),
135
136
  React.createElement("div", { className: classnames("core-number-input-buttons-container", showTouchButtons && "core-number-buttons-for-touch") },
136
137
  React.createElement("div", { className: "core-number-input-button core-number-input-button-up", tabIndex: -1, onClick: handleUpClick },
137
138
  React.createElement(WebFontIcon, { iconName: "icon-caret-up" })),