@gpa-gemstone/react-forms 1.1.101 → 1.1.103
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/lib/MultiInput.js +3 -3
- package/lib/RadioButtons.d.ts +5 -0
- package/lib/RadioButtons.js +1 -1
- package/package.json +5 -5
package/lib/MultiInput.js
CHANGED
|
@@ -75,7 +75,7 @@ function MultiInput(props) {
|
|
|
75
75
|
: null,
|
|
76
76
|
fieldArray.map(function (r, index) {
|
|
77
77
|
var _a, _b, _c, _d, _e, _f;
|
|
78
|
-
return (React.createElement("div", { className: 'row', key: index },
|
|
78
|
+
return (React.createElement("div", { className: 'row no-gutters', key: index },
|
|
79
79
|
React.createElement("div", { className: 'col-10' },
|
|
80
80
|
React.createElement(Input_1.default, { Record: fieldArray, Field: index, Label: index === 0 ? props.Label : '', AllowNull: props.AllowNull, Type: props.Type, Help: index === 0 ? props.Help : undefined, Feedback: (_b = (_a = props.ItemFeedback) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : undefined, Valid: function () { var _a, _b; return (_b = (_a = props.ItemValid) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : true; }, Style: props.Style, Disabled: props.Disabled, Setter: function (record) {
|
|
81
81
|
var _a;
|
|
@@ -87,7 +87,7 @@ function MultiInput(props) {
|
|
|
87
87
|
newArray[index] = record[index];
|
|
88
88
|
props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = newArray, _a)));
|
|
89
89
|
} })),
|
|
90
|
-
React.createElement("div", { className: "col-".concat(index === __spreadArray([], fieldArray, true).length - 1 ? 1 : 2, " ").concat(index === 0 ? 'd-flex align-items-center' : '') },
|
|
90
|
+
React.createElement("div", { className: "col-".concat(index === __spreadArray([], fieldArray, true).length - 1 ? 1 : 2, " ").concat(index === 0 ? 'd-flex align-items-center justify-content-center' : '') },
|
|
91
91
|
React.createElement("button", { className: 'btn', style: ((_c = props.Disabled) !== null && _c !== void 0 ? _c : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
92
92
|
var _a;
|
|
93
93
|
var newRecords = __spreadArray([], fieldArray, true).filter(function (_, i) { return i !== index; });
|
|
@@ -95,7 +95,7 @@ function MultiInput(props) {
|
|
|
95
95
|
} },
|
|
96
96
|
React.createElement(gpa_symbols_1.ReactIcons.TrashCan, { Color: 'red' }))),
|
|
97
97
|
index === __spreadArray([], fieldArray, true).length - 1 ?
|
|
98
|
-
React.createElement("div", { className: "col-1 ".concat(index === 0 ? 'd-flex align-items-center' : '') },
|
|
98
|
+
React.createElement("div", { className: "col-1 ".concat(index === 0 ? 'd-flex align-items-center justify-content-center' : '') },
|
|
99
99
|
React.createElement("button", { className: 'btn', style: ((_f = (((_d = props.DisableAdd) !== null && _d !== void 0 ? _d : false) || ((_e = props.Disabled) !== null && _e !== void 0 ? _e : false))) !== null && _f !== void 0 ? _f : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
100
100
|
var _a;
|
|
101
101
|
var newRecords = __spreadArray(__spreadArray([], __spreadArray([], fieldArray, true), true), [props.DefaultValue], false);
|
package/lib/RadioButtons.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { Gemstone } from '@gpa-gemstone/application-typings';
|
|
2
3
|
interface IOption extends Gemstone.TSX.Interfaces.ILabelValue<string | number> {
|
|
3
4
|
Disabled?: boolean;
|
|
@@ -14,6 +15,10 @@ interface IProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> {
|
|
|
14
15
|
* @type {IOption[]}
|
|
15
16
|
*/
|
|
16
17
|
Options: IOption[];
|
|
18
|
+
/**
|
|
19
|
+
* Optional Style to be applied to the form-group container div
|
|
20
|
+
*/
|
|
21
|
+
Style?: React.CSSProperties;
|
|
17
22
|
}
|
|
18
23
|
export default function RadioButtons<T>(props: IProps<T>): JSX.Element;
|
|
19
24
|
export {};
|
package/lib/RadioButtons.js
CHANGED
|
@@ -44,7 +44,7 @@ function RadioButtons(props) {
|
|
|
44
44
|
// Variables to control the rendering of label and help icon.
|
|
45
45
|
var showHelpIcon = props.Help !== undefined;
|
|
46
46
|
var label = props.Label === undefined ? props.Field : props.Label;
|
|
47
|
-
return (React.createElement("div", { className: "form-group" },
|
|
47
|
+
return (React.createElement("div", { className: "form-group", style: props.Style },
|
|
48
48
|
React.createElement("label", { className: "form-check-label w-100 d-flex align-items-center" },
|
|
49
49
|
React.createElement("span", null, label),
|
|
50
50
|
showHelpIcon ?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gpa-gemstone/react-forms",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.103",
|
|
4
4
|
"description": "React Form modules for gpa webapps",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"typescript": "5.5.3"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@gpa-gemstone/application-typings": "0.0.
|
|
49
|
-
"@gpa-gemstone/gpa-symbols": "0.0.
|
|
50
|
-
"@gpa-gemstone/helper-functions": "0.0.
|
|
48
|
+
"@gpa-gemstone/application-typings": "0.0.90",
|
|
49
|
+
"@gpa-gemstone/gpa-symbols": "0.0.57",
|
|
50
|
+
"@gpa-gemstone/helper-functions": "0.0.48",
|
|
51
51
|
"@types/react": "^17.0.14",
|
|
52
52
|
"@types/styled-components": "^5.1.11",
|
|
53
53
|
"lodash": "^4.17.21",
|
|
54
54
|
"moment": "2.29.4",
|
|
55
|
-
"react": "^18.2.0",
|
|
56
55
|
"react-color": "^2.19.3",
|
|
57
56
|
"react-portal": "4.2.2",
|
|
58
57
|
"styled-components": "5.3.3"
|
|
59
58
|
},
|
|
59
|
+
"peerDependencies": {"react": "18.2.0"},
|
|
60
60
|
"publishConfig": {"access": "public"}
|
|
61
61
|
}
|