oa-componentbook 1.0.1-stage.4 → 1.0.1-stage.400
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 +129 -40
- 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-feedback-form/FeedbackForm.js +75 -0
- package/build/components/oa-component-feedback-tooltip/FeedbackTooltip.js +69 -0
- package/build/components/oa-component-icons/MaterialIcon.js +1 -1
- package/build/components/oa-component-info/CustomInfo.js +9 -4
- package/build/components/oa-component-info/styles.js +3 -3
- package/build/components/oa-component-modal/CustomModal.js +51 -46
- 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-select/CustomSelect.js +116 -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 +610 -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/{TextArea.js → CustomTextArea.js} +4 -4
- package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
- package/build/components/oa-component-upload/CustomUpload.js +120 -40
- package/build/components/oa-component-viewer/CustomViewer.js +3 -1
- 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 +3 -0
- 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/oaChat.svg +5 -0
- package/build/images/outOfStock.png +0 -0
- package/build/index.js +131 -5
- 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 +235 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +63 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2314 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +91 -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 +93 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +87 -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 +294 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +30 -0
- package/build/layout/paymentAndConsent/CancelScreen.js +46 -0
- package/build/layout/paymentAndConsent/ConsentCard.js +68 -0
- package/build/layout/paymentAndConsent/DetailsCard.js +75 -0
- package/build/layout/paymentAndConsent/DetailsList.js +38 -0
- package/build/layout/paymentAndConsent/Header.js +33 -0
- package/build/layout/paymentAndConsent/InProgressScreen.js +46 -0
- package/build/layout/paymentAndConsent/Loader.js +21 -0
- package/build/layout/paymentAndConsent/Modal.js +28 -0
- package/build/layout/paymentAndConsent/PaymentAndConsent.js +22 -0
- package/build/layout/paymentAndConsent/PaymentCard.js +83 -0
- package/build/layout/paymentAndConsent/Section.js +34 -0
- package/build/layout/paymentAndConsent/SuccessScreen.js +46 -0
- package/build/layout/paymentAndConsent/TimeLineCard.js +28 -0
- package/build/layout/paymentAndConsent/TncList.js +32 -0
- package/build/layout/paymentAndConsent/style.js +12 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +576 -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-feedback/FeedbackWidget.js +83 -0
- package/build/widgets/oa-widget-feedback/styles.js +13 -0
- 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 +77 -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 +117 -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 +79 -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 +57 -29
- package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +28 -6
- package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +103 -0
- package/build/widgets/oa-widget-track-shipment-list/fn.js +81 -0
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +352 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/package.json +7 -2
- package/build/dev/oa-widget-track-shipment/TrackShipmentWidget.js +0 -195
- /package/build/{dev/oa-widget-track-shipment → widgets/oa-widget-track-shipment-list}/styles.js +0 -0
|
@@ -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: 100
|
|
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"])));
|
|
@@ -14,6 +14,7 @@ var _CustomTable = _interopRequireDefault(require("../../components/oa-component
|
|
|
14
14
|
var _CustomInput = _interopRequireDefault(require("../../components/oa-component-input/CustomInput"));
|
|
15
15
|
var _styles = require("./styles");
|
|
16
16
|
const _excluded = ["data-test", "disabled", "records", "tableBorder", "onBlur", "extraColumnData"];
|
|
17
|
+
/* eslint-disable */
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
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); }
|
|
19
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; }
|
|
@@ -22,7 +23,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
22
23
|
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; }
|
|
23
24
|
function NotesWidget(_ref) {
|
|
24
25
|
let {
|
|
25
|
-
|
|
26
|
+
"data-test": dataTest,
|
|
26
27
|
disabled,
|
|
27
28
|
records,
|
|
28
29
|
tableBorder,
|
|
@@ -30,32 +31,32 @@ function NotesWidget(_ref) {
|
|
|
30
31
|
extraColumnData
|
|
31
32
|
} = _ref,
|
|
32
33
|
antDesignTableProps = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
-
const [noteInputValue, setNoteInputValue] = (0, _react.useState)(
|
|
34
|
+
const [noteInputValue, setNoteInputValue] = (0, _react.useState)("");
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Call to callback from props.
|
|
38
|
+
* Clearing the notes input, on blur.
|
|
39
|
+
*/
|
|
39
40
|
const handleBlur = event => {
|
|
40
41
|
// Call to callback from props.
|
|
41
42
|
onBlur(event);
|
|
42
43
|
|
|
43
44
|
// Clearing the notes input, on blur.
|
|
44
|
-
setNoteInputValue(
|
|
45
|
+
setNoteInputValue("");
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
// Used a local variable to avoid mutating the passed prop.
|
|
48
49
|
const mutatedRecords = [...records];
|
|
49
50
|
if (!disabled) {
|
|
50
51
|
mutatedRecords === null || mutatedRecords === void 0 || mutatedRecords.unshift({
|
|
51
|
-
key:
|
|
52
|
+
key: "0"
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
const extraColumns = Array.isArray(extraColumnData) && extraColumnData.map(column => ({
|
|
55
56
|
title: column.title,
|
|
56
57
|
dataIndex: column.dataIndex,
|
|
57
58
|
key: column.key,
|
|
58
|
-
width:
|
|
59
|
+
width: "20%"
|
|
59
60
|
}));
|
|
60
61
|
const columns = [
|
|
61
62
|
// {
|
|
@@ -65,9 +66,9 @@ function NotesWidget(_ref) {
|
|
|
65
66
|
// width: '20%',
|
|
66
67
|
// },
|
|
67
68
|
{
|
|
68
|
-
title:
|
|
69
|
-
width:
|
|
70
|
-
dataIndex:
|
|
69
|
+
title: "NOTES",
|
|
70
|
+
width: "40%",
|
|
71
|
+
dataIndex: "notes",
|
|
71
72
|
render: (text, obj, index) => {
|
|
72
73
|
if (!disabled && index === 0) {
|
|
73
74
|
return /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
@@ -76,35 +77,36 @@ function NotesWidget(_ref) {
|
|
|
76
77
|
value: noteInputValue,
|
|
77
78
|
onChange: event => setNoteInputValue(event.target.value),
|
|
78
79
|
onBlur: handleBlur,
|
|
79
|
-
placeholder: "Type here .."
|
|
80
|
+
placeholder: "Type here ..",
|
|
81
|
+
maxLength: 500
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
83
85
|
style: {
|
|
84
|
-
overflow:
|
|
86
|
+
overflow: "auto"
|
|
85
87
|
}
|
|
86
88
|
}, text);
|
|
87
89
|
},
|
|
88
|
-
key:
|
|
90
|
+
key: "notes"
|
|
89
91
|
}, {
|
|
90
|
-
title:
|
|
91
|
-
dataIndex:
|
|
92
|
-
key:
|
|
92
|
+
title: "DATE AND TIME",
|
|
93
|
+
dataIndex: "dateTime",
|
|
94
|
+
key: "dateTime"
|
|
93
95
|
}, {
|
|
94
|
-
title:
|
|
95
|
-
dataIndex:
|
|
96
|
-
key:
|
|
97
|
-
width:
|
|
96
|
+
title: "USER",
|
|
97
|
+
dataIndex: "user",
|
|
98
|
+
key: "user",
|
|
99
|
+
width: "20%"
|
|
98
100
|
}, ...(extraColumns || [])];
|
|
99
101
|
const tableStyle = {
|
|
100
|
-
borderTop:
|
|
101
|
-
borderRight: tableBorder ?
|
|
102
|
-
borderBottom: tableBorder ?
|
|
103
|
-
borderLeft: tableBorder ?
|
|
104
|
-
borderRadius: tableBorder ?
|
|
102
|
+
borderTop: "1px solid var(--color-divider)",
|
|
103
|
+
borderRight: tableBorder ? "1px solid var(--color-divider)" : "0",
|
|
104
|
+
borderBottom: tableBorder ? "1px solid var(--color-divider)" : "0",
|
|
105
|
+
borderLeft: tableBorder ? "1px solid var(--color-divider)" : "0",
|
|
106
|
+
borderRadius: tableBorder ? "4px" : "0"
|
|
105
107
|
// visibility: (!(records.length > 0) && disabled) ? 'hidden' : undefined,
|
|
106
108
|
};
|
|
107
|
-
return /*#__PURE__*/_react.default.createElement(_CustomTable.default, _extends({
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement(_styles.NotesTable, null, /*#__PURE__*/_react.default.createElement(_CustomTable.default, _extends({
|
|
108
110
|
style: tableStyle,
|
|
109
111
|
columns: columns,
|
|
110
112
|
dataSource: mutatedRecords,
|
|
@@ -112,10 +114,10 @@ function NotesWidget(_ref) {
|
|
|
112
114
|
size: "small",
|
|
113
115
|
emptyText: "No Notes Available",
|
|
114
116
|
tableBorder: tableBorder
|
|
115
|
-
}, antDesignTableProps));
|
|
117
|
+
}, antDesignTableProps)));
|
|
116
118
|
}
|
|
117
119
|
NotesWidget.propTypes = {
|
|
118
|
-
|
|
120
|
+
"data-test": _propTypes.default.string,
|
|
119
121
|
disabled: _propTypes.default.bool,
|
|
120
122
|
records: _propTypes.default.arrayOf(_propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))),
|
|
121
123
|
onBlur: _propTypes.default.func,
|
|
@@ -123,7 +125,7 @@ NotesWidget.propTypes = {
|
|
|
123
125
|
extraColumnData: _propTypes.default.array
|
|
124
126
|
};
|
|
125
127
|
NotesWidget.defaultProps = {
|
|
126
|
-
|
|
128
|
+
"data-test": null,
|
|
127
129
|
disabled: false,
|
|
128
130
|
onBlur: () => {},
|
|
129
131
|
records: [],
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.NoNotesMessage = void 0;
|
|
6
|
+
exports.default = exports.NotesTable = exports.NoNotesMessage = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
8
|
+
var _templateObject, _templateObject2;
|
|
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
|
var _default = exports.default = {};
|
|
12
|
-
const NoNotesMessage = exports.NoNotesMessage = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n input{\n height: 30px;\n }\n"])));
|
|
12
|
+
const NoNotesMessage = exports.NoNotesMessage = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n input {\n height: 30px;\n }\n"])));
|
|
13
|
+
const NotesTable = exports.NotesTable = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n table {\n width: auto !important;\n }\n"])));
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = ProfileDataWidget;
|
|
7
|
+
require("core-js/modules/es.string.trim.js");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
11
|
+
var _styles = require("./styles");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/* eslint-disable */
|
|
14
|
+
|
|
15
|
+
function ProfileDataWidget(_ref) {
|
|
16
|
+
let {
|
|
17
|
+
image,
|
|
18
|
+
title,
|
|
19
|
+
line1,
|
|
20
|
+
line2,
|
|
21
|
+
line3,
|
|
22
|
+
line4,
|
|
23
|
+
line5,
|
|
24
|
+
alignProfile
|
|
25
|
+
} = _ref;
|
|
26
|
+
// Determine what to display in the icon
|
|
27
|
+
const getIconContent = () => {
|
|
28
|
+
if (!(image !== null && image !== void 0 && image.visible)) return null;
|
|
29
|
+
if (image.imageType === "source" && image.imageFile) {
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
31
|
+
src: image.imageFile,
|
|
32
|
+
alt: "Profile",
|
|
33
|
+
style: {
|
|
34
|
+
width: "100%",
|
|
35
|
+
height: "100%",
|
|
36
|
+
borderRadius: "50%",
|
|
37
|
+
objectFit: "cover"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (image.imageType === "letterIcon") {
|
|
42
|
+
const letter = title !== null && title !== void 0 && title.label ? title.label.charAt(0).toUpperCase() : "";
|
|
43
|
+
return letter;
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
};
|
|
47
|
+
const resolveToken = token => "var(--color-".concat(String(token || "").trim(), ")");
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_styles.ProfileDataContainer, {
|
|
49
|
+
alignProfile: alignProfile
|
|
50
|
+
}, (image === null || image === void 0 ? void 0 : image.visible) && /*#__PURE__*/_react.default.createElement(_styles.ProfileIcon, {
|
|
51
|
+
style: {
|
|
52
|
+
backgroundColor: resolveToken(image === null || image === void 0 ? void 0 : image.bgColor),
|
|
53
|
+
color: resolveToken(image === null || image === void 0 ? void 0 : image.color)
|
|
54
|
+
}
|
|
55
|
+
}, getIconContent()), /*#__PURE__*/_react.default.createElement(_styles.ProfileInfo, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
56
|
+
color: (title === null || title === void 0 ? void 0 : title.color) || "primary-content",
|
|
57
|
+
typography: (title === null || title === void 0 ? void 0 : title.typography) || "type-h3-500",
|
|
58
|
+
className: "company-name"
|
|
59
|
+
}, (title === null || title === void 0 ? void 0 : title.label) || ""), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "company-details"
|
|
61
|
+
}, line1 && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
62
|
+
color: line1.color || "secondary-content",
|
|
63
|
+
typography: line1.typography || "type-b1-400"
|
|
64
|
+
}, line1.label || ""), line2 && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
65
|
+
color: line2.color || "secondary-content",
|
|
66
|
+
typography: line2.typography || "type-b1-400"
|
|
67
|
+
}, line2.label || ""), line3 && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
68
|
+
color: line3.color || "secondary-content",
|
|
69
|
+
typography: line3.typography || "type-b1-400"
|
|
70
|
+
}, line3.label || ""), line4 && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
71
|
+
color: line4.color || "secondary-content",
|
|
72
|
+
typography: line4.typography || "type-b1-400"
|
|
73
|
+
}, line4.label || ""), line5 && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
74
|
+
color: line5.color || "secondary-content",
|
|
75
|
+
typography: line5.typography || "type-b1-400"
|
|
76
|
+
}, line5.label || ""))));
|
|
77
|
+
}
|
|
78
|
+
ProfileDataWidget.propTypes = {
|
|
79
|
+
image: _propTypes.default.shape({
|
|
80
|
+
visible: _propTypes.default.bool,
|
|
81
|
+
imageType: _propTypes.default.oneOf(["source", "letterIcon"]),
|
|
82
|
+
imageFile: _propTypes.default.string,
|
|
83
|
+
color: _propTypes.default.string,
|
|
84
|
+
bgColor: _propTypes.default.string
|
|
85
|
+
}),
|
|
86
|
+
title: _propTypes.default.shape({
|
|
87
|
+
label: _propTypes.default.string,
|
|
88
|
+
typography: _propTypes.default.string,
|
|
89
|
+
color: _propTypes.default.string
|
|
90
|
+
}),
|
|
91
|
+
line1: _propTypes.default.shape({
|
|
92
|
+
label: _propTypes.default.string,
|
|
93
|
+
typography: _propTypes.default.string,
|
|
94
|
+
color: _propTypes.default.string
|
|
95
|
+
}),
|
|
96
|
+
line2: _propTypes.default.shape({
|
|
97
|
+
label: _propTypes.default.string,
|
|
98
|
+
typography: _propTypes.default.string,
|
|
99
|
+
color: _propTypes.default.string
|
|
100
|
+
}),
|
|
101
|
+
line3: _propTypes.default.shape({
|
|
102
|
+
label: _propTypes.default.string,
|
|
103
|
+
typography: _propTypes.default.string,
|
|
104
|
+
color: _propTypes.default.string
|
|
105
|
+
}),
|
|
106
|
+
line4: _propTypes.default.shape({
|
|
107
|
+
label: _propTypes.default.string,
|
|
108
|
+
typography: _propTypes.default.string,
|
|
109
|
+
color: _propTypes.default.string
|
|
110
|
+
}),
|
|
111
|
+
line5: _propTypes.default.shape({
|
|
112
|
+
label: _propTypes.default.string,
|
|
113
|
+
typography: _propTypes.default.string,
|
|
114
|
+
color: _propTypes.default.string
|
|
115
|
+
}),
|
|
116
|
+
alignProfile: _propTypes.default.string
|
|
117
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ProfileInfo = exports.ProfileIcon = exports.ProfileDataContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
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 ProfileDataContainer = exports.ProfileDataContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n gap: 24px;\n padding: ", ";\n background: ", ";\n border-radius: ", ";\n margin: ", ";\n box-shadow: ", ";\n border: ", ";\n max-width: ", ";\n justify-content: ", ";\n\n @media (max-width: 768px) {\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: 16px;\n margin: ", ";\n padding: 24px;\n }\n"])), props => props.alignProfile === 'center' ? '32px' : '32px', props => props.alignProfile === 'center' ? 'transparent' : '#ffffff', props => props.alignProfile === 'center' ? '0' : '12px', props => props.alignProfile === 'center' ? '24px auto' : '24px', props => props.alignProfile === 'center' ? 'none' : '0 2px 8px rgba(0, 0, 0, 0.1)', props => props.alignProfile === 'center' ? 'none' : '1px solid #f0f0f0', props => props.alignProfile === 'center' ? '600px' : 'none', props => props.alignProfile === 'center' ? 'center' : 'flex-start', props => props.alignProfile === 'center' ? '16px auto' : '16px');
|
|
12
|
+
const ProfileIcon = exports.ProfileIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100px;\n height: 100px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 48px;\n font-weight: 700;\n flex-shrink: 0;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n\n @media (max-width: 768px) {\n width: 80px;\n height: 80px;\n font-size: 36px;\n }\n"])));
|
|
13
|
+
const ProfileInfo = exports.ProfileInfo = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 12px;\n\n .company-name {\n margin-bottom: 4px;\n font-size: 24px;\n font-weight: 700;\n color: #333333;\n }\n\n .company-details {\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n .ant-typography {\n font-size: 14px;\n line-height: 1.5;\n color: #666666;\n }\n }\n"])));
|