oa-componentbook 1.0.1-stage.44 → 1.0.1-stage.440

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/build/components/oa-component-accordion/Accordion.js +123 -43
  2. package/build/components/oa-component-accordion/styles.js +2 -2
  3. package/build/components/oa-component-button/CustomButton.js +24 -19
  4. package/build/components/oa-component-button/styles.js +1 -1
  5. package/build/components/oa-component-checkbox/CustomCheckBox.js +20 -17
  6. package/build/components/oa-component-checkbox/styles.js +1 -1
  7. package/build/components/oa-component-datepicker/CustomDatePicker.js +37 -26
  8. package/build/components/oa-component-drawer/CustomDrawer.js +2 -0
  9. package/build/components/oa-component-dropdown/CustomDropdown.js +16 -4
  10. package/build/components/oa-component-icons/MaterialIcon.js +1 -1
  11. package/build/components/oa-component-modal/CustomModal.js +59 -48
  12. package/build/components/oa-component-modal/styles.js +3 -2
  13. package/build/components/oa-component-pagination/CustomPagination.js +111 -0
  14. package/build/components/oa-component-pagination/styles.js +12 -0
  15. package/build/components/oa-component-progress-bar/CustomProgressBar.js +8 -4
  16. package/build/components/oa-component-select/CustomSelect.js +130 -56
  17. package/build/components/oa-component-steps/CustomSteps.js +117 -0
  18. package/build/components/oa-component-steps/styles.js +12 -0
  19. package/build/components/oa-component-table/CustomTable.js +28 -5
  20. package/build/components/oa-component-table/CustomTableV1.js +613 -0
  21. package/build/components/oa-component-table/styles.js +1 -1
  22. package/build/components/oa-component-table/stylesV1.js +19 -0
  23. package/build/components/oa-component-tabs/CustomTabs.js +1 -1
  24. package/build/components/oa-component-tag/CustomTag.js +29 -11
  25. package/build/components/oa-component-tag/styles.js +30 -3
  26. package/build/components/oa-component-textarea/CustomTextArea.js +161 -0
  27. package/build/components/oa-component-textarea/constants.js +39 -0
  28. package/build/components/oa-component-textarea/styles.js +12 -3
  29. package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
  30. package/build/components/oa-component-upload/CustomUpload.js +129 -42
  31. package/build/components/oa-component-viewer/CustomViewer.js +17 -11
  32. package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
  33. package/build/dev/oa-component-document-viewer/styles.js +12 -0
  34. package/build/dev/oa-component-upload/CustomUpload.js +116 -29
  35. package/build/dev/oa-component-upload/styles.js +2 -2
  36. package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
  37. package/build/dev/oa-widget-document-modal/styles.js +12 -0
  38. package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
  39. package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
  40. package/build/global-css/GlobalCss.js +2 -1
  41. package/build/global-css/GridLayout.js +1 -1
  42. package/build/global-css/commonStyles.js +11 -0
  43. package/build/images/Car.png +0 -0
  44. package/build/images/TwoWheeler.png +0 -0
  45. package/build/images/astronaut_emptystate.png +0 -0
  46. package/build/images/exportGrp01.png +0 -0
  47. package/build/images/exportGrp02.png +0 -0
  48. package/build/images/exportGrp03.png +0 -0
  49. package/build/images/outOfStock.png +0 -0
  50. package/build/index.js +114 -2
  51. package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
  52. package/build/layout/DetailDataLayout/components/Form.js +22 -0
  53. package/build/layout/DetailDataLayout/components/Header.js +32 -0
  54. package/build/layout/DetailDataLayout/style.css +9 -0
  55. package/build/layout/DetailDataLayout/styles.js +12 -0
  56. package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +403 -0
  57. package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +85 -0
  58. package/build/layout/EntityOverviewLayout/styles.js +13 -0
  59. package/build/layout/GenricLayOut/GenricLayOut.js +2421 -0
  60. package/build/layout/GenricLayOut/components/AppliedFilters.js +90 -0
  61. package/build/layout/GenricLayOut/components/CardList.js +34 -0
  62. package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
  63. package/build/layout/GenricLayOut/components/Header.js +74 -0
  64. package/build/layout/GenricLayOut/components/Modal.js +96 -0
  65. package/build/layout/GenricLayOut/components/ProfileSection.js +219 -0
  66. package/build/layout/GenricLayOut/components/Search.js +51 -0
  67. package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
  68. package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
  69. package/build/layout/GenricLayOut/reducer/layoutReducer.js +310 -0
  70. package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
  71. package/build/layout/GenricLayOut/styles.js +42 -0
  72. package/build/utils/download-file.js +23 -0
  73. package/build/widgets/oa-form-widget/FormWidget.js +577 -0
  74. package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
  75. package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +80 -16
  76. package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +50 -7
  77. package/build/widgets/oa-widget-address/AddressWidget.js +12 -17
  78. package/build/widgets/oa-widget-approval/ApprovalWidget.js +19 -11
  79. package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
  80. package/build/widgets/oa-widget-approval/styles.js +2 -2
  81. package/build/widgets/oa-widget-chat/ChatWidget.js +5 -5
  82. package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +17 -5
  83. package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +396 -0
  84. package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
  85. package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
  86. package/build/widgets/oa-widget-content-panel/styles.js +12 -0
  87. package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +5 -5
  88. package/build/widgets/oa-widget-detailcard/styles.js +1 -1
  89. package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -9
  90. package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +53 -19
  91. package/build/widgets/oa-widget-dropdown-search-input/styles.js +1 -1
  92. package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
  93. package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
  94. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
  95. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
  96. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
  97. package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
  98. package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
  99. package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
  100. package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
  101. package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
  102. package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
  103. package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
  104. package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
  105. package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +83 -0
  106. package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
  107. package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
  108. package/build/widgets/oa-widget-key-value/KeyValueWidget.js +46 -12
  109. package/build/widgets/oa-widget-key-value/styles.js +1 -1
  110. package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
  111. package/build/widgets/oa-widget-kpi/styles.js +12 -0
  112. package/build/widgets/oa-widget-map-base-location/AddressDetails.js +21 -7
  113. package/build/widgets/oa-widget-map-base-location/AddressForm.js +32 -5
  114. package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +9 -3
  115. package/build/widgets/oa-widget-map-base-location/MapComponent.js +17 -2
  116. package/build/widgets/oa-widget-membershipcard/MembershipCard.js +14 -3
  117. package/build/widgets/oa-widget-membershipcard/styles.js +1 -1
  118. package/build/widgets/oa-widget-notes/NotesWidget.js +32 -30
  119. package/build/widgets/oa-widget-notes/styles.js +4 -3
  120. package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +165 -0
  121. package/build/widgets/oa-widget-profile-data/styles.js +13 -0
  122. package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
  123. package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
  124. package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +18 -9
  125. package/build/widgets/oa-widget-reimbursement-breakup/styles.js +1 -1
  126. package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
  127. package/build/widgets/oa-widget-select-list-item-modal/SelectListItemModal.js +91 -0
  128. package/build/widgets/oa-widget-sidebar/SidebarWidget.js +175 -0
  129. package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
  130. package/build/widgets/oa-widget-sidebar/styles.js +13 -0
  131. package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +63 -35
  132. package/build/widgets/oa-widget-track-shipment-list/fn.js +16 -4
  133. package/build/widgets/oa-widget-user-management/UserManagementWidget.js +407 -0
  134. package/build/widgets/oa-widget-user-management/styles.js +15 -0
  135. package/package.json +4 -2
  136. package/build/components/oa-component-textarea/TextArea.js +0 -74
@@ -0,0 +1,90 @@
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;
36
+ // Access the filterBy field configuration from the correct path
37
+ // The filterDrawerData structure should be: filterDrawerData.data.filterData.groups
38
+ const filterByField = filterDrawerData === null || filterDrawerData === void 0 || (_filterDrawerData$dat = filterDrawerData.data) === 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");
39
+ if (filterByField !== null && filterByField !== void 0 && filterByField.value) {
40
+ var _matchedOption$label;
41
+ const matchedOption = filterByField.value.find(opt => opt.value === value);
42
+ return (_matchedOption$label = matchedOption === null || matchedOption === void 0 ? void 0 : matchedOption.label) !== null && _matchedOption$label !== void 0 ? _matchedOption$label : value;
43
+ }
44
+ return value;
45
+ }
46
+ case "fromDate":
47
+ return (0, _dayjs.default)(value).format("DD MMM YYYY");
48
+ case "toDate":
49
+ return (0, _dayjs.default)(value).format("DD MMM YYYY");
50
+ default:
51
+ return value;
52
+ }
53
+ };
54
+ const formatAppliedFilterDisplay = () => {
55
+ const filterBy = appliedFilters.filterBy;
56
+ const fromDate = appliedFilters.fromDate;
57
+ const toDate = appliedFilters.toDate;
58
+
59
+ // Create the combined filter display as shown in design
60
+ let displayParts = [];
61
+ if (filterBy) {
62
+ displayParts.push(getFilterDisplayValue("filterBy", filterBy));
63
+ }
64
+ if (fromDate && toDate) {
65
+ displayParts.push("From Date: ".concat(getFilterDisplayValue("fromDate", fromDate), " | To Date: ").concat(getFilterDisplayValue("toDate", toDate)));
66
+ }
67
+ return displayParts.length > 0 ? displayParts.join(": ") : null;
68
+ };
69
+
70
+ // Update the render logic
71
+ const displayText = formatAppliedFilterDisplay();
72
+ if (!displayText) {
73
+ return null;
74
+ }
75
+ return /*#__PURE__*/_react.default.createElement("div", {
76
+ className: "appliedFiltersContainer"
77
+ }, /*#__PURE__*/_react.default.createElement(_antd.Tag, {
78
+ closable: true,
79
+ onClose: onClearAll,
80
+ closeIcon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
81
+ icon: _CancelRounded.default,
82
+ size: 20,
83
+ color: "background-overlay"
84
+ }),
85
+ className: "appliedFilterTag"
86
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
87
+ typography: "type-b2-400"
88
+ }, displayText)));
89
+ };
90
+ 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,96 @@
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
+ var _SelectListItemModal = _interopRequireDefault(require("../../../widgets/oa-widget-select-list-item-modal/SelectListItemModal"));
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+ 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; }
20
+ 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; }
21
+ 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; }
22
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
23
+ 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 */
24
+ function LayoutModal(_ref) {
25
+ var _modal$jsxConfig, _modal$modalContent14;
26
+ let {
27
+ modal,
28
+ onCancel,
29
+ onFooterAction,
30
+ handleSwitchSelectItem
31
+ } = _ref;
32
+ if (!(modal !== null && modal !== void 0 && modal.visible)) return null;
33
+ const getModalButtonConfig = buttonConfig => buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.map(button => _objectSpread(_objectSpread({}, button), {}, {
34
+ callback: () => onFooterAction(button === null || button === void 0 ? void 0 : button.action, button)
35
+ }));
36
+ const render = () => {
37
+ if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "hubAutomation") {
38
+ return /*#__PURE__*/_react.default.createElement(_HubAutomationModal.default, modal);
39
+ } else if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "guideModal") {
40
+ var _modal$modalContent;
41
+ return /*#__PURE__*/_react.default.createElement(_GuideWidget.default, {
42
+ 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,
43
+ onComplete: onCancel
44
+ });
45
+ } else if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "hubAutomationDeleteBiker") {
46
+ return /*#__PURE__*/_react.default.createElement(_HubAutomationDeleteBiker.default, modal);
47
+ } else if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "selectListItem") {
48
+ return /*#__PURE__*/_react.default.createElement(_SelectListItemModal.default, {
49
+ modalContent: modal === null || modal === void 0 ? void 0 : modal.modalContent,
50
+ onItemSelect: item => onFooterAction("select", item),
51
+ handleSwitchSelectItem: handleSwitchSelectItem
52
+ });
53
+ } else {
54
+ 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;
55
+ 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, {
56
+ 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,
57
+ color: "primary-content"
58
+ }, 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", {
59
+ className: "margin-top-12"
60
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
61
+ 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,
62
+ color: "secondary-content"
63
+ }, 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", {
64
+ className: "listOfItems"
65
+ }, (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", {
66
+ className: "modalIconAndTextBox"
67
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
68
+ 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,
69
+ size: 20,
70
+ color: "primary-content"
71
+ }), /*#__PURE__*/_react.default.createElement(_Typography.default, {
72
+ color: "secondary-content",
73
+ 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
74
+ }, 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, {
75
+ 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
76
+ })));
77
+ }
78
+ };
79
+ return /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
80
+ width: (modal === null || modal === void 0 ? void 0 : modal.customWidth) || 428,
81
+ onCancel: onCancel,
82
+ destroyOnClose: true,
83
+ title: modal === null || modal === void 0 ? void 0 : modal.heading,
84
+ imgSrc: modal === null || modal === void 0 ? void 0 : modal.imgSrc,
85
+ buttonConfig: getModalButtonConfig(modal === null || modal === void 0 || (_modal$jsxConfig = modal.jsxConfig) === null || _modal$jsxConfig === void 0 ? void 0 : _modal$jsxConfig.buttonConfig),
86
+ bgColor: modal === null || modal === void 0 ? void 0 : modal.bgColor,
87
+ showCloseIcon: modal === null || modal === void 0 ? void 0 : modal.showCloseIcon,
88
+ maskClosable: (modal === null || modal === void 0 || (_modal$modalContent14 = modal.modalContent) === null || _modal$modalContent14 === void 0 ? void 0 : _modal$modalContent14.backClickDisable) === true ? false : (modal === null || modal === void 0 ? void 0 : modal.maskClosable) !== undefined ? modal === null || modal === void 0 ? void 0 : modal.maskClosable : true
89
+ }, render());
90
+ }
91
+ LayoutModal.propTypes = {
92
+ modal: _propTypes.default.object,
93
+ onCancel: _propTypes.default.func,
94
+ onFooterAction: _propTypes.default.func
95
+ };
96
+ var _default = exports.default = LayoutModal;
@@ -0,0 +1,219 @@
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
+ require("core-js/modules/es.json.stringify.js");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _Typography = _interopRequireDefault(require("../../../components/oa-component-typography/Typography"));
14
+ var _MaterialIcon = _interopRequireDefault(require("../../../components/oa-component-icons/MaterialIcon"));
15
+ var _ChevronRight = _interopRequireDefault(require("@material-ui/icons/ChevronRight"));
16
+ var _CustomButton = _interopRequireDefault(require("../../../components/oa-component-button/CustomButton"));
17
+ var _styles = require("../styles");
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ /* eslint-disable */
22
+
23
+ /**
24
+ * ProfileSection component that displays a user profile icon with tooltip
25
+ *
26
+ * @param {Object} props - Component props
27
+ * @param {Object} props.profileData - Profile data object
28
+ * @param {string} props.profileData.iconText - Text to display in the circular icon
29
+ * @param {string} props.profileData.iconColor - Design token like 'secondary-content'
30
+ * @param {string} props.profileData.iconBgColor - Design token like 'primary'
31
+ * @param {string} props.profileData.tooltipText - Text to display in the tooltip
32
+ * @param {boolean} props.profileData.visible - Whether to show the profile section
33
+ * @param {string} props.profileData.behavior - 'reroute' or 'open-container'
34
+ * @param {Object} props.profileData.containerData - Data for container modal
35
+ * @param {Function} props.onProfileClick - Function to call when profile is clicked
36
+ *
37
+ * @returns {JSX.Element} Profile section component
38
+ */
39
+ function ProfileSection(_ref) {
40
+ var _containerData$curren, _containerData$curren2, _containerData$curren3, _containerData$curren4;
41
+ let {
42
+ profileData,
43
+ onProfileClick
44
+ } = _ref;
45
+ const [showTooltip, setShowTooltip] = (0, _react.useState)(false);
46
+ const [showContainer, setShowContainer] = (0, _react.useState)(false);
47
+ if (!(profileData !== null && profileData !== void 0 && profileData.visible)) {
48
+ return null;
49
+ }
50
+ const {
51
+ iconText,
52
+ iconColor,
53
+ iconBgColor,
54
+ tooltipText,
55
+ behavior = "reroute",
56
+ containerData,
57
+ mwebTypographyType = "type-h2-500"
58
+ } = profileData;
59
+ const resolveToken = token => "var(--color-".concat(String(token || "").trim(), ")");
60
+ const handleProfileClick = () => {
61
+ if (behavior === "open-container") {
62
+ setShowContainer(true);
63
+ } else {
64
+ onProfileClick();
65
+ }
66
+ };
67
+ const handleListItemSelect = enterprise => {
68
+ // Store selected enterprise in session storage
69
+ sessionStorage.setItem("selectedEnterprise", JSON.stringify(enterprise));
70
+
71
+ // Store notification data for after reload
72
+ sessionStorage.setItem("showEnterpriseNotification", JSON.stringify({
73
+ message: "Successfully switched to another enterprise.",
74
+ type: "success"
75
+ }));
76
+
77
+ // Close container
78
+ setShowContainer(false);
79
+
80
+ // Reload the page immediately
81
+ window.location.reload();
82
+ };
83
+ const getEnterpriseAvatarStyle = index => {
84
+ if (containerData !== null && containerData !== void 0 && containerData.avatarColors && containerData.avatarColors.length > 0) {
85
+ // Use modulo to cycle through colors
86
+ const colorIndex = index % containerData.avatarColors.length;
87
+ return containerData.avatarColors[colorIndex];
88
+ }
89
+
90
+ // Fallback to enterprise's own color if no avatarColors provided
91
+ return {
92
+ backgroundColor: enterprise.iconBgColor || "#1890ff",
93
+ color: "#fff"
94
+ };
95
+ };
96
+ const handleManageProfile = () => {
97
+ setShowContainer(false);
98
+ if (containerData !== null && containerData !== void 0 && containerData.manageProfileReroute) {
99
+ window.location.href = containerData.manageProfileReroute;
100
+ }
101
+ };
102
+ return /*#__PURE__*/_react.default.createElement(_styles.ProfileSectionContainer, null, /*#__PURE__*/_react.default.createElement("div", {
103
+ className: "profile-icon-container",
104
+ onMouseEnter: () => setShowTooltip(true),
105
+ onMouseLeave: () => setShowTooltip(false),
106
+ onClick: handleProfileClick
107
+ }, /*#__PURE__*/_react.default.createElement(_styles.ProfileIcon, {
108
+ style: {
109
+ backgroundColor: resolveToken(iconBgColor),
110
+ color: resolveToken(iconColor)
111
+ }
112
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
113
+ color: "white",
114
+ style: {
115
+ fontSize: "28px",
116
+ fontWeight: "500"
117
+ }
118
+ }, iconText)), showTooltip && tooltipText && /*#__PURE__*/_react.default.createElement(_styles.Tooltip, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
119
+ color: "white",
120
+ typography: "type-b2-400"
121
+ }, tooltipText))), showContainer && containerData && /*#__PURE__*/_react.default.createElement(_styles.ProfileContainerOverlay, {
122
+ onClick: () => setShowContainer(false),
123
+ onMouseDown: e => e.target === e.currentTarget && setShowContainer(false)
124
+ }, /*#__PURE__*/_react.default.createElement(_styles.ProfileContainerModal, {
125
+ onClick: e => e.stopPropagation()
126
+ }, /*#__PURE__*/_react.default.createElement(_styles.CurrentProfileSection, null, /*#__PURE__*/_react.default.createElement(_styles.ProfileInfoContainer, null, /*#__PURE__*/_react.default.createElement(_styles.ProfileAvatar, {
127
+ style: {
128
+ backgroundColor: resolveToken(((_containerData$curren = containerData.currentProfile) === null || _containerData$curren === void 0 ? void 0 : _containerData$curren.iconBgColor) || "primary"),
129
+ color: resolveToken(((_containerData$curren2 = containerData.currentProfile) === null || _containerData$curren2 === void 0 ? void 0 : _containerData$curren2.iconColor) || "white"),
130
+ fontSize: "36px",
131
+ fontWeight: "500"
132
+ }
133
+ }, ((_containerData$curren3 = containerData.currentProfile) === null || _containerData$curren3 === void 0 ? void 0 : _containerData$curren3.iconText) || iconText), /*#__PURE__*/_react.default.createElement(_styles.ProfileNameContainer, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
134
+ color: "primary-content",
135
+ typography: "type-t2-700"
136
+ }, ((_containerData$curren4 = containerData.currentProfile) === null || _containerData$curren4 === void 0 ? void 0 : _containerData$curren4.name) || "Current Profile"), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
137
+ label: "Manage Profile",
138
+ type: "secondary",
139
+ onClick: handleManageProfile,
140
+ style: {
141
+ width: "fit-content"
142
+ }
143
+ })))), containerData.listItems && containerData.listItems.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.EnterpriseSection, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
144
+ color: "primary-content",
145
+ typography: "type-t2-700",
146
+ style: {
147
+ marginBottom: "16px"
148
+ }
149
+ }, "Switch to Another Enterprise"), /*#__PURE__*/_react.default.createElement(_styles.EnterpriseList, null, containerData.listItems.map((enterprise, index) => {
150
+ const avatarStyle = getEnterpriseAvatarStyle(index);
151
+ return /*#__PURE__*/_react.default.createElement(_styles.EnterpriseItem, {
152
+ key: index,
153
+ onClick: () => handleListItemSelect(enterprise)
154
+ }, /*#__PURE__*/_react.default.createElement(_styles.EnterpriseAvatar, {
155
+ style: {
156
+ backgroundColor: avatarStyle.backgroundColor,
157
+ color: avatarStyle.color
158
+ }
159
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
160
+ typography: "type-h2-500"
161
+ }, enterprise.iconText)), /*#__PURE__*/_react.default.createElement(_styles.EnterpriseContent, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
162
+ style: {
163
+ fontSize: "14px",
164
+ fontWeight: "700"
165
+ }
166
+ }, enterprise.name)), /*#__PURE__*/_react.default.createElement(_styles.EnterpriseArrow, null, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
167
+ icon: _ChevronRight.default,
168
+ size: 20,
169
+ color: "primary"
170
+ })));
171
+ }))))));
172
+ }
173
+ ProfileSection.propTypes = {
174
+ profileData: _propTypes.default.shape({
175
+ visible: _propTypes.default.bool,
176
+ iconText: _propTypes.default.string,
177
+ iconColor: _propTypes.default.string,
178
+ iconBgColor: _propTypes.default.string,
179
+ tooltipText: _propTypes.default.string,
180
+ mwebTypographyType: _propTypes.default.string,
181
+ behavior: _propTypes.default.oneOf(["reroute", "open-container"]),
182
+ containerData: _propTypes.default.shape({
183
+ currentProfile: _propTypes.default.shape({
184
+ name: _propTypes.default.string,
185
+ iconText: _propTypes.default.string,
186
+ iconColor: _propTypes.default.string,
187
+ iconBgColor: _propTypes.default.string
188
+ }),
189
+ avatarColors: _propTypes.default.arrayOf(_propTypes.default.shape({
190
+ backgroundColor: _propTypes.default.string,
191
+ color: _propTypes.default.string
192
+ })),
193
+ manageProfileReroute: _propTypes.default.string,
194
+ listItems: _propTypes.default.arrayOf(_propTypes.default.shape({
195
+ name: _propTypes.default.string,
196
+ iconText: _propTypes.default.string,
197
+ iconBgColor: _propTypes.default.string,
198
+ reroute: _propTypes.default.string
199
+ }))
200
+ })
201
+ }),
202
+ onProfileClick: _propTypes.default.func,
203
+ onShowNotification: _propTypes.default.func
204
+ };
205
+ ProfileSection.defaultProps = {
206
+ profileData: {
207
+ visible: false,
208
+ iconText: "R",
209
+ iconColor: "primary-content",
210
+ iconBgColor: "primary",
211
+ tooltipText: "To manage the sub-admins, go to the Profile section.",
212
+ mwebTypographyType: "type-h2-500",
213
+ behavior: "reroute",
214
+ containerData: null
215
+ },
216
+ onProfileClick: () => {},
217
+ onShowNotification: () => {}
218
+ };
219
+ 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;