@itwin/core-react 4.8.3 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/ContributeGuidelines.md +2 -3
- package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
- package/lib/cjs/core-react/UiCore.js +1 -0
- package/lib/cjs/core-react/UiCore.js.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts +2 -2
- package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.d.ts +2 -2
- package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Centered.d.ts +2 -2
- package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Div.d.ts +2 -2
- package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +2 -2
- package/lib/cjs/core-react/base/FillCentered.d.ts +2 -2
- package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +2 -2
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Gap.d.ts +2 -2
- package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.d.ts +2 -2
- package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +3 -3
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +3 -3
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +2 -2
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/cjs/core-react/focustrap/FocusTrap.d.ts +1 -1
- package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
- package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -2
- package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -2
- package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -2
- package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -2
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
- package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.d.ts +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.d.ts +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -2
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts +2 -2
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +2 -2
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BlockText.d.ts +2 -2
- package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BodyText.d.ts +2 -2
- package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.d.ts +5 -2
- package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.d.ts +1 -1
- package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/MutedText.d.ts +2 -2
- package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
- package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Branch.d.ts +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -1
- package/lib/cjs/core-react/tree/Node.d.ts +1 -1
- package/lib/cjs/core-react/tree/Placeholder.d.ts +1 -1
- package/lib/cjs/core-react/tree/Tree.d.ts +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.js +3 -0
- package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +2 -0
- package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.js +22 -11
- package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/esm/core-react/UiCore.d.ts.map +1 -1
- package/lib/esm/core-react/UiCore.js +1 -0
- package/lib/esm/core-react/UiCore.js.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts +2 -2
- package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.d.ts +2 -2
- package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/esm/core-react/base/Centered.d.ts +2 -2
- package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
- package/lib/esm/core-react/base/Div.d.ts +2 -2
- package/lib/esm/core-react/base/Div.d.ts.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +2 -2
- package/lib/esm/core-react/base/FillCentered.d.ts +2 -2
- package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts +2 -2
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/esm/core-react/base/Gap.d.ts +2 -2
- package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
- package/lib/esm/core-react/base/ScrollView.d.ts +2 -2
- package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.d.ts +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +3 -3
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +3 -3
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +2 -2
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/esm/core-react/focustrap/FocusTrap.d.ts +1 -1
- package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
- package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -2
- package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -2
- package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -2
- package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.d.ts +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -2
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
- package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.d.ts +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.d.ts +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.d.ts +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -2
- package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.d.ts +2 -2
- package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts +2 -2
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/esm/core-react/text/BlockText.d.ts +2 -2
- package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BodyText.d.ts +2 -2
- package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/esm/core-react/text/DisabledText.d.ts +5 -2
- package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/FilteredText.d.ts +1 -1
- package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/esm/core-react/text/MutedText.d.ts +2 -2
- package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/esm/core-react/text/StyledText.d.ts +2 -2
- package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Branch.d.ts +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -1
- package/lib/esm/core-react/tree/Node.d.ts +1 -1
- package/lib/esm/core-react/tree/Placeholder.d.ts +1 -1
- package/lib/esm/core-react/tree/Tree.d.ts +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.d.ts.map +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.js +3 -0
- package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +2 -0
- package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.js +22 -11
- package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/package.json +4 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageCheckBox.d.ts","sourceRoot":"","sources":["../../../../src/core-react/imagecheckbox/ImageCheckBox.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,oCAAoC;IACpC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,gDAAgD;IAChD,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;I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IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,GAAG,CAAC;IACpC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACjC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACxE,OAAO,CAAC,SAAS,CAQf;IAEF,OAAO,CAAC,aAAa,CAGnB;IAEF,OAAO,CAAC,aAAa,CAGnB;IAEF,gBAAgB;IACA,MAAM;CAqCvB"}
|
|
@@ -47,8 +47,7 @@ class ImageCheckBox extends React.PureComponent {
|
|
|
47
47
|
? this.props.imageOn
|
|
48
48
|
: this.props.imageOff;
|
|
49
49
|
return (
|
|
50
|
-
|
|
51
|
-
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */
|
|
50
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/label-has-associated-control, jsx-a11y/no-noninteractive-element-interactions
|
|
52
51
|
React.createElement("label", { className: checkBoxClass, style: this.props.style, onClick: this._onLabelClick, title: this.props.tooltip },
|
|
53
52
|
React.createElement("input", { type: "checkbox", className: this.props.inputClassName, style: this.props.inputStyle, checked: this.props.checked, disabled: this.props.disabled, onChange: this._onChange, onClick: this._onInputClick, ref: this.props.inputRef }),
|
|
54
53
|
React.createElement("span", { className: imageClass },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageCheckBox.js","sourceRoot":"","sources":["../../../../src/core-react/imagecheckbox/ImageCheckBox.tsx"],"names":[],"mappings":";AA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AAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GACxB;YACF,8BAAM,SAAS,EAAE,UAAU;gBACzB,oBAAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACvB,CACD,CACT,CAAC;IACJ,CAAC;CACF;AA3DD,sCA2DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Checkbox\n */\n\nimport \"./ImageCheckBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Icon } from \"../icons/IconComponent\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for the [[ImageCheckBox]] component\n * @public\n */\nexport interface ImageCheckBoxProps extends CommonProps {\n /** Image for the \"checked\" state */\n imageOn: string | React.ReactNode;\n /** Image for the \"unchecked\" (default) state */\n imageOff: string | React.ReactNode;\n /** Determine if the item is checked or not */\n checked?: boolean;\n /** Determine if the item is disabled or not */\n disabled?: boolean;\n /** Function called when item is clicked. */\n onClick?: (checked: boolean) => any;\n /** Custom CSS class name for the checkbox input element */\n inputClassName?: string;\n /** Custom CSS Style for the checkbox input element */\n inputStyle?: React.CSSProperties;\n /** Tooltip to be displayed when mouse is hovered over the checkbox */\n tooltip?: string;\n /** If true, draw a border around the image checkbox */\n border?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n inputRef?: React.Ref<HTMLInputElement>;\n}\n\n/**\n * ImageCheckBox React component shows a checked or unchecked image\n * @public\n */\nexport class ImageCheckBox extends React.PureComponent<ImageCheckBoxProps> {\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n // istanbul ignore next\n if (e && e.stopPropagation) e.stopPropagation();\n\n // istanbul ignore else\n if (this.props.onClick) {\n this.props.onClick(e.target.checked);\n }\n };\n\n private _onInputClick = (e: React.MouseEvent<HTMLInputElement>) => {\n // istanbul ignore next\n if (e && e.stopPropagation) e.stopPropagation();\n };\n\n private _onLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {\n // istanbul ignore next\n if (e && e.stopPropagation) e.stopPropagation();\n };\n\n /** @internal */\n public override render() {\n const checkBoxClass = classnames(\n \"core-image-checkbox\",\n this.props.className\n );\n const imageClass = classnames(\n \"image\",\n this.props.border && \"image-checkbox-border\"\n );\n const iconSpec = this.props.checked\n ? this.props.imageOn\n : this.props.imageOff;\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/label-has-associated-control, jsx-a11y/no-noninteractive-element-interactions\n <label\n className={checkBoxClass}\n style={this.props.style}\n onClick={this._onLabelClick}\n title={this.props.tooltip}\n >\n <input\n type=\"checkbox\"\n className={this.props.inputClassName}\n style={this.props.inputStyle}\n checked={this.props.checked}\n disabled={this.props.disabled}\n onChange={this._onChange}\n onClick={this._onInputClick}\n ref={this.props.inputRef}\n />\n <span className={imageClass}>\n <Icon iconSpec={iconSpec} />\n </span>\n </label>\n );\n }\n}\n"]}
|
|
@@ -47,10 +47,10 @@ export declare const ListboxContext: React.Context<ListboxContextProps>;
|
|
|
47
47
|
* Single select `Listbox` component
|
|
48
48
|
* @alpha
|
|
49
49
|
*/
|
|
50
|
-
export declare function Listbox(props: ListboxProps): JSX.Element;
|
|
50
|
+
export declare function Listbox(props: ListboxProps): React.JSX.Element;
|
|
51
51
|
/**
|
|
52
52
|
* `ListboxItem` component.
|
|
53
53
|
* @alpha
|
|
54
54
|
*/
|
|
55
|
-
export declare function ListboxItem(props: ListboxItemProps): JSX.Element;
|
|
55
|
+
export declare function ListboxItem(props: ListboxItemProps): React.JSX.Element;
|
|
56
56
|
//# sourceMappingURL=Listbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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CAEzB,CAAC;AA4DH;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,qBA6M1C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBA0DlD"}
|
|
@@ -21,7 +21,7 @@ export interface LoadingBarProps extends CommonProps {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class LoadingBar extends React.PureComponent<LoadingBarProps> {
|
|
23
23
|
static defaultProps: Partial<LoadingBarProps>;
|
|
24
|
-
render(): JSX.Element;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
/** Sanity check to keep percentage between 0 & 100
|
|
27
27
|
* @internal
|
|
@@ -35,6 +35,6 @@ export interface LoadingPromptProps extends CommonProps {
|
|
|
35
35
|
*/
|
|
36
36
|
export declare class LoadingPrompt extends React.PureComponent<LoadingPromptProps> {
|
|
37
37
|
static defaultProps: Partial<LoadingPromptProps>;
|
|
38
|
-
render(): JSX.Element;
|
|
38
|
+
render(): React.JSX.Element;
|
|
39
39
|
}
|
|
40
40
|
//# sourceMappingURL=LoadingPrompt.d.ts.map
|
|
@@ -28,6 +28,6 @@ export interface LoadingSpinnerProps extends Omit<ProgressRadialProps, "size"> {
|
|
|
28
28
|
*/
|
|
29
29
|
export declare class LoadingSpinner extends React.PureComponent<LoadingSpinnerProps> {
|
|
30
30
|
static defaultProps: Partial<LoadingSpinnerProps>;
|
|
31
|
-
render(): JSX.Element;
|
|
31
|
+
render(): React.JSX.Element;
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=LoadingSpinner.d.ts.map
|
|
@@ -20,6 +20,6 @@ export interface LoadingStatusProps extends CommonProps {
|
|
|
20
20
|
export declare class LoadingStatus extends React.PureComponent<LoadingStatusProps> {
|
|
21
21
|
static defaultProps: Partial<LoadingStatusProps>;
|
|
22
22
|
private inRange;
|
|
23
|
-
render(): JSX.Element;
|
|
23
|
+
render(): React.JSX.Element;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=LoadingStatus.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Notification
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import type { MessageType } from "./MessageType";
|
|
6
6
|
import type { ClassNameProps } from "../utils/Props";
|
|
7
7
|
/** Properties for the [[MessageRenderer]] component
|
|
@@ -16,5 +16,5 @@ export interface MessageRendererProps extends ClassNameProps {
|
|
|
16
16
|
/** React component renders a string, HTMLElement or React node in a `div` or `span`
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
export declare function MessageRenderer(props: MessageRendererProps): JSX.Element | null;
|
|
19
|
+
export declare function MessageRenderer(props: MessageRendererProps): React.JSX.Element | null;
|
|
20
20
|
//# sourceMappingURL=MessageRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageRenderer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"MessageRenderer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,wBAAwB;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,4BAyF1D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Settings
|
|
3
3
|
*/
|
|
4
|
-
/// <reference types="react" />
|
|
5
4
|
import "./SettingsContainer.scss";
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import type { SettingsManager, SettingsTabEntry } from "./SettingsManager";
|
|
7
7
|
/** Hook to use within Settings Page component to allow saving the current page's data before the Setting Container is closed.
|
|
8
8
|
* @public
|
|
@@ -27,5 +27,5 @@ export interface SettingsContainerProps {
|
|
|
27
27
|
* Note: that SettingsContainer is not rendered if tabs array is empty
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
|
-
export declare const SettingsContainer: ({ tabs, onSettingsTabSelected, currentSettingsTab, settingsManager, showHeader, }: SettingsContainerProps) => JSX.Element;
|
|
30
|
+
export declare const SettingsContainer: ({ tabs, onSettingsTabSelected, currentSettingsTab, settingsManager, showHeader, }: SettingsContainerProps) => React.JSX.Element;
|
|
31
31
|
//# sourceMappingURL=SettingsContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsContainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsContainer.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"SettingsContainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsContainer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAIV,eAAe,EACf,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAiB3B;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,EAAE,aAAa,CAAC,EAAE,GAAG,KAAK,IAAI,QAa5E;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,CACZ,gBAAgB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,EACrC,sBAAsB,CAAC,EAAE,MAAM,KAC5B,IAAI,QAaV;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAEzB,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;IAEtC,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAExD,eAAe,EAAE,eAAe,CAAC;IAEjC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sFAM3B,sBAAsB,sBAkJxB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Tabs
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import type { TabsProps } from "./Tabs";
|
|
6
6
|
/** Vertical tabs meant to represent the current position in a page/section
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare function VerticalTabs(props: TabsProps): JSX.Element;
|
|
9
|
+
export declare function VerticalTabs(props: TabsProps): React.JSX.Element;
|
|
10
10
|
//# sourceMappingURL=VerticalTabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIxC;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,qBAQ5C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Text
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled block text React functional component
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare function BlockText(props: TextProps): JSX.Element;
|
|
9
|
+
export declare function BlockText(props: TextProps): React.JSX.Element;
|
|
10
10
|
//# sourceMappingURL=BlockText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"BlockText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBAGzC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Text
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled body text React functional component
|
|
7
7
|
* @public
|
|
8
8
|
* @deprecated in 4.0 Use \<Text variant='body' /\> from iTwinUI-react package.
|
|
9
9
|
*/
|
|
10
|
-
export declare function BodyText(props: TextProps): JSX.Element;
|
|
10
|
+
export declare function BodyText(props: TextProps): React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=BodyText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BodyText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"BodyText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAGxC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Text
|
|
3
|
+
*/
|
|
4
|
+
import * as React from "react";
|
|
2
5
|
import type { TextProps } from "./TextProps";
|
|
3
6
|
/** Styled disabled text React functional component
|
|
4
7
|
* @public
|
|
5
8
|
*/
|
|
6
|
-
export declare function DisabledText(props: TextProps): JSX.Element;
|
|
9
|
+
export declare function DisabledText(props: TextProps): React.JSX.Element;
|
|
7
10
|
//# sourceMappingURL=DisabledText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisabledText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DisabledText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,qBAG5C"}
|
|
@@ -21,5 +21,5 @@ export interface FilteredTextProps extends CommonProps {
|
|
|
21
21
|
/** Component used to highlight filter matches within a text string.
|
|
22
22
|
* @alpha
|
|
23
23
|
*/
|
|
24
|
-
export declare function FilteredText(props: FilteredTextProps): JSX.Element;
|
|
24
|
+
export declare function FilteredText(props: FilteredTextProps): React.JSX.Element;
|
|
25
25
|
//# sourceMappingURL=FilteredText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilteredText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"FilteredText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA8DpD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Text
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled muted/gray text React functional component
|
|
7
7
|
* @public
|
|
8
8
|
* @deprecated in 4.0 Use \<Text isMuted /\> from iTwinUI-react package.
|
|
9
9
|
*/
|
|
10
|
-
export declare function MutedText(props: TextProps): JSX.Element;
|
|
10
|
+
export declare function MutedText(props: TextProps): React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=MutedText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutedText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"MutedText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBAGzC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Text
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Properties for [[StyledText]] component
|
|
7
7
|
* @public
|
|
@@ -14,5 +14,5 @@ export interface StyledTextProps extends TextProps {
|
|
|
14
14
|
* @public
|
|
15
15
|
* @deprecated in 4.0 Use \<Text /\> component from iTwinUI-react library.
|
|
16
16
|
*/
|
|
17
|
-
export declare function StyledText(props: StyledTextProps): JSX.Element;
|
|
17
|
+
export declare function StyledText(props: StyledTextProps): React.JSX.Element;
|
|
18
18
|
//# sourceMappingURL=StyledText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"StyledText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qBAYhD"}
|
|
@@ -16,6 +16,6 @@ export interface ExpansionToggleProps extends CommonProps {
|
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
18
|
export declare class ExpansionToggle extends React.PureComponent<ExpansionToggleProps> {
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=ExpansionToggle.d.ts.map
|
|
@@ -70,7 +70,7 @@ export interface TreeNodeProps extends CommonProps {
|
|
|
70
70
|
*/
|
|
71
71
|
export declare class TreeNode extends React.Component<TreeNodeProps> {
|
|
72
72
|
constructor(props: TreeNodeProps);
|
|
73
|
-
render(): JSX.Element;
|
|
73
|
+
render(): React.JSX.Element;
|
|
74
74
|
private createSubComponentTestId;
|
|
75
75
|
private _onCheckboxChange;
|
|
76
76
|
private _onCheckboxClick;
|
|
@@ -18,6 +18,6 @@ export interface TreeNodePlaceholderProps extends CommonProps {
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
export declare class TreeNodePlaceholder extends React.PureComponent<TreeNodePlaceholderProps> {
|
|
21
|
-
render(): JSX.Element;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=Placeholder.d.ts.map
|
|
@@ -24,6 +24,6 @@ export declare class Tree extends React.PureComponent<TreeProps> {
|
|
|
24
24
|
scrollToElement(element: Element): void;
|
|
25
25
|
getElementsByClassName(className: string): Element[];
|
|
26
26
|
setFocusByClassName(selector: string): boolean;
|
|
27
|
-
render(): JSX.Element;
|
|
27
|
+
render(): React.JSX.Element;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=Tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWebComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.ts"],"names":[],"mappings":"AAMA;;GAEG;
|
|
1
|
+
{"version":3,"file":"IconWebComponent.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.ts"],"names":[],"mappings":"AAMA;;GAEG;AAiGH;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;YACjC,iBAAiB;YAKjB,OAAO;CAetB"}
|
|
@@ -52,6 +52,7 @@ function parseSvgFromDataUri(src, element) {
|
|
|
52
52
|
const parsedSvg = new window.DOMParser().parseFromString(sanitizedSvg, "text/xml");
|
|
53
53
|
const errorNode = parsedSvg.querySelector("parsererror");
|
|
54
54
|
if (errorNode || "svg" !== parsedSvg.documentElement.nodeName.toLowerCase()) {
|
|
55
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
55
56
|
throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
|
|
56
57
|
}
|
|
57
58
|
return parsedSvg.documentElement;
|
|
@@ -67,10 +68,12 @@ async function fetchSvg(src, element) {
|
|
|
67
68
|
core_bentley_1.Logger.logError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
|
|
68
69
|
});
|
|
69
70
|
if (!response || !response.ok) {
|
|
71
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
70
72
|
throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
|
|
71
73
|
}
|
|
72
74
|
const str = await response.text();
|
|
73
75
|
if (str === undefined) {
|
|
76
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
74
77
|
throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
|
|
75
78
|
}
|
|
76
79
|
const data = new window.DOMParser().parseFromString(str, "text/xml");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWebComponent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,uBAAuB;AACvB,+CAA+C;AAC/C;;GAEG;;;AAEH,0DAAgD;AAChD,sDAA6C;AAC7C,sCAAmC;AACnC,oEAAoD;AACpD,iEAA8D;AAE9D;;;;GAIG;AACH,MAAM,KAAK,GAAG,IAAI,GAAG,EAAwB,CAAC;AAE9C;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,GAAW,EAAE,OAAY;IACpD,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEpC,IACE,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC;QACxB,2BAA2B,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC,2BAA2B,KAAK,YAAY,CAAC,CAAC,CAAC;YAC9C,oBAAoB,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,EAC3C;QACA,qBAAM,CAAC,QAAQ,CAAC,eAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC,CAAC;QACxE,OAAO;KACR;IAED,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,2BAA2B,KAAK,YAAY,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AC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;SAClC;IACH,CAAC;CACF;AArBD,4CAqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n// istanbul ignore file\n// IconWebComponent requires in-browser testing\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiCore } from \"../UiCore\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport { reuseOrCreatePromise } from \"./reuseOrCreatePromise\";\n\n/**\n * \"getSvg\" list\n * (if multiple icon require the same thing,\n * only do the fetch once, and have all icon use the same result)\n */\nconst cache = new Map<string, Promise<any>>();\n\n/**\n * Parse 'data:' uri to retrieve the Svg component within it.\n * @param src data:image/svg+xml;base64 or data:image/svg+xml\n * @param element Element for logging purpose.\n * @returns HTMLElement (svg)\n */\nfunction parseSvgFromDataUri(src: string, element: any) {\n const dataUriParts = src.split(\",\");\n\n if (\n (dataUriParts.length !== 2 &&\n \"data:image/svg+xml;base64\" === dataUriParts[0]) ||\n (\"data:image/svg+xml;base64\" !== dataUriParts[0] &&\n \"data:image/svg+xml\" !== dataUriParts[0])\n ) {\n Logger.logError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n return;\n }\n\n let rawSvg = \"\";\n if (\"data:image/svg+xml;base64\" === dataUriParts[0]) {\n rawSvg = window.atob(dataUriParts[1]);\n } else {\n // `,` is valid character in data when not in base64, rebuild the data correctly\n rawSvg = decodeURIComponent(dataUriParts.slice(1).join(\",\"));\n }\n\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n // istanbul ignore next\n const sanitizer = DOMPurify ?? DOMPurifyNS;\n const sanitizedSvg = sanitizer.sanitize(rawSvg);\n\n const parsedSvg = new window.DOMParser().parseFromString(\n sanitizedSvg,\n \"text/xml\"\n );\n const errorNode = parsedSvg.querySelector(\"parsererror\");\n if (errorNode || \"svg\" !== parsedSvg.documentElement.nodeName.toLowerCase()) {\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n\n return parsedSvg.documentElement;\n}\n\n/**\n * Fetch the src from the network and return the SVG element.\n * @param src URL representing a .svg file\n * @param element Element for logging purpose\n * @returns HTMLElement (svg)\n */\nasync function fetchSvg(src: string, element: any) {\n const response = await fetch(src).catch((_error) => {\n Logger.logError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n });\n if (!response || !response.ok) {\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n const str = await response.text();\n if (str === undefined) {\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n const data = new window.DOMParser().parseFromString(str, \"text/xml\");\n return data.documentElement;\n}\n\n/**\n * Get the svg (fetch and parse for url, or decode and parse for data: url)\n * @param src URL of the content to download/parse\n * @param element Element for logging purpose.\n * @returns HTMLElement (svg)\n */\nasync function getSvg(src: string, element: any) {\n if (src.startsWith(\"data:\")) {\n return parseSvgFromDataUri(src, element);\n }\n return fetchSvg(src, element);\n}\n\n/**\n * IconWebComponent loads icon from an svg path\n */\nexport class IconWebComponent extends HTMLElement {\n private async connectedCallback() {\n await this.loadSvg();\n this.dispatchEvent(new CustomEvent(\"load\"));\n }\n\n private async loadSvg() {\n // if svg was already appended don't request it again\n if (this.childNodes.length) return;\n const src = this.getAttribute(\"src\") || \"\";\n if (!src) return;\n\n const svg = await reuseOrCreatePromise(\n src,\n async () => getSvg(src, this),\n cache\n );\n if (svg && !this.childNodes.length) {\n this.append(svg.cloneNode(true));\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IconWebComponent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.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E,OAAY;IAC7C,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KAC1C;IACD,OAAO,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;IACvC,KAAK,CAAC,iBAAiB;QAC7B,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,OAAO;QACnB,qDAAqD;QACrD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM;YAAE,OAAO;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,GAAG;YAAE,OAAO;QAEjB,MAAM,GAAG,GAAG,MAAM,IAAA,2CAAoB,EACpC,GAAG,EACH,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,EAC7B,KAAK,CACN,CAAC;QACF,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;SAClC;IACH,CAAC;CACF;AArBD,4CAqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n// istanbul ignore file\n// IconWebComponent requires in-browser testing\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiCore } from \"../UiCore\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport { reuseOrCreatePromise } from \"./reuseOrCreatePromise\";\n\n/**\n * \"getSvg\" list\n * (if multiple icon require the same thing,\n * only do the fetch once, and have all icon use the same result)\n */\nconst cache = new Map<string, Promise<any>>();\n\n/**\n * Parse 'data:' uri to retrieve the Svg component within it.\n * @param src data:image/svg+xml;base64 or data:image/svg+xml\n * @param element Element for logging purpose.\n * @returns HTMLElement (svg)\n */\nfunction parseSvgFromDataUri(src: string, element: any) {\n const dataUriParts = src.split(\",\");\n\n if (\n (dataUriParts.length !== 2 &&\n \"data:image/svg+xml;base64\" === dataUriParts[0]) ||\n (\"data:image/svg+xml;base64\" !== dataUriParts[0] &&\n \"data:image/svg+xml\" !== dataUriParts[0])\n ) {\n Logger.logError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n return;\n }\n\n let rawSvg = \"\";\n if (\"data:image/svg+xml;base64\" === dataUriParts[0]) {\n rawSvg = window.atob(dataUriParts[1]);\n } else {\n // `,` is valid character in data when not in base64, rebuild the data correctly\n rawSvg = decodeURIComponent(dataUriParts.slice(1).join(\",\"));\n }\n\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n // istanbul ignore next\n const sanitizer = DOMPurify ?? DOMPurifyNS;\n const sanitizedSvg = sanitizer.sanitize(rawSvg);\n\n const parsedSvg = new window.DOMParser().parseFromString(\n sanitizedSvg,\n \"text/xml\"\n );\n const errorNode = parsedSvg.querySelector(\"parsererror\");\n if (errorNode || \"svg\" !== parsedSvg.documentElement.nodeName.toLowerCase()) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n\n return parsedSvg.documentElement;\n}\n\n/**\n * Fetch the src from the network and return the SVG element.\n * @param src URL representing a .svg file\n * @param element Element for logging purpose\n * @returns HTMLElement (svg)\n */\nasync function fetchSvg(src: string, element: any) {\n const response = await fetch(src).catch((_error) => {\n Logger.logError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n });\n if (!response || !response.ok) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n const str = await response.text();\n if (str === undefined) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n const data = new window.DOMParser().parseFromString(str, \"text/xml\");\n return data.documentElement;\n}\n\n/**\n * Get the svg (fetch and parse for url, or decode and parse for data: url)\n * @param src URL of the content to download/parse\n * @param element Element for logging purpose.\n * @returns HTMLElement (svg)\n */\nasync function getSvg(src: string, element: any) {\n if (src.startsWith(\"data:\")) {\n return parseSvgFromDataUri(src, element);\n }\n return fetchSvg(src, element);\n}\n\n/**\n * IconWebComponent loads icon from an svg path\n */\nexport class IconWebComponent extends HTMLElement {\n private async connectedCallback() {\n await this.loadSvg();\n this.dispatchEvent(new CustomEvent(\"load\"));\n }\n\n private async loadSvg() {\n // if svg was already appended don't request it again\n if (this.childNodes.length) return;\n const src = this.getAttribute(\"src\") || \"\";\n if (!src) return;\n\n const svg = await reuseOrCreatePromise(\n src,\n async () => getSvg(src, this),\n cache\n );\n if (svg && !this.childNodes.length) {\n this.append(svg.cloneNode(true));\n }\n }\n}\n"]}
|
|
@@ -6,6 +6,8 @@ import type { IDisposable } from "@itwin/core-bentley";
|
|
|
6
6
|
* A custom hook which creates a disposable object and manages its disposal on unmount
|
|
7
7
|
* or factory method change.
|
|
8
8
|
* @public
|
|
9
|
+
* @deprecated in 4.9.0. This hook is not compatible with React 18 Strict mode. Use [[useOptionalDisposable]] or `useState` + `useEffect` for
|
|
10
|
+
* creating and disposing disposable resources.
|
|
9
11
|
*/
|
|
10
12
|
export declare function useDisposable<TDisposable extends IDisposable>(createDisposable: () => TDisposable): TDisposable;
|
|
11
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisposable.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useDisposable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"useDisposable.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useDisposable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,WAAW,SAAS,WAAW,EAC3D,gBAAgB,EAAE,MAAM,WAAW,GAClC,WAAW,CAoBb;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,SAAS,WAAW,EACnE,gBAAgB,EAAE,MAAM,WAAW,GAAG,SAAS,GAC9C,WAAW,GAAG,SAAS,CAYzB"}
|
|
@@ -13,9 +13,26 @@ const react_1 = require("react");
|
|
|
13
13
|
* A custom hook which creates a disposable object and manages its disposal on unmount
|
|
14
14
|
* or factory method change.
|
|
15
15
|
* @public
|
|
16
|
+
* @deprecated in 4.9.0. This hook is not compatible with React 18 Strict mode. Use [[useOptionalDisposable]] or `useState` + `useEffect` for
|
|
17
|
+
* creating and disposing disposable resources.
|
|
16
18
|
*/
|
|
17
19
|
function useDisposable(createDisposable) {
|
|
18
|
-
|
|
20
|
+
const [value, setValue] = (0, react_1.useState)(() => createDisposable());
|
|
21
|
+
// need to capture initial disposable created during render loop in order to dispose later
|
|
22
|
+
const prevValue = (0, react_1.useRef)(value);
|
|
23
|
+
const useInitialValue = (0, react_1.useRef)(true);
|
|
24
|
+
(0, react_1.useEffect)(() => {
|
|
25
|
+
// do not create new disposable on initial render. It was created during render loop.
|
|
26
|
+
if (!useInitialValue.current) {
|
|
27
|
+
prevValue.current = createDisposable();
|
|
28
|
+
setValue(prevValue.current);
|
|
29
|
+
}
|
|
30
|
+
useInitialValue.current = false;
|
|
31
|
+
return () => {
|
|
32
|
+
prevValue.current.dispose();
|
|
33
|
+
};
|
|
34
|
+
}, [createDisposable]);
|
|
35
|
+
return value;
|
|
19
36
|
}
|
|
20
37
|
exports.useDisposable = useDisposable;
|
|
21
38
|
/**
|
|
@@ -25,18 +42,12 @@ exports.useDisposable = useDisposable;
|
|
|
25
42
|
* @public
|
|
26
43
|
*/
|
|
27
44
|
function useOptionalDisposable(createDisposable) {
|
|
28
|
-
const [value, setValue] = (0, react_1.useState)(
|
|
29
|
-
const initialValue = (0, react_1.useRef)(true);
|
|
45
|
+
const [value, setValue] = (0, react_1.useState)();
|
|
30
46
|
(0, react_1.useEffect)(() => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
initialValue.current = false;
|
|
47
|
+
const disposable = createDisposable();
|
|
48
|
+
setValue(disposable);
|
|
35
49
|
return () => {
|
|
36
|
-
|
|
37
|
-
prev && prev.dispose();
|
|
38
|
-
return prev;
|
|
39
|
-
});
|
|
50
|
+
disposable && disposable.dispose();
|
|
40
51
|
};
|
|
41
52
|
}, [createDisposable]);
|
|
42
53
|
return value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisposable.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useDisposable.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAAoD;AAGpD
|
|
1
|
+
{"version":3,"file":"useDisposable.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useDisposable.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAAoD;AAGpD;;;;;;GAMG;AACH,SAAgB,aAAa,CAC3B,gBAAmC;IAEnC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC7D,0FAA0F;IAC1F,MAAM,SAAS,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IAChC,MAAM,eAAe,GAAG,IAAA,cAAM,EAAC,IAAI,CAAC,CAAC;IAErC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,qFAAqF;QACrF,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE;YAC5B,SAAS,CAAC,OAAO,GAAG,gBAAgB,EAAE,CAAC;YACvC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SAC7B;QAED,eAAe,CAAC,OAAO,GAAG,KAAK,CAAC;QAChC,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,KAAK,CAAC;AACf,CAAC;AAtBD,sCAsBC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,gBAA+C;IAE/C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,GAA2B,CAAC;IAE9D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,gBAAgB,EAAE,CAAC;QACtC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrB,OAAO,GAAG,EAAE;YACV,UAAU,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;QACrC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,KAAK,CAAC;AACf,CAAC;AAdD,sDAcC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { useEffect, useRef, useState } from \"react\";\nimport type { IDisposable } from \"@itwin/core-bentley\";\n\n/**\n * A custom hook which creates a disposable object and manages its disposal on unmount\n * or factory method change.\n * @public\n * @deprecated in 4.9.0. This hook is not compatible with React 18 Strict mode. Use [[useOptionalDisposable]] or `useState` + `useEffect` for\n * creating and disposing disposable resources.\n */\nexport function useDisposable<TDisposable extends IDisposable>(\n createDisposable: () => TDisposable\n): TDisposable {\n const [value, setValue] = useState(() => createDisposable());\n // need to capture initial disposable created during render loop in order to dispose later\n const prevValue = useRef(value);\n const useInitialValue = useRef(true);\n\n useEffect(() => {\n // do not create new disposable on initial render. It was created during render loop.\n if (!useInitialValue.current) {\n prevValue.current = createDisposable();\n setValue(prevValue.current);\n }\n\n useInitialValue.current = false;\n return () => {\n prevValue.current.dispose();\n };\n }, [createDisposable]);\n\n return value;\n}\n\n/**\n * A custom hook which calls the factory method to create a disposable object\n * which might as well be undefined. If the result was a disposable object, the\n * hook takes care of disposing it when necessary.\n * @public\n */\nexport function useOptionalDisposable<TDisposable extends IDisposable>(\n createDisposable: () => TDisposable | undefined\n): TDisposable | undefined {\n const [value, setValue] = useState<TDisposable | undefined>();\n\n useEffect(() => {\n const disposable = createDisposable();\n setValue(disposable);\n return () => {\n disposable && disposable.dispose();\n };\n }, [createDisposable]);\n\n return value;\n}\n"]}
|
|
@@ -36,5 +36,5 @@ export declare function ElementResizeObserver({ watchedElement, render, }: {
|
|
|
36
36
|
export declare function ResizableContainerObserver({ onResize, children, }: {
|
|
37
37
|
onResize: (width: number, height: number) => void;
|
|
38
38
|
children?: React.ReactNode;
|
|
39
|
-
}): JSX.Element;
|
|
39
|
+
}): React.JSX.Element;
|
|
40
40
|
//# sourceMappingURL=useResizeObserver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EACjD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,sCAuHnD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,0BA+GrD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,cAAc,EACd,MAAM,GACP,EAAE;IACD,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,YAAY,CAAC;CACxD,sEAGA;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,
|
|
1
|
+
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EACjD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,sCAuHnD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,0BA+GrD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,cAAc,EACd,MAAM,GACP,EAAE;IACD,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,YAAY,CAAC;CACxD,sEAGA;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,qBA2CA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiCore.d.ts","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMvD;;;GAGG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IACpC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAe;IAE5C;;;OAGG;WACiB,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBzE,oDAAoD;WACtC,SAAS;IAQvB,gDAAgD;IAChD,WAAkB,WAAW,IAAI,OAAO,CAEvC;IAED;;OAEG;IACH,WAAkB,YAAY,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"UiCore.d.ts","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMvD;;;GAGG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IACpC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAe;IAE5C;;;OAGG;WACiB,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBzE,oDAAoD;WACtC,SAAS;IAQvB,gDAAgD;IAChD,WAAkB,WAAW,IAAI,OAAO,CAEvC;IAED;;OAEG;IACH,WAAkB,YAAY,IAAI,YAAY,CAU7C;IAED,kDAAkD;IAClD,WAAkB,qBAAqB,IAAI,MAAM,CAEhD;IAED;;OAEG;WACW,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAavD,gBAAgB;IAChB,WAAkB,WAAW,IAAI,MAAM,CAEtC;IAED,gBAAgB;WACF,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;CAK/C"}
|
|
@@ -52,6 +52,7 @@ class UiCore {
|
|
|
52
52
|
static get localization() {
|
|
53
53
|
// istanbul ignore else
|
|
54
54
|
if (!UiCore._localization)
|
|
55
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
55
56
|
throw new UiError(UiCore.loggerCategory(this), "localization: UiCore.initialize has not been called. Unable to return Localization object.");
|
|
56
57
|
// istanbul ignore next
|
|
57
58
|
return UiCore._localization;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,4EAA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CAAC,aAAa;YACvB,mDAAmD;YACnD,MAAM,IAAI,OAAO,CACf,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAC3B,4FAA4F,CAC7F,CAAC;QACJ,uBAAuB;QACvB,OAAO,MAAM,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YACzB,MAAM,CAAC,QAAQ,CACb,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAC3B,4FAA4F,CAC7F,CAAC;YACF,OAAO,EAAE,CAAC;SACX;QACD,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,EAAE;YAClD,EAAE,EAAE,MAAM,CAAC,qBAAqB;SACjC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC;IAClB,CAAC;;AApFc,mBAAY,GAAG,KAAK,CAAC;SADzB,MAAM","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Import color variables, layout variables and Sass classes barrel file */\nimport \"./colorthemes.scss\";\nimport \"./colorvariables.scss\";\nimport \"./layout-variables.scss\";\nimport \"./classes.scss\";\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { IconWebComponent } from \"./utils/IconWebComponent\";\nimport { getObjectClassName } from \"./utils/getObjectClassName\";\n// cSpell:ignore colorthemes colorvariables\n\n/**\n * Manages the Localization service for the core-react package.\n * @public\n */\nexport class UiCore {\n private static _initialized = false;\n private static _localization?: Localization;\n\n /**\n * Registers the Localization service namespace for UiCore.\n * @param localization The internationalization service created by the host application.\n */\n public static async initialize(localization: Localization): Promise<void> {\n if (UiCore._initialized) {\n Logger.logInfo(\n UiCore.loggerCategory(UiCore),\n `UiCore.initialize already called`\n );\n return;\n }\n\n UiCore._localization = localization;\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\n if (window.customElements.get(\"svg-loader\") === undefined)\n window.customElements.define(\"svg-loader\", IconWebComponent);\n\n UiCore._initialized = true;\n }\n\n /** Unregisters the UiCore localization namespace */\n public static terminate() {\n if (UiCore._localization)\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\n UiCore._localization = undefined;\n\n UiCore._initialized = false;\n }\n\n /** Determines if UiCore has been initialized */\n public static get initialized(): boolean {\n return UiCore._initialized;\n }\n\n /** The internationalization service created by the host application.\n * @internal\n */\n public static get localization(): Localization {\n // istanbul ignore else\n if (!UiCore._localization)\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiCore.loggerCategory(this),\n \"localization: UiCore.initialize has not been called. Unable to return Localization object.\"\n );\n // istanbul ignore next\n return UiCore._localization;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return \"UiCore\";\n }\n\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiCore\" namespace. Do NOT include the namespace in the key.\n * @internal\n */\n public static translate(key: string | string[]): string {\n if (!UiCore._localization) {\n Logger.logError(\n UiCore.loggerCategory(this),\n `translate: UiCore must be initialize with a localization provider. Returning blank string.`\n );\n return \"\";\n }\n return UiCore._localization.getLocalizedString(key, {\n ns: UiCore.localizationNamespace,\n });\n }\n\n /** @internal */\n public static get packageName(): string {\n return \"core-react\";\n }\n\n /** @internal */\n public static loggerCategory(obj: any): string {\n const className = getObjectClassName(obj);\n const category = UiCore.packageName + (className ? `.${className}` : \"\");\n return category;\n }\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Utilities
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import type { CommonProps } from "../utils/Props";
|
|
6
6
|
/** Beta Badge React component
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
|
-
export declare function BetaBadge(props: CommonProps): JSX.Element;
|
|
9
|
+
export declare function BetaBadge(props: CommonProps): React.JSX.Element;
|
|
10
10
|
//# sourceMappingURL=BetaBadge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,qBAG3C"}
|