@singularsystems/neo-react 1.0.0-alpha.2 → 1.0.0-beta.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 +98 -0
- package/README.md +4 -0
- package/dist/Modules/NeoReactModule.d.ts +4 -4
- package/dist/Modules/NeoReactModule.js +28 -26
- package/dist/Modules/ReactSetup.d.ts +2 -2
- package/dist/Modules/ReactSetup.js +17 -17
- package/dist/Modules/Types.d.ts +63 -61
- package/dist/Modules/Types.js +13 -12
- package/dist/React/AutoRunner.d.ts +5 -5
- package/dist/React/AutoRunner.js +94 -92
- package/dist/React/DataView.d.ts +6 -6
- package/dist/React/DataView.js +11 -11
- package/dist/React/ReactModelCreator.d.ts +11 -11
- package/dist/React/ReactModelCreator.js +165 -162
- package/dist/ReactComponents/Button.d.ts +24 -23
- package/dist/ReactComponents/Button.js +131 -123
- package/dist/ReactComponents/Card.d.ts +24 -23
- package/dist/ReactComponents/Card.js +56 -54
- package/dist/ReactComponents/Collapsable.d.ts +23 -23
- package/dist/ReactComponents/Collapsable.js +38 -38
- package/dist/ReactComponents/CollapsableBase.d.ts +13 -13
- package/dist/ReactComponents/CollapsableBase.js +42 -42
- package/dist/ReactComponents/ColorPicker.d.ts +26 -26
- package/dist/ReactComponents/ColorPicker.js +67 -67
- package/dist/ReactComponents/ComponentBase.d.ts +17 -17
- package/dist/ReactComponents/ComponentBase.js +33 -33
- package/dist/ReactComponents/ContextMenu/ContextMenu.d.ts +25 -24
- package/dist/ReactComponents/ContextMenu/ContextMenu.js +91 -88
- package/dist/ReactComponents/ContextMenu/ContextMenuContainer.d.ts +14 -14
- package/dist/ReactComponents/ContextMenu/ContextMenuContainer.js +48 -48
- package/dist/ReactComponents/ContextMenu/ContextMenuState.d.ts +8 -7
- package/dist/ReactComponents/ContextMenu/ContextMenuState.js +23 -23
- package/dist/ReactComponents/DatePicker.d.ts +19 -19
- package/dist/ReactComponents/DatePicker.js +53 -53
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.d.ts +93 -83
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.js +222 -188
- package/dist/ReactComponents/DropDown/DropDown.d.ts +44 -44
- package/dist/ReactComponents/DropDown/DropDown.js +138 -134
- package/dist/ReactComponents/DropDown/DropDownBase.d.ts +16 -15
- package/dist/ReactComponents/DropDown/DropDownBase.js +86 -108
- package/dist/ReactComponents/DropDown/LookupHelper.d.ts +13 -0
- package/dist/ReactComponents/DropDown/LookupHelper.js +45 -0
- package/dist/ReactComponents/ErrorHandler.d.ts +9 -8
- package/dist/ReactComponents/ErrorHandler.js +92 -91
- package/dist/ReactComponents/FileManager/FileBasicInput.d.ts +20 -20
- package/dist/ReactComponents/FileManager/FileBasicInput.js +70 -70
- package/dist/ReactComponents/FileManager/FileContext.d.ts +16 -16
- package/dist/ReactComponents/FileManager/FileContext.js +24 -24
- package/dist/ReactComponents/FileManager/FileDropArea.d.ts +19 -18
- package/dist/ReactComponents/FileManager/FileDropArea.js +66 -64
- package/dist/ReactComponents/FileManager/FileInput.d.ts +44 -42
- package/dist/ReactComponents/FileManager/FileInput.js +191 -189
- package/dist/ReactComponents/FileManager/FileUploadButton.d.ts +17 -17
- package/dist/ReactComponents/FileManager/FileUploadButton.js +49 -49
- package/dist/ReactComponents/FileManager/FileUploadProgress.d.ts +14 -14
- package/dist/ReactComponents/FileManager/FileUploadProgress.js +35 -35
- package/dist/ReactComponents/Form.d.ts +19 -18
- package/dist/ReactComponents/Form.js +90 -90
- package/dist/ReactComponents/FormContext.d.ts +33 -31
- package/dist/ReactComponents/FormContext.js +39 -40
- package/dist/ReactComponents/FormGroup/FormGroup.d.ts +37 -37
- package/dist/ReactComponents/FormGroup/FormGroup.js +83 -84
- package/dist/ReactComponents/FormGroup/FormGroupFloating.d.ts +19 -19
- package/dist/ReactComponents/FormGroup/FormGroupFloating.js +97 -97
- package/dist/ReactComponents/FormGroup/FormGroupInline.d.ts +11 -11
- package/dist/ReactComponents/FormGroup/FormGroupInline.js +43 -43
- package/dist/ReactComponents/Grid/ButtonColumn.d.ts +47 -47
- package/dist/ReactComponents/Grid/ButtonColumn.js +81 -82
- package/dist/ReactComponents/Grid/Column.d.ts +47 -47
- package/dist/ReactComponents/Grid/Column.js +205 -205
- package/dist/ReactComponents/Grid/ColumnHelper.d.ts +12 -12
- package/dist/ReactComponents/Grid/ColumnHelper.js +19 -19
- package/dist/ReactComponents/Grid/Grid.d.ts +87 -90
- package/dist/ReactComponents/Grid/Grid.js +203 -203
- package/dist/ReactComponents/Grid/Row.d.ts +81 -81
- package/dist/ReactComponents/Grid/Row.js +200 -201
- package/dist/ReactComponents/Grid/_Exports.d.ts +5 -5
- package/dist/ReactComponents/Grid/_Exports.js +5 -5
- package/dist/ReactComponents/GridLayout.d.ts +20 -20
- package/dist/ReactComponents/GridLayout.js +38 -38
- package/dist/ReactComponents/Icons/FontAwesomeIconFactory.d.ts +23 -0
- package/dist/ReactComponents/Icons/FontAwesomeIconFactory.js +43 -0
- package/dist/ReactComponents/Icons/IIconFactory.d.ts +21 -0
- package/dist/ReactComponents/Icons/IIconFactory.js +1 -0
- package/dist/ReactComponents/Icons/IconFactory.d.ts +9 -0
- package/dist/ReactComponents/Icons/IconFactory.js +45 -0
- package/dist/ReactComponents/Icons/index.d.ts +3 -0
- package/dist/ReactComponents/Icons/index.js +2 -0
- package/dist/ReactComponents/Input.d.ts +45 -45
- package/dist/ReactComponents/Input.js +153 -152
- package/dist/ReactComponents/InputHelpers.d.ts +6 -5
- package/dist/ReactComponents/InputHelpers.js +29 -33
- package/dist/ReactComponents/Link.d.ts +13 -13
- package/dist/ReactComponents/Link.js +28 -28
- package/dist/ReactComponents/Loader.d.ts +18 -18
- package/dist/ReactComponents/Loader.js +57 -57
- package/dist/ReactComponents/Misc.d.ts +15 -15
- package/dist/ReactComponents/Misc.js +28 -28
- package/dist/ReactComponents/Modal/Modal.d.ts +11 -11
- package/dist/ReactComponents/Modal/Modal.js +129 -129
- package/dist/ReactComponents/Modal/ModalContainer.d.ts +17 -17
- package/dist/ReactComponents/Modal/ModalContainer.js +37 -37
- package/dist/ReactComponents/Modal/ModalPortal.d.ts +16 -15
- package/dist/ReactComponents/Modal/ModalPortal.js +27 -27
- package/dist/ReactComponents/Notifications/Alert.d.ts +7 -6
- package/dist/ReactComponents/Notifications/Alert.js +38 -35
- package/dist/ReactComponents/Notifications/Toast.d.ts +9 -8
- package/dist/ReactComponents/Notifications/Toast.js +47 -45
- package/dist/ReactComponents/Notifications/ToastContainer.d.ts +8 -8
- package/dist/ReactComponents/Notifications/ToastContainer.js +18 -18
- package/dist/ReactComponents/NumberInput.d.ts +57 -50
- package/dist/ReactComponents/NumberInput.js +260 -246
- package/dist/ReactComponents/Paging/BasicPagerControls.d.ts +26 -25
- package/dist/ReactComponents/Paging/BasicPagerControls.js +57 -55
- package/dist/ReactComponents/Paging/PageSizeControl.d.ts +11 -11
- package/dist/ReactComponents/Paging/PageSizeControl.js +21 -21
- package/dist/ReactComponents/Paging/Pager.d.ts +24 -24
- package/dist/ReactComponents/Paging/Pager.js +41 -41
- package/dist/ReactComponents/ProgressBar.d.ts +19 -19
- package/dist/ReactComponents/ProgressBar.js +52 -52
- package/dist/ReactComponents/PropTypes.d.ts +161 -161
- package/dist/ReactComponents/PropTypes.js +253 -236
- package/dist/ReactComponents/RadioList.d.ts +29 -29
- package/dist/ReactComponents/RadioList.js +59 -77
- package/dist/ReactComponents/Slider.d.ts +28 -28
- package/dist/ReactComponents/Slider.js +76 -76
- package/dist/ReactComponents/StateObserver.d.ts +15 -15
- package/dist/ReactComponents/StateObserver.js +35 -35
- package/dist/ReactComponents/Tabs/Tab.d.ts +42 -41
- package/dist/ReactComponents/Tabs/Tab.js +71 -72
- package/dist/ReactComponents/Tabs/TabContainer.d.ts +44 -44
- package/dist/ReactComponents/Tabs/TabContainer.js +98 -98
- package/dist/ReactComponents/Tabs/TabManager.d.ts +62 -62
- package/dist/ReactComponents/Tabs/TabManager.js +154 -154
- package/dist/ReactComponents/Tooltip.d.ts +20 -19
- package/dist/ReactComponents/Tooltip.js +51 -51
- package/dist/ReactComponents/TooltipHelper.d.ts +8 -8
- package/dist/ReactComponents/TooltipHelper.js +84 -84
- package/dist/ReactComponents/TooltipProvider.d.ts +30 -30
- package/dist/ReactComponents/TooltipProvider.js +111 -111
- package/dist/ReactComponents/ValidationSummary.d.ts +23 -22
- package/dist/ReactComponents/ValidationSummary.js +46 -43
- package/dist/ReactComponents/_Exports.d.ts +41 -41
- package/dist/ReactComponents/_Exports.js +41 -41
- package/dist/ReactComponents/_Managers.d.ts +4 -4
- package/dist/ReactComponents/_Managers.js +4 -4
- package/dist/Routing/BreadCrumbItem.d.ts +14 -14
- package/dist/Routing/BreadCrumbItem.js +12 -12
- package/dist/Routing/IRouteChangedProps.d.ts +31 -31
- package/dist/Routing/IRouteChangedProps.js +1 -1
- package/dist/Routing/IRouteParameter.d.ts +22 -22
- package/dist/Routing/IRouteParameter.js +9 -9
- package/dist/Routing/MenuRoute.d.ts +25 -24
- package/dist/Routing/MenuRoute.js +24 -24
- package/dist/Routing/NavigationHelper.d.ts +41 -40
- package/dist/Routing/NavigationHelper.js +61 -61
- package/dist/Routing/PageLeaveHandler.d.ts +13 -13
- package/dist/Routing/PageLeaveHandler.js +74 -74
- package/dist/Routing/RouteProvider.d.ts +31 -31
- package/dist/Routing/RouteProvider.js +92 -92
- package/dist/Routing/RouteView.d.ts +50 -50
- package/dist/Routing/RouteView.js +143 -144
- package/dist/Routing/RoutingState.d.ts +18 -15
- package/dist/Routing/RoutingState.js +45 -40
- package/dist/Routing/ViewParameter.d.ts +80 -58
- package/dist/Routing/ViewParameter.js +116 -95
- package/dist/Routing/ViewParameterList.d.ts +53 -53
- package/dist/Routing/ViewParameterList.js +163 -145
- package/dist/Routing/index.d.ts +9 -9
- package/dist/Routing/index.js +6 -6
- package/dist/Services/DisposeHelper.d.ts +15 -15
- package/dist/Services/DisposeHelper.js +40 -41
- package/dist/Services/IDisposeHelper.d.ts +12 -12
- package/dist/Services/IDisposeHelper.js +1 -1
- package/dist/Views/EmptyViewModel.d.ts +5 -5
- package/dist/Views/EmptyViewModel.js +14 -14
- package/dist/Views/IViewModel.d.ts +16 -16
- package/dist/Views/IViewModel.js +1 -1
- package/dist/Views/PersistentViewBase.d.ts +10 -10
- package/dist/Views/PersistentViewBase.js +21 -21
- package/dist/Views/ViewBase.d.ts +70 -71
- package/dist/Views/ViewBase.js +166 -153
- package/dist/Views/ViewComponentBase.d.ts +19 -13
- package/dist/Views/ViewComponentBase.js +24 -21
- package/dist/Views/ViewModelBase.d.ts +57 -56
- package/dist/Views/ViewModelBase.js +122 -118
- package/dist/Views/ViewState.d.ts +13 -13
- package/dist/Views/ViewState.js +9 -9
- package/dist/Views/index.d.ts +5 -5
- package/dist/Views/index.js +5 -5
- package/dist/index.d.ts +11 -10
- package/dist/index.js +10 -9
- package/package.json +26 -26
- package/styles/DatePicker.scss +2 -2
- package/styles/Forms.scss +5 -0
- package/styles/Validation.scss +0 -9
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { __decorate, __extends } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import CollapsableBase from '../CollapsableBase';
|
|
4
|
-
import { observer } from 'mobx-react';
|
|
5
|
-
import { Components,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.countDownRef.current.style.
|
|
21
|
-
Components.AnimationHelper.triggerReflow(this.countDownRef.current);
|
|
22
|
-
this.countDownRef.current.style.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { __decorate, __extends } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import CollapsableBase from '../CollapsableBase';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import { Components, Misc } from '@singularsystems/neo-core';
|
|
6
|
+
import { NeoReactTypes } from '../../Modules/Types';
|
|
7
|
+
var Toast = /** @class */ (function (_super) {
|
|
8
|
+
__extends(Toast, _super);
|
|
9
|
+
function Toast() {
|
|
10
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
_this.iconFactory = Misc.Globals.appService.get(NeoReactTypes.Components.IconFactory);
|
|
12
|
+
_this.countDownRef = React.createRef();
|
|
13
|
+
return _this;
|
|
14
|
+
}
|
|
15
|
+
Toast.prototype.afterRender = function (isInitial) {
|
|
16
|
+
_super.prototype.afterRender.call(this, isInitial);
|
|
17
|
+
if (this.countDownRef.current) {
|
|
18
|
+
// Countdown. Set the animation time to the timeout.
|
|
19
|
+
this.countDownRef.current.style.transition = "none";
|
|
20
|
+
this.countDownRef.current.style.width = "100%";
|
|
21
|
+
Components.AnimationHelper.triggerReflow(this.countDownRef.current);
|
|
22
|
+
this.countDownRef.current.style.transition = "width linear " + this.props.autoCloseTimeout + "ms";
|
|
23
|
+
Components.AnimationHelper.triggerReflow(this.countDownRef.current);
|
|
24
|
+
this.countDownRef.current.style.width = "0%";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
Toast.prototype.render = function () {
|
|
28
|
+
var _a = this.props, variant = _a.variant, heading = _a.heading, show = _a.show, bindShow = _a.bindShow, icon = _a.icon;
|
|
29
|
+
this.shouldShow = show !== false && (!bindShow || bindShow.value);
|
|
30
|
+
return (React.createElement("div", { className: "toast show collapsable", role: "alert", "aria-live": "assertive", "aria-atomic": "true", ref: this.containerRef },
|
|
31
|
+
React.createElement("div", { className: "toast-header toast-header-" + variant },
|
|
32
|
+
React.createElement("strong", { className: "mr-auto alert-heading" }, heading),
|
|
33
|
+
bindShow && React.createElement("button", { type: "button", className: "ml-2 mb-1 close", "data-dismiss": "toast", "aria-label": "Close", onClick: this.onClose },
|
|
34
|
+
React.createElement("span", { "aria-hidden": "true" }, "\u00D7"))),
|
|
35
|
+
this.props.autoCloseTimeout && React.createElement("div", { className: "toast-count-down toast-count-down-" + variant, ref: this.countDownRef }),
|
|
36
|
+
React.createElement("div", { className: "toast-body" },
|
|
37
|
+
icon && React.createElement("div", { className: "notification-icon-container" },
|
|
38
|
+
this.iconFactory.getIconComponent(icon),
|
|
39
|
+
React.createElement("div", null, this.props.children)),
|
|
40
|
+
!icon && this.props.children)));
|
|
41
|
+
};
|
|
42
|
+
Toast = __decorate([
|
|
43
|
+
observer
|
|
44
|
+
], Toast);
|
|
45
|
+
return Toast;
|
|
46
|
+
}(CollapsableBase));
|
|
47
|
+
export default Toast;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Components } from '@singularsystems/neo-core';
|
|
3
|
-
export interface IToastContainerProps {
|
|
4
|
-
notificationStore: Components.INotificationStore;
|
|
5
|
-
}
|
|
6
|
-
export default class ToastContainer extends React.Component<IToastContainerProps> {
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Components } from '@singularsystems/neo-core';
|
|
3
|
+
export interface IToastContainerProps {
|
|
4
|
+
notificationStore: Components.INotificationStore;
|
|
5
|
+
}
|
|
6
|
+
export default class ToastContainer extends React.Component<IToastContainerProps> {
|
|
7
|
+
render(): JSX.Element;
|
|
8
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { __assign, __decorate, __extends } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import Toast from './Toast';
|
|
4
|
-
import { observer } from 'mobx-react';
|
|
5
|
-
var ToastContainer = /** @class */ (function (_super) {
|
|
6
|
-
__extends(ToastContainer, _super);
|
|
7
|
-
function ToastContainer() {
|
|
8
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
9
|
-
}
|
|
10
|
-
ToastContainer.prototype.render = function () {
|
|
11
|
-
return (React.createElement("div", { className: "toast-container" }, this.props.notificationStore.notifications.map(function (notification) { return (React.createElement(Toast, __assign({ key: notification.identifier }, notification.options, { refreshValue: notification.refreshValue }), notification.body)); })));
|
|
12
|
-
};
|
|
13
|
-
ToastContainer = __decorate([
|
|
14
|
-
observer
|
|
15
|
-
], ToastContainer);
|
|
16
|
-
return ToastContainer;
|
|
17
|
-
}(React.Component));
|
|
18
|
-
export default ToastContainer;
|
|
1
|
+
import { __assign, __decorate, __extends } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Toast from './Toast';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
var ToastContainer = /** @class */ (function (_super) {
|
|
6
|
+
__extends(ToastContainer, _super);
|
|
7
|
+
function ToastContainer() {
|
|
8
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
ToastContainer.prototype.render = function () {
|
|
11
|
+
return (React.createElement("div", { className: "toast-container" }, this.props.notificationStore.notifications.map(function (notification) { return (React.createElement(Toast, __assign({ key: notification.identifier }, notification.options, { refreshValue: notification.refreshValue }), notification.body)); })));
|
|
12
|
+
};
|
|
13
|
+
ToastContainer = __decorate([
|
|
14
|
+
observer
|
|
15
|
+
], ToastContainer);
|
|
16
|
+
return ToastContainer;
|
|
17
|
+
}(React.Component));
|
|
18
|
+
export default ToastContainer;
|
|
@@ -1,50 +1,57 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IBindableEditorProps } from './PropTypes';
|
|
3
|
-
import { FormContext } from './FormContext';
|
|
4
|
-
import { Misc } from '@singularsystems/neo-core';
|
|
5
|
-
import Decimal from 'decimal.js-light';
|
|
6
|
-
import ComponentBase from './ComponentBase';
|
|
7
|
-
export interface INumberInputSpecificProps {
|
|
8
|
-
/** Format string of number */
|
|
9
|
-
formatString?: string;
|
|
10
|
-
/** Pre-defined format */
|
|
11
|
-
format?: Misc.NumberFormat;
|
|
12
|
-
/** Override currency symbol. */
|
|
13
|
-
currencySymbol?: string;
|
|
14
|
-
/** If set to false, the number will not be rounded to the number of decimals in the format string. */
|
|
15
|
-
autoRound?: boolean;
|
|
16
|
-
/** Text to display if the value is zero or null. E.g. '-' */
|
|
17
|
-
zeroText?: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
private
|
|
42
|
-
private
|
|
43
|
-
private
|
|
44
|
-
private
|
|
45
|
-
private
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IBindableEditorProps } from './PropTypes';
|
|
3
|
+
import { FormContext } from './FormContext';
|
|
4
|
+
import { Misc, Model } from '@singularsystems/neo-core';
|
|
5
|
+
import Decimal from 'decimal.js-light';
|
|
6
|
+
import ComponentBase from './ComponentBase';
|
|
7
|
+
export interface INumberInputSpecificProps {
|
|
8
|
+
/** Format string of number */
|
|
9
|
+
formatString?: string;
|
|
10
|
+
/** Pre-defined format */
|
|
11
|
+
format?: Misc.NumberFormat;
|
|
12
|
+
/** Override currency symbol. */
|
|
13
|
+
currencySymbol?: string;
|
|
14
|
+
/** If set to false, the number will not be rounded to the number of decimals in the format string. */
|
|
15
|
+
autoRound?: boolean;
|
|
16
|
+
/** Text to display if the value is zero or null. E.g. '-' */
|
|
17
|
+
zeroText?: string;
|
|
18
|
+
/** Set to true to use the browsers native numeric input control. Note: only decimal place formatting is supported in this mode. */
|
|
19
|
+
native?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface INumberInputProps extends IBindableEditorProps<HTMLInputElement> {
|
|
22
|
+
numProps?: INumberInputSpecificProps;
|
|
23
|
+
}
|
|
24
|
+
export declare class FormatState {
|
|
25
|
+
isPercent: boolean;
|
|
26
|
+
hasExternalPercentSymbol: boolean;
|
|
27
|
+
formatString: string;
|
|
28
|
+
/** How many decimals the value is allowed. */
|
|
29
|
+
allowedDecimals: number;
|
|
30
|
+
zeroText?: string | undefined;
|
|
31
|
+
useNative?: boolean | undefined;
|
|
32
|
+
constructor(isPercent: boolean, hasExternalPercentSymbol: boolean, formatString: string,
|
|
33
|
+
/** How many decimals the value is allowed. */
|
|
34
|
+
allowedDecimals: number, zeroText?: string | undefined, useNative?: boolean | undefined);
|
|
35
|
+
static create(propertyInfo: Model.PropertyInfo, numericType: Misc.DataType, numProps?: INumberInputSpecificProps, appendText?: string): FormatState;
|
|
36
|
+
getFormattedValue(value?: number | Decimal | null): string;
|
|
37
|
+
}
|
|
38
|
+
export default class NumberInput extends ComponentBase<INumberInputProps> {
|
|
39
|
+
static contextType: React.Context<import("./FormContext").FormContextParams>;
|
|
40
|
+
context: React.ContextType<typeof FormContext>;
|
|
41
|
+
private hasFocus;
|
|
42
|
+
private numericType;
|
|
43
|
+
private isReadOnly;
|
|
44
|
+
private inputElement;
|
|
45
|
+
private recalcFormatState;
|
|
46
|
+
private formatState;
|
|
47
|
+
constructor(props: INumberInputProps);
|
|
48
|
+
private onChanged;
|
|
49
|
+
private onFocus;
|
|
50
|
+
private getBindValueAsNumber;
|
|
51
|
+
private setFocusedText;
|
|
52
|
+
private onBlur;
|
|
53
|
+
private onKeyDown;
|
|
54
|
+
componentDidMount(): void;
|
|
55
|
+
componentWillUnmount(): void;
|
|
56
|
+
render(): JSX.Element;
|
|
57
|
+
}
|