oa-componentbook 1.0.1-stage.44 → 1.0.1-stage.440
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/components/oa-component-accordion/Accordion.js +123 -43
- package/build/components/oa-component-accordion/styles.js +2 -2
- package/build/components/oa-component-button/CustomButton.js +24 -19
- package/build/components/oa-component-button/styles.js +1 -1
- package/build/components/oa-component-checkbox/CustomCheckBox.js +20 -17
- package/build/components/oa-component-checkbox/styles.js +1 -1
- package/build/components/oa-component-datepicker/CustomDatePicker.js +37 -26
- package/build/components/oa-component-drawer/CustomDrawer.js +2 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +16 -4
- package/build/components/oa-component-icons/MaterialIcon.js +1 -1
- package/build/components/oa-component-modal/CustomModal.js +59 -48
- package/build/components/oa-component-modal/styles.js +3 -2
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-progress-bar/CustomProgressBar.js +8 -4
- package/build/components/oa-component-select/CustomSelect.js +130 -56
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +28 -5
- package/build/components/oa-component-table/CustomTableV1.js +613 -0
- package/build/components/oa-component-table/styles.js +1 -1
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-tabs/CustomTabs.js +1 -1
- package/build/components/oa-component-tag/CustomTag.js +29 -11
- package/build/components/oa-component-tag/styles.js +30 -3
- package/build/components/oa-component-textarea/CustomTextArea.js +161 -0
- package/build/components/oa-component-textarea/constants.js +39 -0
- package/build/components/oa-component-textarea/styles.js +12 -3
- package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
- package/build/components/oa-component-upload/CustomUpload.js +129 -42
- package/build/components/oa-component-viewer/CustomViewer.js +17 -11
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-upload/CustomUpload.js +116 -29
- package/build/dev/oa-component-upload/styles.js +2 -2
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/global-css/GlobalCss.js +2 -1
- package/build/global-css/GridLayout.js +1 -1
- package/build/global-css/commonStyles.js +11 -0
- package/build/images/Car.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/index.js +114 -2
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +403 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +85 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2421 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +90 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +96 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +219 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +310 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +42 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +577 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +80 -16
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +50 -7
- package/build/widgets/oa-widget-address/AddressWidget.js +12 -17
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +19 -11
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
- package/build/widgets/oa-widget-approval/styles.js +2 -2
- package/build/widgets/oa-widget-chat/ChatWidget.js +5 -5
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +17 -5
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +396 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +5 -5
- package/build/widgets/oa-widget-detailcard/styles.js +1 -1
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -9
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +53 -19
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +1 -1
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
- package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +83 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +46 -12
- package/build/widgets/oa-widget-key-value/styles.js +1 -1
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +21 -7
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +32 -5
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +9 -3
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +17 -2
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +14 -3
- package/build/widgets/oa-widget-membershipcard/styles.js +1 -1
- package/build/widgets/oa-widget-notes/NotesWidget.js +32 -30
- package/build/widgets/oa-widget-notes/styles.js +4 -3
- package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +165 -0
- package/build/widgets/oa-widget-profile-data/styles.js +13 -0
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +18 -9
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +1 -1
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-select-list-item-modal/SelectListItemModal.js +91 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +175 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/styles.js +13 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +63 -35
- package/build/widgets/oa-widget-track-shipment-list/fn.js +16 -4
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +407 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/package.json +4 -2
- package/build/components/oa-component-textarea/TextArea.js +0 -74
|
@@ -8,8 +8,11 @@ require("core-js/modules/web.dom-collections.iterator.js");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _utils = require("../../utils");
|
|
11
|
+
var _CustomTag = _interopRequireDefault(require("../../components/oa-component-tag/CustomTag"));
|
|
11
12
|
var _styles = require("./styles");
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
/* eslint-disable */
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* Renders a view displaying key-value pairs in a structured format.
|
|
15
18
|
*
|
|
@@ -17,6 +20,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
20
|
* @param {Object} props.data - An object containing key-value pairs to be displayed.
|
|
18
21
|
* @param {Array<number>} [props.columnLayout] - An array defining the number of items per column.
|
|
19
22
|
* @param {Object} [props.info] - An object containing information about a key-value pair.
|
|
23
|
+
* @param {boolean} [props.fullWidth] - If true, uses 30%/70% width distribution, otherwise uses previous layout.
|
|
20
24
|
*
|
|
21
25
|
* @returns {JSX.Element} A component that renders key-value pairs in a grid layout.
|
|
22
26
|
*/
|
|
@@ -24,7 +28,10 @@ function KeyValueDataView(_ref) {
|
|
|
24
28
|
let {
|
|
25
29
|
data,
|
|
26
30
|
columnLayout,
|
|
27
|
-
info
|
|
31
|
+
info,
|
|
32
|
+
tagStatus,
|
|
33
|
+
customClassName,
|
|
34
|
+
fullWidth = false
|
|
28
35
|
} = _ref;
|
|
29
36
|
let actualColumnLayout = [];
|
|
30
37
|
if (columnLayout.length === 0) {
|
|
@@ -40,32 +47,45 @@ function KeyValueDataView(_ref) {
|
|
|
40
47
|
}, actualColumnLayout.map((element, layoutIdx) => {
|
|
41
48
|
entryIdx += layoutIdx - 1 >= 0 ? actualColumnLayout[layoutIdx - 1] : 0;
|
|
42
49
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className: className,
|
|
50
|
+
className: customClassName !== null && customClassName !== void 0 ? customClassName : className,
|
|
44
51
|
key: (0, _utils.getUUID)()
|
|
45
52
|
}, Object.entries(data).splice(entryIdx, element).map(_ref2 => {
|
|
46
53
|
let [key, value] = _ref2;
|
|
47
54
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
-
className: "valuestyle",
|
|
55
|
+
className: "valuestyle ".concat(fullWidth ? "full-width" : null),
|
|
49
56
|
key: (0, _utils.getUUID)()
|
|
50
57
|
}, (info === null || info === void 0 ? void 0 : info.infoKey) === key ? /*#__PURE__*/_react.default.createElement("b", {
|
|
51
58
|
className: "type-b2-400"
|
|
52
59
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
53
60
|
style: {
|
|
54
|
-
color:
|
|
61
|
+
color: "var(--color-primary-content)"
|
|
55
62
|
}
|
|
56
63
|
}, key, /*#__PURE__*/_react.default.createElement("em", {
|
|
57
64
|
style: {
|
|
58
|
-
marginLeft:
|
|
59
|
-
position:
|
|
60
|
-
top:
|
|
61
|
-
color:
|
|
65
|
+
marginLeft: "4px",
|
|
66
|
+
position: "relative",
|
|
67
|
+
top: "3px",
|
|
68
|
+
color: "var(--color-secondary-content)"
|
|
62
69
|
}
|
|
63
70
|
}, info === null || info === void 0 ? void 0 : info.infoData))) : /*#__PURE__*/_react.default.createElement("b", {
|
|
64
71
|
className: "type-b2-400"
|
|
65
|
-
}, key, ":"),
|
|
72
|
+
}, key, ":"), /*#__PURE__*/_react.default.createElement("span", {
|
|
73
|
+
style: {
|
|
74
|
+
display: "flex",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
gap: "8px"
|
|
77
|
+
}
|
|
78
|
+
}, ((0, _utils.isString)(value) || (0, _utils.isNumber)(value)) && /*#__PURE__*/_react.default.createElement("span", {
|
|
66
79
|
className: "type-b2-400",
|
|
67
80
|
title: value
|
|
68
|
-
}, value) || _react.default.isValidElement && /*#__PURE__*/_react.default.createElement("span", null, value))
|
|
81
|
+
}, value) || _react.default.isValidElement && /*#__PURE__*/_react.default.createElement("span", null, value), (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagKey) === key && (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagData) && /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
|
|
82
|
+
style: {
|
|
83
|
+
width: "100px"
|
|
84
|
+
},
|
|
85
|
+
type: tagStatus.tagData.type || "success",
|
|
86
|
+
label: tagStatus.tagData.label,
|
|
87
|
+
size: tagStatus.tagData.size || "small"
|
|
88
|
+
})));
|
|
69
89
|
}));
|
|
70
90
|
}))));
|
|
71
91
|
}
|
|
@@ -75,13 +95,27 @@ KeyValueDataView.propTypes = {
|
|
|
75
95
|
info: _propTypes.default.shape({
|
|
76
96
|
infoData: _propTypes.default.node,
|
|
77
97
|
infoKey: _propTypes.default.string
|
|
78
|
-
})
|
|
98
|
+
}),
|
|
99
|
+
tagStatus: _propTypes.default.shape({
|
|
100
|
+
tagKey: _propTypes.default.string,
|
|
101
|
+
tagData: _propTypes.default.shape({
|
|
102
|
+
type: _propTypes.default.string,
|
|
103
|
+
label: _propTypes.default.string,
|
|
104
|
+
size: _propTypes.default.string
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
customClassName: _propTypes.default.string,
|
|
108
|
+
fullWidth: _propTypes.default.bool
|
|
79
109
|
};
|
|
80
110
|
KeyValueDataView.defaultProps = {
|
|
81
111
|
columnLayout: [],
|
|
82
112
|
info: {
|
|
83
113
|
infoData: null,
|
|
84
|
-
infoKey:
|
|
114
|
+
infoKey: ""
|
|
115
|
+
},
|
|
116
|
+
tagStatus: {
|
|
117
|
+
tagKey: "",
|
|
118
|
+
tagData: null
|
|
85
119
|
}
|
|
86
120
|
};
|
|
87
121
|
var _default = exports.default = KeyValueDataView;
|
|
@@ -8,7 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4; // KeyValueWidgetStyles.js
|
|
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
|
-
const KeyValueGroup = exports.KeyValueGroup = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .col-md-4:last-child,.col-md-12:last-child,.col-md-3:last-child,.col-md-6:last-child {\n padding: 0;\n }\n \n .valuestyle {\n display: flex;\n gap: 16px;\n padding: 0 0 8px;\n }\n\n .valuestyle b {\n width: 38.734%;\n font-style: normal;\n color: var(--color-primary-content); \n }\n\n .valuestyle span {\n width: 180px;\n word-wrap: break-word;\n font-style: normal;\n color: var(--color-secondary-content); }\n\n .valuestyle span + span{\n color: var(--color-primary-content);\n font-size: 14px;\n padding: 0 4px 0 0;\n }\n"])));
|
|
11
|
+
const KeyValueGroup = exports.KeyValueGroup = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .col-md-4:last-child,.col-md-12:last-child,.col-md-3:last-child,.col-md-6:last-child {\n padding: 0;\n }\n \n .valuestyle {\n display: flex;\n gap: 16px;\n padding: 0 0 8px;\n }\n\n .valuestyle b {\n width: 38.734%;\n font-style: normal;\n color: var(--color-primary-content); \n }\n\n .valuestyle span {\n width: 180px;\n word-wrap: break-word;\n font-style: normal;\n color: var(--color-secondary-content); }\n\n .valuestyle span + span{\n color: var(--color-primary-content);\n font-size: 14px;\n padding: 0 4px 0 0;\n }\n\n /* Add these CSS rules for full-width */\n .valuestyle.full-width {\n display: flex;\n gap: 16px;\n padding: 0 0 8px;\n }\n\n .valuestyle.full-width b {\n width: 30%;\n }\n\n .valuestyle.full-width span {\n width: 100%;\n }\n\n"])));
|
|
12
12
|
const KeyValueGroups = exports.KeyValueGroups = _styledComponents.default.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.container {\n max-width: 1154px;\n margin: 0 auto;\n padding: 0 16px;\n}\n.container-fluid{\n width: 100%;\n padding: 0 16px;\n}\n.row {\n display: flex;\n flex-direction: column;\n}\n.row::after {\n content: \"\";\n clear: both;\n display: table;\n}\n.col-xs-1 {\n width: 8.33333%;\n}\n\n.col-xs-2 {\n width: 16.66667%;\n}\n\n.col-xs-3 {\n width: 25%;\n}\n\n.col-xs-4 {\n width: 33.33333%;\n}\n\n.col-xs-5 {\n width: 41.66667%;\n}\n\n.col-xs-6 {\n width: 50%;\n}\n\n.col-xs-7 {\n width: 58.33333%;\n}\n\n.col-xs-8 {\n width: 66.66667%;\n}\n\n.col-xs-9 {\n width: 75%;\n}\n\n.col-xs-10 {\n width: 83.33333%;\n}\n\n.col-xs-11 {\n width: 91.66667%;\n}\n\n.col-xs-12 {\n width: 100%;\n}\n@media (min-width: 768px) {\n .row {\n flex-direction: row;\n}\n .col-sm-1 {\n width: 8.33333%;\n }\n\n .col-sm-2 {\n width: 16.66667%;\n }\n\n .col-sm-3 {\n width: 25%;\n }\n\n .col-sm-4 {\n width: 33.33333%;\n }\n\n .col-sm-5 {\n width: 41.66667%;\n }\n\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-7 {\n width: 58.33333%;\n }\n .col-sm-8 {\n width: 66.66667%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-10 {\n width: 83.33333%;\n }\n .col-sm-11 {\n width: 91.66667%;\n }\n .col-sm-12 {\n width: 100%;\n }\n}\n\n@media (min-width: 768px) {\n .col-md-1 {\n width: 8.33333%;\n }\n .col-md-2 {\n width: 16.66667%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-4 {\n width: 33.33333%;\n float: left;\n }\n\n .col-md-5 {\n width: 41.66667%;\n }\n\n .col-md-6 {\n width: 50%;\n }\n\n .col-md-7 {\n width: 58.33333%;\n }\n\n .col-md-8 {\n width: 66.66667%;\n }\n\n .col-md-9 {\n width: 75%;\n }\n\n .col-md-10 {\n width: 83.33333%;\n }\n .col-md-11 {\n width: 91.66667%;\n }\n\n .col-md-12 {\n width: 100%;\n }\n\n}\n/* Large Devices (desktops) */\n@media (min-width: 992px) {\n .gutter{\n padding: 0 24px 0 0;\n }\n .col-lg-1 {\n width: 8.33333%;\n }\n .col-lg-2 {\n width: 16.66667%;\n }\n .col-lg-3 {\n width: 25%;\n float: left;\n }\n .col-lg-4 {\n width: 33.33333%;\n float: left;\n }\n .col-lg-5 {\n width: 41.66667%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-7 {\n width: 58.33333%;\n }\n .col-lg-8 {\n width: 66.66667%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-10 {\n width: 83.33333%;\n }\n\n .col-lg-11 {\n width: 91.66667%;\n }\n\n .col-lg-12 {\n width: 100%;\n }\n}\n\n@media (min-width: 1200px) {\n .gutter{\n padding: 0 32px 0 0;\n }\n .col-xl-1 {\n width: 8.33333%;\n }\n\n \n}\n@media (max-width: 767px) {\n .gutter{\n padding: 0;\n }\n}\n"])));
|
|
13
13
|
const StyledBold = exports.StyledBold = _styledComponents.default.b(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: var(--color-primary-content);\n font-weight: 400;\n"])));
|
|
14
14
|
const StyledSpan = exports.StyledSpan = _styledComponents.default.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n /* vertical-align: bottom; */\n color: var(--color-secondary-content);\n font-weight: 400;\n word-break: break-word;\n"])));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
11
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
12
|
+
var _CustomTooltip = _interopRequireDefault(require("../../components/oa-component-tooltip/CustomTooltip"));
|
|
13
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
|
+
var _AccessAlarmOutlined = _interopRequireDefault(require("@material-ui/icons/AccessAlarmOutlined"));
|
|
15
|
+
const _excluded = ["type", "iconConfig", "tooltip"];
|
|
16
|
+
/* eslint-disable */
|
|
17
|
+
// ✅ no curly braces
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
+
function KPICardWidget(_ref) {
|
|
22
|
+
let {
|
|
23
|
+
title,
|
|
24
|
+
subTitle,
|
|
25
|
+
subText,
|
|
26
|
+
titleSubConfig
|
|
27
|
+
} = _ref;
|
|
28
|
+
const renderTitleSubConfig = () => {
|
|
29
|
+
if (!titleSubConfig) return null;
|
|
30
|
+
const {
|
|
31
|
+
type,
|
|
32
|
+
iconConfig,
|
|
33
|
+
tooltip
|
|
34
|
+
} = titleSubConfig,
|
|
35
|
+
config = _objectWithoutProperties(titleSubConfig, _excluded);
|
|
36
|
+
if (type === "tooltip" && iconConfig && tooltip) {
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
|
|
38
|
+
title: tooltip,
|
|
39
|
+
placement: config.placement || "top"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, iconConfig));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Add more types here as needed
|
|
44
|
+
// if (type === "button" && iconConfig) {
|
|
45
|
+
// return <CustomButton {...config} iconConfig={iconConfig} />;
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
return null;
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_styles.default, null, /*#__PURE__*/_react.default.createElement(_antd.Card, null, title && /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
className: "title-container"
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
53
|
+
typography: "type-t2-700",
|
|
54
|
+
color: "parimary-content"
|
|
55
|
+
}, title, " ", renderTitleSubConfig())), subTitle && /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
className: "padding-top-8 inclGst"
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
58
|
+
typography: "type-h1-500",
|
|
59
|
+
color: "parimary-content"
|
|
60
|
+
}, subTitle), subText && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
61
|
+
typography: "type-t2-700",
|
|
62
|
+
color: "secondary-content"
|
|
63
|
+
}, subText))));
|
|
64
|
+
}
|
|
65
|
+
KPICardWidget.propTypes = {
|
|
66
|
+
title: _propTypes.default.string,
|
|
67
|
+
subTitle: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
68
|
+
subText: _propTypes.default.string,
|
|
69
|
+
titleSubConfig: _propTypes.default.shape({
|
|
70
|
+
type: _propTypes.default.oneOf(["tooltip", "button"]),
|
|
71
|
+
// Add more types as needed
|
|
72
|
+
iconConfig: _propTypes.default.object,
|
|
73
|
+
// MaterialIcon props (same as SidebarWidget)
|
|
74
|
+
tooltip: _propTypes.default.string,
|
|
75
|
+
// For tooltip type
|
|
76
|
+
placement: _propTypes.default.string // Tooltip placement
|
|
77
|
+
// Add more config options as needed
|
|
78
|
+
})
|
|
79
|
+
};
|
|
80
|
+
KPICardWidget.defaultProps = {
|
|
81
|
+
title: "Total Active Orders",
|
|
82
|
+
subTitle: "",
|
|
83
|
+
subText: "",
|
|
84
|
+
titleSubConfig: null
|
|
85
|
+
};
|
|
86
|
+
var _default = exports.default = KPICardWidget;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject; // styles.js
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const OaCardStyle = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .ant-card-bordered {\n border: none;\n }\n .padding-top-8 {\n padding: 8px 0 0;\n }\n\n .inclGst {\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: anchor-center;\n }\n\n .title-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n }\n\n .title-container span{\n display: flex; align-items: center;\n gap: 4px;\n }\n\n .title-container .ant-typography {\n flex: 1;\n }\n"])));
|
|
12
|
+
var _default = exports.default = OaCardStyle;
|
|
@@ -15,7 +15,6 @@ var _AddressForm = _interopRequireDefault(require("./AddressForm"));
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
/* eslint-disable */
|
|
17
17
|
|
|
18
|
-
// Address Details Component
|
|
19
18
|
/**
|
|
20
19
|
* Address Details component.
|
|
21
20
|
* This component renders the address details and edit button.
|
|
@@ -28,18 +27,31 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
28
27
|
* @returns {React.ReactNode} Address Details component.
|
|
29
28
|
*/
|
|
30
29
|
function AddressDetails(_ref) {
|
|
31
|
-
var _geolocationData$addr, _geolocationData$addr2
|
|
30
|
+
var _geolocationData$addr, _geolocationData$addr2;
|
|
32
31
|
let {
|
|
33
32
|
geolocationData,
|
|
34
33
|
pinCodeServisible,
|
|
35
34
|
editLocationHandler,
|
|
36
|
-
onFinish
|
|
35
|
+
onFinish,
|
|
36
|
+
showAddressType,
|
|
37
|
+
isSaveButtonDisabled
|
|
37
38
|
} = _ref;
|
|
39
|
+
const showPinCode = () => {
|
|
40
|
+
var _addressLine2$mainAdd, _addressLine2$seconda;
|
|
41
|
+
const {
|
|
42
|
+
addressLine2,
|
|
43
|
+
pincode
|
|
44
|
+
} = geolocationData;
|
|
45
|
+
const isPincodeIncluded = (addressLine2 === null || addressLine2 === void 0 || (_addressLine2$mainAdd = addressLine2.mainAddress) === null || _addressLine2$mainAdd === void 0 ? void 0 : _addressLine2$mainAdd.includes(pincode)) || (addressLine2 === null || addressLine2 === void 0 || (_addressLine2$seconda = addressLine2.secondaryAddress) === null || _addressLine2$seconda === void 0 ? void 0 : _addressLine2$seconda.includes(pincode));
|
|
46
|
+
if (isPincodeIncluded) return "";
|
|
47
|
+
if (pincode) return ", ".concat(pincode);
|
|
48
|
+
return "";
|
|
49
|
+
};
|
|
38
50
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
39
51
|
className: "addresBoxDiv"
|
|
40
52
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
41
53
|
className: "addressEdit"
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
}, pinCodeServisible && /*#__PURE__*/_react.default.createElement("div", {
|
|
43
55
|
className: "addressDetails"
|
|
44
56
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
45
57
|
className: "type-t1-400",
|
|
@@ -49,12 +61,12 @@ function AddressDetails(_ref) {
|
|
|
49
61
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
50
62
|
className: "type-b3-400",
|
|
51
63
|
color: "secondary-content"
|
|
52
|
-
}, (_geolocationData$addr2 = geolocationData.addressLine2) === null || _geolocationData$addr2 === void 0 ? void 0 : _geolocationData$addr2.secondaryAddress, (
|
|
64
|
+
}, (_geolocationData$addr2 = geolocationData.addressLine2) === null || _geolocationData$addr2 === void 0 ? void 0 : _geolocationData$addr2.secondaryAddress, showPinCode()))), pinCodeServisible && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
53
65
|
iconConfig: {
|
|
54
66
|
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
55
67
|
icon: _EditOutlined.default
|
|
56
68
|
}),
|
|
57
|
-
position:
|
|
69
|
+
position: "left"
|
|
58
70
|
},
|
|
59
71
|
size: "small",
|
|
60
72
|
label: "Edit location",
|
|
@@ -62,7 +74,9 @@ function AddressDetails(_ref) {
|
|
|
62
74
|
onClick: editLocationHandler
|
|
63
75
|
})), pinCodeServisible ? /*#__PURE__*/_react.default.createElement(_AddressForm.default, {
|
|
64
76
|
geolocationData: geolocationData,
|
|
65
|
-
onFinish: onFinish
|
|
77
|
+
onFinish: onFinish,
|
|
78
|
+
showAddressType: showAddressType,
|
|
79
|
+
isSaveButtonDisabled: isSaveButtonDisabled
|
|
66
80
|
}) : /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
67
81
|
color: "negative"
|
|
68
82
|
}, "Pincode according to your pin on map is Non-serviceable, please move the pin to serviceable pincode."));
|
|
@@ -10,6 +10,7 @@ var _antd = require("antd");
|
|
|
10
10
|
var _CustomInput = _interopRequireDefault(require("../../components/oa-component-input/CustomInput"));
|
|
11
11
|
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
12
12
|
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
13
|
+
var _CustomRadio = _interopRequireDefault(require("../../components/oa-component-radio/CustomRadio"));
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
15
|
/* eslint-disable */
|
|
15
16
|
|
|
@@ -28,7 +29,9 @@ function AddressForm(props) {
|
|
|
28
29
|
const [form] = _antd.Form.useForm();
|
|
29
30
|
const {
|
|
30
31
|
geolocationData,
|
|
31
|
-
onFinish
|
|
32
|
+
onFinish,
|
|
33
|
+
showAddressType,
|
|
34
|
+
isSaveButtonDisabled = false
|
|
32
35
|
} = props;
|
|
33
36
|
return /*#__PURE__*/_react.default.createElement(_antd.Form, {
|
|
34
37
|
form: form,
|
|
@@ -51,11 +54,12 @@ function AddressForm(props) {
|
|
|
51
54
|
name: "houseNo",
|
|
52
55
|
rules: [{
|
|
53
56
|
required: true,
|
|
54
|
-
message:
|
|
57
|
+
message: "Please input your House no. / Flat / Floor!"
|
|
55
58
|
}]
|
|
56
59
|
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
57
60
|
placeholder: "Type here",
|
|
58
|
-
autoFocus: true
|
|
61
|
+
autoFocus: true,
|
|
62
|
+
maxLength: 250
|
|
59
63
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
64
|
className: "margin-top-12"
|
|
61
65
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
@@ -66,10 +70,33 @@ function AddressForm(props) {
|
|
|
66
70
|
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
67
71
|
name: "landmark"
|
|
68
72
|
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
69
|
-
placeholder: "Type here"
|
|
70
|
-
|
|
73
|
+
placeholder: "Type here",
|
|
74
|
+
maxLength: 50
|
|
75
|
+
})))), showAddressType && /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
className: "margin-top-12"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
78
|
+
color: "primary-content",
|
|
79
|
+
className: "type-b2-400"
|
|
80
|
+
}, "Address Type", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
81
|
+
color: "negative"
|
|
82
|
+
}, "*")), /*#__PURE__*/_react.default.createElement("div", {
|
|
83
|
+
className: "margin-top-4"
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
85
|
+
name: "addressType",
|
|
86
|
+
rules: [{
|
|
87
|
+
required: true,
|
|
88
|
+
message: "Please select Address Type"
|
|
89
|
+
}]
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, null, /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
91
|
+
value: "RESIDENTIAL",
|
|
92
|
+
label: "Residential"
|
|
93
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
94
|
+
value: "COMMERCIAL",
|
|
95
|
+
label: "Commercial"
|
|
96
|
+
}))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
97
|
className: "buttonBottom margin-top-24"
|
|
72
98
|
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
99
|
+
disabled: isSaveButtonDisabled || false,
|
|
73
100
|
type: "primary",
|
|
74
101
|
size: "large",
|
|
75
102
|
label: "Save and Proceed",
|
|
@@ -44,7 +44,10 @@ function MapBaseLocation(_ref) {
|
|
|
44
44
|
form,
|
|
45
45
|
onFinish,
|
|
46
46
|
openLocationNotDetectedModal,
|
|
47
|
-
setOpenLocationNotDetectedModalState
|
|
47
|
+
setOpenLocationNotDetectedModalState,
|
|
48
|
+
showAddressType,
|
|
49
|
+
isSaveButtonDisabled,
|
|
50
|
+
showCurrentLocation = true
|
|
48
51
|
} = _ref;
|
|
49
52
|
return /*#__PURE__*/_react.default.createElement(_styles.MapStyles, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
50
53
|
className: "containerMap"
|
|
@@ -55,10 +58,11 @@ function MapBaseLocation(_ref) {
|
|
|
55
58
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
56
59
|
className: "addressDetaisBox"
|
|
57
60
|
}, /*#__PURE__*/_react.default.createElement(_MapComponent.default, {
|
|
61
|
+
showCurrentLocation: showCurrentLocation,
|
|
58
62
|
googleMapURL: googleMapURL,
|
|
59
63
|
loadingElement: /*#__PURE__*/_react.default.createElement("div", {
|
|
60
64
|
style: {
|
|
61
|
-
height:
|
|
65
|
+
height: "100%"
|
|
62
66
|
}
|
|
63
67
|
}),
|
|
64
68
|
containerElement: /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -66,7 +70,7 @@ function MapBaseLocation(_ref) {
|
|
|
66
70
|
}),
|
|
67
71
|
mapElement: /*#__PURE__*/_react.default.createElement("div", {
|
|
68
72
|
style: {
|
|
69
|
-
height:
|
|
73
|
+
height: "100%"
|
|
70
74
|
}
|
|
71
75
|
}),
|
|
72
76
|
googleMapRef: googleMapRef,
|
|
@@ -74,6 +78,8 @@ function MapBaseLocation(_ref) {
|
|
|
74
78
|
fetchAddressFromGoogleApi: fetchAddressFromGoogleApi,
|
|
75
79
|
setOpenLocationNotDetectedModal: setOpenLocationNotDetectedModal
|
|
76
80
|
}), /*#__PURE__*/_react.default.createElement(_AddressDetails.default, {
|
|
81
|
+
isSaveButtonDisabled: isSaveButtonDisabled,
|
|
82
|
+
showAddressType: showAddressType,
|
|
77
83
|
geolocationData: geolocationData,
|
|
78
84
|
pinCodeServisible: pinCodeServisible,
|
|
79
85
|
editLocationHandler: editLocationHandler,
|
|
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _reactGoogleMaps = require("react-google-maps");
|
|
14
14
|
var _map_pointer = _interopRequireDefault(require("../../images/map_pointer.svg"));
|
|
15
15
|
var _currentLocation = _interopRequireDefault(require("../../images/current-location.svg"));
|
|
16
|
+
var _CustomTooltip = _interopRequireDefault(require("../../components/oa-component-tooltip/CustomTooltip"));
|
|
17
|
+
var _InfoBox = _interopRequireDefault(require("react-google-maps/lib/components/addons/InfoBox"));
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
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); }
|
|
18
20
|
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; }
|
|
@@ -134,14 +136,27 @@ const MapComponent = (0, _reactGoogleMaps.withScriptjs)((0, _reactGoogleMaps.wit
|
|
|
134
136
|
style: google.maps.ZoomControlStyle.LARGE
|
|
135
137
|
},
|
|
136
138
|
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
|
137
|
-
draggable: window.location.origin.includes(
|
|
139
|
+
draggable: window.location.origin.includes("oneassist") // Disable dragging in non-prod environment
|
|
138
140
|
}
|
|
139
141
|
}, /*#__PURE__*/_react.default.createElement(_reactGoogleMaps.Marker, {
|
|
140
142
|
position: markerPosition,
|
|
141
143
|
draggable: false,
|
|
142
144
|
icon: _map_pointer.default,
|
|
143
145
|
title: "You are here"
|
|
144
|
-
}
|
|
146
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoBox.default, {
|
|
147
|
+
defaultPosition: markerPosition,
|
|
148
|
+
options: {
|
|
149
|
+
pixelOffset: new window.google.maps.Size(0, -40),
|
|
150
|
+
// Adjust -40 to move higher
|
|
151
|
+
closeBoxURL: "",
|
|
152
|
+
enableEventPropagation: true
|
|
153
|
+
}
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
|
|
155
|
+
placement: "top",
|
|
156
|
+
title: "Place the pin accurately on map",
|
|
157
|
+
defaultOpen: true,
|
|
158
|
+
open: true
|
|
159
|
+
}))), props.showCurrentLocation && /*#__PURE__*/_react.default.createElement("div", {
|
|
145
160
|
className: "map-current-location"
|
|
146
161
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
147
162
|
src: _currentLocation.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;
|
|
@@ -159,7 +163,7 @@ function MembershipCard(_ref) {
|
|
|
159
163
|
color: "primary-background",
|
|
160
164
|
icon: _ArrowForwardIos.default
|
|
161
165
|
}))), alert.length > 0 && alert.map((item, i) => {
|
|
162
|
-
var _item$description, _item$description2, _item$description3, _item$description4, _item$description5, _item$description6;
|
|
166
|
+
var _item$description, _item$description2, _item$description3, _item$description4, _item$description5, _item$description6, _item$description7;
|
|
163
167
|
return ((item === null || item === void 0 ? void 0 : item.subHeading) !== '' || (item === null || item === void 0 ? void 0 : item.heading) !== '' || (item === null || item === void 0 || (_item$description = item.description) === null || _item$description === void 0 ? void 0 : _item$description.text) !== undefined) && /*#__PURE__*/_react.default.createElement("div", {
|
|
164
168
|
className: item !== null && item !== void 0 && (_item$description2 = item.description) !== null && _item$description2 !== void 0 && _item$description2.text && (item === null || item === void 0 || (_item$description3 = item.description) === null || _item$description3 === void 0 ? void 0 : _item$description3.text) !== '' ? "toolTipInfo ".concat(item.type) : "toolTipInfo ".concat(item.type, " flexChangeBody")
|
|
165
169
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -181,7 +185,13 @@ function MembershipCard(_ref) {
|
|
|
181
185
|
}, item === null || item === void 0 ? void 0 : item.heading))), (item === null || item === void 0 ? void 0 : item.description) && (item === null || item === void 0 || (_item$description4 = item.description) === null || _item$description4 === void 0 ? void 0 : _item$description4.text) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
182
186
|
color: "primary-content",
|
|
183
187
|
className: "type-b2-400"
|
|
184
|
-
}, item.description.text))), (item === null || item === void 0
|
|
188
|
+
}, item.description.text))), (item === null || item === void 0 || (_item$description5 = item.description) === null || _item$description5 === void 0 ? void 0 : _item$description5.additionalText) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
189
|
+
dangerouslySetInnerHTML: {
|
|
190
|
+
__html: item.description.additionalText
|
|
191
|
+
},
|
|
192
|
+
color: "primary-content",
|
|
193
|
+
className: "type-b2-400"
|
|
194
|
+
}))), (item === null || item === void 0 ? void 0 : item.description) && (item === null || item === void 0 || (_item$description6 = item.description) === null || _item$description6 === void 0 ? void 0 : _item$description6.listData) && (item === null || item === void 0 || (_item$description7 = item.description) === null || _item$description7 === void 0 || (_item$description7 = _item$description7.listData) === null || _item$description7 === void 0 ? void 0 : _item$description7.length) > 0 && /*#__PURE__*/_react.default.createElement("ul", null, item.description.listData.map((temp, j) => /*#__PURE__*/_react.default.createElement("li", null, temp))))), item.actions && /*#__PURE__*/_react.default.createElement("div", {
|
|
185
195
|
className: "viewStatus"
|
|
186
196
|
}, item.actions.map((action, index) => /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
187
197
|
key: action.label,
|
|
@@ -230,7 +240,8 @@ MembershipCard.propTypes = {
|
|
|
230
240
|
subHeading: _propTypes.default.string,
|
|
231
241
|
heading: _propTypes.default.string,
|
|
232
242
|
description: _propTypes.default.shape({
|
|
233
|
-
text: _propTypes.default.string
|
|
243
|
+
text: _propTypes.default.string,
|
|
244
|
+
additionalText: _propTypes.default.string
|
|
234
245
|
}),
|
|
235
246
|
actions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
236
247
|
label: _propTypes.default.string,
|
|
@@ -8,6 +8,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
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
|
-
const MembershipCardStyle = exports.MembershipCardStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.topPad24{\n padding: 16px 0 0;\n}\n.flexGap div{\n padding: 0 0 8px;\n}\n.flexGap ul{\n margin: 0;\n padding: 0 0 0 16px;\n list-style-type: disc;\n}\n.flexGap li{\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n.viewStatus button{\n margin: 16px 0 0;\n}\n.flexGap div:last-child{\n padding: 0;\n}\n.primaryInfo svg{\n cursor: pointer;\n}\np,h1, h2, h3, h4, h5, h6{\n margin: 0;\n}\n padding: 24px;\n background: var(--color-primary-background);\n border-radius: 12px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n position: relative;\n margin: 0 0 24px;\n border: 1px solid var(--color-divider);\n @media only screen and (max-width: 600px) {\n gap: 16px;\n padding: 24px 16px 16px;\n .cardHead p .type-b1-400{\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .primary-info label .type-t2-700{\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n }\n }\n .primaryInfo{\n display: flex;\n padding: 12px 8px;\n justify-content: space-between;\n background: var(--color-primary);\n border-radius: 8px;\n align-items: center;\n cursor: pointer;\n }\n .primaryInfo img{\n width: 24px;\n height: 24px;\n }\n .toolTipInfo .text-container svg {\n font-size: 16px !important;\n }\n .paraWithIcon{\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .toolTipInfo{\n display: flex;\n background: var(--color-background-positive);\n padding: 12px;\n border-radius: 8px;\n flex-direction: column;\n justify-content: space-between;\n }\n .flexChangeBody{\n flex-direction: row;\n align-items: center;\n }\n\n .toolTipInfo .toolTip + div{\n display: flex;\n justify-content: end;\n }\n .error{\n background: var(--color-background-negative);\n }\n .error .toolTip svg{\n color: var(--color-negative);\n }\n .warning{\n background: var(--color-background-warning);\n }\n .warning .toolTip svg{\n color: var(--color-warning);\n }\n .success{\n background: var(--color-background-positive);\n }\n\n .success .toolTip svg{\n color: var(--color-positive);\n }\n .toolTip{\n display: flex;\n gap: 8px;\n }\n .cardHead{\n display: flex;\n justify-content: space-between;\n gap: 24px;\n }\n .imgBg{\n border-radius: 8px;\n background: #DEF1FB;\n min-width: 56px;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .ant-modal-footer{\n display: none;\n }\n .toolTip svg{\n margin: 0px 0 0;\n }\n .flexChangeBody{\n align-items: center !important;\n flex-direction: row !important;\n gap: 8px !important;\n }\n .flexChangeBody .text-container{\n white-space: nowrap;\n }\n .flexChangeBody .viewStatus button {\n margin: 0 !important;\n}\n.displayFlex{\n display: flex;\n}\n @media only screen and (max-width: 600px) {\n .type-b1-400{\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .toolTipInfo {\n flex-direction: column;\n gap: 0;\n align-items: unset;\n }\n \n .cardHead .titleHead > span{\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n }\n"])));
|
|
11
|
+
const MembershipCardStyle = exports.MembershipCardStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.topPad24{\n padding: 16px 0 0;\n}\n.flexGap div{\n padding: 0 0 8px;\n}\n.flexGap ul{\n margin: 0;\n padding: 0 0 0 16px;\n list-style-type: disc;\n}\n.flexGap li{\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n.viewStatus button{\n margin: 16px 0 0;\n}\n.flexGap div:last-child{\n padding: 0;\n}\n.primaryInfo svg{\n cursor: pointer;\n}\np,h1, h2, h3, h4, h5, h6{\n margin: 0;\n}\n padding: 24px;\n background: var(--color-primary-background);\n border-radius: 12px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n position: relative;\n margin: 0 0 24px;\n border: 1px solid var(--color-divider);\n @media only screen and (max-width: 600px) {\n gap: 16px;\n padding: 24px 16px 16px;\n .cardHead p .type-b1-400{\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .primary-info label .type-t2-700{\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n }\n }\n .primaryInfo{\n display: flex;\n padding: 12px 8px;\n justify-content: space-between;\n background: var(--color-primary);\n border-radius: 8px;\n align-items: center;\n cursor: pointer;\n }\n .primaryInfo img{\n width: 24px;\n height: 24px;\n }\n .toolTipInfo .text-container svg {\n font-size: 16px !important;\n }\n .paraWithIcon{\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .toolTipInfo{\n display: flex;\n background: var(--color-background-positive);\n padding: 12px;\n border-radius: 8px;\n flex-direction: column;\n justify-content: space-between;\n }\n .flexChangeBody{\n flex-direction: row;\n align-items: center;\n }\n\n .toolTipInfo .toolTip + div{\n display: flex;\n justify-content: end;\n }\n .error{\n background: var(--color-background-negative);\n }\n .error .toolTip svg{\n color: var(--color-negative);\n }\n .warning{\n background: var(--color-background-warning);\n }\n .warning .toolTip svg{\n color: var(--color-warning);\n }\n .success{\n background: var(--color-background-positive);\n }\n\n .success .toolTip svg{\n color: var(--color-positive);\n }\n \n .intermediate{\n background: var(--color-background-info);\n }\n .toolTip{\n display: flex;\n gap: 8px;\n }\n .cardHead{\n display: flex;\n justify-content: space-between;\n gap: 24px;\n }\n .imgBg{\n border-radius: 8px;\n background: #DEF1FB;\n min-width: 56px;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .ant-modal-footer{\n display: none;\n }\n .toolTip svg{\n margin: 0px 0 0;\n }\n .flexChangeBody{\n align-items: center !important;\n flex-direction: row !important;\n gap: 8px !important;\n }\n .flexChangeBody .text-container{\n white-space: nowrap;\n }\n .flexChangeBody .viewStatus button {\n margin: 0 !important;\n}\n.displayFlex{\n display: flex;\n}\n @media only screen and (max-width: 600px) {\n .type-b1-400{\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .toolTipInfo {\n flex-direction: column;\n gap: 0;\n align-items: unset;\n }\n \n .cardHead .titleHead > span{\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n }\n"])));
|
|
12
12
|
const CardBody = exports.CardBody = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\ndisplay: flex;\nflex-direction: column;\ngap: 24px;\n@media only screen and (max-width: 600px) {\n gap: 16px;\n}\n"])));
|
|
13
13
|
const CardFooter = exports.CardFooter = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\ndisplay: flex;\npadding: 16px 24px;\ngap: 24px;\nborder-top: 1px solid var(--color-divider);\nwidth: calc(100% + 48px);\nmargin: 0 0 0 -24px;\nposition: relative;\ntop: 24px;\njustify-content: end;\n@media only screen and (max-width: 600px) {\n padding: 16px 16px;\n width: calc(100% + 32px);\n margin: 0 0 0 -16px;\n top: 16px;\n\n .text-container .type-t2-700 {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n}\n.large {\n height: 36px;\n min-width: 100px;\n padding: 10px 16px;\n}\n}\n"])));
|