@pdg/react-form 1.0.7 → 1.0.9
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/dist/index.esm.js +45 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +45 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4884,7 +4884,7 @@ var FormRadioGroup = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
4884
4884
|
}
|
|
4885
4885
|
}, [readOnly, value, items, name, getFinalValue, onValueChangeByUser, onRequestSearchSubmit]);
|
|
4886
4886
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
4887
|
-
return (React__default["default"].createElement(FormItemBase, { focused: focused, ref: baseRef, className: classNames$1(className, 'FormValueItem', 'FormRadioGroup'), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, fullWidth: fullWidth, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
4887
|
+
return (React__default["default"].createElement(FormItemBase, { focused: focused, ref: baseRef, className: classNames$1(className, 'FormValueItem', 'FormRadioGroup'), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, fullWidth: fullWidth, required: required, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
4888
4888
|
!fullWidth && !isOnGetItemLoading && !loading && items && (React__default["default"].createElement("div", { ref: resizeWidthDetectorRef, style: {
|
|
4889
4889
|
display: 'grid',
|
|
4890
4890
|
position: 'absolute',
|
|
@@ -5438,7 +5438,7 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
|
|
|
5438
5438
|
}
|
|
5439
5439
|
}, [readOnly, name, getFinalValue, onValueChangeByUser, onRequestSearchSubmit]);
|
|
5440
5440
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
5441
|
-
return (React__default["default"].createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormRating'), labelIcon: labelIcon, label: label, error: error, fullWidth: false, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: style, sx: sx, controlHeight: height || (size === 'small' ? 21 : 26), controlVerticalCenter: true, control: React__default["default"].createElement(material.Rating, { ref: resizeDetectorRef, size: size === 'medium' ? 'large' : 'medium', name: name, precision: precision, highlightSelectedOnly: highlightSelectedOnly, value: value, disabled: disabled || readOnly, max: max, icon: React__default["default"].createElement(FormIcon, { color: color, fontSize: 'inherit' }, icon ? icon : 'Star'), emptyIcon: React__default["default"].createElement(FormIcon, { fontSize: 'inherit' }, emptyIcon ? emptyIcon : 'StarBorder'), onChange: handleChange, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } }) }));
|
|
5441
|
+
return (React__default["default"].createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormRating'), labelIcon: labelIcon, label: label, error: error, fullWidth: false, required: required, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: style, sx: sx, controlHeight: height || (size === 'small' ? 21 : 26), controlVerticalCenter: true, control: React__default["default"].createElement(material.Rating, { ref: resizeDetectorRef, size: size === 'medium' ? 'large' : 'medium', name: name, precision: precision, highlightSelectedOnly: highlightSelectedOnly, value: value, disabled: disabled || readOnly, max: max, icon: React__default["default"].createElement(FormIcon, { color: color, fontSize: 'inherit' }, icon ? icon : 'Star'), emptyIcon: React__default["default"].createElement(FormIcon, { fontSize: 'inherit' }, emptyIcon ? emptyIcon : 'StarBorder'), onChange: handleChange, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } }) }));
|
|
5442
5442
|
});
|
|
5443
5443
|
FormRating.displayName = 'FormRating';
|
|
5444
5444
|
FormRating.defaultProps = FormRatingDefaultProps;var propTypes = {exports: {}};var reactIs = {exports: {}};var reactIs_production_min = {};/** @license React v16.13.1
|
|
@@ -14848,7 +14848,7 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default["default"].forwar
|
|
|
14848
14848
|
}
|
|
14849
14849
|
}
|
|
14850
14850
|
textFieldInputRef.current = ref;
|
|
14851
|
-
}, variant: variant, size: size, color: color, focused: focused || initFocused, InputLabelProps: textFieldInputLabelProps, InputProps: muiInputProps, inputProps: inputProps, fullWidth: fullWidth, helperText: undefined, error: !!error || !!initError || !!timeError, style: __assign$4(__assign$4({}, style), initStyle), sx: sx, onFocus: function () {
|
|
14851
|
+
}, variant: variant, size: size, color: color, focused: focused || initFocused, InputLabelProps: textFieldInputLabelProps, InputProps: muiInputProps, inputProps: inputProps, required: required, fullWidth: fullWidth, helperText: undefined, error: !!error || !!initError || !!timeError, style: __assign$4(__assign$4({}, style), initStyle), sx: sx, onFocus: function () {
|
|
14852
14852
|
setOpen(true);
|
|
14853
14853
|
}, onClick: function () {
|
|
14854
14854
|
setOpen(true);
|
|
@@ -16433,7 +16433,41 @@ FormImageFile.defaultProps = FormImageFileDefaultProps;var SearchDefaultProps =
|
|
|
16433
16433
|
Search.displayName = 'Search';
|
|
16434
16434
|
Search.defaultProps = SearchDefaultProps;var SearchGroupDefaultProps = {
|
|
16435
16435
|
spacing: 1.5,
|
|
16436
|
-
};var
|
|
16436
|
+
};var isReactFragment = function (child) {
|
|
16437
|
+
try {
|
|
16438
|
+
return child.type.toString() === React__default["default"].Fragment.toString();
|
|
16439
|
+
}
|
|
16440
|
+
catch (e) {
|
|
16441
|
+
return false;
|
|
16442
|
+
}
|
|
16443
|
+
};
|
|
16444
|
+
var removeReactFragment = function (el) {
|
|
16445
|
+
if (isReactFragment(el)) {
|
|
16446
|
+
var children = el.props.children;
|
|
16447
|
+
if (children) {
|
|
16448
|
+
if (Array.isArray(children)) {
|
|
16449
|
+
return children.map(function (child) {
|
|
16450
|
+
if (React__default["default"].isValidElement(child)) {
|
|
16451
|
+
return removeReactFragment(child);
|
|
16452
|
+
}
|
|
16453
|
+
else {
|
|
16454
|
+
return React__default["default"].createElement(material.Grid, { item: true }, child);
|
|
16455
|
+
}
|
|
16456
|
+
});
|
|
16457
|
+
}
|
|
16458
|
+
else {
|
|
16459
|
+
return React__default["default"].createElement(material.Grid, { item: true }, el);
|
|
16460
|
+
}
|
|
16461
|
+
}
|
|
16462
|
+
else {
|
|
16463
|
+
return React__default["default"].createElement(material.Grid, { item: true }, el);
|
|
16464
|
+
}
|
|
16465
|
+
}
|
|
16466
|
+
else {
|
|
16467
|
+
return React__default["default"].createElement(material.Grid, { item: true }, el);
|
|
16468
|
+
}
|
|
16469
|
+
};
|
|
16470
|
+
var SearchGroup = function (_a) {
|
|
16437
16471
|
// State -----------------------------------------------------------------------------------------------------------
|
|
16438
16472
|
var children = _a.children, className = _a.className, style = _a.style, sx = _a.sx,
|
|
16439
16473
|
//--------------------------------------------------------------------------------------------------------------------
|
|
@@ -16451,8 +16485,13 @@ Search.defaultProps = SearchDefaultProps;var SearchGroupDefaultProps = {
|
|
|
16451
16485
|
}, [align]))[0];
|
|
16452
16486
|
// Render ----------------------------------------------------------------------------------------------------------
|
|
16453
16487
|
return (React__default["default"].createElement(material.Grid, { item: true, className: classNames$1(className, 'SearchGroup'), style: { flex: max ? 1 : undefined, display: hidden ? 'none' : undefined } },
|
|
16454
|
-
React__default["default"].createElement(material.Grid, { container: true, wrap: 'wrap', spacing: spacing, justifyContent: justifyContent, alignItems: 'start', style: style, sx: sx }, React__default["default"].Children.map(children, function (child
|
|
16455
|
-
|
|
16488
|
+
React__default["default"].createElement(material.Grid, { container: true, wrap: 'wrap', spacing: spacing, justifyContent: justifyContent, alignItems: 'start', style: style, sx: sx }, React__default["default"].Children.map(children, function (child) {
|
|
16489
|
+
if (React__default["default"].isValidElement(child)) {
|
|
16490
|
+
return removeReactFragment(child);
|
|
16491
|
+
}
|
|
16492
|
+
else {
|
|
16493
|
+
return child;
|
|
16494
|
+
}
|
|
16456
16495
|
}))));
|
|
16457
16496
|
};
|
|
16458
16497
|
SearchGroup.defaultProps = SearchGroupDefaultProps;var SearchButtonDefaultProps = {};var SearchButton = function (_a) {
|