oa-componentbook 1.0.1-stage.36 → 1.0.1-stage.360
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-checkbox/CustomCheckBox.js +20 -17
- package/build/components/oa-component-checkbox/styles.js +1 -1
- package/build/components/oa-component-datepicker/CustomDatePicker.js +25 -22
- package/build/components/oa-component-drawer/CustomDrawer.js +2 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +16 -4
- package/build/components/oa-component-icons/MaterialIcon.js +1 -1
- package/build/components/oa-component-modal/styles.js +3 -2
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-select/CustomSelect.js +116 -56
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +28 -5
- package/build/components/oa-component-table/CustomTableV1.js +520 -0
- package/build/components/oa-component-table/styles.js +1 -1
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-tabs/CustomTabs.js +1 -1
- package/build/components/oa-component-tag/CustomTag.js +17 -5
- package/build/components/oa-component-tag/styles.js +30 -3
- package/build/components/oa-component-textarea/{TextArea.js → CustomTextArea.js} +4 -4
- package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
- package/build/components/oa-component-upload/CustomUpload.js +120 -40
- package/build/components/oa-component-viewer/CustomViewer.js +3 -1
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-upload/CustomUpload.js +3 -0
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/global-css/GlobalCss.js +2 -1
- package/build/global-css/GridLayout.js +1 -1
- package/build/global-css/commonStyles.js +11 -0
- package/build/images/Car.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/index.js +100 -2
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2275 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +84 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +85 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +290 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +22 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +519 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +73 -12
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +51 -7
- package/build/widgets/oa-widget-address/AddressWidget.js +12 -17
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +481 -0
- package/build/widgets/oa-widget-approval/styles.js +2 -2
- package/build/widgets/oa-widget-chat/ChatWidget.js +5 -5
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +17 -5
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +399 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +5 -5
- package/build/widgets/oa-widget-detailcard/styles.js +1 -1
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -9
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +56 -19
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +1 -1
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +257 -0
- package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +77 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +37 -10
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +21 -7
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +32 -5
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +9 -3
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +17 -2
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +14 -3
- package/build/widgets/oa-widget-membershipcard/styles.js +1 -1
- package/build/widgets/oa-widget-notes/NotesWidget.js +2 -1
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +392 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +18 -9
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +1 -1
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +87 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +30 -0
- package/build/widgets/oa-widget-sidebar/sidebar.css +0 -0
- package/build/widgets/oa-widget-sidebar/styles.js +12 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +57 -29
- package/build/widgets/oa-widget-track-shipment-list/fn.js +16 -4
- package/package.json +4 -2
|
@@ -12,7 +12,8 @@ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorV
|
|
|
12
12
|
var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
|
|
13
13
|
var _styles = require("./styles");
|
|
14
14
|
var _utils = require("../../utils");
|
|
15
|
-
const _excluded = ["data-test", "label", "onChange", "size"];
|
|
15
|
+
const _excluded = ["data-test", "label", "onChange", "size", "className"];
|
|
16
|
+
/* eslint-disable */
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
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); }
|
|
18
19
|
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; }
|
|
@@ -32,14 +33,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
32
33
|
*/
|
|
33
34
|
const getCheckboxTheme = () => ({
|
|
34
35
|
token: {
|
|
35
|
-
colorTextDisabled: _ColorVariablesMap.default[
|
|
36
|
-
colorPrimaryHover: _ColorVariablesMap.default[
|
|
37
|
-
colorPrimary: _ColorVariablesMap.default[
|
|
38
|
-
colorBgContainerDisabled: _ColorVariablesMap.default[
|
|
39
|
-
colorBorder: _ColorVariablesMap.default[
|
|
40
|
-
colorText: _ColorVariablesMap.default[
|
|
41
|
-
borderRadiusSM:
|
|
42
|
-
paddingXS:
|
|
36
|
+
colorTextDisabled: _ColorVariablesMap.default["--color-disabled-button"],
|
|
37
|
+
colorPrimaryHover: _ColorVariablesMap.default["--color-primary"],
|
|
38
|
+
colorPrimary: _ColorVariablesMap.default["--color-primary"],
|
|
39
|
+
colorBgContainerDisabled: _ColorVariablesMap.default["--color-secondary-background"],
|
|
40
|
+
colorBorder: _ColorVariablesMap.default["--color-secondary-content"],
|
|
41
|
+
colorText: _ColorVariablesMap.default["--color-primary-content"],
|
|
42
|
+
borderRadiusSM: "2px",
|
|
43
|
+
paddingXS: "12px"
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
|
|
@@ -64,10 +65,11 @@ const getCheckboxTheme = () => ({
|
|
|
64
65
|
exports.getCheckboxTheme = getCheckboxTheme;
|
|
65
66
|
function CustomCheckBox(_ref) {
|
|
66
67
|
let {
|
|
67
|
-
|
|
68
|
+
"data-test": dataTest,
|
|
68
69
|
label,
|
|
69
70
|
onChange,
|
|
70
|
-
size
|
|
71
|
+
size,
|
|
72
|
+
className
|
|
71
73
|
/*
|
|
72
74
|
Instead of keeping a `checked` prop explicitly,
|
|
73
75
|
we keep it optional by directly passing extra props to the antd component.
|
|
@@ -82,12 +84,13 @@ function CustomCheckBox(_ref) {
|
|
|
82
84
|
return /*#__PURE__*/_react.default.createElement(_styles.StyleContainer, null, /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
83
85
|
theme: getCheckboxTheme()
|
|
84
86
|
}, /*#__PURE__*/_react.default.createElement(_antd.Checkbox, _extends({
|
|
87
|
+
className: className !== null && className !== void 0 ? className : "",
|
|
85
88
|
"data-test": dataTest,
|
|
86
89
|
onChange: handleChange
|
|
87
90
|
}, antDesignProps),
|
|
88
91
|
// The label is a string or a number
|
|
89
92
|
((0, _utils.isString)(label) || (0, _utils.isNumber)(label)) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
90
|
-
typography: size ===
|
|
93
|
+
typography: size === "large" ? "type-b1-400" : "type-b2-400"
|
|
91
94
|
}, label) ||
|
|
92
95
|
// The label is a node
|
|
93
96
|
/*#__PURE__*/_react.default.isValidElement(label) && label || undefined)));
|
|
@@ -96,17 +99,17 @@ function CustomCheckBox(_ref) {
|
|
|
96
99
|
// This allows us referencing the Group container in our Checkbox component
|
|
97
100
|
CustomCheckBox.Group = _antd.Checkbox.Group;
|
|
98
101
|
CustomCheckBox.propTypes = {
|
|
99
|
-
|
|
102
|
+
"data-test": _propTypes.default.string,
|
|
100
103
|
label: _propTypes.default.node,
|
|
101
104
|
onChange: _propTypes.default.func,
|
|
102
|
-
size: _propTypes.default.oneOf([
|
|
105
|
+
size: _propTypes.default.oneOf(["large", "small"]),
|
|
103
106
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool])
|
|
104
107
|
};
|
|
105
108
|
CustomCheckBox.defaultProps = {
|
|
106
|
-
|
|
109
|
+
"data-test": null,
|
|
107
110
|
label: null,
|
|
108
111
|
onChange: value => {},
|
|
109
|
-
size:
|
|
110
|
-
value:
|
|
112
|
+
size: "small",
|
|
113
|
+
value: ""
|
|
111
114
|
};
|
|
112
115
|
var _default = exports.default = CustomCheckBox;
|
|
@@ -9,4 +9,4 @@ var _templateObject;
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
11
|
var _default = exports.default = {};
|
|
12
|
-
const StyleContainer = exports.StyleContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-checkbox-wrapper .ant-checkbox {\n align-self: start;\n margin: 2px 0 0 0
|
|
12
|
+
const StyleContainer = exports.StyleContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-checkbox-wrapper .ant-checkbox {\n align-self: start;\n margin: 2px 0 0 0; \n}\n"])));
|
|
@@ -14,8 +14,9 @@ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorV
|
|
|
14
14
|
var _TypographiesMap = _interopRequireDefault(require("../../global-css/TypographiesMap"));
|
|
15
15
|
require("antd/dist/reset.css");
|
|
16
16
|
var _MaterialIcon = _interopRequireDefault(require("../oa-component-icons/MaterialIcon"));
|
|
17
|
-
const _excluded = ["data-test"];
|
|
17
|
+
const _excluded = ["data-test", "disabledDateFunction"];
|
|
18
18
|
var _templateObject;
|
|
19
|
+
/* eslint-disable */
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
21
|
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); }
|
|
21
22
|
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; }
|
|
@@ -37,7 +38,8 @@ const FullWidthDatePicker = (0, _styledComponents.default)(_antd.DatePicker)(_te
|
|
|
37
38
|
*/
|
|
38
39
|
function CustomDatePicker(_ref) {
|
|
39
40
|
let {
|
|
40
|
-
|
|
41
|
+
"data-test": dataTest,
|
|
42
|
+
disabledDateFunction
|
|
41
43
|
} = _ref,
|
|
42
44
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
45
|
return /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
@@ -65,7 +67,7 @@ function CustomDatePicker(_ref) {
|
|
|
65
67
|
}
|
|
66
68
|
},
|
|
67
69
|
token: {
|
|
68
|
-
lineHeight: _TypographiesMap.default[
|
|
70
|
+
lineHeight: _TypographiesMap.default["type-b2-400"]["line-height"] / _TypographiesMap.default["type-b2-400"]["font-size"],
|
|
69
71
|
paddingBlockLG: 50,
|
|
70
72
|
paddingXS: 16,
|
|
71
73
|
// Used to control margin of calendar icon
|
|
@@ -77,31 +79,31 @@ function CustomDatePicker(_ref) {
|
|
|
77
79
|
// height of small text field
|
|
78
80
|
// controlHeightLG: 64,
|
|
79
81
|
borderRadius: 4,
|
|
80
|
-
colorPrimary: _ColorVariablesMap.default[
|
|
82
|
+
colorPrimary: _ColorVariablesMap.default["--color-primary"],
|
|
81
83
|
// for active color of input
|
|
82
|
-
colorPrimaryHover: _ColorVariablesMap.default[
|
|
84
|
+
colorPrimaryHover: _ColorVariablesMap.default["--color-primary"],
|
|
83
85
|
// for hover color of input
|
|
84
|
-
colorBgContainerDisabled: _ColorVariablesMap.default[
|
|
85
|
-
colorBorder: _ColorVariablesMap.default[
|
|
86
|
+
colorBgContainerDisabled: _ColorVariablesMap.default["--color-divider"],
|
|
87
|
+
colorBorder: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
86
88
|
// border color of input text field
|
|
87
|
-
colorTextDisabled: _ColorVariablesMap.default[
|
|
89
|
+
colorTextDisabled: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
88
90
|
// Color of disabled text.
|
|
89
|
-
colorTextPlaceholder: _ColorVariablesMap.default[
|
|
91
|
+
colorTextPlaceholder: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
90
92
|
// Color of placeholder text
|
|
91
|
-
colorTextQuaternary: _ColorVariablesMap.default[
|
|
93
|
+
colorTextQuaternary: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
92
94
|
// color of disabled calendar icon
|
|
93
|
-
colorText: _ColorVariablesMap.default[
|
|
95
|
+
colorText: _ColorVariablesMap.default["--color-primary-content"],
|
|
94
96
|
// Text color
|
|
95
|
-
colorIcon: _ColorVariablesMap.default[
|
|
97
|
+
colorIcon: _ColorVariablesMap.default["--color-primary"],
|
|
96
98
|
// Color of arrows icons beside month and year in datepicker
|
|
97
|
-
colorIconHover: _ColorVariablesMap.default[
|
|
99
|
+
colorIconHover: _ColorVariablesMap.default["--color-primary-hover"],
|
|
98
100
|
// Hover color of arrows icons beside month and year in datepicker
|
|
99
101
|
|
|
100
|
-
colorLink: _ColorVariablesMap.default[
|
|
101
|
-
colorLinkHover: _ColorVariablesMap.default[
|
|
102
|
-
colorError: _ColorVariablesMap.default[
|
|
102
|
+
colorLink: _ColorVariablesMap.default["--color-primary"],
|
|
103
|
+
colorLinkHover: _ColorVariablesMap.default["--color-primary-hover"],
|
|
104
|
+
colorError: _ColorVariablesMap.default["--color-negative"],
|
|
103
105
|
// Error color
|
|
104
|
-
colorErrorBorderHover: _ColorVariablesMap.default[
|
|
106
|
+
colorErrorBorderHover: _ColorVariablesMap.default["--color-negative"] // Hover error color should be same as error color
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
}, /*#__PURE__*/_react.default.createElement(FullWidthDatePicker, _extends({
|
|
@@ -110,14 +112,15 @@ function CustomDatePicker(_ref) {
|
|
|
110
112
|
suffixIcon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
111
113
|
icon: _CalendarTodayRounded.default,
|
|
112
114
|
size: 20
|
|
113
|
-
})
|
|
115
|
+
}),
|
|
116
|
+
disabledDate: disabledDateFunction
|
|
114
117
|
}, props)));
|
|
115
118
|
}
|
|
116
119
|
CustomDatePicker.propTypes = {
|
|
117
|
-
|
|
118
|
-
size: _propTypes.default.oneOf([
|
|
120
|
+
"data-test": _propTypes.default.string,
|
|
121
|
+
size: _propTypes.default.oneOf(["small", "middle"])
|
|
119
122
|
};
|
|
120
123
|
CustomDatePicker.defaultProps = {
|
|
121
|
-
|
|
122
|
-
size:
|
|
124
|
+
"data-test": null,
|
|
125
|
+
size: "middle"
|
|
123
126
|
};
|
|
@@ -114,11 +114,13 @@ function CustomDrawer(_ref) {
|
|
|
114
114
|
title: isBaseDrawer ? /*#__PURE__*/_react.default.createElement(_styles.BaseDrawerTitle, null, DrawerTitle(title), /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
115
115
|
color: "primary-content",
|
|
116
116
|
icon: _CloseRounded.default,
|
|
117
|
+
className: "drawerCloseRoundedIcon",
|
|
117
118
|
onClick: handleClose,
|
|
118
119
|
size: 20,
|
|
119
120
|
"data-test": dataTest ? "".concat(dataTest, "--close-drawer-button") : undefined
|
|
120
121
|
})) : /*#__PURE__*/_react.default.createElement(_styles.LayeredDrawerTitle, null, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
121
122
|
color: "primary-content",
|
|
123
|
+
className: "drawerCloseRoundedIcon",
|
|
122
124
|
icon: _ArrowBackIosRounded.default,
|
|
123
125
|
onClick: handleClose,
|
|
124
126
|
size: 20,
|
|
@@ -36,7 +36,8 @@ function CustomDropdown(_ref) {
|
|
|
36
36
|
firstLetterIcon,
|
|
37
37
|
trigger,
|
|
38
38
|
placement,
|
|
39
|
-
type
|
|
39
|
+
type,
|
|
40
|
+
onMenuItemClick
|
|
40
41
|
// dropDownHeading,
|
|
41
42
|
} = _ref;
|
|
42
43
|
const firstLetter = (displayText === null || displayText === void 0 || (_displayText$split = displayText.split(' ')) === null || _displayText$split === void 0 || (_displayText$split = _displayText$split[1]) === null || _displayText$split === void 0 ? void 0 : _displayText$split.charAt(0).toUpperCase()) || 'H'; // Extract the first letter after Hi.
|
|
@@ -52,7 +53,16 @@ function CustomDropdown(_ref) {
|
|
|
52
53
|
}
|
|
53
54
|
}, /*#__PURE__*/_react.default.createElement(_styles.default, null, firstLetterIcon && firstLetter && /*#__PURE__*/_react.default.createElement("small", null, firstLetter), /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
54
55
|
menu: {
|
|
55
|
-
items
|
|
56
|
+
items,
|
|
57
|
+
onClick: _ref2 => {
|
|
58
|
+
let {
|
|
59
|
+
key
|
|
60
|
+
} = _ref2;
|
|
61
|
+
const clickedItem = items.find(item => item.key === key);
|
|
62
|
+
if (clickedItem) {
|
|
63
|
+
onMenuItemClick(clickedItem);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
56
66
|
},
|
|
57
67
|
trigger: trigger,
|
|
58
68
|
placement: placement,
|
|
@@ -69,7 +79,8 @@ CustomDropdown.propTypes = {
|
|
|
69
79
|
firstLetterIcon: _propTypes.default.bool,
|
|
70
80
|
trigger: _propTypes.default.string,
|
|
71
81
|
placement: _propTypes.default.string,
|
|
72
|
-
type: _propTypes.default.string
|
|
82
|
+
type: _propTypes.default.string,
|
|
83
|
+
onMenuItemClick: _propTypes.default.func
|
|
73
84
|
// dropDownHeading: PropTypes.string,
|
|
74
85
|
};
|
|
75
86
|
CustomDropdown.defaultProps = {
|
|
@@ -85,6 +96,7 @@ CustomDropdown.defaultProps = {
|
|
|
85
96
|
firstLetterIcon: false,
|
|
86
97
|
trigger: ['click'],
|
|
87
98
|
placement: 'bottomRight',
|
|
88
|
-
type: 'default'
|
|
99
|
+
type: 'default',
|
|
100
|
+
onMenuItemClick: () => {}
|
|
89
101
|
// dropDownHeading: '',
|
|
90
102
|
};
|
|
@@ -39,7 +39,7 @@ function MaterialIcon(_ref) {
|
|
|
39
39
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
40
|
const renderedIcon = /*#__PURE__*/_react.default.createElement(Icon, _extends({
|
|
41
41
|
style: _objectSpread({
|
|
42
|
-
color: color ? _ColorVariablesMap.default["--color-".concat(color)] : undefined,
|
|
42
|
+
color: color && _ColorVariablesMap.default["--color-".concat(color)] ? _ColorVariablesMap.default["--color-".concat(color)] : color || undefined,
|
|
43
43
|
fontSize: size ? "".concat(size, "px") : 'inherit',
|
|
44
44
|
transition: 'transform .3s ease',
|
|
45
45
|
transform: "rotate(".concat(rotate, "deg)")
|
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TitleContainer = exports.DescriptionContainer = exports.ButtonContainer = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3;
|
|
9
|
+
/* eslint-disable */
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
const ButtonContainer = exports.ButtonContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n justify-content: flex-end;\n margin:
|
|
12
|
+
const ButtonContainer = exports.ButtonContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n justify-content: flex-end;\n margin: 36px 0 0;\n @media (max-width: 768px) {\n justify-content: space-between;\n button{\n width: 100%;\n }\n }\n"])));
|
|
12
13
|
const DescriptionContainer = exports.DescriptionContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 12px 0 0;\n"])));
|
|
13
|
-
const TitleContainer = exports.TitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
14
|
+
const TitleContainer = exports.TitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: 32px 0 0 0;\n display: flex;\n flex-direction: column;\n gap: 16px;\n img {\n height: 36px;\n width: 36px;\n }\n"])));
|
|
@@ -0,0 +1,111 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
|
|
12
|
+
var _TypographiesMap = _interopRequireDefault(require("../../global-css/TypographiesMap"));
|
|
13
|
+
var _styles = require("./styles");
|
|
14
|
+
const _excluded = ["current", "total", "pageSize", "onChange", "onShowSizeChange", "pageSizeOptions", "showSizeChanger", "showQuickJumper", "showTotal", "size", "style"];
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
/**
|
|
20
|
+
* @description A custom wrapper for Ant Design Pagination component with consistent theming.
|
|
21
|
+
* @param {number} current - The current page number (1-based).
|
|
22
|
+
* @param {number} total - The total number of items.
|
|
23
|
+
* @param {number} pageSize - The number of items per page.
|
|
24
|
+
* @param {function} onChange - Callback function when page changes.
|
|
25
|
+
* @param {function} onShowSizeChange - Callback function when page size changes.
|
|
26
|
+
* @param {array} pageSizeOptions - Array of page size options.
|
|
27
|
+
* @param {boolean} showSizeChanger - Whether to show the page size selector.
|
|
28
|
+
* @param {boolean} showQuickJumper - Whether to show the quick jumper input.
|
|
29
|
+
* @param {boolean} showTotal - Whether to show the total items count.
|
|
30
|
+
* @param {string} size - The size of the pagination component.
|
|
31
|
+
* @param {object} style - Custom styles for the component.
|
|
32
|
+
* @param {object} antDesignProps - Additional props to pass to Ant Design Pagination.
|
|
33
|
+
* @returns {JSX.Element} The rendered pagination component.
|
|
34
|
+
*/
|
|
35
|
+
function CustomPagination(_ref) {
|
|
36
|
+
let {
|
|
37
|
+
current = 1,
|
|
38
|
+
total = 0,
|
|
39
|
+
pageSize = 10,
|
|
40
|
+
onChange,
|
|
41
|
+
onShowSizeChange,
|
|
42
|
+
pageSizeOptions = [10, 20, 50, 100],
|
|
43
|
+
showSizeChanger = true,
|
|
44
|
+
showQuickJumper = false,
|
|
45
|
+
showTotal = true,
|
|
46
|
+
size = 'default',
|
|
47
|
+
style
|
|
48
|
+
} = _ref,
|
|
49
|
+
antDesignProps = _objectWithoutProperties(_ref, _excluded);
|
|
50
|
+
const renderTotal = (totalItems, range) => {
|
|
51
|
+
if (!showTotal) return null;
|
|
52
|
+
return "Showing ".concat(range[0], "-").concat(range[1], " of ").concat(totalItems, " items");
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_styles.MainContainer, {
|
|
55
|
+
style: style
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
57
|
+
theme: {
|
|
58
|
+
components: {
|
|
59
|
+
Pagination: {}
|
|
60
|
+
},
|
|
61
|
+
token: {
|
|
62
|
+
colorPrimary: '#014FC5',
|
|
63
|
+
colorPrimaryBorder: '#014FC5',
|
|
64
|
+
colorPrimaryHover: '#82A9E2',
|
|
65
|
+
colorText: '#212121',
|
|
66
|
+
colorTextDisabled: '#BFBFBF',
|
|
67
|
+
colorTextPlaceholder: '#959595',
|
|
68
|
+
borderRadius: 2,
|
|
69
|
+
colorBorder: '#E0E0E0'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Pagination, _extends({
|
|
73
|
+
current: current,
|
|
74
|
+
total: total,
|
|
75
|
+
pageSize: pageSize,
|
|
76
|
+
onChange: onChange,
|
|
77
|
+
onShowSizeChange: onShowSizeChange,
|
|
78
|
+
showSizeChanger: showSizeChanger,
|
|
79
|
+
showQuickJumper: showQuickJumper,
|
|
80
|
+
showTotal: renderTotal,
|
|
81
|
+
pageSizeOptions: pageSizeOptions,
|
|
82
|
+
size: size
|
|
83
|
+
}, antDesignProps))));
|
|
84
|
+
}
|
|
85
|
+
CustomPagination.propTypes = {
|
|
86
|
+
current: _propTypes.default.number,
|
|
87
|
+
total: _propTypes.default.number,
|
|
88
|
+
pageSize: _propTypes.default.number,
|
|
89
|
+
onChange: _propTypes.default.func,
|
|
90
|
+
onShowSizeChange: _propTypes.default.func,
|
|
91
|
+
pageSizeOptions: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
92
|
+
showSizeChanger: _propTypes.default.bool,
|
|
93
|
+
showQuickJumper: _propTypes.default.bool,
|
|
94
|
+
showTotal: _propTypes.default.bool,
|
|
95
|
+
size: _propTypes.default.oneOf(['default', 'small']),
|
|
96
|
+
style: _propTypes.default.object
|
|
97
|
+
};
|
|
98
|
+
CustomPagination.defaultProps = {
|
|
99
|
+
current: 1,
|
|
100
|
+
total: 0,
|
|
101
|
+
pageSize: 10,
|
|
102
|
+
onChange: undefined,
|
|
103
|
+
onShowSizeChange: undefined,
|
|
104
|
+
pageSizeOptions: [10, 20, 50, 100],
|
|
105
|
+
showSizeChanger: true,
|
|
106
|
+
showQuickJumper: false,
|
|
107
|
+
showTotal: true,
|
|
108
|
+
size: 'default',
|
|
109
|
+
style: undefined
|
|
110
|
+
};
|
|
111
|
+
var _default = exports.default = CustomPagination;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.MainContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-pagination-item {\n border: 1px solid #E0E0E0;\n }\n .ant-pagination-item-active {\n border: 1px solid #014FC5;\n }\n .mobile-pagination{margin: 0;padding:0;}\n .ant-pagination-total-text,.ant-pagination-options{display: none;}\n"])));
|
|
12
|
+
var _default = exports.default = {};
|