@arquimedes.co/eureka-forms 1.6.2-test → 1.6.5-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.
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +1 -1
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +1 -1
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +8 -35
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +0 -25
- package/dist/shared/Rating/Rating.d.ts +15 -0
- package/dist/shared/Rating/Rating.js +41 -0
- package/dist/shared/Rating/Rating.module.css +32 -0
- package/dist/shared/Rating/Ratings/LikeRating.d.ts +4 -0
- package/dist/{FormComponents/Step/RatingStep/MaterialRatingStep → shared/Rating}/Ratings/LikeRating.js +10 -12
- package/dist/shared/Rating/Ratings/SatisfactionRating.d.ts +4 -0
- package/dist/{FormComponents/Step/RatingStep/MaterialRatingStep → shared/Rating}/Ratings/SatisfactionRating.js +16 -18
- package/dist/shared/Rating/Ratings/ScaleRating.d.ts +4 -0
- package/dist/{FormComponents/Step/RatingStep/MaterialRatingStep → shared/Rating}/Ratings/ScaleRating.js +9 -10
- package/package.json +1 -1
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/Ratings/LikeRating.d.ts +0 -8
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/Ratings/SatisfactionRating.d.ts +0 -8
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/Ratings/ScaleRating.d.ts +0 -8
|
@@ -95,7 +95,7 @@ function ColumnForm(_a) {
|
|
|
95
95
|
return __generator(this, function (_c) {
|
|
96
96
|
switch (_c.label) {
|
|
97
97
|
case 0:
|
|
98
|
-
if (!(apiKey || internal)) return [3 /*break*/, 11];
|
|
98
|
+
if (!(apiKey || internal || customSend)) return [3 /*break*/, 11];
|
|
99
99
|
return [4 /*yield*/, trigger(undefined, { shouldFocus: true })];
|
|
100
100
|
case 1:
|
|
101
101
|
valid = _c.sent();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RatingStepProps } from '../RatingStep';
|
|
3
|
-
declare function MaterialRatingStep({ step, errors,
|
|
3
|
+
declare function MaterialRatingStep({ step, errors, editable, control, postview, formStyle, widthStats, }: RatingStepProps): JSX.Element;
|
|
4
4
|
export default MaterialRatingStep;
|
|
@@ -9,56 +9,29 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
13
|
import styles from './MaterialRatingStep.module.css';
|
|
25
|
-
import { RatingTypes } from '../../../../constants/FormStepTypes';
|
|
26
|
-
import LikeRating from './Ratings/LikeRating';
|
|
27
|
-
import ScaleRating from './Ratings/ScaleRating';
|
|
28
|
-
import SatisfactionRating from './Ratings/SatisfactionRating';
|
|
29
14
|
import { Controller } from 'react-hook-form';
|
|
30
15
|
import React from 'react';
|
|
16
|
+
import Rating from '../../../../shared/Rating/Rating';
|
|
31
17
|
function MaterialRatingStep(_a) {
|
|
32
|
-
var step = _a.step, errors = _a.errors,
|
|
33
|
-
var mapRating = function (field) {
|
|
34
|
-
switch (step.ratingType) {
|
|
35
|
-
case RatingTypes.LIKE:
|
|
36
|
-
return (_jsx(LikeRating, __assign({ step: step, errors: errors }, others, { inputRef: field.ref, value: field.value, onChange: field.onChange }), void 0));
|
|
37
|
-
case RatingTypes.SATISFACTION:
|
|
38
|
-
return (_jsx(SatisfactionRating, __assign({ step: step, errors: errors }, others, { inputRef: field.ref, value: field.value, onChange: field.onChange }), void 0));
|
|
39
|
-
case RatingTypes.SCALE:
|
|
40
|
-
return (_jsx(ScaleRating, __assign({ step: step, errors: errors }, others, { inputRef: field.ref, value: field.value, onChange: field.onChange }), void 0));
|
|
41
|
-
default:
|
|
42
|
-
return _jsx("div", {}, void 0);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
18
|
+
var step = _a.step, errors = _a.errors, editable = _a.editable, control = _a.control, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats;
|
|
45
19
|
return (_jsxs("div", __assign({ className: styles.container, style: {
|
|
46
20
|
paddingBottom: step.description || step.required ? 0 : 15,
|
|
47
|
-
} }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label + (step.required ? ' *' : '') }), void 0), _jsx(Controller, { name: step.id, control:
|
|
21
|
+
} }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label + (step.required ? ' *' : '') }), void 0), _jsx(Controller, { name: step.id, control: control, defaultValue: null, rules: {
|
|
48
22
|
required: step.required
|
|
49
23
|
? 'Este campo es obligatorio'
|
|
50
24
|
: undefined,
|
|
51
25
|
}, shouldUnregister: true, render: function (_a) {
|
|
52
|
-
var _b, _c, _d;
|
|
26
|
+
var _b, _c, _d, _e, _f;
|
|
53
27
|
var field = _a.field;
|
|
54
|
-
return (_jsxs(React.Fragment, { children: [_jsx("div", __assign({ className: styles.ratingContainer }, { children:
|
|
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: {
|
|
55
29
|
color: !!errors[step.id] &&
|
|
56
30
|
field.value === null
|
|
57
|
-
? (
|
|
58
|
-
: (
|
|
59
|
-
.descriptionTextColor) !== null && _c !== void 0 ? _c : '#989898',
|
|
31
|
+
? (_d = formStyle.errorColor) !== null && _d !== void 0 ? _d : '#cc2936'
|
|
32
|
+
: (_e = formStyle.descriptionTextColor) !== null && _e !== void 0 ? _e : '#989898',
|
|
60
33
|
} }, { children: !!errors[step.id] && field.value === null
|
|
61
|
-
? (
|
|
34
|
+
? (_f = errors[step.id]) === null || _f === void 0 ? void 0 : _f.message
|
|
62
35
|
: step.description }), void 0))] }, void 0));
|
|
63
36
|
} }, void 0)] }), void 0));
|
|
64
37
|
}
|
package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css
CHANGED
|
@@ -28,28 +28,3 @@
|
|
|
28
28
|
text-align: center;
|
|
29
29
|
min-height: 20px;
|
|
30
30
|
}
|
|
31
|
-
.disabledSentimentContainer,
|
|
32
|
-
.sentimentContainer {
|
|
33
|
-
font-size: 60px;
|
|
34
|
-
height: 60px;
|
|
35
|
-
color: var(--eureka-outline);
|
|
36
|
-
}
|
|
37
|
-
.disabledLikeContainer,
|
|
38
|
-
.likeContainer {
|
|
39
|
-
font-size: 60px;
|
|
40
|
-
height: 75px;
|
|
41
|
-
color: var(--eureka-outline);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.likeContainer:hover,
|
|
45
|
-
.sentimentContainer:hover {
|
|
46
|
-
transform: scale(1.2);
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
color: var(--eureka-primary);
|
|
49
|
-
}
|
|
50
|
-
.hiddenInput {
|
|
51
|
-
height: 0;
|
|
52
|
-
width: 0;
|
|
53
|
-
padding: 0;
|
|
54
|
-
border-width: 0;
|
|
55
|
-
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RatingTypes } from '../../constants/FormStepTypes';
|
|
3
|
+
export interface RatingProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
isMobile?: boolean;
|
|
6
|
+
value: any;
|
|
7
|
+
onChange: Function;
|
|
8
|
+
inputRef: any;
|
|
9
|
+
focusColor: string;
|
|
10
|
+
unSelectedColor: string;
|
|
11
|
+
}
|
|
12
|
+
declare function Rating({ type, ...others }: RatingProps & {
|
|
13
|
+
type: RatingTypes;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
export default Rating;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import LikeRating from './Ratings/LikeRating';
|
|
25
|
+
import ScaleRating from './Ratings/ScaleRating';
|
|
26
|
+
import SatisfactionRating from './Ratings/SatisfactionRating';
|
|
27
|
+
import { RatingTypes } from '../../constants/FormStepTypes';
|
|
28
|
+
function Rating(_a) {
|
|
29
|
+
var type = _a.type, others = __rest(_a, ["type"]);
|
|
30
|
+
switch (type) {
|
|
31
|
+
case RatingTypes.LIKE:
|
|
32
|
+
return _jsx(LikeRating, __assign({}, others), void 0);
|
|
33
|
+
case RatingTypes.SATISFACTION:
|
|
34
|
+
return _jsx(SatisfactionRating, __assign({}, others), void 0);
|
|
35
|
+
case RatingTypes.SCALE:
|
|
36
|
+
return _jsx(ScaleRating, __assign({}, others), void 0);
|
|
37
|
+
default:
|
|
38
|
+
return _jsx("div", {}, void 0);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export default Rating;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.ratingContainer {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.disabledSentimentContainer,
|
|
8
|
+
.sentimentContainer {
|
|
9
|
+
font-size: 60px;
|
|
10
|
+
height: 60px;
|
|
11
|
+
color: var(--eureka-outline);
|
|
12
|
+
}
|
|
13
|
+
.disabledLikeContainer,
|
|
14
|
+
.likeContainer {
|
|
15
|
+
font-size: 60px;
|
|
16
|
+
height: 75px;
|
|
17
|
+
color: var(--eureka-outline);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.likeContainer:hover,
|
|
21
|
+
.sentimentContainer:hover {
|
|
22
|
+
transform: scale(1.2);
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
color: var(--eureka-primary);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hiddenInput {
|
|
28
|
+
height: 0;
|
|
29
|
+
width: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
border-width: 0;
|
|
32
|
+
}
|
|
@@ -12,31 +12,29 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import ThumbDownRoundedIcon from '@material-ui/icons/ThumbDownRounded';
|
|
14
14
|
import ThumbUpRoundedIcon from '@material-ui/icons/ThumbUpRounded';
|
|
15
|
-
import styles from '../
|
|
15
|
+
import styles from '../Rating.module.css';
|
|
16
16
|
function LikeRating(_a) {
|
|
17
|
-
var
|
|
18
|
-
var value = _a.value, inputRef = _a.inputRef, editable = _a.editable, postview = _a.postview, onChange = _a.onChange, formStyle = _a.formStyle;
|
|
19
|
-
var cantEdit = !editable || postview;
|
|
17
|
+
var disabled = _a.disabled, inputRef = _a.inputRef, value = _a.value, onChange = _a.onChange, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
20
18
|
return (_jsxs("div", __assign({ className: styles.ratingContainer, style: {
|
|
21
|
-
'--eureka-primary':
|
|
22
|
-
'--eureka-outline':
|
|
23
|
-
} }, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }, void 0), _jsx("div", __assign({ className:
|
|
19
|
+
'--eureka-primary': focusColor,
|
|
20
|
+
'--eureka-outline': unSelectedColor,
|
|
21
|
+
} }, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }, void 0), _jsx("div", __assign({ className: disabled
|
|
24
22
|
? styles.disabledLikeContainer
|
|
25
23
|
: styles.likeContainer, onClick: function () {
|
|
26
|
-
if (!
|
|
24
|
+
if (!disabled)
|
|
27
25
|
onChange(value === 1 ? null : 1);
|
|
28
26
|
} }, { children: _jsx(ThumbUpRoundedIcon, { fontSize: "inherit", style: value === 1
|
|
29
27
|
? {
|
|
30
|
-
color:
|
|
28
|
+
color: focusColor,
|
|
31
29
|
}
|
|
32
|
-
: {} }, void 0) }), void 0), _jsx("div", __assign({ className:
|
|
30
|
+
: {} }, void 0) }), void 0), _jsx("div", __assign({ className: disabled
|
|
33
31
|
? styles.disabledLikeContainer
|
|
34
32
|
: styles.likeContainer, onClick: function () {
|
|
35
|
-
if (!
|
|
33
|
+
if (!disabled)
|
|
36
34
|
onChange(value === 0 ? null : 0);
|
|
37
35
|
} }, { children: _jsx(ThumbDownRoundedIcon, { fontSize: "inherit", style: value === 0
|
|
38
36
|
? {
|
|
39
|
-
color:
|
|
37
|
+
color: focusColor,
|
|
40
38
|
marginTop: 14,
|
|
41
39
|
marginLeft: 15,
|
|
42
40
|
}
|
|
@@ -10,53 +10,51 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import styles from '../
|
|
13
|
+
import styles from '../Rating.module.css';
|
|
14
14
|
import SentimentVeryDissatisfiedIcon from '@material-ui/icons/SentimentVeryDissatisfied';
|
|
15
15
|
import SentimentDissatisfiedIcon from '@material-ui/icons/SentimentDissatisfied';
|
|
16
16
|
import SentimentSatisfiedAltIcon from '@material-ui/icons/SentimentSatisfiedAltOutlined';
|
|
17
17
|
import SentimentVerySatisfiedIcon from '@material-ui/icons/SentimentVerySatisfied';
|
|
18
18
|
function SatisfactionRating(_a) {
|
|
19
|
-
var
|
|
20
|
-
var value = _a.value, inputRef = _a.inputRef, editable = _a.editable, postview = _a.postview, onChange = _a.onChange, formStyle = _a.formStyle;
|
|
21
|
-
var cantEdit = !editable || postview;
|
|
19
|
+
var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
22
20
|
return (_jsxs("div", __assign({ className: styles.ratingContainer, style: {
|
|
23
|
-
'--eureka-primary':
|
|
24
|
-
'--eureka-outline':
|
|
25
|
-
} }, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }, void 0), _jsx("div", __assign({ className:
|
|
21
|
+
'--eureka-primary': focusColor,
|
|
22
|
+
'--eureka-outline': unSelectedColor,
|
|
23
|
+
} }, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }, void 0), _jsx("div", __assign({ className: disabled
|
|
26
24
|
? styles.disabledSentimentContainer
|
|
27
25
|
: styles.sentimentContainer, onClick: function () {
|
|
28
|
-
if (!
|
|
26
|
+
if (!disabled)
|
|
29
27
|
onChange(value === 1 ? null : 1);
|
|
30
28
|
} }, { children: _jsx(SentimentVeryDissatisfiedIcon, { fontSize: "inherit", style: value === 1
|
|
31
29
|
? {
|
|
32
|
-
color:
|
|
30
|
+
color: focusColor,
|
|
33
31
|
}
|
|
34
|
-
: {} }, void 0) }), void 0), _jsx("div", __assign({ className:
|
|
32
|
+
: {} }, void 0) }), void 0), _jsx("div", __assign({ className: disabled
|
|
35
33
|
? styles.disabledSentimentContainer
|
|
36
34
|
: styles.sentimentContainer, onClick: function () {
|
|
37
|
-
if (!
|
|
35
|
+
if (!disabled)
|
|
38
36
|
onChange(value === 2 ? null : 2);
|
|
39
37
|
} }, { children: _jsx(SentimentDissatisfiedIcon, { fontSize: "inherit", style: value === 2
|
|
40
38
|
? {
|
|
41
|
-
color:
|
|
39
|
+
color: focusColor,
|
|
42
40
|
}
|
|
43
|
-
: {} }, void 0) }), void 0), _jsx("div", __assign({ className:
|
|
41
|
+
: {} }, void 0) }), void 0), _jsx("div", __assign({ className: disabled
|
|
44
42
|
? styles.disabledSentimentContainer
|
|
45
43
|
: styles.sentimentContainer, onClick: function () {
|
|
46
|
-
if (!
|
|
44
|
+
if (!disabled)
|
|
47
45
|
onChange(value === 3 ? null : 3);
|
|
48
46
|
} }, { children: _jsx(SentimentSatisfiedAltIcon, { fontSize: "inherit", style: value === 3
|
|
49
47
|
? {
|
|
50
|
-
color:
|
|
48
|
+
color: focusColor,
|
|
51
49
|
}
|
|
52
|
-
: {} }, void 0) }), void 0), _jsx("div", __assign({ className:
|
|
50
|
+
: {} }, void 0) }), void 0), _jsx("div", __assign({ className: disabled
|
|
53
51
|
? styles.disabledSentimentContainer
|
|
54
52
|
: styles.sentimentContainer, onClick: function () {
|
|
55
|
-
if (!
|
|
53
|
+
if (!disabled)
|
|
56
54
|
onChange(value === 4 ? null : 4);
|
|
57
55
|
} }, { children: _jsx(SentimentVerySatisfiedIcon, { fontSize: "inherit", style: value === 4
|
|
58
56
|
? {
|
|
59
|
-
color:
|
|
57
|
+
color: focusColor,
|
|
60
58
|
}
|
|
61
59
|
: {} }, void 0) }), void 0)] }), void 0));
|
|
62
60
|
}
|
|
@@ -21,38 +21,37 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import styles from '../
|
|
24
|
+
import styles from '../Rating.module.css';
|
|
25
25
|
import { Rating } from '@material-ui/lab';
|
|
26
26
|
import GradeRoundedIcon from '@material-ui/icons/GradeRounded';
|
|
27
27
|
import { makeStyles } from '@material-ui/core';
|
|
28
28
|
import React from 'react';
|
|
29
29
|
var useRatingStyles = function (props) {
|
|
30
|
-
var _a, _b;
|
|
31
30
|
return makeStyles({
|
|
32
31
|
root: {
|
|
33
32
|
'&.Mui-disabled': {
|
|
34
33
|
opacity: 1,
|
|
35
34
|
},
|
|
36
35
|
'& .EF-MuiRating-iconFilled': {
|
|
37
|
-
color:
|
|
36
|
+
color: props.focusColor,
|
|
38
37
|
},
|
|
39
38
|
'& .EF-MuiRating-iconEmpty': {
|
|
40
|
-
color:
|
|
39
|
+
color: props.unSelectedColor,
|
|
41
40
|
},
|
|
42
41
|
},
|
|
43
42
|
});
|
|
44
43
|
};
|
|
45
44
|
function ScaleRating(_a) {
|
|
46
|
-
var value = _a.value, inputRef = _a.inputRef,
|
|
47
|
-
var cantEdit = !editable || postview;
|
|
45
|
+
var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
48
46
|
var ratingClasses = useRatingStyles({
|
|
49
|
-
|
|
50
|
-
focusColor:
|
|
47
|
+
unSelectedColor: unSelectedColor,
|
|
48
|
+
focusColor: focusColor,
|
|
51
49
|
})();
|
|
52
50
|
return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }, void 0), _jsx(Rating, { value: value, onChange: function (_event, newValue) {
|
|
53
|
-
|
|
51
|
+
console.log('AA', disabled, newValue);
|
|
52
|
+
if (!disabled)
|
|
54
53
|
onChange(newValue);
|
|
55
|
-
}, disabled:
|
|
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));
|
|
56
55
|
}
|
|
57
56
|
function IconContainer(_a) {
|
|
58
57
|
var value = _a.value, other = __rest(_a, ["value"]);
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RatingStepProps } from '../../RatingStep';
|
|
3
|
-
declare function LikeRating({ value, inputRef, editable, postview, onChange, formStyle, }: RatingStepProps & {
|
|
4
|
-
value: any;
|
|
5
|
-
onChange: Function;
|
|
6
|
-
inputRef: any;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
export default LikeRating;
|
package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/Ratings/SatisfactionRating.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RatingStepProps } from '../../RatingStep';
|
|
3
|
-
declare function SatisfactionRating({ value, inputRef, editable, postview, onChange, formStyle, }: RatingStepProps & {
|
|
4
|
-
value: any;
|
|
5
|
-
onChange: Function;
|
|
6
|
-
inputRef: any;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
export default SatisfactionRating;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RatingStepProps } from '../../RatingStep';
|
|
3
|
-
declare function ScaleRating({ value, inputRef, editable, postview, onChange, widthStats, formStyle, }: RatingStepProps & {
|
|
4
|
-
value: any;
|
|
5
|
-
onChange: Function;
|
|
6
|
-
inputRef: any;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
export default ScaleRating;
|