@arquimedes.co/eureka-forms 1.6.5-test → 1.6.6-test

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.
@@ -25,7 +25,7 @@ function MaterialRatingStep(_a) {
25
25
  }, shouldUnregister: true, render: function (_a) {
26
26
  var _b, _c, _d, _e, _f;
27
27
  var field = _a.field;
28
- return (_jsxs(React.Fragment, { children: [_jsx("div", __assign({ className: styles.ratingContainer }, { children: _jsx(Rating, { type: step.ratingType, isMobile: widthStats.isMobile, focusColor: (_b = formStyle.primaryColor) !== null && _b !== void 0 ? _b : '#3d5a7f', unSelectedColor: (_c = formStyle.outlineColor) !== null && _c !== void 0 ? _c : '#b8b8b8', disabled: !editable || postview, value: field.value, onChange: field.onChange, inputRef: field.ref }, void 0) }), void 0), (step.description || step.required) && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: {
28
+ return (_jsxs(React.Fragment, { children: [_jsx("div", __assign({ className: styles.ratingContainer }, { children: _jsx(Rating, { name: step.id, type: step.ratingType, isMobile: widthStats.isMobile, focusColor: (_b = formStyle.primaryColor) !== null && _b !== void 0 ? _b : '#3d5a7f', unSelectedColor: (_c = formStyle.outlineColor) !== null && _c !== void 0 ? _c : '#b8b8b8', disabled: !editable || postview, value: field.value, onChange: field.onChange, inputRef: field.ref }, void 0) }), void 0), (step.description || step.required) && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: {
29
29
  color: !!errors[step.id] &&
30
30
  field.value === null
31
31
  ? (_d = formStyle.errorColor) !== null && _d !== void 0 ? _d : '#cc2936'
@@ -2,6 +2,7 @@
2
2
  import { RatingTypes } from '../../constants/FormStepTypes';
3
3
  export interface RatingProps {
4
4
  disabled?: boolean;
5
+ name: string;
5
6
  isMobile?: boolean;
6
7
  value: any;
7
8
  onChange: Function;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { RatingProps } from '../Rating';
3
- declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
3
+ declare function ScaleRating({ value, name, inputRef, disabled, onChange, isMobile, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
4
4
  export default ScaleRating;
@@ -42,16 +42,15 @@ var useRatingStyles = function (props) {
42
42
  });
43
43
  };
44
44
  function ScaleRating(_a) {
45
- var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
45
+ var value = _a.value, name = _a.name, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
46
46
  var ratingClasses = useRatingStyles({
47
47
  unSelectedColor: unSelectedColor,
48
48
  focusColor: focusColor,
49
49
  })();
50
50
  return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }, void 0), _jsx(Rating, { value: value, onChange: function (_event, newValue) {
51
- console.log('AA', disabled, newValue);
52
51
  if (!disabled)
53
52
  onChange(newValue);
54
- }, disabled: disabled, classes: ratingClasses, name: "customized-icons", size: "large", defaultValue: 0, getLabelText: function (value) { return value + '/5'; }, max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer }, void 0)] }, void 0));
53
+ }, disabled: disabled, classes: ratingClasses, name: name, size: "large", defaultValue: 0, getLabelText: function (value) { return value + '/5'; }, max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer }, void 0)] }, void 0));
55
54
  }
56
55
  function IconContainer(_a) {
57
56
  var value = _a.value, other = __rest(_a, ["value"]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version":"1.6.5-test",
4
+ "version":"1.6.6-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",