oa-componentbook 1.0.1-stage.390 → 1.0.1-stage.392
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-modal/CustomModal.js +51 -46
- package/build/layout/GenricLayOut/GenricLayOut.js +24 -3
- package/build/layout/GenricLayOut/components/AppliedFilters.js +11 -4
- package/build/layout/GenricLayOut/components/Modal.js +10 -2
- package/build/layout/GenricLayOut/styles.js +7 -2
- package/build/widgets/oa-form-widget/FormWidget.js +44 -12
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +3 -2
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +6 -6
- package/build/widgets/oa-widget-select-list-item-modal/SelectListItemModal.js +79 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +64 -13
- package/build/widgets/oa-widget-sidebar/styles.js +1 -1
- package/package.json +1 -1
|
@@ -14,53 +14,56 @@ var _Typography = _interopRequireDefault(require("../oa-component-typography/Typ
|
|
|
14
14
|
var _typographyOptions = require("../../global-css/typography-options");
|
|
15
15
|
var _utils = require("../../utils");
|
|
16
16
|
var _styles = require("./styles");
|
|
17
|
-
const _excluded = ["buttonConfig", "children", "data-test", "imgSrc", "onCancel", "open", "title", "typographies", "width"];
|
|
17
|
+
const _excluded = ["buttonConfig", "children", "data-test", "imgSrc", "onCancel", "open", "title", "typographies", "width", "bgColor", "showCloseIcon"];
|
|
18
|
+
/* eslint-disable */
|
|
18
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
20
|
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); }
|
|
20
21
|
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; }
|
|
21
22
|
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; }
|
|
22
23
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
24
|
+
* This is a custom Modal component that extends the default antd Modal
|
|
25
|
+
* component.
|
|
26
|
+
*
|
|
27
|
+
* The open state of the modal is controlled by the parent component.
|
|
28
|
+
*
|
|
29
|
+
* The parent can also provide a callback function to be called when the
|
|
30
|
+
* cancel button is clicked.
|
|
31
|
+
*
|
|
32
|
+
* The width of the modal can be customized by providing a width prop.
|
|
33
|
+
*
|
|
34
|
+
* The buttons for the modal can be customized by providing a buttonConfig
|
|
35
|
+
* prop.
|
|
36
|
+
*
|
|
37
|
+
* The title of the modal can be provided as a string or as an image.
|
|
38
|
+
*
|
|
39
|
+
* The children of the modal can be provided as a string or a number, or as
|
|
40
|
+
* JSX elements.
|
|
41
|
+
*
|
|
42
|
+
* The typography of the title and description can be customized by providing
|
|
43
|
+
* a typographies object.
|
|
44
|
+
*
|
|
45
|
+
* The modal is centered by default.
|
|
46
|
+
*
|
|
47
|
+
* The modal is rendered with a gray background.
|
|
48
|
+
*
|
|
49
|
+
* The modal is rendered with a close button.
|
|
50
|
+
*
|
|
51
|
+
* The parent can provide additional props to the Modal component.
|
|
52
|
+
*/
|
|
52
53
|
function CustomModal(_ref) {
|
|
53
54
|
let {
|
|
54
55
|
buttonConfig,
|
|
55
56
|
children,
|
|
56
|
-
|
|
57
|
+
"data-test": dataTest,
|
|
57
58
|
imgSrc,
|
|
58
59
|
// This callback function provided by parent is called upon clicking on the cancel button
|
|
59
60
|
onCancel,
|
|
60
61
|
open,
|
|
61
62
|
title,
|
|
62
63
|
typographies,
|
|
63
|
-
width
|
|
64
|
+
width,
|
|
65
|
+
bgColor,
|
|
66
|
+
showCloseIcon = true // Add this prop with default value
|
|
64
67
|
} = _ref,
|
|
65
68
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
66
69
|
/*
|
|
@@ -75,15 +78,15 @@ function CustomModal(_ref) {
|
|
|
75
78
|
return /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
76
79
|
theme: {
|
|
77
80
|
token: {
|
|
78
|
-
colorBgMask:
|
|
81
|
+
colorBgMask: bgColor || "rgba(0, 0, 0, 0.7)"
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
}, open && /*#__PURE__*/_react.default.createElement(_antd.Modal, _extends({
|
|
82
|
-
closeIcon: /*#__PURE__*/_react.default.createElement(_icons.CloseCircleFilled, {
|
|
85
|
+
closeIcon: showCloseIcon ? /*#__PURE__*/_react.default.createElement(_icons.CloseCircleFilled, {
|
|
83
86
|
style: {
|
|
84
|
-
fontSize:
|
|
87
|
+
fontSize: "26px"
|
|
85
88
|
}
|
|
86
|
-
}),
|
|
89
|
+
}) : false,
|
|
87
90
|
centered: true,
|
|
88
91
|
"data-test": dataTest,
|
|
89
92
|
footer: (buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.ButtonContainer, null, buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.map(button => /*#__PURE__*/_react.default.createElement(_CustomButton.default, _extends({
|
|
@@ -94,7 +97,7 @@ function CustomModal(_ref) {
|
|
|
94
97
|
onClick: button.callback,
|
|
95
98
|
size: "large",
|
|
96
99
|
type: button === null || button === void 0 ? void 0 : button.type,
|
|
97
|
-
"data-test": button[
|
|
100
|
+
"data-test": button["data-test"]
|
|
98
101
|
})))),
|
|
99
102
|
onCancel: handleCancel,
|
|
100
103
|
open: open,
|
|
@@ -116,17 +119,17 @@ CustomModal.propTypes = {
|
|
|
116
119
|
// Array of button configurations
|
|
117
120
|
buttonConfig: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
118
121
|
callback: _propTypes.default.func.isRequired,
|
|
119
|
-
|
|
122
|
+
"data-test": _propTypes.default.string,
|
|
120
123
|
label: _propTypes.default.string,
|
|
121
124
|
iconConfig: _propTypes.default.shape({
|
|
122
125
|
icon: _propTypes.default.node,
|
|
123
|
-
position: _propTypes.default.oneOf([
|
|
126
|
+
position: _propTypes.default.oneOf(["left", "right"]),
|
|
124
127
|
style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))
|
|
125
128
|
}),
|
|
126
|
-
type: _propTypes.default.oneOf([
|
|
129
|
+
type: _propTypes.default.oneOf(["primary", "secondary", "text-only", "danger-primary", "danger-secondary", "danger-text-only"])
|
|
127
130
|
})),
|
|
128
131
|
children: _propTypes.default.node,
|
|
129
|
-
|
|
132
|
+
"data-test": _propTypes.default.string,
|
|
130
133
|
title: _propTypes.default.string,
|
|
131
134
|
typographies: _propTypes.default.shape({
|
|
132
135
|
title: _propTypes.default.oneOf(_typographyOptions.typographyOptions),
|
|
@@ -135,19 +138,21 @@ CustomModal.propTypes = {
|
|
|
135
138
|
imgSrc: _propTypes.default.string,
|
|
136
139
|
onCancel: _propTypes.default.func.isRequired,
|
|
137
140
|
open: _propTypes.default.bool,
|
|
138
|
-
width: _propTypes.default.string || _propTypes.default.number
|
|
141
|
+
width: _propTypes.default.string || _propTypes.default.number,
|
|
142
|
+
showCloseIcon: _propTypes.default.bool
|
|
139
143
|
};
|
|
140
144
|
CustomModal.defaultProps = {
|
|
141
145
|
buttonConfig: [],
|
|
142
146
|
children: null,
|
|
143
|
-
|
|
147
|
+
"data-test": null,
|
|
144
148
|
imgSrc: null,
|
|
145
149
|
open: true,
|
|
146
150
|
title: null,
|
|
147
151
|
typographies: {
|
|
148
|
-
title:
|
|
149
|
-
children:
|
|
152
|
+
title: "type-t1-500",
|
|
153
|
+
children: "type-b2-400"
|
|
150
154
|
},
|
|
151
|
-
width: 416
|
|
155
|
+
width: 416,
|
|
156
|
+
showCloseIcon: true
|
|
152
157
|
};
|
|
153
158
|
var _default = exports.default = CustomModal;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.description.js");
|
|
4
3
|
require("core-js/modules/es.weak-map.js");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
@@ -9,6 +8,7 @@ exports.default = void 0;
|
|
|
9
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
9
|
require("core-js/modules/es.promise.js");
|
|
11
10
|
require("core-js/modules/es.string.trim.js");
|
|
11
|
+
require("core-js/modules/es.symbol.description.js");
|
|
12
12
|
require("core-js/modules/es.object.assign.js");
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _layoutReducer = require("./reducer/layoutReducer");
|
|
@@ -38,6 +38,7 @@ var _downloadFile = _interopRequireDefault(require("../../utils/download-file"))
|
|
|
38
38
|
var _AppliedFilters = _interopRequireDefault(require("./components/AppliedFilters"));
|
|
39
39
|
var _ProfileSection = _interopRequireDefault(require("./components/ProfileSection"));
|
|
40
40
|
var _FilterListRounded = _interopRequireDefault(require("@material-ui/icons/FilterListRounded"));
|
|
41
|
+
var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-info/CustomInfo"));
|
|
41
42
|
const _excluded = ["filteredValue"],
|
|
42
43
|
_excluded2 = ["sortOrder"];
|
|
43
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -52,7 +53,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
52
53
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
53
54
|
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 */
|
|
54
55
|
function GenricLayOut(_ref) {
|
|
55
|
-
var _state$misc22, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables4, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination17, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
|
|
56
|
+
var _state$misc22, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables4, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination17, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
|
|
56
57
|
let {
|
|
57
58
|
config,
|
|
58
59
|
getInitialData,
|
|
@@ -105,7 +106,8 @@ function GenricLayOut(_ref) {
|
|
|
105
106
|
imageViewer,
|
|
106
107
|
customDrawer,
|
|
107
108
|
staticFilter,
|
|
108
|
-
profileData
|
|
109
|
+
profileData,
|
|
110
|
+
infoPanel
|
|
109
111
|
} = state !== null && state !== void 0 ? state : {};
|
|
110
112
|
(0, _react.useEffect)(() => {
|
|
111
113
|
init();
|
|
@@ -2028,6 +2030,7 @@ function GenricLayOut(_ref) {
|
|
|
2028
2030
|
}
|
|
2029
2031
|
console.log(state, "GenricLayOutstate");
|
|
2030
2032
|
return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
|
|
2033
|
+
marginBottom: infoPanel !== null && infoPanel !== void 0 && infoPanel.bottomMarginRequired ? "12px" : "0",
|
|
2031
2034
|
className: (state === null || state === void 0 || (_state$misc22 = state.misc) === null || _state$misc22 === void 0 ? void 0 : _state$misc22.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
|
|
2032
2035
|
}, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
2033
2036
|
className: "fullPageLayout"
|
|
@@ -2152,6 +2155,24 @@ function GenricLayOut(_ref) {
|
|
|
2152
2155
|
allowClear: true,
|
|
2153
2156
|
onClear: onInputSearchClear,
|
|
2154
2157
|
onBlur: onInputSearchBlur
|
|
2158
|
+
}))), (infoPanel === null || infoPanel === void 0 ? void 0 : infoPanel.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
|
|
2159
|
+
loading: state === null || state === void 0 ? void 0 : state.isLoading,
|
|
2160
|
+
active: true,
|
|
2161
|
+
paragraph: {
|
|
2162
|
+
rows: 1
|
|
2163
|
+
}
|
|
2164
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
2165
|
+
className: "margin-bottom-12"
|
|
2166
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomInfo.default, {
|
|
2167
|
+
description: infoPanel === null || infoPanel === void 0 || (_infoPanel$data = infoPanel.data) === null || _infoPanel$data === void 0 ? void 0 : _infoPanel$data.description,
|
|
2168
|
+
color: infoPanel === null || infoPanel === void 0 || (_infoPanel$data2 = infoPanel.data) === null || _infoPanel$data2 === void 0 ? void 0 : _infoPanel$data2.color,
|
|
2169
|
+
iconConfig: {
|
|
2170
|
+
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
2171
|
+
color: (infoPanel === null || infoPanel === void 0 || (_infoPanel$data3 = infoPanel.data) === null || _infoPanel$data3 === void 0 || (_infoPanel$data3 = _infoPanel$data3.iconConfig) === null || _infoPanel$data3 === void 0 ? void 0 : _infoPanel$data3.color) || "warning",
|
|
2172
|
+
icon: infoPanel === null || infoPanel === void 0 || (_infoPanel$data4 = infoPanel.data) === null || _infoPanel$data4 === void 0 || (_infoPanel$data4 = _infoPanel$data4.iconConfig) === null || _infoPanel$data4 === void 0 ? void 0 : _infoPanel$data4.icon
|
|
2173
|
+
}),
|
|
2174
|
+
position: (infoPanel === null || infoPanel === void 0 || (_infoPanel$data5 = infoPanel.data) === null || _infoPanel$data5 === void 0 || (_infoPanel$data5 = _infoPanel$data5.iconConfig) === null || _infoPanel$data5 === void 0 ? void 0 : _infoPanel$data5.position) || 'left'
|
|
2175
|
+
}
|
|
2155
2176
|
}))), Object.keys((state === null || state === void 0 || (_state$customDrawer3 = state.customDrawer) === null || _state$customDrawer3 === void 0 ? void 0 : _state$customDrawer3.appliedFilters) || {}).length > 0 && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
|
|
2156
2177
|
loading: state === null || state === void 0 ? void 0 : state.isLoading,
|
|
2157
2178
|
active: true,
|
|
@@ -32,10 +32,17 @@ const AppliedFilters = _ref => {
|
|
|
32
32
|
switch (key) {
|
|
33
33
|
case "filterBy":
|
|
34
34
|
{
|
|
35
|
-
var _filterDrawerData$dat
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
console.log("matchedOption:", matchedOption);
|
|
43
|
+
return (_matchedOption$label = matchedOption === null || matchedOption === void 0 ? void 0 : matchedOption.label) !== null && _matchedOption$label !== void 0 ? _matchedOption$label : value;
|
|
44
|
+
}
|
|
45
|
+
return value;
|
|
39
46
|
}
|
|
40
47
|
case "fromDate":
|
|
41
48
|
return (0, _dayjs.default)(value).format("DD MMM YYYY");
|
|
@@ -14,6 +14,7 @@ var _HubAutomationModal = _interopRequireDefault(require("../../../widgets/oa-wi
|
|
|
14
14
|
var _GuideWidget = _interopRequireDefault(require("../../../widgets/oa-widget-guide/GuideWidget"));
|
|
15
15
|
var _MaterialIcon = _interopRequireDefault(require("../../../components/oa-component-icons/MaterialIcon"));
|
|
16
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"));
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
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; }
|
|
19
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; }
|
|
@@ -42,6 +43,11 @@ function LayoutModal(_ref) {
|
|
|
42
43
|
});
|
|
43
44
|
} else if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "hubAutomationDeleteBiker") {
|
|
44
45
|
return /*#__PURE__*/_react.default.createElement(_HubAutomationDeleteBiker.default, modal);
|
|
46
|
+
} else if ((modal === null || modal === void 0 ? void 0 : modal.widget) === "selectListItem") {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_SelectListItemModal.default, {
|
|
48
|
+
modalContent: modal === null || modal === void 0 ? void 0 : modal.modalContent,
|
|
49
|
+
onItemSelect: item => onFooterAction("select", item)
|
|
50
|
+
});
|
|
45
51
|
} else {
|
|
46
52
|
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
53
|
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, {
|
|
@@ -69,12 +75,14 @@ function LayoutModal(_ref) {
|
|
|
69
75
|
}
|
|
70
76
|
};
|
|
71
77
|
return /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
|
|
72
|
-
width: 428,
|
|
78
|
+
width: (modal === null || modal === void 0 ? void 0 : modal.customWidth) || 428,
|
|
73
79
|
onCancel: onCancel,
|
|
74
80
|
destroyOnClose: true,
|
|
75
81
|
title: modal === null || modal === void 0 ? void 0 : modal.heading,
|
|
76
82
|
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)
|
|
83
|
+
buttonConfig: getModalButtonConfig(modal === null || modal === void 0 || (_modal$jsxConfig = modal.jsxConfig) === null || _modal$jsxConfig === void 0 ? void 0 : _modal$jsxConfig.buttonConfig),
|
|
84
|
+
bgColor: modal === null || modal === void 0 ? void 0 : modal.bgColor,
|
|
85
|
+
showCloseIcon: modal === null || modal === void 0 ? void 0 : modal.showCloseIcon
|
|
78
86
|
}, render());
|
|
79
87
|
}
|
|
80
88
|
LayoutModal.propTypes = {
|
|
@@ -13,10 +13,15 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
|
-
const DrawerWithOutFooter = exports.DrawerWithOutFooter = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.hubAutomationContainer .fullPageLayout {padding: 0 !important; background: #fff !important;}\n.hubAutomationContainer .fullPageLayout .oaRightLayouts{\n max-width: 1154px;\n margin: 24px auto;\n padding: 0 16px;\n box-shadow: none;}\n.oaDrawer div + div.ant-drawer-body{padding-bottom:100px !important;}\n\n.ant-checkbox-indeterminate .ant-checkbox-inner:after {\n background-color: #014fc5;\n}\n\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::before {display:none;}\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::after{ content: \"*\"; color: #DE350B; visibility: visible !important;}\n\n\n.cstUplaodWithFullWidth{margin-bottom:24px;}\n.cstUplaodWithFullWidth:last-child{margin-bottom:0;}\n.cstUplaodWithFullWidth .uploadDiv{width:100%;}\n.cstUplaodWithFullWidth .uploadDiv .ant-upload-list-item-container, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper .ant-upload-list-picture-card .ant-upload-select, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container {\n width: 100%; \n height: 120px;\n}\n\n\n\n\n.oaDrawer .ant-form-item .ant-form-item-explain-error {\n color: #DE350B;\n font-size: 12px;\n margin: 4px 0 0 0;\n}\n.bottomSelectedSecion{background: #F6F6F6; padding: 16px 36px; position: fixed; bottom: 0; left: 0; right: 0;\nbox-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n display: flex; z-index: 2;\n align-items: center;\n justify-content: end;\n gap: 24px;}\n\n\n\n.listOfItems{ border-radius: 12px;\n border: 1px solid #E0E0E0;\n padding: 24px;\n margin: 24px 0 0 0;}\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n.listOfItemsWithoutBorder{\n padding: 24px 0;\n margin: 24px 0 0 0;}\n\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n\n\n\n.modalIconAndTextBox{display:flex; flex-direction:row; align-items: center; margin: 0 0 16px 0; gap:4px;}\n"])));
|
|
16
|
+
const DrawerWithOutFooter = exports.DrawerWithOutFooter = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.hubAutomationContainer .fullPageLayout {padding: 0 !important; background: #fff !important;}\n.hubAutomationContainer .fullPageLayout .oaRightLayouts{\n max-width: 1154px;\n margin: 24px auto;\n padding: 0 16px;\n box-shadow: none;}\n.oaDrawer div + div.ant-drawer-body{padding-bottom:100px !important;}\n\n.ant-checkbox-indeterminate .ant-checkbox-inner:after {\n background-color: #014fc5;\n}\n\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::before {display:none;}\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::after{ content: \"*\"; color: #DE350B; visibility: visible !important;}\n\n\n.cstUplaodWithFullWidth{margin-bottom:24px;}\n.cstUplaodWithFullWidth:last-child{margin-bottom:0;}\n.cstUplaodWithFullWidth .uploadDiv{width:100%;}\n.cstUplaodWithFullWidth .uploadDiv .ant-upload-list-item-container, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper .ant-upload-list-picture-card .ant-upload-select, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container {\n width: 100%; \n height: 120px;\n}\n\n\n\n\n.oaDrawer .ant-form-item .ant-form-item-explain-error {\n color: #DE350B;\n font-size: 12px;\n margin: 4px 0 0 0;\n}\n.bottomSelectedSecion{background: #F6F6F6; padding: 16px 36px; position: fixed; bottom: 0; left: 0; right: 0;\nbox-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n display: flex; z-index: 2;\n align-items: center;\n justify-content: end;\n gap: 24px;}\n\n\n\n.listOfItems{ border-radius: 12px;\n border: 1px solid #E0E0E0;\n padding: 24px;\n margin: 24px 0 0 0;}\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n.listOfItemsWithoutBorder{\n padding: 24px 0;\n margin: 24px 0 0 0;}\n\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n\n\n\n.modalIconAndTextBox{display:flex; flex-direction:row; align-items: center; margin: 0 0 16px 0; gap:4px;}\n\n/* Select List Item Styles */\n.select-list-container {\n padding: 0;\n margin: 16px 0 0 0;\n}\n\n.select-list-item {\n display: flex;\n align-items: center;\n padding: 16px 0;\n cursor: pointer;\n transition: background-color 0.2s ease;\n border-bottom: 1px solid #f0f0f0;\n position: relative;\n}\n\n.select-list-item:hover {\n background-color: #f8f9fa;\n}\n\n.select-list-item:last-child {\n border-bottom: none;\n}\n\n.item-avatar {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background-color: #f0f0f0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 12px;\n font-size: 20px;\n font-weight: 500;\n color: #333;\n flex-shrink: 0;\n}\n\n/* Different avatar colors for different items */\n.select-list-item:nth-child(1) .item-avatar {\n background-color: #717171;\n color: #fff;\n}\n\n.select-list-item:nth-child(2) .item-avatar {\n background-color: #014fc5;\n color: #fff;\n}\n\n.item-content {\n flex: 1;\n min-width: 0;\n}\n\n.item-arrow {\n flex-shrink: 0;\n margin-left: 8px;\n color: #014fc5;\n}\n"])));
|
|
17
17
|
const FormWidgetStyle = exports.FormWidgetStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .formBottomAction {\n position: absolute;\n bottom: 0px;\n background-color: rgb(249, 249, 249);\n box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 8px;\n padding: 16px;\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n z-index: 10;\n left: 0;\n right: 0;\n }\n\n .formBottomAction .ant-form-item {\n margin-bottom: 0px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n }\n .searchErrorMsg {\n font-size: 12px;\n }\n"])));
|
|
18
18
|
const TableDataStyle = exports.TableDataStyle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n"])));
|
|
19
|
-
const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n .headerContent {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n\n .headerLeft {\n flex: 1;\n }\n\n .headerRight {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n }\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .subHading1Text {\n margin: 0 0
|
|
19
|
+
const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n .headerContent {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n\n .headerLeft {\n flex: 1;\n }\n\n .headerRight {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n }\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .subHading1Text {\n margin: 0 0 ", " 40px;\n }\n\n .marginNone {\n margin: 0 !important;\n }\n\n .subHadingText > span {\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n .oaRightLayouts {\n width: 100%;\n min-height: calc(100vh - 16px);\n padding: 76px 48px;\n overflow-y: auto;\n border-radius: 16px;\n background: #fff;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n }\n\n .oaheaderSearchAndFilter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 16px 0;\n gap: 16px;\n }\n\n .oaRightLayouts .iconAndTextSecBox {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n .inLine {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 8px;\n }\n\n .cardData {\n padding: 28px 0 48px 0;\n }\n\n .ant-carousel .slick-dots {\n position: static;\n margin: 20px auto 12px 0;\n }\n .ant-carousel .slick-dots li {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li button {\n width: 8px;\n height: 8px;\n background: #cacaca;\n border-radius: 50%;\n opacity: 0.5;\n }\n .ant-carousel .slick-dots li.slick-active {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li.slick-active button {\n width: 8px;\n height: 8px;\n opacity: 1;\n }\n .ant-carousel .slick-dots li::after {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n opacity: 1;\n background: #717171;\n }\n\n .oaTabs .ant-tabs-nav {\n border-top: 1px solid #e0e0e0;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n padding: 12px 22px 0 22px;\n margin: 0 0 8px 0;\n background: #fff;\n border-radius: 4px 4px 0 0;\n }\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .cardContainer {\n display: flex;\n gap: 24px;\n }\n .selectAndSearch .noClear {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n margin: 4px 0px 0px;\n color: #de350b;\n }\n .searchOnly {\n margin: 0px 0px 16px;\n position: relative;\n }\n .searchOnly .ant-input-affix-wrapper {\n border-radius: 4px;\n max-width: 420px;\n padding-left: 44px;\n }\n .searchOnly .cstSearchIcon {\n position: absolute;\n left: 16px;\n top: 14px;\n z-index: 2;\n }\n\n .selectAndSearch .ant-input-affix-wrapper {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .selectAndSearch {\n flex-shrink: 0;\n }\n\n .customeSelectDropdown .ant-select-selector {\n border: none;\n padding: 0;\n }\n .customeSelectDropdown .ant-select-selection-item > span {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 32px;\n }\n\n .customeSelectDropdown .ant-select .ant-select-arrow {\n color: #014fc5;\n inset-inline-end: -6px;\n }\n\n .customeSelectDropdown .ant-select-selector {\n box-shadow: none !important;\n }\n .oaheaderButtons {\n display: flex;\n gap: 24px;\n align-items: center;\n position: relative;\n flex-grow: 1;\n justify-content: space-between;\n }\n\n .oaheaderButtons.single-child {\n justify-content: flex-end;\n }\n\n .oaheaderButtonsRight {\n display: flex;\n flex-direction: row;\n gap: 16px;\n }\n\n .oaheaderButtons .notifyDot {\n width: 12px;\n height: 12px;\n background: #de350b;\n position: absolute;\n top: -4px;\n right: -4px;\n border-radius: 50%;\n }\n\n @media only screen and (max-width: 600px) {\n .selectAndSearch .ant-input-affix-wrapper {\n width: calc(100% - 84px);\n }\n .oaheaderSearchAndFilter .dropDownSearchContainer {\n width: 100%;\n }\n\n .oaheaderSearchAndFilter {\n align-items: flex-end;\n flex-direction: column;\n gap: 16px;\n }\n\n .inLine {\n flex-direction: column;\n gap: 0;\n align-items: flex-start;\n }\n\n .subHadingText > span {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .fullPageLayout {\n flex-direction: column;\n padding: 0;\n }\n .oaRightLayouts {\n padding: 16px;\n border-radius: 0;\n background: #fff;\n box-shadow: none;\n height: auto;\n background: #f6f6f6;\n }\n .oaTabs .ant-tabs-nav {\n margin: 0 0 28px 0;\n padding: 12px 0 0 0;\n }\n .layoutHeadingPage {\n margin: 0 0 16px 0;\n background: #fff;\n padding: 16px;\n border-radius: 8px;\n width: 100%;\n }\n .layoutHeadingAndSearch {\n background: #fff;\n padding: 20px 16px;\n margin: 0;\n width: 100%;\n border-radius: 8px;\n }\n \n /* Hide profile section on mobile when sidebar has profile icon */\n .hideProfileOnMobile {\n display: none !important;\n }\n }\n"])), _ref => {
|
|
20
|
+
let {
|
|
21
|
+
marginBottom
|
|
22
|
+
} = _ref;
|
|
23
|
+
return marginBottom || "0";
|
|
24
|
+
});
|
|
20
25
|
const ListofDamageParts = exports.ListofDamageParts = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ul.damagedParts {\n display: flex;\n flex-direction: column;\n margin: 8px 0 0 16px;\n list-style-type: disc;\n }\n ul.damagedParts li {\n padding: 4px 0;\n width: 100%;\n }\n ul.damagedParts li::marker {\n color: #717171;\n font-size: 20px;\n }\n"])));
|
|
21
26
|
const IncidentListParts = exports.IncidentListParts = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .qaSec dl {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n }\n .qaSec dl dt {\n display: flex;\n flex-direction: column;\n margin: 16px 0 0 0;\n }\n .qaSec dl dt:first-child {\n margin-top: 8px;\n }\n"])));
|
|
22
27
|
const ProfileSectionContainer = exports.ProfileSectionContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-left: auto;\n\n .profile-icon-container {\n position: relative;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])));
|
|
@@ -34,7 +34,6 @@ var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-
|
|
|
34
34
|
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
35
35
|
var _CustomTooltip = _interopRequireDefault(require("../../components/oa-component-tooltip/CustomTooltip"));
|
|
36
36
|
var _InfoOutlined = _interopRequireDefault(require("@material-ui/icons/InfoOutlined"));
|
|
37
|
-
var _InfoRounded = _interopRequireDefault(require("@material-ui/icons/InfoRounded"));
|
|
38
37
|
var _CollapsibleKeyValueWidget = _interopRequireDefault(require("../oa-widget-collapsible-key-value/CollapsibleKeyValueWidget"));
|
|
39
38
|
var _UserManagementWidget = _interopRequireDefault(require("../oa-widget-user-management/UserManagementWidget"));
|
|
40
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -133,8 +132,8 @@ function FormWidget(props) {
|
|
|
133
132
|
placement: "top"
|
|
134
133
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
135
134
|
color: "primary-content",
|
|
136
|
-
size:
|
|
137
|
-
icon:
|
|
135
|
+
size: 16,
|
|
136
|
+
icon: _InfoOutlined.default
|
|
138
137
|
})));
|
|
139
138
|
};
|
|
140
139
|
const renderFieldWidget = (item, index, itemData) => {
|
|
@@ -211,14 +210,45 @@ function FormWidget(props) {
|
|
|
211
210
|
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
212
211
|
name: item === null || item === void 0 ? void 0 : item.name,
|
|
213
212
|
initialValue: item === null || item === void 0 ? void 0 : item.defaultValue,
|
|
214
|
-
label: item === null || item === void 0 ? void 0 : item.label,
|
|
213
|
+
label: renderLabelWithTooltip(item === null || item === void 0 ? void 0 : item.label, item === null || item === void 0 ? void 0 : item.tooltip),
|
|
215
214
|
rules: item === null || item === void 0 ? void 0 : item.rules
|
|
216
215
|
}, /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, {
|
|
217
|
-
defaultValue: item.defaultValue
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
216
|
+
defaultValue: item.defaultValue,
|
|
217
|
+
style: {
|
|
218
|
+
display: 'flex',
|
|
219
|
+
flexDirection: 'row',
|
|
220
|
+
gap: '24px'
|
|
221
|
+
}
|
|
222
|
+
}, item === null || item === void 0 ? void 0 : item.value.map((v, index) => {
|
|
223
|
+
// Check if this radio option has info/tooltip
|
|
224
|
+
const hasInfo = v.info || v.tooltip;
|
|
225
|
+
const radioLabel = hasInfo ? /*#__PURE__*/_react.default.createElement("div", {
|
|
226
|
+
style: {
|
|
227
|
+
display: 'flex',
|
|
228
|
+
alignItems: 'center',
|
|
229
|
+
gap: '4px'
|
|
230
|
+
}
|
|
231
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, v.label), v.info && /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
|
|
232
|
+
title: v.info.tooltip || v.info.tooltipTitle || v.info.infoData,
|
|
233
|
+
placement: "top"
|
|
234
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
235
|
+
color: v.info.color || "primary-content",
|
|
236
|
+
size: v.info.size || 16,
|
|
237
|
+
icon: _InfoOutlined.default
|
|
238
|
+
})), v.tooltip && !v.info && /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
|
|
239
|
+
title: v.tooltip,
|
|
240
|
+
placement: "top"
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
242
|
+
color: "primary-content",
|
|
243
|
+
size: 16,
|
|
244
|
+
icon: _InfoOutlined.default
|
|
245
|
+
}))) : v.label;
|
|
246
|
+
return /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
247
|
+
key: index,
|
|
248
|
+
value: v.value,
|
|
249
|
+
label: radioLabel
|
|
250
|
+
});
|
|
251
|
+
})));
|
|
222
252
|
}
|
|
223
253
|
if ((item === null || item === void 0 ? void 0 : item.widget) === "input") {
|
|
224
254
|
var _item$value;
|
|
@@ -345,9 +375,10 @@ function FormWidget(props) {
|
|
|
345
375
|
title: item.info.tooltipTitle,
|
|
346
376
|
placement: "top"
|
|
347
377
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
348
|
-
color: item.info.color || "
|
|
378
|
+
color: item.info.color || "primary-content",
|
|
349
379
|
size: item.info.size || 16,
|
|
350
|
-
icon: _InfoOutlined.default
|
|
380
|
+
icon: _InfoOutlined.default,
|
|
381
|
+
className: "margin-left-4"
|
|
351
382
|
}))
|
|
352
383
|
} : undefined;
|
|
353
384
|
return /*#__PURE__*/_react.default.createElement(_KeyValueWidget.default, {
|
|
@@ -443,7 +474,8 @@ function FormWidget(props) {
|
|
|
443
474
|
title: headingInfo,
|
|
444
475
|
placement: "top"
|
|
445
476
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
446
|
-
icon: _InfoOutlined.default
|
|
477
|
+
icon: _InfoOutlined.default,
|
|
478
|
+
size: 16
|
|
447
479
|
})));
|
|
448
480
|
return /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FormWidgetStyleStyle, null, /*#__PURE__*/_react.default.createElement(_antd.Form, {
|
|
449
481
|
form: form,
|
|
@@ -292,8 +292,9 @@ function CollapsibleKeyValueWidget(_ref) {
|
|
|
292
292
|
infoData: /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
|
|
293
293
|
title: item === null || item === void 0 || (_item$info2 = item.info) === null || _item$info2 === void 0 ? void 0 : _item$info2.tooltipTitle
|
|
294
294
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
295
|
-
color: "
|
|
296
|
-
icon: _InfoOutlined.default
|
|
295
|
+
color: "primary-content",
|
|
296
|
+
icon: _InfoOutlined.default,
|
|
297
|
+
size: 16
|
|
297
298
|
}))
|
|
298
299
|
},
|
|
299
300
|
tagStatus: {
|
|
@@ -8,9 +8,9 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
const CollapsibleKeyValueContainer = exports.CollapsibleKeyValueContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n
|
|
12
|
-
const CollapsibleItem = exports.CollapsibleItem = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
13
|
-
const CollapsibleHeader = exports.CollapsibleHeader = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
14
|
-
const OrderTotalSec = exports.OrderTotalSec = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["
|
|
15
|
-
const CollapsibleContent = exports.CollapsibleContent = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: slideDown 0.3s ease-out;\n
|
|
16
|
-
const ExpandButton = exports.ExpandButton = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["
|
|
11
|
+
const CollapsibleKeyValueContainer = exports.CollapsibleKeyValueContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n\n .type-t2-700 {\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n\n .type-b2-400 {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n\n .margin-bottom-16 {\n margin-bottom: 16px;\n }\n"])));
|
|
12
|
+
const CollapsibleItem = exports.CollapsibleItem = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .totalOrderSecBox {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 0 0 0;\n border-top: 1px solid #e0e0e0;\n }\n .gstAndCost {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n"])));
|
|
13
|
+
const CollapsibleHeader = exports.CollapsibleHeader = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .keyValueSecWithBtn {\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 4px;\n border: 1px solid #e0e0e0;\n gap: 16px;\n margin-bottom: 16px;\n }\n\n .keyValueSecWithBtn .valuestyle span {\n width: auto;\n }\n\n @media (max-width: 600px) {\n flex-direction: column;\n align-items: stretch;\n\n .key-value-section {\n margin-right: 0;\n margin-bottom: 12px;\n }\n }\n"])));
|
|
14
|
+
const OrderTotalSec = exports.OrderTotalSec = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""])));
|
|
15
|
+
const CollapsibleContent = exports.CollapsibleContent = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: slideDown 0.3s ease-out;\n\n .details-section {\n color: var(--color-secondary-content);\n }\n\n @keyframes slideDown {\n from {\n opacity: 0;\n max-height: 0;\n }\n to {\n opacity: 1;\n max-height: 500px;\n }\n }\n"])));
|
|
16
|
+
const ExpandButton = exports.ExpandButton = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""])));
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
10
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
11
|
+
var _ChevronRight = _interopRequireDefault(require("@material-ui/icons/ChevronRight"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/* eslint-disable */
|
|
14
|
+
|
|
15
|
+
const SelectListItemModal = _ref => {
|
|
16
|
+
var _modalContent$header, _modalContent$header2, _modalContent$subHead, _modalContent$subHead2, _modalContent$listIte;
|
|
17
|
+
let {
|
|
18
|
+
modalContent,
|
|
19
|
+
onItemSelect
|
|
20
|
+
} = _ref;
|
|
21
|
+
const avatarColors = (modalContent === null || modalContent === void 0 ? void 0 : modalContent.avatarColors) || [];
|
|
22
|
+
const handleItemSelect = item => {
|
|
23
|
+
// localStorage.setItem('selectedListItem', JSON.stringify(item));
|
|
24
|
+
if (onItemSelect) {
|
|
25
|
+
onItemSelect(item);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const getAvatarStyle = index => {
|
|
29
|
+
if (avatarColors.length === 0) {
|
|
30
|
+
// Default colors if no colors provided
|
|
31
|
+
return {
|
|
32
|
+
backgroundColor: '#f0f0f0',
|
|
33
|
+
color: '#333'
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Use modulo to cycle through colors
|
|
38
|
+
const colorIndex = index % avatarColors.length;
|
|
39
|
+
return avatarColors[colorIndex];
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (modalContent === null || modalContent === void 0 ? void 0 : modalContent.header) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
42
|
+
typography: modalContent === null || modalContent === void 0 || (_modalContent$header = modalContent.header) === null || _modalContent$header === void 0 ? void 0 : _modalContent$header.type,
|
|
43
|
+
color: "primary-content"
|
|
44
|
+
}, modalContent === null || modalContent === void 0 || (_modalContent$header2 = modalContent.header) === null || _modalContent$header2 === void 0 ? void 0 : _modalContent$header2.text), (modalContent === null || modalContent === void 0 ? void 0 : modalContent.subHeading) && /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
+
className: "margin-top-12"
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
47
|
+
typography: modalContent === null || modalContent === void 0 || (_modalContent$subHead = modalContent.subHeading) === null || _modalContent$subHead === void 0 ? void 0 : _modalContent$subHead.type,
|
|
48
|
+
color: "secondary-content"
|
|
49
|
+
}, modalContent === null || modalContent === void 0 || (_modalContent$subHead2 = modalContent.subHeading) === null || _modalContent$subHead2 === void 0 ? void 0 : _modalContent$subHead2.text)), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
+
className: "select-list-container"
|
|
51
|
+
}, modalContent === null || modalContent === void 0 || (_modalContent$listIte = modalContent.listItem) === null || _modalContent$listIte === void 0 ? void 0 : _modalContent$listIte.map((item, index) => {
|
|
52
|
+
var _item$label;
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
key: index,
|
|
55
|
+
className: "select-list-item",
|
|
56
|
+
onClick: () => handleItemSelect(item)
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "item-avatar",
|
|
59
|
+
style: getAvatarStyle(index)
|
|
60
|
+
}, (_item$label = item.label) === null || _item$label === void 0 || (_item$label = _item$label.charAt(0)) === null || _item$label === void 0 ? void 0 : _item$label.toUpperCase()), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: "item-content"
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
63
|
+
typography: "type-b1-400",
|
|
64
|
+
color: "primary-content"
|
|
65
|
+
}, item.label)), /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "item-arrow"
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
68
|
+
icon: _ChevronRight.default,
|
|
69
|
+
size: 20,
|
|
70
|
+
color: "primary"
|
|
71
|
+
})));
|
|
72
|
+
})));
|
|
73
|
+
};
|
|
74
|
+
SelectListItemModal.propTypes = {
|
|
75
|
+
modalContent: _propTypes.default.object,
|
|
76
|
+
onItemSelect: _propTypes.default.func,
|
|
77
|
+
avatarColors: _propTypes.default.array
|
|
78
|
+
};
|
|
79
|
+
var _default = exports.default = SelectListItemModal;
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
9
|
require("core-js/modules/es.regexp.exec.js");
|
|
10
10
|
require("core-js/modules/es.string.replace.js");
|
|
11
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
var _reactRouterDom = require("react-router-dom");
|
|
14
14
|
var _Menu = _interopRequireDefault(require("@material-ui/icons/Menu"));
|
|
@@ -17,14 +17,17 @@ var _MaterialIcon = _interopRequireDefault(require("../../components/oa-componen
|
|
|
17
17
|
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
18
18
|
var _styles = _interopRequireWildcard(require("./styles"));
|
|
19
19
|
var _CustomDropdown = _interopRequireDefault(require("../../components/oa-component-dropdown/CustomDropdown"));
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
/* eslint-disable */
|
|
24
24
|
|
|
25
25
|
const {
|
|
26
26
|
Sider
|
|
27
27
|
} = _antd.Layout;
|
|
28
|
+
const {
|
|
29
|
+
SubMenu
|
|
30
|
+
} = _antd.Menu;
|
|
28
31
|
function SidebarWidget(_ref) {
|
|
29
32
|
var _mobileMenuItems$item, _footer$item, _menuItems$items, _footer$item2, _footer$item3;
|
|
30
33
|
let {
|
|
@@ -35,12 +38,65 @@ function SidebarWidget(_ref) {
|
|
|
35
38
|
location,
|
|
36
39
|
history,
|
|
37
40
|
handleFooterClick,
|
|
38
|
-
profileData
|
|
41
|
+
profileData
|
|
39
42
|
} = _ref;
|
|
43
|
+
const [openKeys, setOpenKeys] = (0, _react.useState)([]);
|
|
44
|
+
|
|
40
45
|
// Determine which menu items to use and whether to show profile icon
|
|
41
46
|
const shouldShowProfileIcon = (mobileMenuItems === null || mobileMenuItems === void 0 || (_mobileMenuItems$item = mobileMenuItems.items) === null || _mobileMenuItems$item === void 0 ? void 0 : _mobileMenuItems$item.length) > 0;
|
|
42
47
|
const activeMenuItems = shouldShowProfileIcon ? mobileMenuItems : menuItems;
|
|
43
|
-
|
|
48
|
+
|
|
49
|
+
// Find which submenu contains the current path and set it as open by default
|
|
50
|
+
(0, _react.useEffect)(() => {
|
|
51
|
+
const currentPath = location.pathname;
|
|
52
|
+
const items = (menuItems === null || menuItems === void 0 ? void 0 : menuItems.items) || [];
|
|
53
|
+
|
|
54
|
+
// Find if current path is in any submenu
|
|
55
|
+
for (const item of items) {
|
|
56
|
+
if (item.children && item.children.length > 0) {
|
|
57
|
+
const hasCurrentPath = item.children.some(child => child.path === currentPath);
|
|
58
|
+
if (hasCurrentPath) {
|
|
59
|
+
setOpenKeys([item.key]);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// If no match found, open the first submenu by default
|
|
66
|
+
const firstSubmenu = items.find(item => item.children && item.children.length > 0);
|
|
67
|
+
if (firstSubmenu) {
|
|
68
|
+
setOpenKeys([firstSubmenu.key]);
|
|
69
|
+
}
|
|
70
|
+
}, [location.pathname, menuItems]);
|
|
71
|
+
|
|
72
|
+
// Simple menu click handler
|
|
73
|
+
const handleMenuClick = _ref2 => {
|
|
74
|
+
let {
|
|
75
|
+
key
|
|
76
|
+
} = _ref2;
|
|
77
|
+
history.replace(key);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// Handle submenu open/close
|
|
81
|
+
const handleOpenChange = keys => {
|
|
82
|
+
setOpenKeys(keys);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Simple render function for menu items
|
|
86
|
+
const renderMenuItem = item => {
|
|
87
|
+
if (item.children && item.children.length > 0) {
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement(SubMenu, {
|
|
89
|
+
key: item.key,
|
|
90
|
+
title: /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, item === null || item === void 0 ? void 0 : item.iconConfig), item.label)
|
|
91
|
+
}, item.children.map(child => /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
92
|
+
key: child.path
|
|
93
|
+
}, child.label)));
|
|
94
|
+
} else {
|
|
95
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
96
|
+
key: item.path
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, item === null || item === void 0 ? void 0 : item.iconConfig), item.label);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
44
100
|
return /*#__PURE__*/_react.default.createElement(_styles.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
45
101
|
className: "oaLeftLayouts"
|
|
46
102
|
}, /*#__PURE__*/_react.default.createElement(Sider, {
|
|
@@ -85,16 +141,11 @@ function SidebarWidget(_ref) {
|
|
|
85
141
|
theme: "light",
|
|
86
142
|
mode: "inline",
|
|
87
143
|
selectedKeys: [location.pathname],
|
|
144
|
+
openKeys: openKeys,
|
|
145
|
+
onOpenChange: handleOpenChange,
|
|
88
146
|
className: "menu",
|
|
89
|
-
onClick:
|
|
90
|
-
|
|
91
|
-
key
|
|
92
|
-
} = _ref2;
|
|
93
|
-
history.replace(key);
|
|
94
|
-
}
|
|
95
|
-
}, menuItems === null || menuItems === void 0 || (_menuItems$items = menuItems.items) === null || _menuItems$items === void 0 ? void 0 : _menuItems$items.map(item => /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
96
|
-
key: item.path
|
|
97
|
-
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, item === null || item === void 0 ? void 0 : item.iconConfig), item.label))), (footer === null || footer === void 0 ? void 0 : footer.visible) && /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
+
onClick: handleMenuClick
|
|
148
|
+
}, menuItems === null || menuItems === void 0 || (_menuItems$items = menuItems.items) === null || _menuItems$items === void 0 ? void 0 : _menuItems$items.map(item => renderMenuItem(item))), (footer === null || footer === void 0 ? void 0 : footer.visible) && /*#__PURE__*/_react.default.createElement("div", {
|
|
98
149
|
className: "logoutDiv",
|
|
99
150
|
onClick: () => handleFooterClick()
|
|
100
151
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, footer === null || footer === void 0 || (_footer$item2 = footer.item) === null || _footer$item2 === void 0 ? void 0 : _footer$item2.iconConfig), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
@@ -8,6 +8,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2; // styles.js
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
const OalayoutStyle = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .oaLeftLayouts {\n padding: 24px 8px;\n background: #f6f6f6;\n }\n\n .logoContainer {\n padding: 0 12px 68px;\n display: flex;\n justify-content: space-between;\n }\n\n .logoutDiv {\n display: flex; flex-direction: row; margin: 140px 0 0 16px; gap: 8px; cursor: pointer;\n }\n\n .leftLogoSec {\n display: flex;\n flex-direction: row;\n gap: 8px;\n }\n\n .logoContainer em {\n width: 1px;\n background: #e0e0e0;\n }\n .logoContainer img {\n height: 32px;\n }\n .ant-layout-sider-light,\n .ant-menu-light {\n background: transparent;\n }\n .ant-menu-item {\n padding: 16px;\n border-radius: 50px;\n margin: 0 0 8px;\n height: auto;\n line-height: normal;\n border-radius: 999px;\n border: 1px solid #e0e0e0;\n background: #fff;\n }\n\n .ant-menu-item .ant-menu-title-content {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n .ant-menu-item-active {\n background: #014fc5;\n color: #fff;\n }\n .ant-menu-item-selected {\n background: #014fc5;\n color: #fff;\n }\n .ant-menu-light:not(.ant-menu-horizontal)\n .ant-menu-item:not(.ant-menu-item-selected):hover,\n :where(.css-dev-only-do-not-override-zcfrx9).ant-menu-light\n > .ant-menu:not(.ant-menu-horizontal)\n .ant-menu-item:not(.ant-menu-item-selected):hover {\n background: #014fc5;\n color: #fff;\n }\n .ant-menu-light.ant-menu-root.ant-menu-inline {\n border: none;\n }\n .ant-menu-
|
|
11
|
+
const OalayoutStyle = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .oaLeftLayouts {\n padding: 24px 8px;\n background: #f6f6f6;\n }\n\n .logoContainer {\n padding: 0 12px 68px;\n display: flex;\n justify-content: space-between;\n }\n\n .logoutDiv {\n display: flex; flex-direction: row; margin: 140px 0 0 16px; gap: 8px; cursor: pointer;\n }\n\n .leftLogoSec {\n display: flex;\n flex-direction: row;\n gap: 8px;\n }\n\n .logoContainer em {\n width: 1px;\n background: #e0e0e0;\n }\n .logoContainer img {\n height: 32px;\n }\n .ant-layout-sider-light,\n .ant-menu-light {\n background: transparent;\n }\n\n /* Regular menu items */\n .ant-menu-item {\n padding: 16px;\n border-radius: 50px;\n margin: 0 0 8px;\n height: auto;\n line-height: normal;\n border-radius: 999px;\n border: 1px solid #e0e0e0;\n background: #fff;\n }\n\n /* SubMenu title styling - this is the parent item - same size as regular items */\n .ant-menu-submenu-title {\n padding: 16px;\n border-radius: 50px;\n margin: 0 0 8px;\n height: auto;\n line-height: normal;\n border-radius: 999px;\n border: 1px solid #e0e0e0;\n background: #fff;\n display: flex;\n align-items: center;\n }\n\n /* SubMenu items - these are the children - should be plain text */\n .ant-menu-submenu .ant-menu-item {\n margin: 8px 0;\n padding: 8px 24px;\n border-radius: 0;\n background: transparent;\n border: none;\n margin-left: 16px;\n color: #666;\n font-size: 14px;\n height: auto;\n line-height: 1.4;\n }\n\n /* Add extra spacing for first nested item */\n .ant-menu-submenu .ant-menu-item:first-child {\n margin-top: 12px;\n }\n\n /* Add extra spacing for last nested item */\n .ant-menu-submenu .ant-menu-item:last-child {\n margin-bottom: 12px;\n }\n\n /* REMOVED: Open SubMenu styling - this was making ALL open submenus blue */\n /* .ant-menu-submenu-open > .ant-menu-submenu-title {\n background: #014fc5;\n color: #fff;\n padding: 24px; \n } */\n\n /* NEW: Only make parent blue when it contains a selected child */\n .ant-menu-submenu-open:has(.ant-menu-item-selected) > .ant-menu-submenu-title {\n background: #014fc5;\n color: #fff;\n padding: 24px;\n }\n\n /* Fallback for browsers that don't support :has() */\n .ant-menu-submenu-open > .ant-menu-submenu-title {\n background: #fff;\n color: #000;\n padding: 24px;\n }\n\n /* SubMenu title content */\n .ant-menu-item .ant-menu-title-content {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n \n .ant-menu-submenu-title .ant-menu-title-content {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n\n /* Add styling to span elements inside SubMenu title content */\n .ant-menu-submenu-title .ant-menu-title-content span {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n\n /* Selected states */\n .ant-menu-item-active {\n background: #014fc5;\n color: #fff;\n }\n .ant-menu-item-selected {\n background: #014fc5;\n color: #fff;\n }\n\n /* SubMenu selected item - should be bold black when selected */\n .ant-menu-submenu .ant-menu-item-selected {\n background: transparent;\n color: #000;\n font-weight: bold;\n border-radius: 0;\n }\n\n /* Hover effects */\n .ant-menu-light:not(.ant-menu-horizontal)\n .ant-menu-item:not(.ant-menu-item-selected):hover,\n :where(.css-dev-only-do-not-override-zcfrx9).ant-menu-light\n > .ant-menu:not(.ant-menu-horizontal)\n .ant-menu-item:not(.ant-menu-item-selected):hover {\n background: #014fc5;\n color: #fff;\n }\n\n /* SubMenu title hover - should be blue on hover */\n .ant-menu-submenu-title:hover {\n background: #014fc5 !important;\n color: #fff !important;\n padding: 24px !important;\n }\n\n /* Nested items hover - should be bold black when hovered */\n .ant-menu-submenu .ant-menu-item:hover {\n background: transparent !important;\n color: #000 !important;\n font-weight: bold !important;\n border-radius: 0;\n }\n\n /* Make Orders parent blue when hovering over submenu items */\n .ant-menu-submenu:hover .ant-menu-submenu-title {\n background: #014fc5 !important;\n color: #fff !important;\n padding: 24px !important;\n }\n\n .ant-menu-light.ant-menu-root.ant-menu-inline {\n border: none;\n }\n\n /* SubMenu arrow styling */\n .ant-menu-submenu-arrow {\n color: inherit;\n }\n\n /* SubMenu content area */\n .ant-menu-sub {\n background: transparent !important;\n padding: 8px 0;\n }\n\n /* Remove default SubMenu styling */\n .ant-menu-submenu .ant-menu-sub {\n background: transparent !important;\n box-shadow: none !important;\n }\n\n .notShowInDesktop {\n display: none;\n }\n\n @media only screen and (max-width: 600px) {\n .oaLeftLayouts {\n background: #fff;\n padding: 16px;\n }\n .logoContainer {\n padding: 0;\n align-items: center;\n }\n\n .notShowInMobile {\n display: none;\n }\n .notShowInDesktop {\n display: flex;\n }\n\n .oaLeftLayouts .ant-layout-sider {\n max-width: none !important;\n width: 100% !important;\n }\n p.ant-dropdown-trigger {\n margin-bottom: 0;\n }\n }\n"])));
|
|
12
12
|
const ProfileIcon = exports.ProfileIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 36px;\n height: 36px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--color-primary);\n\n &:hover {\n transform: scale(1.05);\n }\n"])));
|
|
13
13
|
var _default = exports.default = OalayoutStyle;
|