@insticc/genericform 1.0.6 → 1.0.8
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.
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
7
|
var _semanticUiReact = require("semantic-ui-react");
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
8
|
var CustomCheckbox = function CustomCheckbox(_ref) {
|
|
11
9
|
var _onChange = _ref.onChange,
|
|
12
10
|
name = _ref.name,
|
|
@@ -17,31 +15,35 @@ var CustomCheckbox = function CustomCheckbox(_ref) {
|
|
|
17
15
|
_ref$showHelp = _ref.showHelp,
|
|
18
16
|
showHelp = _ref$showHelp === void 0 ? false : _ref$showHelp,
|
|
19
17
|
_ref$helpText = _ref.helpText,
|
|
20
|
-
helpText = _ref$helpText === void 0 ? "" : _ref$helpText
|
|
21
|
-
|
|
18
|
+
helpText = _ref$helpText === void 0 ? "" : _ref$helpText,
|
|
19
|
+
_ref$checkBoxCss = _ref.checkBoxCss,
|
|
20
|
+
checkBoxCss = _ref$checkBoxCss === void 0 ? {
|
|
21
|
+
display: 'inline-block',
|
|
22
|
+
margin: '0px 0px'
|
|
23
|
+
} : _ref$checkBoxCss,
|
|
24
|
+
_ref$labelCss = _ref.labelCss,
|
|
25
|
+
labelCss = _ref$labelCss === void 0 ? {
|
|
26
|
+
display: 'inline-block',
|
|
27
|
+
fontSize: '10pt',
|
|
28
|
+
textAlign: 'center',
|
|
29
|
+
margin: '0px 5px'
|
|
30
|
+
} : _ref$labelCss;
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
32
|
className: "checkboxDiv",
|
|
23
33
|
id: name,
|
|
24
34
|
key: name
|
|
25
|
-
}, /*#__PURE__*/
|
|
35
|
+
}, /*#__PURE__*/React.createElement(_semanticUiReact.Form.Checkbox, {
|
|
26
36
|
type: "checkbox",
|
|
27
|
-
style:
|
|
28
|
-
display: 'inline-block',
|
|
29
|
-
margin: '0px 0px'
|
|
30
|
-
},
|
|
37
|
+
style: checkBoxCss,
|
|
31
38
|
checked: checked,
|
|
32
39
|
onChange: function onChange(checked) {
|
|
33
40
|
return _onChange(name);
|
|
34
41
|
},
|
|
35
42
|
disabled: disabled
|
|
36
|
-
}), /*#__PURE__*/
|
|
43
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
37
44
|
htmlFor: "form-input-" + name,
|
|
38
|
-
style:
|
|
39
|
-
|
|
40
|
-
fontSize: '10pt',
|
|
41
|
-
textAlign: 'center',
|
|
42
|
-
margin: '0px 5px'
|
|
43
|
-
}
|
|
44
|
-
}, displayName, " ", showHelp ? /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Icon, {
|
|
45
|
+
style: labelCss
|
|
46
|
+
}, displayName, " ", showHelp ? /*#__PURE__*/React.createElement(_semanticUiReact.Icon, {
|
|
45
47
|
name: "help circle",
|
|
46
48
|
title: helpText
|
|
47
49
|
}) : null));
|
|
@@ -4,9 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
7
|
var _reactDatetime = _interopRequireDefault(require("react-datetime"));
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
var divStyleDefault = {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
alignItems: 'baseline'
|
|
12
|
+
},
|
|
13
|
+
labelStyleDefault = {
|
|
14
|
+
width: '161px',
|
|
15
|
+
fontSize: '10pt',
|
|
16
|
+
textAlign: 'left'
|
|
17
|
+
},
|
|
18
|
+
datetimeComponentStyleDefault = {
|
|
19
|
+
maxWidth: 350,
|
|
20
|
+
display: 'inline-block'
|
|
21
|
+
},
|
|
22
|
+
tooltipStyleDefault = {
|
|
23
|
+
fontSize: '11px'
|
|
24
|
+
};
|
|
10
25
|
var CustomDatePicker = function CustomDatePicker(_ref) {
|
|
11
26
|
var _onChange = _ref.onChange,
|
|
12
27
|
name = _ref.name,
|
|
@@ -18,32 +33,30 @@ var CustomDatePicker = function CustomDatePicker(_ref) {
|
|
|
18
33
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
19
34
|
_ref$tooltip = _ref.tooltip,
|
|
20
35
|
tooltip = _ref$tooltip === void 0 ? "" : _ref$tooltip,
|
|
21
|
-
_ref$
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
_ref$mainDivStyle = _ref.mainDivStyle,
|
|
37
|
+
mainDivStyle = _ref$mainDivStyle === void 0 ? divStyleDefault : _ref$mainDivStyle,
|
|
38
|
+
_ref$labelStyle = _ref.labelStyle,
|
|
39
|
+
labelStyle = _ref$labelStyle === void 0 ? labelStyleDefault : _ref$labelStyle,
|
|
40
|
+
_ref$componentStyle = _ref.componentStyle,
|
|
41
|
+
componentStyle = _ref$componentStyle === void 0 ? datetimeComponentStyleDefault : _ref$componentStyle,
|
|
42
|
+
_ref$tooltipStyle = _ref.tooltipStyle,
|
|
43
|
+
tooltipStyle = _ref$tooltipStyle === void 0 ? tooltipStyleDefault : _ref$tooltipStyle,
|
|
44
|
+
_ref$dateFormat = _ref.dateFormat,
|
|
45
|
+
dateFormat = _ref$dateFormat === void 0 ? "DD/MM/YYYY" : _ref$dateFormat;
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
47
|
className: "datePickerDiv",
|
|
25
48
|
key: name,
|
|
26
49
|
id: 'form-dateDiv-' + name,
|
|
27
|
-
style:
|
|
28
|
-
|
|
29
|
-
alignItems: 'baseline'
|
|
30
|
-
}
|
|
31
|
-
}, /*#__PURE__*/_react["default"].createElement("label", {
|
|
50
|
+
style: mainDivStyle
|
|
51
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
32
52
|
id: 'form-datelabel-' + name,
|
|
33
53
|
htmlFor: "form-date-" + name,
|
|
34
|
-
style:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
textAlign: 'left'
|
|
38
|
-
}
|
|
39
|
-
}, displayName), /*#__PURE__*/_react["default"].createElement(_reactDatetime["default"], {
|
|
40
|
-
style: {
|
|
41
|
-
maxWidth: 350,
|
|
42
|
-
display: 'inline-block'
|
|
43
|
-
},
|
|
54
|
+
style: labelStyle
|
|
55
|
+
}, displayName), /*#__PURE__*/React.createElement(_reactDatetime["default"], {
|
|
56
|
+
style: componentStyle,
|
|
44
57
|
id: "form-date-" + name,
|
|
45
58
|
value: value,
|
|
46
|
-
dateFormat:
|
|
59
|
+
dateFormat: dateFormat,
|
|
47
60
|
onChange: function onChange(date) {
|
|
48
61
|
return _onChange(date, name);
|
|
49
62
|
},
|
|
@@ -51,10 +64,8 @@ var CustomDatePicker = function CustomDatePicker(_ref) {
|
|
|
51
64
|
timeFormat: false,
|
|
52
65
|
disabled: disabled,
|
|
53
66
|
required: required
|
|
54
|
-
}), tooltip != "" ? /*#__PURE__*/
|
|
55
|
-
style:
|
|
56
|
-
fontSize: '11px'
|
|
57
|
-
}
|
|
67
|
+
}), tooltip != "" ? /*#__PURE__*/React.createElement("label", {
|
|
68
|
+
style: tooltipStyle
|
|
58
69
|
}, tooltip) : null);
|
|
59
70
|
};
|
|
60
71
|
var _default = exports["default"] = CustomDatePicker;
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@insticc/genericform",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "a generic form with various types of fields",
|
|
5
|
-
"main": "build/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "babel src -d build --copy-files"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://set1.insticc.org/Bonobo.Git.Server/GenericForm.git"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"generic",
|
|
15
|
-
"form"
|
|
16
|
-
],
|
|
17
|
-
"author": "Bernardo Lagos",
|
|
18
|
-
"license": "ISC",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"bootstrap": "^5.3.3",
|
|
21
|
-
"moment": "^2.22.2",
|
|
22
|
-
"prop-types": "^15.6.1",
|
|
23
|
-
"react": "^18.2.0",
|
|
24
|
-
"react-bootstrap": "^2.10.2",
|
|
25
|
-
"react-datetime": "^3.2.0",
|
|
26
|
-
"react-dom": "^18.2.0",
|
|
27
|
-
"semantic-ui-css": "^2.5.0",
|
|
28
|
-
"semantic-ui-react": "^2.1.5"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@babel/cli": "^7.26.4",
|
|
32
|
-
"@babel/core": "^7.26.0",
|
|
33
|
-
"@babel/preset-env": "^7.26.0",
|
|
34
|
-
"@babel/preset-react": "^7.26.3"
|
|
35
|
-
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"bootstrap": "^5.3.3",
|
|
38
|
-
"moment": "^2.22.2",
|
|
39
|
-
"prop-types": "^15.6.1",
|
|
40
|
-
"react": "^18.2.0",
|
|
41
|
-
"react-bootstrap": "^2.10.2",
|
|
42
|
-
"react-datetime": "^3.2.0",
|
|
43
|
-
"react-dom": "^18.2.0",
|
|
44
|
-
"semantic-ui-css": "^2.5.0",
|
|
45
|
-
"semantic-ui-react": "^2.1.5"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@insticc/genericform",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "a generic form with various types of fields",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "babel src -d build --copy-files"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://set1.insticc.org/Bonobo.Git.Server/GenericForm.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"generic",
|
|
15
|
+
"form"
|
|
16
|
+
],
|
|
17
|
+
"author": "Bernardo Lagos",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"bootstrap": "^5.3.3",
|
|
21
|
+
"moment": "^2.22.2",
|
|
22
|
+
"prop-types": "^15.6.1",
|
|
23
|
+
"react": "^18.2.0",
|
|
24
|
+
"react-bootstrap": "^2.10.2",
|
|
25
|
+
"react-datetime": "^3.2.0",
|
|
26
|
+
"react-dom": "^18.2.0",
|
|
27
|
+
"semantic-ui-css": "^2.5.0",
|
|
28
|
+
"semantic-ui-react": "^2.1.5"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@babel/cli": "^7.26.4",
|
|
32
|
+
"@babel/core": "^7.26.0",
|
|
33
|
+
"@babel/preset-env": "^7.26.0",
|
|
34
|
+
"@babel/preset-react": "^7.26.3"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"bootstrap": "^5.3.3",
|
|
38
|
+
"moment": "^2.22.2",
|
|
39
|
+
"prop-types": "^15.6.1",
|
|
40
|
+
"react": "^18.2.0",
|
|
41
|
+
"react-bootstrap": "^2.10.2",
|
|
42
|
+
"react-datetime": "^3.2.0",
|
|
43
|
+
"react-dom": "^18.2.0",
|
|
44
|
+
"semantic-ui-css": "^2.5.0",
|
|
45
|
+
"semantic-ui-react": "^2.1.5"
|
|
46
|
+
}
|
|
47
|
+
}
|