oa-componentbook 0.18.54 → 0.18.56
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/build/MockData.js +0 -39
- package/build/index.js +7 -0
- package/build/widgets/oa-widget-approval/styles.js +1 -1
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +7 -8
- package/build/widgets/oa-widget-location-access/LocationAccessWidget.js +9 -8
- package/build/widgets/oa-widget-repair-service/RepairServiceWidget.js +19 -15
- package/build/widgets/oa-widget-send-payment-link/SendPaymentLinkWidget.js +14 -4
- package/build/widgets/oa-widget-send-payment-link/styles.js +1 -1
- package/package.json +1 -1
package/build/MockData.js
CHANGED
|
@@ -610,45 +610,6 @@ const serviceRequestData = exports.serviceRequestData = {
|
|
|
610
610
|
invoiceNameVariationReason: null,
|
|
611
611
|
customerGifterRelation: null
|
|
612
612
|
},
|
|
613
|
-
incidentDetail: {
|
|
614
|
-
incidentDescription: [{
|
|
615
|
-
createdOn: '09-Oct-2023 22:02:14',
|
|
616
|
-
createdBy: '51834430',
|
|
617
|
-
modifiedOn: '09-Oct-2023 22:02:14',
|
|
618
|
-
id: '8a81fc6b8b12affe018b154831650349',
|
|
619
|
-
serviceRequestId: 3800621,
|
|
620
|
-
key: 'Q1',
|
|
621
|
-
value: 'On the Table',
|
|
622
|
-
displayName: 'Where was the device kept at the time of incident?'
|
|
623
|
-
}, {
|
|
624
|
-
createdOn: '09-Oct-2023 22:02:14',
|
|
625
|
-
createdBy: '51834430',
|
|
626
|
-
modifiedOn: '09-Oct-2023 22:02:14',
|
|
627
|
-
id: '8a81fc6b8b12affe018b15483165034a',
|
|
628
|
-
serviceRequestId: 3800621,
|
|
629
|
-
key: 'Q2',
|
|
630
|
-
value: 'Father',
|
|
631
|
-
displayName: 'Who was using the device at the time of damage? Mention your relationship.'
|
|
632
|
-
}, {
|
|
633
|
-
createdOn: '09-Oct-2023 22:02:14',
|
|
634
|
-
createdBy: '51834430',
|
|
635
|
-
modifiedOn: '09-Oct-2023 22:02:14',
|
|
636
|
-
id: '8a81fc6b8b12affe018b15483165034b',
|
|
637
|
-
serviceRequestId: 3800621,
|
|
638
|
-
key: 'Q3',
|
|
639
|
-
value: 'User was at home',
|
|
640
|
-
displayName: 'Where was the device user and what activity was he doing at the time of incident?'
|
|
641
|
-
}, {
|
|
642
|
-
createdOn: '09-Oct-2023 22:02:14',
|
|
643
|
-
createdBy: '51834430',
|
|
644
|
-
modifiedOn: '09-Oct-2023 22:02:14',
|
|
645
|
-
id: '8a81fc6b8b12affe018b15483165034c',
|
|
646
|
-
serviceRequestId: 3800621,
|
|
647
|
-
key: 'Q4',
|
|
648
|
-
value: 'This is the test incident description',
|
|
649
|
-
displayName: 'Explain the incident due to which your device was damaged, highlighting the events which led up to the incident'
|
|
650
|
-
}]
|
|
651
|
-
},
|
|
652
613
|
logisticReferenceNo: null,
|
|
653
614
|
shortCircuitReason: null,
|
|
654
615
|
srCloseDate: null,
|
package/build/index.js
CHANGED
|
@@ -263,6 +263,12 @@ Object.defineProperty(exports, "KeyValueWidget", {
|
|
|
263
263
|
return _KeyValueWidget.default;
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
|
+
Object.defineProperty(exports, "LocationAccessWidget", {
|
|
267
|
+
enumerable: true,
|
|
268
|
+
get: function get() {
|
|
269
|
+
return _LocationAccessWidget.default;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
266
272
|
Object.defineProperty(exports, "MaterialIcon", {
|
|
267
273
|
enumerable: true,
|
|
268
274
|
get: function get() {
|
|
@@ -434,6 +440,7 @@ var _Typographies = _interopRequireDefault(require("./global-css/Typographies"))
|
|
|
434
440
|
var _colorOptions = require("./global-css/color-options");
|
|
435
441
|
var _typographyOptions = require("./global-css/typography-options");
|
|
436
442
|
var _GoogleRating = _interopRequireDefault(require("./widgets/oa-widget-googlerating/GoogleRating"));
|
|
443
|
+
var _LocationAccessWidget = _interopRequireDefault(require("./widgets/oa-widget-location-access/LocationAccessWidget"));
|
|
437
444
|
var _RepairServiceWidget = _interopRequireDefault(require("./widgets/oa-widget-repair-service/RepairServiceWidget"));
|
|
438
445
|
var _AddressWidget = _interopRequireDefault(require("./widgets/oa-widget-address/AddressWidget"));
|
|
439
446
|
var _AddSparePartWidget = _interopRequireDefault(require("./widgets/oa-widget-add-spare-part/AddSparePartWidget"));
|
|
@@ -9,5 +9,5 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
11
|
const Styledescription = exports.Styledescription = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 0 8px;\n"])));
|
|
12
|
-
const StyledContainer = exports.StyledContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0 0 16px;\nlabel.ant-radio-wrapper:first-child{\n margin-inline-end:
|
|
12
|
+
const StyledContainer = exports.StyledContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0 0 16px;\nlabel.ant-radio-wrapper:first-child{\n margin-inline-end: 24px;\n}\n.paddind-bottom-4{\n padding: 0 0 4px;\n}\n .container {\n margin-bottom: 16px;\n }\n\n h4{\n padding: 0 0 4px;\n }\n.view-button {\n justify-content: start;\n}\n .ant-form-item.custom-radio-group {\n margin-bottom: 12px;\n }\n\n .ant-divider-horizontal {\n margin: 16px 0px 0px;\n }\n\n .ant-form-item .ant-form-item-control-input {\n min-height: auto;\n }\n\n .ant-radio-group-outline {\n display: flex;\n justify-content: start;\n }\n\n textarea {\n padding: 16px; \n min-height: 88px;\n resize: none;\n border-radius: 4px;\n border: 1px solid var(--color-placeholder-text);\n }\n\n h5 {\n margin: 0 0 4px;\n color: var(--color-primary-content);\n }\n\n radiofield label {\n white-space: nowrap;\n }\n\n docdetailstag a {\n white-space: nowrap;\n }\n \n"])));
|
|
13
13
|
const RedText = exports.RedText = _styledComponents.default.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n color: red;\n margin-left: 4px;\n"])));
|
|
@@ -38,20 +38,19 @@ function KeyValueDataView(_ref) {
|
|
|
38
38
|
className: "valuestyle",
|
|
39
39
|
key: (0, _utils.getUUID)()
|
|
40
40
|
}, (info === null || info === void 0 ? void 0 : info.infoKey) === key ? /*#__PURE__*/_react.default.createElement("b", {
|
|
41
|
-
className: "type-b2-400"
|
|
42
|
-
style: {
|
|
43
|
-
display: 'flex',
|
|
44
|
-
alignItems: 'center'
|
|
45
|
-
}
|
|
41
|
+
className: "type-b2-400"
|
|
46
42
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
47
43
|
style: {
|
|
48
44
|
color: 'var(--color-primary-content)'
|
|
49
45
|
}
|
|
50
|
-
}, key
|
|
46
|
+
}, key, /*#__PURE__*/_react.default.createElement("em", {
|
|
51
47
|
style: {
|
|
52
|
-
marginLeft: '4px'
|
|
48
|
+
marginLeft: '4px',
|
|
49
|
+
position: 'relative',
|
|
50
|
+
top: '3px',
|
|
51
|
+
color: 'var(--color-secondary-content)'
|
|
53
52
|
}
|
|
54
|
-
}, info === null || info === void 0 ? void 0 : info.infoData)
|
|
53
|
+
}, info === null || info === void 0 ? void 0 : info.infoData))) : /*#__PURE__*/_react.default.createElement("b", {
|
|
55
54
|
className: "type-b2-400"
|
|
56
55
|
}, key, ":"), ((0, _utils.isString)(value) || (0, _utils.isNumber)(value)) && /*#__PURE__*/_react.default.createElement("span", {
|
|
57
56
|
className: "type-b2-400",
|
|
@@ -18,10 +18,6 @@ var _styles = require("./styles");
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
const buttonConfig = {
|
|
20
20
|
label: 'Change',
|
|
21
|
-
// iconConfig:{
|
|
22
|
-
// icon:<MaterialIcon icon ={ ArrowForwardIosOutlinedIcon } />,
|
|
23
|
-
// position:'right'
|
|
24
|
-
// },
|
|
25
21
|
type: 'text-only'
|
|
26
22
|
};
|
|
27
23
|
const iconConfigInfo = {
|
|
@@ -37,7 +33,8 @@ function LocationAccessWidget(_ref) {
|
|
|
37
33
|
buttonLabel,
|
|
38
34
|
locationAccessTitle,
|
|
39
35
|
locationAccessDescription,
|
|
40
|
-
showOrHideTypography
|
|
36
|
+
showOrHideTypography,
|
|
37
|
+
onClick
|
|
41
38
|
} = _ref;
|
|
42
39
|
return /*#__PURE__*/_react.default.createElement(_styles.LocationAccessStyle, null, materialIcon && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
43
40
|
color: "primary",
|
|
@@ -62,7 +59,8 @@ function LocationAccessWidget(_ref) {
|
|
|
62
59
|
iconConfig: iconConfigInfo
|
|
63
60
|
}))), buttonLabel && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
64
61
|
size: "large",
|
|
65
|
-
label: buttonLabel
|
|
62
|
+
label: buttonLabel,
|
|
63
|
+
onClick: onClick
|
|
66
64
|
}));
|
|
67
65
|
}
|
|
68
66
|
LocationAccessWidget.propTypes = {
|
|
@@ -70,7 +68,8 @@ LocationAccessWidget.propTypes = {
|
|
|
70
68
|
buttonLabel: _propTypes.default.string,
|
|
71
69
|
locationAccessTitle: _propTypes.default.string,
|
|
72
70
|
locationAccessDescription: _propTypes.default.string,
|
|
73
|
-
showOrHideTypography: _propTypes.default.bool
|
|
71
|
+
showOrHideTypography: _propTypes.default.bool,
|
|
72
|
+
onClick: _propTypes.default.func
|
|
74
73
|
};
|
|
75
74
|
LocationAccessWidget.defaultProps = {
|
|
76
75
|
materialIcon: null,
|
|
@@ -81,6 +80,8 @@ LocationAccessWidget.defaultProps = {
|
|
|
81
80
|
// Provide a default value, e.g., an empty string
|
|
82
81
|
locationAccessDescription: '',
|
|
83
82
|
// Provide a default value, e.g., an empty string
|
|
84
|
-
showOrHideTypography: false
|
|
83
|
+
showOrHideTypography: false,
|
|
84
|
+
// Provide a default value, e.g., false
|
|
85
|
+
onClick: () => {}
|
|
85
86
|
};
|
|
86
87
|
var _default = exports.default = LocationAccessWidget;
|
|
@@ -15,9 +15,15 @@ function RepairServiceWidget(_ref) {
|
|
|
15
15
|
let {
|
|
16
16
|
text,
|
|
17
17
|
icon,
|
|
18
|
-
subText
|
|
18
|
+
subText,
|
|
19
|
+
onClick
|
|
19
20
|
} = _ref;
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(_styles.RepairService, null, /*#__PURE__*/_react.default.createElement("
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_styles.RepairService, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
role: "button",
|
|
23
|
+
onClick: onClick,
|
|
24
|
+
onKeyPress: e => e.preventDefault(),
|
|
25
|
+
tabIndex: 0
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
21
27
|
color: "primary-content",
|
|
22
28
|
typography: "type-t2-700"
|
|
23
29
|
}, text), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
@@ -27,22 +33,20 @@ function RepairServiceWidget(_ref) {
|
|
|
27
33
|
color: "primary",
|
|
28
34
|
icon: icon,
|
|
29
35
|
size: 20
|
|
30
|
-
})))
|
|
31
|
-
color: "primary-content",
|
|
32
|
-
typography: "type-t2-700"
|
|
33
|
-
}, text), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
34
|
-
color: "secondary-content",
|
|
35
|
-
typography: "type-b2-400"
|
|
36
|
-
}, subText)), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
37
|
-
color: "primary",
|
|
38
|
-
icon: icon,
|
|
39
|
-
size: 20
|
|
40
|
-
}))));
|
|
36
|
+
})))));
|
|
41
37
|
}
|
|
42
38
|
RepairServiceWidget.propTypes = {
|
|
43
39
|
text: _propTypes.default.string.isRequired,
|
|
44
|
-
subText: _propTypes.default.string
|
|
45
|
-
icon: _propTypes.default.object
|
|
40
|
+
subText: _propTypes.default.string,
|
|
41
|
+
icon: _propTypes.default.object,
|
|
42
|
+
// Assuming that icon is a Material UI icon component
|
|
43
|
+
onClick: _propTypes.default.func
|
|
44
|
+
};
|
|
45
|
+
RepairServiceWidget.defaultProps = {
|
|
46
|
+
subText: '',
|
|
47
|
+
icon: null,
|
|
48
|
+
// Assuming that icon is a Material UI icon component
|
|
49
|
+
onClick: () => {}
|
|
46
50
|
};
|
|
47
51
|
|
|
48
52
|
// export default RepairServiceWidget;
|
|
@@ -111,8 +111,13 @@ function SendPaymentLinkWidget(_ref) {
|
|
|
111
111
|
form: form,
|
|
112
112
|
initialValues: (_options$selectedRadi = options[selectedRadio]) === null || _options$selectedRadi === void 0 ? void 0 : _options$selectedRadi.data,
|
|
113
113
|
layout: "vertical"
|
|
114
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
115
|
-
|
|
114
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
+
className: "padding-bottom-4"
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
117
|
+
color: "primary-content"
|
|
118
|
+
}, "Mobile Number", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
119
|
+
color: "negative"
|
|
120
|
+
}, "*"))), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
116
121
|
name: "mobileNum",
|
|
117
122
|
rules: [{
|
|
118
123
|
required: true,
|
|
@@ -132,8 +137,13 @@ function SendPaymentLinkWidget(_ref) {
|
|
|
132
137
|
},
|
|
133
138
|
"data-test": dataTest ? "".concat(dataTest, "--mobile-number") : undefined,
|
|
134
139
|
disabled: (_options$selectedRadi2 = options[selectedRadio]) === null || _options$selectedRadi2 === void 0 || (_options$selectedRadi2 = _options$selectedRadi2.data) === null || _options$selectedRadi2 === void 0 ? void 0 : _options$selectedRadi2.mobileNum
|
|
135
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
136
|
-
|
|
140
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: "padding-bottom-4"
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
143
|
+
color: "primary-content"
|
|
144
|
+
}, "Email ID", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
145
|
+
color: "negative"
|
|
146
|
+
}, "*"))), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
137
147
|
name: "email",
|
|
138
148
|
rules: [{
|
|
139
149
|
required: true,
|
|
@@ -12,4 +12,4 @@ const RadioContainer = exports.RadioContainer = _styledComponents.default.sectio
|
|
|
12
12
|
|
|
13
13
|
// This helps make the radio buttons aligned in uniform columns
|
|
14
14
|
const RadioGrid = exports.RadioGrid = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n"])));
|
|
15
|
-
const FormContainer = exports.FormContainer = _styledComponents.default.aside(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ant-form-item-label >label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {\n position: absolute;\n right: 0;\n color: var(--color-negative);\n }\n .ant-form-item {\n margin-bottom: 36px;\n }\n label{\n display: block;\n }\n .ant-form-item .ant-form-item-label{\n text-align: start;\n }\n .ant-row{\n flex-direction: column;\n }\n"])));
|
|
15
|
+
const FormContainer = exports.FormContainer = _styledComponents.default.aside(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ant-form-item-label >label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {\n position: absolute;\n right: 0;\n color: var(--color-negative);\n }\n .ant-form-item {\n margin-bottom: 36px;\n }\n label{\n display: block;\n }\n .ant-form-item .ant-form-item-label{\n text-align: start;\n }\n .ant-row{\n flex-direction: column;\n }\n .padding-bottom-4{\n padding: 0 0 4px;\n }\n"])));
|