oa-componentbook 1.0.1-stage.40 → 1.0.1-stage.401
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 +120 -42
- 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 +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/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 +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 +2351 -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 +306 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +30 -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-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-list/fn.js +16 -4
- 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 +4 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SubmitButton = exports.StepsContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2;
|
|
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 StepsContainer = exports.StepsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .stepQanAnsBox {\n line-height: normal;\n margin-bottom: 24px;\n }\n .ant-steps.ant-steps-vertical > .ant-steps-item .ant-steps-item-icon {\n margin-inline-end: 12px;\n border: none;\n width: 28px;\n height: 28px;\n line-height: normal;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .ant-steps\n .ant-steps-item-process\n > .ant-steps-item-container\n > .ant-steps-item-tail::after,\n .ant-steps\n .ant-steps-item-finish\n > .ant-steps-item-container\n > .ant-steps-item-tail::after {\n background-color: #e0e0e0;\n }\n .ant-steps .ant-steps-item-finish .ant-steps-item-icon {\n background-color: #00875a;\n }\n .ant-steps .ant-steps-item-finish .ant-steps-item-icon > .ant-steps-icon {\n color: #fff;\n }\n .ant-steps .ant-steps-item-process .ant-steps-item-icon {\n background-color: #014fc5;\n }\n .ant-steps.ant-steps-vertical > .ant-steps-item .ant-steps-item-title {\n padding-inline-end: 0;\n line-height: normal;\n width: 100%;\n }\n\n ul.bankDetailSec {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 0;\n margin: 0;\n }\n ul.bankDetailSec li {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n border: 1px solid rgb(217, 217, 217);\n border-radius: 6px;\n padding: 12px;\n margin: 0;\n }\n\n .ant-steps-item-tail {\n inset-inline-start: 15px !important;\n }\n .optionBtnSec {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n }\n .optionBtnSec button {\n width: 50%;\n }\n .optionBtnSec button {\n width: calc(50% - 6px);\n }\n"])));
|
|
12
|
+
const SubmitButton = exports.SubmitButton = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 32px;\n text-align: center;\n padding-top: 20px;\n border-top: 1px solid #f0f0f0;\n"])));
|
|
@@ -4,14 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = ReimbursementBreakupWidget;
|
|
7
|
+
require("core-js/modules/es.symbol.description.js");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _InfoRounded = _interopRequireDefault(require("@material-ui/icons/InfoRounded"));
|
|
10
|
-
var _CustomModal = _interopRequireDefault(require("../../components/oa-component-modal/CustomModal"));
|
|
11
11
|
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
12
12
|
var _styles = require("./styles");
|
|
13
13
|
var _utils = require("../../utils");
|
|
14
14
|
var _CustomDrawer = _interopRequireDefault(require("../../components/oa-component-drawer/CustomDrawer"));
|
|
15
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
17
|
/**
|
|
17
18
|
* A React component that displays a reimbursement amount breakup in a modal dialog.
|
|
@@ -40,10 +41,10 @@ function ReimbursementBreakupWidget(props) {
|
|
|
40
41
|
}];
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
* Determines the class name based on the type of table row.
|
|
45
|
+
* @param {string} type - The type of the table row
|
|
46
|
+
* @returns {string} The class name for the table row
|
|
47
|
+
*/
|
|
47
48
|
const getClassForTableRow = type => {
|
|
48
49
|
switch (type) {
|
|
49
50
|
case 'HEADER':
|
|
@@ -59,11 +60,11 @@ function ReimbursementBreakupWidget(props) {
|
|
|
59
60
|
title: heading,
|
|
60
61
|
onClose: closeBreakUpModal
|
|
61
62
|
}, /*#__PURE__*/_react.default.createElement(_styles.WidgetContainer, null, cardData === null || cardData === void 0 ? void 0 : cardData.map(item => {
|
|
62
|
-
var _item$tableRows, _item$tableRows2;
|
|
63
|
+
var _item$tableRows, _item$gridInfo, _item$gridInfo2, _item$gridInfo3, _item$gridInfo4, _item$tableRows2, _item$tableRows3;
|
|
63
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
65
|
className: "rmbsProdAmt",
|
|
65
66
|
key: (0, _utils.getUUID)()
|
|
66
|
-
}, item.
|
|
67
|
+
}, item.tableType === 'NON_GRID' && /*#__PURE__*/_react.default.createElement("ul", {
|
|
67
68
|
className: "calSecBox",
|
|
68
69
|
id: "Claimgrid"
|
|
69
70
|
}, item === null || item === void 0 || (_item$tableRows = item.tableRows) === null || _item$tableRows === void 0 ? void 0 : _item$tableRows.map(tableRow => {
|
|
@@ -84,10 +85,18 @@ function ReimbursementBreakupWidget(props) {
|
|
|
84
85
|
"data-test": dataTest ? "".concat(dataTest, "--info-button-").concat(index) : null
|
|
85
86
|
// onClick={this.scrollToRef}
|
|
86
87
|
})), ' ')));
|
|
87
|
-
})), item.
|
|
88
|
+
})), (item === null || item === void 0 || (_item$gridInfo = item.gridInfo) === null || _item$gridInfo === void 0 ? void 0 : _item$gridInfo.length) > 0 && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
89
|
+
typography: "type-b3-400",
|
|
90
|
+
className: "margin-bottom-8 margin-top-4",
|
|
91
|
+
color: "primary-content"
|
|
92
|
+
}, item === null || item === void 0 || (_item$gridInfo2 = item.gridInfo) === null || _item$gridInfo2 === void 0 || (_item$gridInfo2 = _item$gridInfo2[0]) === null || _item$gridInfo2 === void 0 ? void 0 : _item$gridInfo2.title), (item === null || item === void 0 || (_item$gridInfo3 = item.gridInfo) === null || _item$gridInfo3 === void 0 ? void 0 : _item$gridInfo3.length) > 0 && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
93
|
+
typography: "type-b3-400",
|
|
94
|
+
className: "margin-bottom-16",
|
|
95
|
+
color: "secondary-content"
|
|
96
|
+
}, item === null || item === void 0 || (_item$gridInfo4 = item.gridInfo) === null || _item$gridInfo4 === void 0 || (_item$gridInfo4 = _item$gridInfo4[0]) === null || _item$gridInfo4 === void 0 ? void 0 : _item$gridInfo4.description), item.tableType === 'GRID' && (item === null || item === void 0 || (_item$tableRows2 = item.tableRows) === null || _item$tableRows2 === void 0 ? void 0 : _item$tableRows2.length) && /*#__PURE__*/_react.default.createElement("ul", {
|
|
88
97
|
className: "listofProd",
|
|
89
98
|
id: "gridView"
|
|
90
|
-
}, item === null || item === void 0 || (_item$
|
|
99
|
+
}, item === null || item === void 0 || (_item$tableRows3 = item.tableRows) === null || _item$tableRows3 === void 0 ? void 0 : _item$tableRows3.map(tableRow => {
|
|
91
100
|
var _tableRow$data2;
|
|
92
101
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
93
102
|
className: tableRow.type === 'HEADER' ? 'nonGridTableHeader' : ''
|
|
@@ -9,4 +9,4 @@ var _templateObject;
|
|
|
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 WidgetContainer = exports.WidgetContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.oaReimbursFlow {\n
|
|
12
|
+
const WidgetContainer = exports.WidgetContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .oaReimbursFlow {\n background: #fff;\n border-radius: 8px 8px 0px 0px;\n color: #212121;\n padding: 16px 12px;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n display: flex;\n flex-direction: column;\n }\n\n .amoutCalculat {\n color: #0282f0;\n padding: 16px 12px 0;\n border-top: solid 1px var(--color-divider);\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n width: calc(100% + 24px);\n display: flex;\n flex-direction: row;\n align-items: center;\n margin: 12px 0 0 -12px;\n cursor: pointer;\n justify-content: space-between;\n }\n\n .rmbsProdAmt {\n display: flex;\n flex-direction: column;\n }\n\n .rmbsProdAmt h5 {\n font-style: normal;\n color: #212121;\n font-size: 14px;\n font-weight: 400;\n line-height: 22px;\n border-top: solid 1px var(--color-divider);\n padding: 36px 0 16px;\n }\n\n ul.calSecBox {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n }\n\n ul.calSecBox li {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin: 0 0 16px;\n gap: 16px;\n }\n ul.calSecBox li:last-child {\n padding-bottom: 16px;\n }\n\n .gridtableFooter {\n border-top: solid 1px var(--color-divider);\n border-bottom: solid 1px var(--color-divider);\n padding: 16px 0 0 0;\n font-size: 14px;\n font-style: normal;\n font-weight: 700;\n line-height: 22px;\n }\n\n .gridtableFooter aside {\n font-weight: 700;\n }\n .gridtableFooter aside p {\n color: var(--color-positive) !important;\n }\n ul.calSecBox li aside {\n color: #212121;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n }\n .gridtableFooter aside p {\n font-weight: 700;\n }\n\n ul.calSecBox li aside + aside {\n font-weight: 700;\n text-align: right;\n }\n\n ul.calSecBox li aside p {\n margin: 0;\n }\n\n .infoIconScroll img {\n width: 12px;\n height: 12px;\n margin: 0 0 0 5px;\n }\n\n .rmbsProdAmt ul.listofProd {\n display: flex;\n flex-direction: column;\n border-radius: 4px 4px 0px 0px;\n border: 1px solid #f6f6f6;\n overflow: hidden;\n border-top: none !important;\n border-bottom: none !important;\n background: #fff;\n margin: 0;\n padding: 0;\n }\n\n .rmbsProdAmt ul.listofProd li {\n border-bottom: solid 1px var(--color-divider);\n padding: 16px;\n display: flex;\n flex-direction: row;\n gap: 16px;\n }\n\n .nonGridTableHeader {\n background: #f6f6f6;\n border-bottom: none;\n }\n\n .rmbsProdAmt ul.listofProd li aside {\n color: #212121;\n width: 100%;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n }\n\n .rmbsProdAmt ul.listofProd li aside.boldText {\n font-weight: 700;\n }\n .nonGridTableHeader aside {\n white-space: nowrap;\n color: var(--color-secondary-content) !important;\n font-size: 12px;\n font-style: normal;\n font-weight: 700;\n line-height: 16px; /* 133.333% */\n letter-spacing: 0.24px;\n text-transform: uppercase;\n }\n #gridView {\n border: solid 1px var(--color-divider);\n }\n .rmbsProdAmt ul#gridView {\n border: solid 1px var(--color-divider);\n border-radius: 4px;\n border-top: solid 1px var(--color-divider) !important;\n }\n #gridView li aside {\n font-size: 14px !important;\n line-height: 20px !important;\n }\n #gridView li.nonGridTableHeader aside {\n font-size: 12px !important;\n white-space: normal;\n font-weight: 700 !important;\n line-height: 16px; /* 133.333% */\n letter-spacing: 0.24px;\n text-transform: uppercase;\n }\n"])));
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.assign.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
require("core-js/modules/es.array.includes.js");
|
|
9
|
+
require("core-js/modules/es.string.includes.js");
|
|
10
|
+
require("core-js/modules/es.promise.js");
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _Info = _interopRequireDefault(require("@material-ui/icons/Info"));
|
|
13
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _antd = require("antd");
|
|
15
|
+
var _InfoOutlined = _interopRequireDefault(require("@material-ui/icons/InfoOutlined"));
|
|
16
|
+
var _CustomDrawer = _interopRequireDefault(require("../../components/oa-component-drawer/CustomDrawer"));
|
|
17
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
18
|
+
var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-info/CustomInfo"));
|
|
19
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
20
|
+
var _CustomUpload = _interopRequireDefault(require("../../dev/oa-component-upload/CustomUpload"));
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
function GenericUpload(_ref) {
|
|
24
|
+
var _config$documents;
|
|
25
|
+
let {
|
|
26
|
+
config,
|
|
27
|
+
uploadHandler,
|
|
28
|
+
deleteHandler: _deleteHandler,
|
|
29
|
+
downloadHandler,
|
|
30
|
+
previewHandler,
|
|
31
|
+
visible,
|
|
32
|
+
onClose,
|
|
33
|
+
validationConfig = {
|
|
34
|
+
maxSize: 5,
|
|
35
|
+
allowedTypes: ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf'],
|
|
36
|
+
customValidation: null
|
|
37
|
+
},
|
|
38
|
+
uploadedDocuments,
|
|
39
|
+
showDelete = true,
|
|
40
|
+
showPreview = false,
|
|
41
|
+
form
|
|
42
|
+
} = _ref;
|
|
43
|
+
const validateFile = (file, docTypeId) => {
|
|
44
|
+
const isValidType = validationConfig.allowedTypes.includes(file.type);
|
|
45
|
+
if (!isValidType) {
|
|
46
|
+
form.setFields([{
|
|
47
|
+
name: docTypeId,
|
|
48
|
+
errors: ["Only ".concat(validationConfig.allowedTypes.map(type => type.split('/')[1].toUpperCase()).join('/'), " files are allowed!")]
|
|
49
|
+
}]);
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const isValidSize = file.size / 1024 / 1024 < validationConfig.maxSize;
|
|
53
|
+
if (!isValidSize) {
|
|
54
|
+
form.setFields([{
|
|
55
|
+
name: docTypeId,
|
|
56
|
+
errors: ["File must be smaller than ".concat(validationConfig.maxSize, "MB!")]
|
|
57
|
+
}]);
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (validationConfig.customValidation) {
|
|
61
|
+
return validationConfig.customValidation(file, docTypeId);
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
};
|
|
65
|
+
const handleUpload = async (file, docTypeId, documentId) => {
|
|
66
|
+
if (!validateFile(file, docTypeId)) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return uploadHandler(file, docTypeId, documentId);
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
|
|
72
|
+
title: config.title,
|
|
73
|
+
width: config.width,
|
|
74
|
+
open: visible,
|
|
75
|
+
onClose: onClose,
|
|
76
|
+
buttonConfig: config.buttonConfig
|
|
77
|
+
}, config.systemInfo && /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
+
className: "margin-bottom-32"
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomInfo.default, _extends({}, config.systemInfo, {
|
|
80
|
+
iconConfig: {
|
|
81
|
+
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
82
|
+
icon: _InfoOutlined.default,
|
|
83
|
+
size: 24,
|
|
84
|
+
color: "negative"
|
|
85
|
+
}),
|
|
86
|
+
position: 'left'
|
|
87
|
+
}
|
|
88
|
+
}))), (config === null || config === void 0 ? void 0 : config.heading) && /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
+
className: "padding-bottom-32"
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
91
|
+
className: "type-t1-500",
|
|
92
|
+
color: "primary-content"
|
|
93
|
+
}, config.heading, ' ')), /*#__PURE__*/_react.default.createElement(_antd.Form, {
|
|
94
|
+
form: form
|
|
95
|
+
}, (_config$documents = config.documents) === null || _config$documents === void 0 ? void 0 : _config$documents.map(item => /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
key: item.docTypeId
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: "padding-bottom-4"
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
100
|
+
typography: "type-b2-500",
|
|
101
|
+
color: "primary-content"
|
|
102
|
+
}, item === null || item === void 0 ? void 0 : item.docName)), /*#__PURE__*/_react.default.createElement(_CustomUpload.default, {
|
|
103
|
+
isMandatory: true,
|
|
104
|
+
handleCustomOnChange: (file, status) => handleUpload(file, item.docTypeId, item.documentId),
|
|
105
|
+
formName: item.docTypeId,
|
|
106
|
+
uploadedDocuments: uploadedDocuments && uploadedDocuments[item.docTypeId] ? [uploadedDocuments[item.docTypeId]] : [],
|
|
107
|
+
deleteHandler: selectedFile => _deleteHandler(item.docTypeId),
|
|
108
|
+
downloadCallback: file => downloadHandler(item.docTypeId),
|
|
109
|
+
getPreview: previewHandler || (() => {}),
|
|
110
|
+
showDelete: showDelete,
|
|
111
|
+
showPreview: showPreview,
|
|
112
|
+
accept: validationConfig.allowedTypes.join(', '),
|
|
113
|
+
docName: item.docName
|
|
114
|
+
})))));
|
|
115
|
+
}
|
|
116
|
+
GenericUpload.propTypes = {
|
|
117
|
+
config: _propTypes.default.shape({
|
|
118
|
+
title: _propTypes.default.string.isRequired,
|
|
119
|
+
width: _propTypes.default.number,
|
|
120
|
+
buttonConfig: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
121
|
+
callback: _propTypes.default.func,
|
|
122
|
+
label: _propTypes.default.string,
|
|
123
|
+
type: _propTypes.default.string
|
|
124
|
+
})),
|
|
125
|
+
systemInfo: _propTypes.default.shape({
|
|
126
|
+
title: _propTypes.default.string,
|
|
127
|
+
color: _propTypes.default.string,
|
|
128
|
+
description: _propTypes.default.node
|
|
129
|
+
}),
|
|
130
|
+
heading: _propTypes.default.string,
|
|
131
|
+
documents: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
132
|
+
title: _propTypes.default.string,
|
|
133
|
+
docTypeId: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
134
|
+
docName: _propTypes.default.string
|
|
135
|
+
}))
|
|
136
|
+
}).isRequired,
|
|
137
|
+
uploadHandler: _propTypes.default.func.isRequired,
|
|
138
|
+
deleteHandler: _propTypes.default.func.isRequired,
|
|
139
|
+
downloadHandler: _propTypes.default.func.isRequired,
|
|
140
|
+
previewHandler: _propTypes.default.func,
|
|
141
|
+
validationConfig: _propTypes.default.shape({
|
|
142
|
+
maxSize: _propTypes.default.number,
|
|
143
|
+
allowedTypes: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
144
|
+
customValidation: _propTypes.default.func
|
|
145
|
+
}),
|
|
146
|
+
uploadedDocuments: _propTypes.default.object,
|
|
147
|
+
showDelete: _propTypes.default.bool,
|
|
148
|
+
showPreview: _propTypes.default.bool,
|
|
149
|
+
form: _propTypes.default.object.isRequired,
|
|
150
|
+
visible: _propTypes.default.bool.isRequired,
|
|
151
|
+
onClose: _propTypes.default.func.isRequired
|
|
152
|
+
};
|
|
153
|
+
GenericUpload.defaultProps = {
|
|
154
|
+
previewHandler: () => {},
|
|
155
|
+
validationConfig: {
|
|
156
|
+
maxSize: 5,
|
|
157
|
+
allowedTypes: ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf'],
|
|
158
|
+
customValidation: null
|
|
159
|
+
},
|
|
160
|
+
uploadedDocuments: {},
|
|
161
|
+
showDelete: true,
|
|
162
|
+
showPreview: false
|
|
163
|
+
};
|
|
164
|
+
var _default = exports.default = GenericUpload;
|
|
@@ -0,0 +1,79 @@
|
|
|
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 _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
10
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
11
|
+
var _ChevronRight = _interopRequireDefault(require("@material-ui/icons/ChevronRight"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/* eslint-disable */
|
|
14
|
+
|
|
15
|
+
const SelectListItemModal = _ref => {
|
|
16
|
+
var _modalContent$header, _modalContent$header2, _modalContent$subHead, _modalContent$subHead2, _modalContent$listIte;
|
|
17
|
+
let {
|
|
18
|
+
modalContent,
|
|
19
|
+
onItemSelect
|
|
20
|
+
} = _ref;
|
|
21
|
+
const avatarColors = (modalContent === null || modalContent === void 0 ? void 0 : modalContent.avatarColors) || [];
|
|
22
|
+
const handleItemSelect = item => {
|
|
23
|
+
// localStorage.setItem('selectedListItem', JSON.stringify(item));
|
|
24
|
+
if (onItemSelect) {
|
|
25
|
+
onItemSelect(item);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const getAvatarStyle = index => {
|
|
29
|
+
if (avatarColors.length === 0) {
|
|
30
|
+
// Default colors if no colors provided
|
|
31
|
+
return {
|
|
32
|
+
backgroundColor: '#f0f0f0',
|
|
33
|
+
color: '#333'
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Use modulo to cycle through colors
|
|
38
|
+
const colorIndex = index % avatarColors.length;
|
|
39
|
+
return avatarColors[colorIndex];
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (modalContent === null || modalContent === void 0 ? void 0 : modalContent.header) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
42
|
+
typography: modalContent === null || modalContent === void 0 || (_modalContent$header = modalContent.header) === null || _modalContent$header === void 0 ? void 0 : _modalContent$header.type,
|
|
43
|
+
color: "primary-content"
|
|
44
|
+
}, modalContent === null || modalContent === void 0 || (_modalContent$header2 = modalContent.header) === null || _modalContent$header2 === void 0 ? void 0 : _modalContent$header2.text), (modalContent === null || modalContent === void 0 ? void 0 : modalContent.subHeading) && /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
+
className: "margin-top-12"
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
47
|
+
typography: modalContent === null || modalContent === void 0 || (_modalContent$subHead = modalContent.subHeading) === null || _modalContent$subHead === void 0 ? void 0 : _modalContent$subHead.type,
|
|
48
|
+
color: "secondary-content"
|
|
49
|
+
}, modalContent === null || modalContent === void 0 || (_modalContent$subHead2 = modalContent.subHeading) === null || _modalContent$subHead2 === void 0 ? void 0 : _modalContent$subHead2.text)), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
+
className: "select-list-container"
|
|
51
|
+
}, modalContent === null || modalContent === void 0 || (_modalContent$listIte = modalContent.listItem) === null || _modalContent$listIte === void 0 ? void 0 : _modalContent$listIte.map((item, index) => {
|
|
52
|
+
var _item$label;
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
key: index,
|
|
55
|
+
className: "select-list-item",
|
|
56
|
+
onClick: () => handleItemSelect(item)
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "item-avatar",
|
|
59
|
+
style: getAvatarStyle(index)
|
|
60
|
+
}, (_item$label = item.label) === null || _item$label === void 0 || (_item$label = _item$label.charAt(0)) === null || _item$label === void 0 ? void 0 : _item$label.toUpperCase()), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: "item-content"
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
63
|
+
typography: "type-b1-400",
|
|
64
|
+
color: "primary-content"
|
|
65
|
+
}, item.label)), /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "item-arrow"
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
68
|
+
icon: _ChevronRight.default,
|
|
69
|
+
size: 20,
|
|
70
|
+
color: "primary"
|
|
71
|
+
})));
|
|
72
|
+
})));
|
|
73
|
+
};
|
|
74
|
+
SelectListItemModal.propTypes = {
|
|
75
|
+
modalContent: _propTypes.default.object,
|
|
76
|
+
onItemSelect: _propTypes.default.func,
|
|
77
|
+
avatarColors: _propTypes.default.array
|
|
78
|
+
};
|
|
79
|
+
var _default = exports.default = SelectListItemModal;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
10
|
+
require("core-js/modules/es.string.replace.js");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
var _reactRouterDom = require("react-router-dom");
|
|
14
|
+
var _Menu = _interopRequireDefault(require("@material-ui/icons/Menu"));
|
|
15
|
+
var _Header = _interopRequireDefault(require("./components/Header"));
|
|
16
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
17
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
18
|
+
var _styles = _interopRequireWildcard(require("./styles"));
|
|
19
|
+
var _CustomDropdown = _interopRequireDefault(require("../../components/oa-component-dropdown/CustomDropdown"));
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
23
|
+
/* eslint-disable */
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
Sider
|
|
27
|
+
} = _antd.Layout;
|
|
28
|
+
const {
|
|
29
|
+
SubMenu
|
|
30
|
+
} = _antd.Menu;
|
|
31
|
+
function SidebarWidget(_ref) {
|
|
32
|
+
var _mobileMenuItems$item, _footer$item, _menuItems$items, _footer$item2, _footer$item3, _footer$icons$;
|
|
33
|
+
let {
|
|
34
|
+
heading,
|
|
35
|
+
menuItems = [],
|
|
36
|
+
mobileMenuItems = [],
|
|
37
|
+
footer,
|
|
38
|
+
location,
|
|
39
|
+
history,
|
|
40
|
+
handleFooterClick,
|
|
41
|
+
profileData
|
|
42
|
+
} = _ref;
|
|
43
|
+
const [openKeys, setOpenKeys] = (0, _react.useState)([]);
|
|
44
|
+
|
|
45
|
+
// Determine which menu items to use and whether to show profile icon
|
|
46
|
+
const shouldShowProfileIcon = (mobileMenuItems === null || mobileMenuItems === void 0 || (_mobileMenuItems$item = mobileMenuItems.items) === null || _mobileMenuItems$item === void 0 ? void 0 : _mobileMenuItems$item.length) > 0;
|
|
47
|
+
const activeMenuItems = shouldShowProfileIcon ? mobileMenuItems : menuItems;
|
|
48
|
+
|
|
49
|
+
// Find which submenu contains the current path and set it as open by default
|
|
50
|
+
(0, _react.useEffect)(() => {
|
|
51
|
+
const currentPath = location.pathname;
|
|
52
|
+
const items = (menuItems === null || menuItems === void 0 ? void 0 : menuItems.items) || [];
|
|
53
|
+
|
|
54
|
+
// Find if current path is in any submenu
|
|
55
|
+
for (const item of items) {
|
|
56
|
+
if (item !== null && item !== void 0 && item.children && (item === null || item === void 0 ? void 0 : item.children.length) > 0) {
|
|
57
|
+
var _item$children;
|
|
58
|
+
const hasCurrentPath = item === null || item === void 0 || (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.some(child => (child === null || child === void 0 ? void 0 : child.path) === currentPath);
|
|
59
|
+
if (hasCurrentPath) {
|
|
60
|
+
setOpenKeys([item === null || item === void 0 ? void 0 : item.key]);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// If no match found, open the first submenu by default
|
|
67
|
+
const firstSubmenu = items === null || items === void 0 ? void 0 : items.find(item => {
|
|
68
|
+
var _item$children2;
|
|
69
|
+
return (item === null || item === void 0 ? void 0 : item.children) && (item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.length) > 0;
|
|
70
|
+
});
|
|
71
|
+
if (firstSubmenu) {
|
|
72
|
+
setOpenKeys([firstSubmenu === null || firstSubmenu === void 0 ? void 0 : firstSubmenu.key]);
|
|
73
|
+
}
|
|
74
|
+
}, [location.pathname, menuItems]);
|
|
75
|
+
|
|
76
|
+
// Simple menu click handler
|
|
77
|
+
const handleMenuClick = _ref2 => {
|
|
78
|
+
let {
|
|
79
|
+
key
|
|
80
|
+
} = _ref2;
|
|
81
|
+
history.replace(key);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// Handle submenu open/close
|
|
85
|
+
const handleOpenChange = keys => {
|
|
86
|
+
setOpenKeys(keys);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// Simple render function for menu items
|
|
90
|
+
const renderMenuItem = item => {
|
|
91
|
+
var _item$children3;
|
|
92
|
+
if (item !== null && item !== void 0 && item.children && (item === null || item === void 0 || (_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.length) > 0) {
|
|
93
|
+
var _item$children4;
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(SubMenu, {
|
|
95
|
+
key: item.key,
|
|
96
|
+
title: /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, item === null || item === void 0 ? void 0 : item.iconConfig), item === null || item === void 0 ? void 0 : item.label)
|
|
97
|
+
}, item === null || item === void 0 || (_item$children4 = item.children) === null || _item$children4 === void 0 ? void 0 : _item$children4.map(child => /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
98
|
+
key: child === null || child === void 0 ? void 0 : child.path
|
|
99
|
+
}, child === null || child === void 0 ? void 0 : child.label)));
|
|
100
|
+
} else {
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
102
|
+
key: item.path
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, item === null || item === void 0 ? void 0 : item.iconConfig), item === null || item === void 0 ? void 0 : item.label);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_styles.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
className: "oaLeftLayouts"
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement(Sider, {
|
|
109
|
+
width: 250,
|
|
110
|
+
theme: "light",
|
|
111
|
+
className: "sidebar"
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
className: "logoContainer"
|
|
114
|
+
}, (heading === null || heading === void 0 ? void 0 : heading.visible) && /*#__PURE__*/_react.default.createElement(_Header.default, heading), /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
+
className: "notShowInDesktop"
|
|
116
|
+
}, (activeMenuItems === null || activeMenuItems === void 0 ? void 0 : activeMenuItems.visible) && /*#__PURE__*/_react.default.createElement(_CustomDropdown.default, {
|
|
117
|
+
items: [...((activeMenuItems === null || activeMenuItems === void 0 ? void 0 : activeMenuItems.items) || []), ...(footer !== null && footer !== void 0 && footer.visible ? [{
|
|
118
|
+
label: footer === null || footer === void 0 || (_footer$item = footer.item) === null || _footer$item === void 0 ? void 0 : _footer$item.label,
|
|
119
|
+
key: "footerAction",
|
|
120
|
+
onClick: handleFooterClick,
|
|
121
|
+
danger: true
|
|
122
|
+
}] : [])],
|
|
123
|
+
trigger: ["click"],
|
|
124
|
+
type: "primary",
|
|
125
|
+
onMenuItemClick: key => {
|
|
126
|
+
if ((key === null || key === void 0 ? void 0 : key.key) === "footerAction") {
|
|
127
|
+
handleFooterClick();
|
|
128
|
+
} else {
|
|
129
|
+
history.replace(key === null || key === void 0 ? void 0 : key.path);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, shouldShowProfileIcon && profileData !== null && profileData !== void 0 && profileData.visible ? /*#__PURE__*/_react.default.createElement(_styles.ProfileIcon, {
|
|
133
|
+
style: {
|
|
134
|
+
backgroundColor: "var(--color-".concat((profileData === null || profileData === void 0 ? void 0 : profileData.iconBgColor) || "primary", ")"),
|
|
135
|
+
color: "var(--color-".concat((profileData === null || profileData === void 0 ? void 0 : profileData.iconColor) || "primary-content", ")")
|
|
136
|
+
}
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
138
|
+
color: "white",
|
|
139
|
+
typography: profileData === null || profileData === void 0 ? void 0 : profileData.mwebTypographyType
|
|
140
|
+
}, profileData === null || profileData === void 0 ? void 0 : profileData.iconText)) : /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
141
|
+
color: "primary",
|
|
142
|
+
icon: _Menu.default,
|
|
143
|
+
size: 20
|
|
144
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
+
className: "notShowInMobile"
|
|
146
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
+
className: "sidebarContent"
|
|
148
|
+
}, (menuItems === null || menuItems === void 0 ? void 0 : menuItems.visible) && /*#__PURE__*/_react.default.createElement(_antd.Menu, {
|
|
149
|
+
theme: "light",
|
|
150
|
+
mode: "inline",
|
|
151
|
+
selectedKeys: [location.pathname],
|
|
152
|
+
openKeys: openKeys,
|
|
153
|
+
onOpenChange: handleOpenChange,
|
|
154
|
+
className: "menu",
|
|
155
|
+
onClick: handleMenuClick
|
|
156
|
+
}, menuItems === null || menuItems === void 0 || (_menuItems$items = menuItems.items) === null || _menuItems$items === void 0 ? void 0 : _menuItems$items.map(item => renderMenuItem(item))), (footer === null || footer === void 0 ? void 0 : footer.visible) && /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
+
className: "logoutDiv",
|
|
158
|
+
onClick: () => handleFooterClick()
|
|
159
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, footer === null || footer === void 0 || (_footer$item2 = footer.item) === null || _footer$item2 === void 0 ? void 0 : _footer$item2.iconConfig), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
160
|
+
color: "negative",
|
|
161
|
+
typography: "type-button-500"
|
|
162
|
+
}, footer === null || footer === void 0 || (_footer$item3 = footer.item) === null || _footer$item3 === void 0 ? void 0 : _footer$item3.label)))))), (footer === null || footer === void 0 ? void 0 : footer.icons) && footer.icons.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
163
|
+
className: "footerLogoSection notShowInMobile"
|
|
164
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
165
|
+
color: "secondary-content",
|
|
166
|
+
typography: "type-b2-400"
|
|
167
|
+
}, "Powered by"), /*#__PURE__*/_react.default.createElement("div", {
|
|
168
|
+
className: "footerLogoContainer"
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Image, {
|
|
170
|
+
src: (_footer$icons$ = footer.icons[0]) === null || _footer$icons$ === void 0 ? void 0 : _footer$icons$.icon,
|
|
171
|
+
preview: false,
|
|
172
|
+
className: "footerLogo"
|
|
173
|
+
}))));
|
|
174
|
+
}
|
|
175
|
+
var _default = exports.default = (0, _reactRouterDom.withRouter)(SidebarWidget);
|
|
@@ -0,0 +1,33 @@
|
|
|
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 _antd = require("antd");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
|
|
12
|
+
function Header(_ref) {
|
|
13
|
+
let {
|
|
14
|
+
icons = [],
|
|
15
|
+
text = null
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
className: "leftLogoSec"
|
|
19
|
+
}, icons === null || icons === void 0 ? void 0 : icons.map(_ref2 => {
|
|
20
|
+
let {
|
|
21
|
+
icon,
|
|
22
|
+
showLine
|
|
23
|
+
} = _ref2;
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Image, {
|
|
25
|
+
src: icon,
|
|
26
|
+
preview: false,
|
|
27
|
+
className: "logo logo-mobile-height"
|
|
28
|
+
}));
|
|
29
|
+
}), text && /*#__PURE__*/_react.default.createElement(_antd.Typography, {
|
|
30
|
+
typography: "type-h3-500"
|
|
31
|
+
}, text));
|
|
32
|
+
}
|
|
33
|
+
var _default = exports.default = Header;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ProfileIcon = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2; // 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 OalayoutStyle = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .oaLeftLayouts {\n padding: 24px 8px;\n background: #f6f6f6;\n height: 80vh; /* full viewport height */\n display: flex;\n flex-direction: column;\n }\n\n .logoContainer {\n padding: 12px;\n display: flex;\n justify-content: space-between;\n height: 110px;\n align-items: center;\n margin: 0 0 16px 0;\n }\n\n .logoutDiv {\n display: flex;\n flex-direction: row;\n margin: 48px 0 0 16px;\n gap: 8px;\n cursor: pointer;\n }\n\n .leftLogoSec {\n display: flex;\n flex-direction: row;\n gap: 8px;\n }\n\n .logo-mobile-height {\n height: auto;\n }\n\n // .logoContainer em {\n // width: 1px;\n // background: #e0e0e0;\n // }\n // .logoContainer img {\n // height: 32px;\n // }\n .ant-layout-sider-light,\n .ant-menu-light {\n background: transparent;\n }\n\n /* Regular menu items */\n .ant-menu-item {\n padding: 16px;\n border-radius: 50px;\n margin: 0 0 8px;\n height: auto;\n line-height: normal;\n border-radius: 999px;\n border: 1px solid #e0e0e0;\n background: #fff;\n }\n\n /* SubMenu title styling - this is the parent item - same size as regular items */\n .ant-menu-submenu-title {\n padding: 24px;\n border-radius: 50px;\n margin: 0 0 8px;\n height: auto;\n line-height: normal;\n border-radius: 999px;\n border: 1px solid #e0e0e0;\n background: #fff;\n display: flex;\n align-items: center;\n }\n\n /* SubMenu items - these are the children - should be plain text */\n .ant-menu-submenu .ant-menu-item {\n margin: 8px 0;\n padding: 8px 24px;\n border-radius: 0;\n background: transparent;\n border: none;\n margin-left: 16px;\n color: #666;\n font-size: 14px;\n height: auto;\n line-height: 1.4;\n }\n\n /* Add extra spacing for last nested item */\n .ant-menu-submenu .ant-menu-item:last-child {\n margin-bottom: 12px;\n }\n\n /* REMOVED: Open SubMenu styling - this was making ALL open submenus blue */\n /* .ant-menu-submenu-open > .ant-menu-submenu-title {\n background: #014fc5;\n color: #fff;\n padding: 24px; \n } */\n\n /* NEW: Only make parent blue when it contains a selected child */\n .ant-menu-submenu-open:has(.ant-menu-item-selected)\n > .ant-menu-submenu-title {\n background: #014fc5;\n color: #fff;\n padding: 24px;\n }\n\n /* Fallback for browsers that don't support :has() */\n .ant-menu-submenu-open > .ant-menu-submenu-title {\n background: #fff;\n color: #000;\n padding: 24px;\n }\n\n /* SubMenu title content */\n .ant-menu-item .ant-menu-title-content {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n\n .ant-menu-submenu-title .ant-menu-title-content {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n\n /* Add styling to span elements inside SubMenu title content */\n .ant-menu-submenu-title .ant-menu-title-content span {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n\n /* Selected states */\n .ant-menu-item-active {\n background: #014fc5;\n color: #fff;\n }\n .ant-menu-item-selected {\n background: #014fc5;\n color: #fff;\n }\n\n /* SubMenu selected item - should be bold black when selected */\n .ant-menu-submenu .ant-menu-item-selected {\n background: transparent;\n color: #000;\n font-weight: bold;\n border-radius: 0;\n }\n\n /* Hover effects */\n .ant-menu-light:not(.ant-menu-horizontal)\n .ant-menu-item:not(.ant-menu-item-selected):hover,\n :where(.css-dev-only-do-not-override-zcfrx9).ant-menu-light\n > .ant-menu:not(.ant-menu-horizontal)\n .ant-menu-item:not(.ant-menu-item-selected):hover {\n background: #014fc5;\n color: #fff;\n }\n\n /* SubMenu title hover - should be blue on hover */\n .ant-menu-submenu-title:hover {\n background: #014fc5 !important;\n color: #fff !important;\n padding: 24px !important;\n }\n\n /* Nested items hover - should be bold black when hovered */\n .ant-menu-submenu .ant-menu-item:hover {\n background: transparent !important;\n color: #000 !important;\n font-weight: bold !important;\n border-radius: 0;\n }\n\n /* Make Orders parent blue when hovering over submenu items */\n .ant-menu-submenu:hover .ant-menu-submenu-title {\n background: #014fc5 !important;\n color: #fff !important;\n padding: 24px !important;\n }\n\n .ant-menu-light.ant-menu-root.ant-menu-inline {\n border: none;\n }\n\n /* SubMenu arrow styling */\n .ant-menu-submenu-arrow {\n color: inherit;\n }\n\n /* SubMenu content area */\n .ant-menu-sub {\n background: transparent !important;\n padding: 8px 0;\n }\n\n /* Remove default SubMenu styling */\n .ant-menu-submenu .ant-menu-sub {\n background: transparent !important;\n box-shadow: none !important;\n }\n\n .notShowInDesktop {\n display: none;\n }\n\n .footerLogoSection {\n margin-top: auto;\n margin-bottom: 40px;\n padding: 0 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 172px;\n height: 75px;\n }\n\n .footerLogoContainer {\n display: flex;\n align-items: center;\n }\n\n .footerLogo {\n width: 172px;\n height: 43px;\n }\n\n @media only screen and (max-width: 600px) {\n .oaLeftLayouts {\n background: #fff;\n padding: 0 16px;\n height: auto;\n display: block;\n }\n .logoContainer {\n padding: 0;\n align-items: center;\n width: 100%;\n height: 80px;\n }\n\n .logo-mobile-height {\n height: 56px;\n }\n\n .notShowInMobile {\n display: none;\n }\n .notShowInDesktop {\n display: flex;\n }\n\n .oaLeftLayouts .ant-layout-sider {\n max-width: none !important;\n width: 100% !important;\n }\n p.ant-dropdown-trigger {\n margin-bottom: 0;\n }\n .layoutHeadingPage * {\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n"])));
|
|
12
|
+
const ProfileIcon = exports.ProfileIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 36px;\n height: 36px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--color-primary);\n\n &:hover {\n transform: scale(1.05);\n }\n"])));
|
|
13
|
+
var _default = exports.default = OalayoutStyle;
|