oa-componentbook 0.18.349 → 0.18.351
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/images/Car.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +32 -7
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +1 -1
- package/build/widgets/oa-widget-item-info-card/styles.js +1 -1
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +4 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +9 -5
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -32,7 +32,8 @@ function ThumbnailGrid(_ref) {
|
|
|
32
32
|
fetchImage: fetchImage,
|
|
33
33
|
key: img.id || index,
|
|
34
34
|
img: img,
|
|
35
|
-
onClick: () => onImageClick(index)
|
|
35
|
+
onClick: () => onImageClick(index),
|
|
36
|
+
displayDocName: img.displayDocName
|
|
36
37
|
}))));
|
|
37
38
|
}
|
|
38
39
|
ThumbnailGrid.propTypes = {
|
|
@@ -51,7 +52,8 @@ function ThumbnailImage(_ref2) {
|
|
|
51
52
|
let {
|
|
52
53
|
img,
|
|
53
54
|
onClick,
|
|
54
|
-
fetchImage
|
|
55
|
+
fetchImage,
|
|
56
|
+
displayDocName
|
|
55
57
|
} = _ref2;
|
|
56
58
|
const {
|
|
57
59
|
ref,
|
|
@@ -95,17 +97,38 @@ function ThumbnailImage(_ref2) {
|
|
|
95
97
|
onClick: onClick,
|
|
96
98
|
onKeyDown: e => e.key === "Enter" && onClick(),
|
|
97
99
|
role: "button",
|
|
98
|
-
tabIndex: 0
|
|
100
|
+
tabIndex: 0,
|
|
101
|
+
style: {
|
|
102
|
+
position: 'relative',
|
|
103
|
+
display: 'flex',
|
|
104
|
+
flexDirection: 'column',
|
|
105
|
+
alignItems: 'stretch'
|
|
106
|
+
}
|
|
99
107
|
}, /*#__PURE__*/_react.default.createElement(_CustomLoader.default, {
|
|
100
108
|
spinning: !loaded && inView
|
|
101
109
|
}, inView && resolvedSrc && /*#__PURE__*/_react.default.createElement("img", {
|
|
102
110
|
src: resolvedSrc,
|
|
103
111
|
alt: "thumbnail",
|
|
104
112
|
style: {
|
|
105
|
-
display: loaded ?
|
|
113
|
+
display: loaded ? 'block' : 'none',
|
|
114
|
+
width: '100%',
|
|
115
|
+
borderRadius: 8,
|
|
116
|
+
background: '#e0e0e0',
|
|
117
|
+
minHeight: 120,
|
|
118
|
+
objectFit: 'cover'
|
|
106
119
|
},
|
|
107
120
|
onLoad: () => setLoaded(true)
|
|
108
|
-
}))
|
|
121
|
+
})), loaded && /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
+
style: {
|
|
123
|
+
marginTop: 8,
|
|
124
|
+
marginLeft: 8,
|
|
125
|
+
marginBottom: 4,
|
|
126
|
+
color: '#222',
|
|
127
|
+
fontSize: 15,
|
|
128
|
+
fontWeight: 400,
|
|
129
|
+
letterSpacing: 0.2
|
|
130
|
+
}
|
|
131
|
+
}, displayDocName || 'Image')));
|
|
109
132
|
}
|
|
110
133
|
ThumbnailImage.propTypes = {
|
|
111
134
|
img: _propTypes.default.shape({
|
|
@@ -113,9 +136,11 @@ ThumbnailImage.propTypes = {
|
|
|
113
136
|
originalImageUrl: _propTypes.default.string
|
|
114
137
|
}).isRequired,
|
|
115
138
|
onClick: _propTypes.default.func.isRequired,
|
|
116
|
-
fetchImage: _propTypes.default.func
|
|
139
|
+
fetchImage: _propTypes.default.func,
|
|
140
|
+
displayDocName: _propTypes.default.string
|
|
117
141
|
};
|
|
118
142
|
ThumbnailImage.defaultProps = {
|
|
119
|
-
fetchImage: () => {}
|
|
143
|
+
fetchImage: () => {},
|
|
144
|
+
displayDocName: ''
|
|
120
145
|
};
|
|
121
146
|
var _default = exports.default = ThumbnailGrid;
|
|
@@ -10,7 +10,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
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 StylesContainer = exports.StylesContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n.topBottomGallarySec{ display:flex; flex-direction:row; margin-bottom:16px; justify-content:flex-end;}\n\n.thumbnailGridStyle{display: grid\n;\n grid-template-columns: repeat(2, 1fr);\n gap: 8px;}\n\n\n"])));
|
|
12
12
|
const ThumbnailGridStyle = exports.ThumbnailGridStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.thumbnailGridStyleBox{display: grid;\n grid-template-columns: repeat(2, 1fr);\n gap: 8px;}\n"])));
|
|
13
|
-
const ThumbnailGridBoxStyle = exports.ThumbnailGridBoxStyle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n.thumbnailGridBox{ position: relative;\n aspect-ratio: 1 / 1; padding: 8px; border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgb(240, 240, 240)
|
|
13
|
+
const ThumbnailGridBoxStyle = exports.ThumbnailGridBoxStyle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n.thumbnailGridBox{ position: relative;\n aspect-ratio: 1 / 1; padding: 8px; border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgb(240, 240, 240);\n gap:6px;\n }\n\n .thumbnailGridBox img{ border-radius:4px; width: 100%;\n height: 100%; transition: transform .2s;\n object-fit: cover;} \n\n .thumbnailGridBox img:hover{ transform: scale(1.02);} \n\n"])));
|
|
14
14
|
const FullScreenStyle = exports.FullScreenStyle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\n.overlay{\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(31, 31, 31, 0.82);\n z-index: 99999;\n }\n\n\n\n .navButtonLeft, .navButtonRight{\n position: absolute;\n top: 50%;\n font-size: 16px;\n cursor: pointer;\n user-select: none;\n background: rgba(0, 0, 0, 0.7);\n border-radius: 50%;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .navButtonLeft:hover, .navButtonRight:hover{ background: rgba(0, 0, 0, 0.9);}\n\n.navButtonLeft{left: 10px;}\n.navButtonRight {right: 10px;}\n.downloadAll{color: #FFF;\n padding: 10px 24px;\n border-radius: 4px;\n border: 1px solid #FFF;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n position: absolute; cursor: pointer;\n bottom: 60px;\n left: 50%;\n transform: translate(-50%, -50%);}\n\n.header{padding:24px; display:flex; flex-direction:row; justify-content:space-between; align-items:center;}\n\n"])));
|
|
15
15
|
|
|
16
16
|
// export default StylesContainer;
|
|
@@ -10,5 +10,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
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 Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #ffffff;\n border-radius: 12px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n"])));
|
|
12
12
|
const TotalRow = exports.TotalRow = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n border-top: 1px solid #e0e0e0;\n padding: 16px 16px 0 16px;\n margin: 0 0 0 -16px;\n width: calc(100% + 32px);\n\n\n .gstAndCost{display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;}\n"])));
|
|
13
|
-
const ItemInfoCard = exports.ItemInfoCard = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n.productBox{width:100%; display:flex; flex-direction:row; justify-content: space-between; padding:12px 0;}\n.productIcon{border-radius: 12px; background: #F6F6F6; width:80px; height:80px; display:flex; align-items:center; justify-content:center;}\n.productIcon img{
|
|
13
|
+
const ItemInfoCard = exports.ItemInfoCard = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n.productBox{width:100%; display:flex; flex-direction:row; justify-content: space-between; padding:12px 0;}\n.productIcon{border-radius: 12px; background: #F6F6F6; width:80px; height:80px; display:flex; align-items:center; justify-content:center;}\n.productIcon img{height:64px;}\n.iconAndtextSec{display:flex; flex-direction:row; gap:12px; width:calc(100% - 88px);}\n.product-info {display: flex; flex-direction: column; width: calc(100% - 92px);}\n"])));
|
|
14
14
|
var _default = exports.default = {};
|
|
@@ -39,6 +39,8 @@ var _Laptop = _interopRequireDefault(require("../../images/Laptop.png"));
|
|
|
39
39
|
var _Luggage = _interopRequireDefault(require("../../images/Luggage.png"));
|
|
40
40
|
var _Microwave = _interopRequireDefault(require("../../images/Microwave.png"));
|
|
41
41
|
var _HA = _interopRequireDefault(require("../../images/HA.png"));
|
|
42
|
+
var _Car = _interopRequireDefault(require("../../images/Car.png"));
|
|
43
|
+
var _TwoWheeler = _interopRequireDefault(require("../../images/TwoWheeler.png"));
|
|
42
44
|
var _CustomIcon = _interopRequireDefault(require("../../components/oa-component-icons/CustomIcon"));
|
|
43
45
|
var _styles = require("./styles");
|
|
44
46
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -98,6 +100,8 @@ function MembershipCard(_ref) {
|
|
|
98
100
|
Footwear: _Footwear.default,
|
|
99
101
|
Furniture: _Furniture.default,
|
|
100
102
|
HA: _HA.default,
|
|
103
|
+
Car: _Car.default,
|
|
104
|
+
Two_Wheeler: _TwoWheeler.default,
|
|
101
105
|
Default: _Default.default
|
|
102
106
|
};
|
|
103
107
|
const iconSrc = icons[icon] || _Default.default;
|
|
@@ -25,7 +25,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
27
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
28
|
-
const FlexContainer = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n .text-only-size{\n justify-content: left;\n }\n small{\n color: var(--color-secondary-content);\n display: block;\n }\n"])));
|
|
28
|
+
const FlexContainer = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n .text-only-size{\n justify-content: left;\n }\n small{\n color: var(--color-secondary-content);\n display: block;\n }\n .costClass span {\n display: block;\n text-align: end; \n }\n"])));
|
|
29
29
|
const CostBreakdown = _styledComponents.default.aside(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: var(--color-secondary-background);\n padding: 0 12px;\n border-radius: 4px;\n ul{\n display: flex;\n margin: 0;\n border-bottom: 1px solid var(--color-divider);\n padding: 12px 0;\n }\n ul:last-child{\n border-bottom: none;\n }\n ul li{\n width: 100%;\n list-style: none;\n }\n ul li:first-child{\n color: var(--color-primary-content);\n font-style: normal;\n }\n ul li:last-child{\n font-style: normal;\n color: var(--color-secondary-content);\n }\n .font-bold{\n font-weight: 700;\n }\n .subHeadingclass{\n color:rgba(113, 113, 113, 1);\n font-weight: 400;\n }\n\n .alignItemsClass{\n display: flex;\n flex-direction: column;\n justify-content: start;\n gap: 4px;\n }\n .breakDownLastChild{\n text-align: right;\n margin-right: 8px;\n }\n \n"])));
|
|
30
30
|
// Mapping of how costs are covered
|
|
31
31
|
const costCoveredBy = {
|
|
@@ -115,7 +115,8 @@ function SparePartsWidget(_ref) {
|
|
|
115
115
|
showDiscount,
|
|
116
116
|
showSparePartsInfo = true,
|
|
117
117
|
keySettings = {},
|
|
118
|
-
showNonCoverageMessage
|
|
118
|
+
showNonCoverageMessage,
|
|
119
|
+
unCoveredScopeDescription
|
|
119
120
|
} = _ref;
|
|
120
121
|
const sparePartList = [...scopeDetails.unCoveredScope, ...scopeDetails.coveredScope];
|
|
121
122
|
const showActionList = sparePartList.some(sparePart => {
|
|
@@ -156,6 +157,7 @@ function SparePartsWidget(_ref) {
|
|
|
156
157
|
title: 'Cost',
|
|
157
158
|
width: '20%',
|
|
158
159
|
dataIndex: 'cost',
|
|
160
|
+
className: 'costClass',
|
|
159
161
|
key: 'cost',
|
|
160
162
|
render: (cost, record) => /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
161
163
|
className: "row",
|
|
@@ -211,7 +213,7 @@ function SparePartsWidget(_ref) {
|
|
|
211
213
|
const coveredScope = (scopeDetails === null || scopeDetails === void 0 ? void 0 : scopeDetails.coveredScope) || [];
|
|
212
214
|
return /*#__PURE__*/_react.default.createElement(FlexContainer, null, showNonCoverageMessage && (scopeDetails === null || scopeDetails === void 0 || (_scopeDetails$unCover = scopeDetails.unCoveredScope) === null || _scopeDetails$unCover === void 0 ? void 0 : _scopeDetails$unCover.length) > 0 && coverageShow && /*#__PURE__*/_react.default.createElement(_CustomInfo.default, {
|
|
213
215
|
color: "background-warning",
|
|
214
|
-
description:
|
|
216
|
+
description: unCoveredScopeDescription,
|
|
215
217
|
iconConfig: {
|
|
216
218
|
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
217
219
|
color: "warning",
|
|
@@ -267,7 +269,8 @@ SparePartsWidget.propTypes = {
|
|
|
267
269
|
showGST: _propTypes.default.bool,
|
|
268
270
|
showDiscount: _propTypes.default.bool,
|
|
269
271
|
keySettings: _propTypes.default.shape({}),
|
|
270
|
-
showNonCoverageMessage: _propTypes.default.bool
|
|
272
|
+
showNonCoverageMessage: _propTypes.default.bool,
|
|
273
|
+
unCoveredScopeDescription: _propTypes.default.string
|
|
271
274
|
};
|
|
272
275
|
|
|
273
276
|
// Define default props for SpareParts component
|
|
@@ -285,6 +288,7 @@ SparePartsWidget.defaultProps = {
|
|
|
285
288
|
showGST: false,
|
|
286
289
|
showDiscount: false,
|
|
287
290
|
keySettings: {},
|
|
288
|
-
showNonCoverageMessage: true
|
|
291
|
+
showNonCoverageMessage: true,
|
|
292
|
+
unCoveredScopeDescription: 'Multiple components need to be repaired which are not covered in this plan'
|
|
289
293
|
};
|
|
290
294
|
var _default = exports.default = SparePartsWidget;
|