@singularsystems/neo-react 0.10.44 → 0.10.47
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.
|
@@ -85,7 +85,11 @@ var NumberInput = /** @class */ (function (_super) {
|
|
|
85
85
|
NumberInput.prototype.onChanged = function (e) {
|
|
86
86
|
var newValue;
|
|
87
87
|
if (e.target.value !== "") {
|
|
88
|
-
|
|
88
|
+
var testValue = e.target.value;
|
|
89
|
+
if (testValue[0] === "-") {
|
|
90
|
+
testValue = testValue.substring(1);
|
|
91
|
+
}
|
|
92
|
+
if (isNaN(parseFloat(testValue)) || !validDecimalRegex.test(testValue)) {
|
|
89
93
|
return;
|
|
90
94
|
}
|
|
91
95
|
}
|
|
@@ -47,15 +47,16 @@ export declare class TabManager<T extends string = string> {
|
|
|
47
47
|
private getTab;
|
|
48
48
|
/**
|
|
49
49
|
* Marks the tab as 'initial'.
|
|
50
|
-
* @param
|
|
50
|
+
* @param reInitialise True if the tabs onInitialise() should be invoked.
|
|
51
51
|
*/
|
|
52
52
|
reset(tabKey: T, reInitialise?: boolean): void;
|
|
53
|
-
/** Calls
|
|
53
|
+
/** Calls onInitialise() if the tab has not yet initialised. */
|
|
54
54
|
initialiseTab(tabKey: T): void;
|
|
55
55
|
/**
|
|
56
|
-
* Marks all tabs as 'initial'.
|
|
56
|
+
* Marks all tabs as 'initial', causing onInitialise() to be called the next time each is displayed.
|
|
57
|
+
* @param reInitialise True if the onInitialise() should be called on the currently displayed tab.
|
|
57
58
|
*/
|
|
58
|
-
resetAll(): void;
|
|
59
|
+
resetAll(reInitialise?: boolean): void;
|
|
59
60
|
private tabs;
|
|
60
61
|
private onTabChanged;
|
|
61
62
|
}
|
|
@@ -92,7 +92,7 @@ var TabManager = /** @class */ (function () {
|
|
|
92
92
|
};
|
|
93
93
|
/**
|
|
94
94
|
* Marks the tab as 'initial'.
|
|
95
|
-
* @param
|
|
95
|
+
* @param reInitialise True if the tabs onInitialise() should be invoked.
|
|
96
96
|
*/
|
|
97
97
|
TabManager.prototype.reset = function (tabKey, reInitialise) {
|
|
98
98
|
if (reInitialise === void 0) { reInitialise = false; }
|
|
@@ -106,7 +106,7 @@ var TabManager = /** @class */ (function () {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
/** Calls
|
|
109
|
+
/** Calls onInitialise() if the tab has not yet initialised. */
|
|
110
110
|
TabManager.prototype.initialiseTab = function (tabKey) {
|
|
111
111
|
var tab = this.getTab(tabKey);
|
|
112
112
|
if (tab && !tab.hasFetched) {
|
|
@@ -114,10 +114,15 @@ var TabManager = /** @class */ (function () {
|
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
/**
|
|
117
|
-
* Marks all tabs as 'initial'.
|
|
117
|
+
* Marks all tabs as 'initial', causing onInitialise() to be called the next time each is displayed.
|
|
118
|
+
* @param reInitialise True if the onInitialise() should be called on the currently displayed tab.
|
|
118
119
|
*/
|
|
119
|
-
TabManager.prototype.resetAll = function () {
|
|
120
|
-
|
|
120
|
+
TabManager.prototype.resetAll = function (reInitialise) {
|
|
121
|
+
if (reInitialise === void 0) { reInitialise = false; }
|
|
122
|
+
var currentTabKey = this.observable.peek;
|
|
123
|
+
for (var tabKey in this.tabs) {
|
|
124
|
+
this.reset(tabKey, reInitialise && currentTabKey === tabKey);
|
|
125
|
+
}
|
|
121
126
|
};
|
|
122
127
|
TabManager.prototype.onTabChanged = function () {
|
|
123
128
|
var tab = this.getTab(this.observable.peek);
|
package/package.json
CHANGED
package/styles/Validation.scss
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
// Input boxes
|
|
2
2
|
.form-control {
|
|
3
3
|
&.is-invalid {
|
|
4
|
-
padding-right: 0.75rem;
|
|
5
|
-
background: none;
|
|
4
|
+
padding-right: 0.75rem !important;
|
|
5
|
+
background-image: none;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
+
select.form-control.is-invalid {
|
|
9
|
+
padding-right: 0.75rem !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
.form-control.is-invalid.warning {
|
|
9
13
|
border-color: $validation-border-warning;
|
|
10
14
|
|
|
@@ -30,6 +34,37 @@
|
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
36
|
|
|
37
|
+
// Autocomplete drop down
|
|
38
|
+
.react-select-bs {
|
|
39
|
+
&.is-invalid.error {
|
|
40
|
+
.react-select-bs__control {
|
|
41
|
+
border-color: $validation-color-error;
|
|
42
|
+
|
|
43
|
+
&.react-select-bs__control--is-focused {
|
|
44
|
+
box-shadow: $validation-shadow-error;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&.is-invalid.warning {
|
|
49
|
+
.react-select-bs__control {
|
|
50
|
+
border-color: $validation-color-warning;
|
|
51
|
+
|
|
52
|
+
&.react-select-bs__control--is-focused {
|
|
53
|
+
box-shadow: $validation-shadow-warning;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
&.is-invalid.info {
|
|
58
|
+
.react-select-bs__control {
|
|
59
|
+
border-color: $validation-color-info;
|
|
60
|
+
|
|
61
|
+
&.react-select-bs__control--is-focused {
|
|
62
|
+
box-shadow: $validation-shadow-info;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
33
68
|
// Text below input boxes
|
|
34
69
|
.invalid-feedback {
|
|
35
70
|
|