oa-componentbook 1.0.1-stage.38 → 1.0.1-stage.381
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 +118 -42
- package/build/components/oa-component-accordion/styles.js +2 -2
- package/build/components/oa-component-button/CustomButton.js +6 -4
- 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/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 +531 -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 +2293 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +84 -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 +85 -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 +25 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +544 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +73 -12
- 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 +18 -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 +395 -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 +40 -10
- 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 +2 -1
- 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-sidebar/SidebarWidget.js +105 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/sidebar.css +0 -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 +351 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/package.json +4 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/es.array.flat-map.js");
|
|
8
|
+
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
var _Typography = _interopRequireDefault(require("../../../components/oa-component-typography/Typography"));
|
|
12
|
+
var _CancelRounded = _interopRequireDefault(require("@material-ui/icons/CancelRounded"));
|
|
13
|
+
var _MaterialIcon = _interopRequireDefault(require("../../../components/oa-component-icons/MaterialIcon"));
|
|
14
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
15
|
+
require("./StaticFilter.css");
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
/* eslint-disable */
|
|
18
|
+
|
|
19
|
+
const AppliedFilters = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
appliedFilters,
|
|
22
|
+
filterConfig,
|
|
23
|
+
onRemoveFilter,
|
|
24
|
+
onClearAll,
|
|
25
|
+
filterDrawerData
|
|
26
|
+
} = _ref;
|
|
27
|
+
const filterKeys = Object.keys(appliedFilters);
|
|
28
|
+
if (filterKeys.length === 0) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const getFilterDisplayValue = (key, value) => {
|
|
32
|
+
switch (key) {
|
|
33
|
+
case "filterBy":
|
|
34
|
+
{
|
|
35
|
+
var _filterDrawerData$dat, _filterByField$value, _matchedOption$label;
|
|
36
|
+
const filterByField = filterDrawerData === null || filterDrawerData === void 0 || (_filterDrawerData$dat = filterDrawerData.data) === null || _filterDrawerData$dat === void 0 || (_filterDrawerData$dat = _filterDrawerData$dat.filterData) === null || _filterDrawerData$dat === void 0 || (_filterDrawerData$dat = _filterDrawerData$dat.groups) === null || _filterDrawerData$dat === void 0 || (_filterDrawerData$dat = _filterDrawerData$dat.flatMap(group => group.items || [])) === null || _filterDrawerData$dat === void 0 ? void 0 : _filterDrawerData$dat.find(item => item.name === "filterBy");
|
|
37
|
+
const matchedOption = filterByField === null || filterByField === void 0 || (_filterByField$value = filterByField.value) === null || _filterByField$value === void 0 ? void 0 : _filterByField$value.find(opt => opt.value === value);
|
|
38
|
+
return (_matchedOption$label = matchedOption === null || matchedOption === void 0 ? void 0 : matchedOption.label) !== null && _matchedOption$label !== void 0 ? _matchedOption$label : value;
|
|
39
|
+
}
|
|
40
|
+
case "fromDate":
|
|
41
|
+
return (0, _dayjs.default)(value).format("DD MMM YYYY");
|
|
42
|
+
case "toDate":
|
|
43
|
+
return (0, _dayjs.default)(value).format("DD MMM YYYY");
|
|
44
|
+
default:
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const formatAppliedFilterDisplay = () => {
|
|
49
|
+
const filterBy = appliedFilters.filterBy;
|
|
50
|
+
const fromDate = appliedFilters.fromDate;
|
|
51
|
+
const toDate = appliedFilters.toDate;
|
|
52
|
+
|
|
53
|
+
// Create the combined filter display as shown in design
|
|
54
|
+
let displayParts = [];
|
|
55
|
+
if (filterBy) {
|
|
56
|
+
displayParts.push(getFilterDisplayValue("filterBy", filterBy));
|
|
57
|
+
}
|
|
58
|
+
if (fromDate && toDate) {
|
|
59
|
+
displayParts.push("From Date: ".concat(getFilterDisplayValue("fromDate", fromDate), " | To Date: ").concat(getFilterDisplayValue("toDate", toDate)));
|
|
60
|
+
}
|
|
61
|
+
return displayParts.length > 0 ? displayParts.join(": ") : null;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// Update the render logic
|
|
65
|
+
const displayText = formatAppliedFilterDisplay();
|
|
66
|
+
if (!displayText) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
+
className: "appliedFiltersContainer"
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Tag, {
|
|
72
|
+
closable: true,
|
|
73
|
+
onClose: onClearAll,
|
|
74
|
+
closeIcon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
75
|
+
icon: _CancelRounded.default,
|
|
76
|
+
size: 20,
|
|
77
|
+
color: "background-overlay"
|
|
78
|
+
}),
|
|
79
|
+
className: "appliedFilterTag"
|
|
80
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
81
|
+
typography: "type-b2-400"
|
|
82
|
+
}, displayText)));
|
|
83
|
+
};
|
|
84
|
+
var _default = exports.default = AppliedFilters;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/es.object.assign.js");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _KPICardWidget = _interopRequireDefault(require("../../../widgets/oa-widget-kpi/KPICardWidget"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
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); } /* eslint-disable */
|
|
13
|
+
function CardList(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
cards = []
|
|
16
|
+
} = _ref;
|
|
17
|
+
if (window.innerWidth < 600) {
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: "cardData"
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Carousel, {
|
|
21
|
+
autoplay: true
|
|
22
|
+
}, cards === null || cards === void 0 ? void 0 : cards.map(card => /*#__PURE__*/_react.default.createElement(_KPICardWidget.default, _extends({
|
|
23
|
+
key: card === null || card === void 0 ? void 0 : card.title
|
|
24
|
+
}, card)))));
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
+
className: "cardData"
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
+
className: "cardContainer"
|
|
30
|
+
}, cards === null || cards === void 0 ? void 0 : cards.map(card => /*#__PURE__*/_react.default.createElement(_KPICardWidget.default, _extends({
|
|
31
|
+
key: card === null || card === void 0 ? void 0 : card.title
|
|
32
|
+
}, card)))));
|
|
33
|
+
}
|
|
34
|
+
var _default = exports.default = CardList;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _DropdownSearchInput = _interopRequireDefault(require("../../../widgets/oa-widget-dropdown-search-input/DropdownSearchInput"));
|
|
10
|
+
const _excluded = ["menuItems", "value", "error", "selectedOption", "onInputChange", "onOptionChange", "onPressEnter", "onClear", "onBlur", "allowClear"];
|
|
11
|
+
/* eslint-disable */
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
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); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
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; }
|
|
16
|
+
function DropdownSearch(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
menuItems,
|
|
19
|
+
value,
|
|
20
|
+
error,
|
|
21
|
+
selectedOption,
|
|
22
|
+
onInputChange,
|
|
23
|
+
onOptionChange,
|
|
24
|
+
onPressEnter,
|
|
25
|
+
onClear,
|
|
26
|
+
onBlur,
|
|
27
|
+
allowClear = true
|
|
28
|
+
} = _ref,
|
|
29
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
+
className: "dropDownSearchContainer"
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
className: "selectAndSearch"
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_DropdownSearchInput.default, _extends({
|
|
35
|
+
allowClear: allowClear,
|
|
36
|
+
options: menuItems,
|
|
37
|
+
inputValue: value,
|
|
38
|
+
selectedOption: selectedOption,
|
|
39
|
+
onInputChange: onInputChange,
|
|
40
|
+
onPressEnter: onPressEnter,
|
|
41
|
+
onOptionChange: onOptionChange,
|
|
42
|
+
onClear: onClear,
|
|
43
|
+
onBlur: onBlur
|
|
44
|
+
}, otherProps)), error && /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
+
className: "searchErrorMsg"
|
|
46
|
+
}, error)));
|
|
47
|
+
}
|
|
48
|
+
var _default = exports.default = DropdownSearch;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/es.object.assign.js");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Typography = _interopRequireDefault(require("../../../components/oa-component-typography/Typography"));
|
|
10
|
+
var _MaterialIcon = _interopRequireDefault(require("../../../components/oa-component-icons/MaterialIcon"));
|
|
11
|
+
var _CustomButton = _interopRequireDefault(require("../../../components/oa-component-button/CustomButton"));
|
|
12
|
+
var _CustomSelect = _interopRequireDefault(require("../../../components/oa-component-select/CustomSelect"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
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); } /* eslint-disable */
|
|
15
|
+
function Header(_ref) {
|
|
16
|
+
var _subHeading$jsxConfig8, _subHeading$jsxConfig9, _subHeading$jsxConfig10, _subHeading$color, _subHeading$icon, _subHeading$icon2, _subHeading$icon3, _subHeading$icon4;
|
|
17
|
+
let {
|
|
18
|
+
heading,
|
|
19
|
+
subHeading,
|
|
20
|
+
subHeading1,
|
|
21
|
+
onSubHeadingClick,
|
|
22
|
+
handleSubHeadingSelect
|
|
23
|
+
} = _ref;
|
|
24
|
+
const {
|
|
25
|
+
text,
|
|
26
|
+
type,
|
|
27
|
+
icon
|
|
28
|
+
} = heading !== null && heading !== void 0 ? heading : {};
|
|
29
|
+
const subHeadingJsx = subHeading => {
|
|
30
|
+
var _subHeading$jsxConfig, _subHeading$jsxConfig5;
|
|
31
|
+
if ((subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig = subHeading.jsxConfig) === null || _subHeading$jsxConfig === void 0 ? void 0 : _subHeading$jsxConfig.type) === "button") {
|
|
32
|
+
var _subHeading$jsxConfig2, _subHeading$jsxConfig4;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
34
|
+
label: subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig2 = subHeading.jsxConfig) === null || _subHeading$jsxConfig2 === void 0 ? void 0 : _subHeading$jsxConfig2.label,
|
|
35
|
+
onClick: () => {
|
|
36
|
+
var _subHeading$jsxConfig3;
|
|
37
|
+
return onSubHeadingClick(subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig3 = subHeading.jsxConfig) === null || _subHeading$jsxConfig3 === void 0 ? void 0 : _subHeading$jsxConfig3.action);
|
|
38
|
+
},
|
|
39
|
+
type: subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig4 = subHeading.jsxConfig) === null || _subHeading$jsxConfig4 === void 0 ? void 0 : _subHeading$jsxConfig4.buttonType
|
|
40
|
+
});
|
|
41
|
+
} else if ((subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig5 = subHeading.jsxConfig) === null || _subHeading$jsxConfig5 === void 0 ? void 0 : _subHeading$jsxConfig5.type) === "select") {
|
|
42
|
+
var _subHeading$jsxConfig6, _subHeading$jsxConfig7;
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: "customeSelectDropdown"
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomSelect.default, {
|
|
46
|
+
value: subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig6 = subHeading.jsxConfig) === null || _subHeading$jsxConfig6 === void 0 ? void 0 : _subHeading$jsxConfig6.value,
|
|
47
|
+
options: (subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig7 = subHeading.jsxConfig) === null || _subHeading$jsxConfig7 === void 0 ? void 0 : _subHeading$jsxConfig7.data) || [],
|
|
48
|
+
onChange: handleSubHeadingSelect
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
className: "layoutHeadingPage"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
className: "topHadingWithIcon"
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
58
|
+
typography: type,
|
|
59
|
+
color: "primary-content"
|
|
60
|
+
}, (icon === null || icon === void 0 ? void 0 : icon.position) === "left" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, icon === null || icon === void 0 ? void 0 : icon.iconConfig), text, (icon === null || icon === void 0 ? void 0 : icon.position) === "right" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, icon === null || icon === void 0 ? void 0 : icon.iconConfig))), subHeading && /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: subHeading !== null && subHeading !== void 0 && (_subHeading$jsxConfig8 = subHeading.jsxConfig) !== null && _subHeading$jsxConfig8 !== void 0 && _subHeading$jsxConfig8.type && (subHeading === null || subHeading === void 0 || (_subHeading$jsxConfig9 = subHeading.jsxConfig) === null || _subHeading$jsxConfig9 === void 0 ? void 0 : _subHeading$jsxConfig9.align) === "in-line" ? "inLine subHadingText" : subHeading !== null && subHeading !== void 0 && (_subHeading$jsxConfig10 = subHeading.jsxConfig) !== null && _subHeading$jsxConfig10 !== void 0 && _subHeading$jsxConfig10.type ? "subHadingText marginNone" : "subHadingText"
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
63
|
+
typography: subHeading === null || subHeading === void 0 ? void 0 : subHeading.type,
|
|
64
|
+
color: (_subHeading$color = subHeading === null || subHeading === void 0 ? void 0 : subHeading.color) !== null && _subHeading$color !== void 0 ? _subHeading$color : "secondary-content"
|
|
65
|
+
}, (subHeading === null || subHeading === void 0 || (_subHeading$icon = subHeading.icon) === null || _subHeading$icon === void 0 ? void 0 : _subHeading$icon.position) === "left" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, _extends({}, subHeading === null || subHeading === void 0 || (_subHeading$icon2 = subHeading.icon) === null || _subHeading$icon2 === void 0 ? void 0 : _subHeading$icon2.iconConfig, {
|
|
66
|
+
className: "margin-right-8"
|
|
67
|
+
})), subHeading === null || subHeading === void 0 ? void 0 : subHeading.text, (subHeading === null || subHeading === void 0 || (_subHeading$icon3 = subHeading.icon) === null || _subHeading$icon3 === void 0 ? void 0 : _subHeading$icon3.position) === "right" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, subHeading === null || subHeading === void 0 || (_subHeading$icon4 = subHeading.icon) === null || _subHeading$icon4 === void 0 ? void 0 : _subHeading$icon4.iconConfig)), subHeadingJsx(subHeading)), subHeading1 && /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: "subHading1Text"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
70
|
+
typography: subHeading1 === null || subHeading1 === void 0 ? void 0 : subHeading1.type,
|
|
71
|
+
color: "secondary-content"
|
|
72
|
+
}, subHeading1 === null || subHeading1 === void 0 ? void 0 : subHeading1.text)));
|
|
73
|
+
}
|
|
74
|
+
var _default = exports.default = Header;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/es.symbol.description.js");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _CustomModal = _interopRequireDefault(require("../../../components/oa-component-modal/CustomModal"));
|
|
11
|
+
var _Typography = _interopRequireDefault(require("../../../components/oa-component-typography/Typography"));
|
|
12
|
+
var _KeyValueWidget = _interopRequireDefault(require("../../../widgets/oa-widget-key-value/KeyValueWidget"));
|
|
13
|
+
var _HubAutomationModal = _interopRequireDefault(require("../../../widgets/oa-widget-hub-automation-modal/HubAutomationModal"));
|
|
14
|
+
var _GuideWidget = _interopRequireDefault(require("../../../widgets/oa-widget-guide/GuideWidget"));
|
|
15
|
+
var _MaterialIcon = _interopRequireDefault(require("../../../components/oa-component-icons/MaterialIcon"));
|
|
16
|
+
var _HubAutomationDeleteBiker = _interopRequireDefault(require("../../../widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker"));
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
22
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
|
|
23
|
+
function LayoutModal(_ref) {
|
|
24
|
+
var _modal$jsxConfig;
|
|
25
|
+
let {
|
|
26
|
+
modal,
|
|
27
|
+
onCancel,
|
|
28
|
+
onFooterAction
|
|
29
|
+
} = _ref;
|
|
30
|
+
if (!(modal !== null && modal !== void 0 && modal.visible)) return null;
|
|
31
|
+
const getModalButtonConfig = buttonConfig => buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.map(button => _objectSpread(_objectSpread({}, button), {}, {
|
|
32
|
+
callback: () => onFooterAction(button === null || button === void 0 ? void 0 : button.action, button)
|
|
33
|
+
}));
|
|
34
|
+
const render = () => {
|
|
35
|
+
if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "hubAutomation") {
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_HubAutomationModal.default, modal);
|
|
37
|
+
} else if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "guideModal") {
|
|
38
|
+
var _modal$modalContent;
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_GuideWidget.default, {
|
|
40
|
+
slides: modal === null || modal === void 0 || (_modal$modalContent = modal.modalContent) === null || _modal$modalContent === void 0 || (_modal$modalContent = _modal$modalContent.content) === null || _modal$modalContent === void 0 || (_modal$modalContent = _modal$modalContent.data) === null || _modal$modalContent === void 0 ? void 0 : _modal$modalContent.dataSource,
|
|
41
|
+
onComplete: onCancel
|
|
42
|
+
});
|
|
43
|
+
} else if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "hubAutomationDeleteBiker") {
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_HubAutomationDeleteBiker.default, modal);
|
|
45
|
+
} else {
|
|
46
|
+
var _modal$modalContent2, _modal$modalContent3, _modal$modalContent4, _modal$modalContent5, _modal$modalContent6, _modal$modalContent7, _modal$modalContent8, _modal$modalContent9, _modal$modalContent10, _modal$modalContent11, _modal$modalContent12, _modal$modalContent13;
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (modal === null || modal === void 0 || (_modal$modalContent2 = modal.modalContent) === null || _modal$modalContent2 === void 0 ? void 0 : _modal$modalContent2.header) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
48
|
+
typography: modal === null || modal === void 0 || (_modal$modalContent3 = modal.modalContent) === null || _modal$modalContent3 === void 0 || (_modal$modalContent3 = _modal$modalContent3.header) === null || _modal$modalContent3 === void 0 ? void 0 : _modal$modalContent3.type,
|
|
49
|
+
color: "primary-content"
|
|
50
|
+
}, modal === null || modal === void 0 || (_modal$modalContent4 = modal.modalContent) === null || _modal$modalContent4 === void 0 || (_modal$modalContent4 = _modal$modalContent4.header) === null || _modal$modalContent4 === void 0 ? void 0 : _modal$modalContent4.text), (modal === null || modal === void 0 || (_modal$modalContent5 = modal.modalContent) === null || _modal$modalContent5 === void 0 ? void 0 : _modal$modalContent5.subHeading) && /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
className: "margin-top-12"
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
53
|
+
typography: modal === null || modal === void 0 || (_modal$modalContent6 = modal.modalContent) === null || _modal$modalContent6 === void 0 || (_modal$modalContent6 = _modal$modalContent6.subHeading) === null || _modal$modalContent6 === void 0 ? void 0 : _modal$modalContent6.type,
|
|
54
|
+
color: "secondary-content"
|
|
55
|
+
}, modal === null || modal === void 0 || (_modal$modalContent7 = modal.modalContent) === null || _modal$modalContent7 === void 0 || (_modal$modalContent7 = _modal$modalContent7.subHeading) === null || _modal$modalContent7 === void 0 ? void 0 : _modal$modalContent7.text)), (modal === null || modal === void 0 || (_modal$modalContent8 = modal.modalContent) === null || _modal$modalContent8 === void 0 || (_modal$modalContent8 = _modal$modalContent8.content) === null || _modal$modalContent8 === void 0 || (_modal$modalContent8 = _modal$modalContent8.data) === null || _modal$modalContent8 === void 0 ? void 0 : _modal$modalContent8.dataType) === "keyvalue" && /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
className: "listOfItems"
|
|
57
|
+
}, (modal === null || modal === void 0 || (_modal$modalContent9 = modal.modalContent) === null || _modal$modalContent9 === void 0 || (_modal$modalContent9 = _modal$modalContent9.content) === null || _modal$modalContent9 === void 0 || (_modal$modalContent9 = _modal$modalContent9.data) === null || _modal$modalContent9 === void 0 ? void 0 : _modal$modalContent9.boxHeading) && /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "modalIconAndTextBox"
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
60
|
+
icon: modal === null || modal === void 0 || (_modal$modalContent10 = modal.modalContent) === null || _modal$modalContent10 === void 0 || (_modal$modalContent10 = _modal$modalContent10.content) === null || _modal$modalContent10 === void 0 || (_modal$modalContent10 = _modal$modalContent10.data) === null || _modal$modalContent10 === void 0 || (_modal$modalContent10 = _modal$modalContent10.boxHeading) === null || _modal$modalContent10 === void 0 ? void 0 : _modal$modalContent10.icon,
|
|
61
|
+
size: 20,
|
|
62
|
+
color: "primary-content"
|
|
63
|
+
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
64
|
+
color: "secondary-content",
|
|
65
|
+
typography: modal === null || modal === void 0 || (_modal$modalContent11 = modal.modalContent) === null || _modal$modalContent11 === void 0 || (_modal$modalContent11 = _modal$modalContent11.content) === null || _modal$modalContent11 === void 0 || (_modal$modalContent11 = _modal$modalContent11.data) === null || _modal$modalContent11 === void 0 || (_modal$modalContent11 = _modal$modalContent11.boxHeading) === null || _modal$modalContent11 === void 0 ? void 0 : _modal$modalContent11.type
|
|
66
|
+
}, modal === null || modal === void 0 || (_modal$modalContent12 = modal.modalContent) === null || _modal$modalContent12 === void 0 || (_modal$modalContent12 = _modal$modalContent12.content) === null || _modal$modalContent12 === void 0 || (_modal$modalContent12 = _modal$modalContent12.data) === null || _modal$modalContent12 === void 0 || (_modal$modalContent12 = _modal$modalContent12.boxHeading) === null || _modal$modalContent12 === void 0 ? void 0 : _modal$modalContent12.text)), /*#__PURE__*/_react.default.createElement(_KeyValueWidget.default, {
|
|
67
|
+
data: modal === null || modal === void 0 || (_modal$modalContent13 = modal.modalContent) === null || _modal$modalContent13 === void 0 || (_modal$modalContent13 = _modal$modalContent13.content) === null || _modal$modalContent13 === void 0 || (_modal$modalContent13 = _modal$modalContent13.data) === null || _modal$modalContent13 === void 0 ? void 0 : _modal$modalContent13.dataSource
|
|
68
|
+
})));
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
|
|
72
|
+
width: 428,
|
|
73
|
+
onCancel: onCancel,
|
|
74
|
+
destroyOnClose: true,
|
|
75
|
+
title: modal === null || modal === void 0 ? void 0 : modal.heading,
|
|
76
|
+
imgSrc: modal === null || modal === void 0 ? void 0 : modal.imgSrc,
|
|
77
|
+
buttonConfig: getModalButtonConfig(modal === null || modal === void 0 || (_modal$jsxConfig = modal.jsxConfig) === null || _modal$jsxConfig === void 0 ? void 0 : _modal$jsxConfig.buttonConfig)
|
|
78
|
+
}, render());
|
|
79
|
+
}
|
|
80
|
+
LayoutModal.propTypes = {
|
|
81
|
+
modal: _propTypes.default.object,
|
|
82
|
+
onCancel: _propTypes.default.func,
|
|
83
|
+
onFooterAction: _propTypes.default.func
|
|
84
|
+
};
|
|
85
|
+
var _default = exports.default = LayoutModal;
|
|
@@ -0,0 +1,87 @@
|
|
|
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.string.trim.js");
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _Typography = _interopRequireDefault(require("../../../components/oa-component-typography/Typography"));
|
|
13
|
+
var _styles = require("../styles");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
/* eslint-disable */
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* ProfileSection component that displays a user profile icon with tooltip
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} props - Component props
|
|
23
|
+
* @param {Object} props.profileData - Profile data object
|
|
24
|
+
* @param {string} props.profileData.iconText - Text to display in the circular icon
|
|
25
|
+
* @param {string} props.profileData.iconColor - Design token like 'secondary-content'
|
|
26
|
+
* @param {string} props.profileData.iconBgColor - Design token like 'primary'
|
|
27
|
+
* @param {string} props.profileData.tooltipText - Text to display in the tooltip
|
|
28
|
+
* @param {boolean} props.profileData.visible - Whether to show the profile section
|
|
29
|
+
* @param {Function} props.onProfileClick - Function to call when profile is clicked
|
|
30
|
+
*
|
|
31
|
+
* @returns {JSX.Element} Profile section component
|
|
32
|
+
*/
|
|
33
|
+
function ProfileSection(_ref) {
|
|
34
|
+
let {
|
|
35
|
+
profileData,
|
|
36
|
+
onProfileClick
|
|
37
|
+
} = _ref;
|
|
38
|
+
const [showTooltip, setShowTooltip] = (0, _react.useState)(false);
|
|
39
|
+
if (!(profileData !== null && profileData !== void 0 && profileData.visible)) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const {
|
|
43
|
+
iconText,
|
|
44
|
+
iconColor,
|
|
45
|
+
iconBgColor,
|
|
46
|
+
tooltipText
|
|
47
|
+
} = profileData;
|
|
48
|
+
const resolveToken = token => "var(--color-".concat(String(token || "").trim(), ")");
|
|
49
|
+
return /*#__PURE__*/_react.default.createElement(_styles.ProfileSectionContainer, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
+
className: "profile-icon-container",
|
|
51
|
+
onMouseEnter: () => setShowTooltip(true),
|
|
52
|
+
onMouseLeave: () => setShowTooltip(false),
|
|
53
|
+
onClick: onProfileClick
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.ProfileIcon, {
|
|
55
|
+
style: {
|
|
56
|
+
backgroundColor: resolveToken(iconBgColor),
|
|
57
|
+
color: resolveToken(iconColor)
|
|
58
|
+
}
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
60
|
+
color: "white",
|
|
61
|
+
typography: "type-h2-500"
|
|
62
|
+
}, iconText)), showTooltip && /*#__PURE__*/_react.default.createElement(_styles.Tooltip, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
63
|
+
color: "white",
|
|
64
|
+
typography: "type-b2-400"
|
|
65
|
+
}, tooltipText))));
|
|
66
|
+
}
|
|
67
|
+
ProfileSection.propTypes = {
|
|
68
|
+
profileData: _propTypes.default.shape({
|
|
69
|
+
visible: _propTypes.default.bool,
|
|
70
|
+
iconText: _propTypes.default.string,
|
|
71
|
+
iconColor: _propTypes.default.string,
|
|
72
|
+
iconBgColor: _propTypes.default.string,
|
|
73
|
+
tooltipText: _propTypes.default.string
|
|
74
|
+
}),
|
|
75
|
+
onProfileClick: _propTypes.default.func
|
|
76
|
+
};
|
|
77
|
+
ProfileSection.defaultProps = {
|
|
78
|
+
profileData: {
|
|
79
|
+
visible: false,
|
|
80
|
+
iconText: "R",
|
|
81
|
+
iconColor: "primary-content",
|
|
82
|
+
iconBgColor: "primary",
|
|
83
|
+
tooltipText: "To manage the sub-admins, go to the Profile section."
|
|
84
|
+
},
|
|
85
|
+
onProfileClick: () => {}
|
|
86
|
+
};
|
|
87
|
+
var _default = exports.default = ProfileSection;
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _CustomInput = _interopRequireDefault(require("../../../components/oa-component-input/CustomInput"));
|
|
10
|
+
var _Search = _interopRequireDefault(require("@material-ui/icons/Search"));
|
|
11
|
+
var _MaterialIcon = _interopRequireDefault(require("../../../components/oa-component-icons/MaterialIcon"));
|
|
12
|
+
const _excluded = ["value", "placeholder", "error", "onInputChange", "onPressEnter", "onClear", "onBlur"];
|
|
13
|
+
/* eslint-disable */
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
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); }
|
|
16
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
|
+
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; }
|
|
18
|
+
function Search(_ref) {
|
|
19
|
+
let {
|
|
20
|
+
value,
|
|
21
|
+
placeholder,
|
|
22
|
+
error,
|
|
23
|
+
onInputChange,
|
|
24
|
+
onPressEnter,
|
|
25
|
+
onClear,
|
|
26
|
+
onBlur
|
|
27
|
+
} = _ref,
|
|
28
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
+
className: "searchContainer"
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: "searchOnly"
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
34
|
+
className: "cstSearchIcon",
|
|
35
|
+
icon: _Search.default,
|
|
36
|
+
size: 20,
|
|
37
|
+
color: "placeholder-text"
|
|
38
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomInput.default, _extends({
|
|
39
|
+
allowClear: true,
|
|
40
|
+
className: "searchContainerInput",
|
|
41
|
+
value: value,
|
|
42
|
+
placeholder: placeholder,
|
|
43
|
+
onChange: onInputChange,
|
|
44
|
+
onPressEnter: onPressEnter,
|
|
45
|
+
onClear: onClear,
|
|
46
|
+
onBlur: onBlur
|
|
47
|
+
}, otherProps)), error && /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
+
className: "searchErrorMsg"
|
|
49
|
+
}, error)));
|
|
50
|
+
}
|
|
51
|
+
var _default = exports.default = Search;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.quick-filter-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
margin: 16px 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
ul.quick-filter-buttons {
|
|
9
|
+
list-style: none;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
gap: 16px;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ul.quick-filter-buttons li {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
border: solid 1px #014fc5;
|
|
20
|
+
padding: 10px 24px;
|
|
21
|
+
color: #014fc5;
|
|
22
|
+
text-align: center;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 20px;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
border-radius: 24px;
|
|
29
|
+
background: #fff;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
ul.quick-filter-buttons li.selected {
|
|
33
|
+
background: #014fc5;
|
|
34
|
+
border: none;
|
|
35
|
+
color: #fff;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.appliedFiltersContainer {
|
|
39
|
+
border-radius: 8px;
|
|
40
|
+
padding: 12px;
|
|
41
|
+
width: 100%;
|
|
42
|
+
background: #f6f6f6;
|
|
43
|
+
margin-bottom: 8px;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-wrap: wrap;
|
|
46
|
+
gap: 8px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.appliedFilterTag {
|
|
50
|
+
border-radius: 8px;
|
|
51
|
+
border: 1px solid #e0e0e0;
|
|
52
|
+
padding: 8px;
|
|
53
|
+
background: #fff;
|
|
54
|
+
display: flex;
|
|
55
|
+
margin: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@media only screen and (max-width: 600px) {
|
|
60
|
+
.quick-filter-container {
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
margin: 0 0 16px 0;
|
|
63
|
+
align-items: flex-start;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
ul.quick-filter-buttons {
|
|
68
|
+
overflow-x: scroll;
|
|
69
|
+
width: 100%;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
require("./StaticFilter.css");
|
|
9
|
+
var _Typography = _interopRequireDefault(require("../../../components/oa-component-typography/Typography"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
/* eslint-disable */
|
|
12
|
+
|
|
13
|
+
// You'll need to create this CSS file
|
|
14
|
+
|
|
15
|
+
function StaticFilter(_ref) {
|
|
16
|
+
var _staticFilter$data;
|
|
17
|
+
let {
|
|
18
|
+
staticFilter,
|
|
19
|
+
onFilterSelect
|
|
20
|
+
} = _ref;
|
|
21
|
+
if (!(staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) || !(staticFilter !== null && staticFilter !== void 0 && (_staticFilter$data = staticFilter.data) !== null && _staticFilter$data !== void 0 && _staticFilter$data.length)) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: "quick-filter-container"
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
27
|
+
color: "primary-content",
|
|
28
|
+
typography: "type-b2-400"
|
|
29
|
+
}, "Quick Filters:"), /*#__PURE__*/_react.default.createElement("ul", {
|
|
30
|
+
className: "quick-filter-buttons"
|
|
31
|
+
}, staticFilter.data.map(filter => /*#__PURE__*/_react.default.createElement("li", {
|
|
32
|
+
key: filter.value,
|
|
33
|
+
onClick: () => onFilterSelect(filter.value),
|
|
34
|
+
className: "quick-filter-btn ".concat(filter.selected ? "selected" : "")
|
|
35
|
+
}, filter.label))));
|
|
36
|
+
}
|
|
37
|
+
var _default = exports.default = StaticFilter;
|