@3sc/common-component 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +8 -20
  2. package/dist/index.es.js +22242 -0
  3. package/dist/index.es.js.map +1 -0
  4. package/dist/index.umd.js +253 -1
  5. package/dist/index.umd.js.map +1 -1
  6. package/dist/style.css +1 -0
  7. package/dist/vite.svg +1 -0
  8. package/package.json +48 -62
  9. package/dist/App.js +0 -17
  10. package/dist/App.test.js +0 -10
  11. package/dist/components/alert/alert-body.js +0 -155
  12. package/dist/components/alert/details-body.js +0 -128
  13. package/dist/components/alert/index.js +0 -266
  14. package/dist/components/alert/style.scss +0 -166
  15. package/dist/components/alert/table-detail.js +0 -37
  16. package/dist/components/bell.js +0 -45
  17. package/dist/components/index.js +0 -13
  18. package/dist/components/input-field/index.js +0 -67
  19. package/dist/components/my-dialog.js +0 -119
  20. package/dist/components/my-pagination/index.js +0 -54
  21. package/dist/components/my-pagination/logs.js +0 -24
  22. package/dist/components/notification-card/card.js +0 -107
  23. package/dist/components/notification-card/index.js +0 -36
  24. package/dist/components/select-field/index.js +0 -55
  25. package/dist/components/select-field/react-select.js +0 -31
  26. package/dist/components/sort-icon/index.js +0 -26
  27. package/dist/config/axios.js +0 -41
  28. package/dist/config/mui-provider.js +0 -19
  29. package/dist/config/my-context.js +0 -67
  30. package/dist/config/theme.js +0 -22
  31. package/dist/helper/common-fun.js +0 -90
  32. package/dist/index.cjs +0 -2
  33. package/dist/index.cjs.map +0 -1
  34. package/dist/index.css +0 -2
  35. package/dist/index.css.map +0 -1
  36. package/dist/index.esm.mjs +0 -2
  37. package/dist/index.esm.mjs.map +0 -1
  38. package/dist/index.js +0 -2
  39. package/dist/index.js.map +0 -1
  40. package/dist/index.modern.js +0 -2
  41. package/dist/index.modern.js.map +0 -1
  42. package/dist/index.modern.mjs +0 -2
  43. package/dist/index.modern.mjs.map +0 -1
  44. package/dist/index.module.js +0 -2
  45. package/dist/index.module.js.map +0 -1
  46. package/dist/modules/common-component +0 -2
  47. package/dist/modules/common-component.cjs +0 -2
  48. package/dist/modules/common-component.cjs.map +0 -1
  49. package/dist/modules/common-component.css +0 -2
  50. package/dist/modules/common-component.css.map +0 -1
  51. package/dist/modules/common-component.map +0 -1
  52. package/dist/modules/common-component.modern.js +0 -2
  53. package/dist/modules/common-component.modern.js.map +0 -1
  54. package/dist/modules/common-component.umd.js +0 -2
  55. package/dist/modules/common-component.umd.js.map +0 -1
  56. package/dist/modules/index.js +0 -12
  57. package/dist/modules/notification.js +0 -20
  58. package/dist/reportWebVitals.js +0 -30
  59. package/dist/sass/_base.scss +0 -271
  60. package/dist/sass/_colors.scss +0 -7
  61. package/dist/sass/_typography.scss +0 -1
  62. package/dist/sass/fonts/montserrat-v25-latin-300.eot +0 -0
  63. package/dist/sass/fonts/montserrat-v25-latin-300.svg +0 -326
  64. package/dist/sass/fonts/montserrat-v25-latin-300.ttf +0 -0
  65. package/dist/sass/fonts/montserrat-v25-latin-300.woff +0 -0
  66. package/dist/sass/fonts/montserrat-v25-latin-300.woff2 +0 -0
  67. package/dist/sass/fonts/montserrat-v25-latin-500.eot +0 -0
  68. package/dist/sass/fonts/montserrat-v25-latin-500.svg +0 -328
  69. package/dist/sass/fonts/montserrat-v25-latin-500.ttf +0 -0
  70. package/dist/sass/fonts/montserrat-v25-latin-500.woff +0 -0
  71. package/dist/sass/fonts/montserrat-v25-latin-500.woff2 +0 -0
  72. package/dist/sass/fonts/montserrat-v25-latin-600.eot +0 -0
  73. package/dist/sass/fonts/montserrat-v25-latin-600.svg +0 -329
  74. package/dist/sass/fonts/montserrat-v25-latin-600.ttf +0 -0
  75. package/dist/sass/fonts/montserrat-v25-latin-600.woff +0 -0
  76. package/dist/sass/fonts/montserrat-v25-latin-600.woff2 +0 -0
  77. package/dist/sass/fonts/montserrat-v25-latin-700.eot +0 -0
  78. package/dist/sass/fonts/montserrat-v25-latin-700.svg +0 -329
  79. package/dist/sass/fonts/montserrat-v25-latin-700.ttf +0 -0
  80. package/dist/sass/fonts/montserrat-v25-latin-700.woff +0 -0
  81. package/dist/sass/fonts/montserrat-v25-latin-700.woff2 +0 -0
  82. package/dist/sass/fonts/montserrat-v25-latin-800.eot +0 -0
  83. package/dist/sass/fonts/montserrat-v25-latin-800.svg +0 -329
  84. package/dist/sass/fonts/montserrat-v25-latin-800.ttf +0 -0
  85. package/dist/sass/fonts/montserrat-v25-latin-800.woff +0 -0
  86. package/dist/sass/fonts/montserrat-v25-latin-800.woff2 +0 -0
  87. package/dist/sass/fonts/montserrat-v25-latin-regular.eot +0 -0
  88. package/dist/sass/fonts/montserrat-v25-latin-regular.svg +0 -327
  89. package/dist/sass/fonts/montserrat-v25-latin-regular.ttf +0 -0
  90. package/dist/sass/fonts/montserrat-v25-latin-regular.woff +0 -0
  91. package/dist/sass/fonts/montserrat-v25-latin-regular.woff2 +0 -0
  92. package/dist/sass/fonts/poppins-v20-latin-300.eot +0 -0
  93. package/dist/sass/fonts/poppins-v20-latin-300.svg +0 -321
  94. package/dist/sass/fonts/poppins-v20-latin-300.ttf +0 -0
  95. package/dist/sass/fonts/poppins-v20-latin-300.woff +0 -0
  96. package/dist/sass/fonts/poppins-v20-latin-300.woff2 +0 -0
  97. package/dist/sass/fonts/poppins-v20-latin-500.eot +0 -0
  98. package/dist/sass/fonts/poppins-v20-latin-500.svg +0 -323
  99. package/dist/sass/fonts/poppins-v20-latin-500.ttf +0 -0
  100. package/dist/sass/fonts/poppins-v20-latin-500.woff +0 -0
  101. package/dist/sass/fonts/poppins-v20-latin-500.woff2 +0 -0
  102. package/dist/sass/fonts/poppins-v20-latin-600.eot +0 -0
  103. package/dist/sass/fonts/poppins-v20-latin-600.svg +0 -322
  104. package/dist/sass/fonts/poppins-v20-latin-600.ttf +0 -0
  105. package/dist/sass/fonts/poppins-v20-latin-600.woff +0 -0
  106. package/dist/sass/fonts/poppins-v20-latin-600.woff2 +0 -0
  107. package/dist/sass/fonts/poppins-v20-latin-700.eot +0 -0
  108. package/dist/sass/fonts/poppins-v20-latin-700.svg +0 -322
  109. package/dist/sass/fonts/poppins-v20-latin-700.ttf +0 -0
  110. package/dist/sass/fonts/poppins-v20-latin-700.woff +0 -0
  111. package/dist/sass/fonts/poppins-v20-latin-700.woff2 +0 -0
  112. package/dist/sass/fonts/poppins-v20-latin-800.eot +0 -0
  113. package/dist/sass/fonts/poppins-v20-latin-800.svg +0 -320
  114. package/dist/sass/fonts/poppins-v20-latin-800.ttf +0 -0
  115. package/dist/sass/fonts/poppins-v20-latin-800.woff +0 -0
  116. package/dist/sass/fonts/poppins-v20-latin-800.woff2 +0 -0
  117. package/dist/sass/fonts/poppins-v20-latin-regular.eot +0 -0
  118. package/dist/sass/fonts/poppins-v20-latin-regular.svg +0 -323
  119. package/dist/sass/fonts/poppins-v20-latin-regular.ttf +0 -0
  120. package/dist/sass/fonts/poppins-v20-latin-regular.woff +0 -0
  121. package/dist/sass/fonts/poppins-v20-latin-regular.woff2 +0 -0
  122. package/dist/sass/main.scss +0 -3
  123. package/dist/services/notification.js +0 -47
  124. package/dist/setupTests.js +0 -3
  125. package/dist/utils/ActionType.js +0 -13
  126. package/dist/utils/Constant.js +0 -54
  127. package/dist/utils/EndPoint.js +0 -10
  128. package/dist/utils/Env.js +0 -14
  129. package/dist/utils/ErrorMsg.js +0 -14
  130. package/dist/utils/LocalStorage.js +0 -17
  131. package/dist/utils/StatusCode.js +0 -16
@@ -1,266 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.symbol.description.js");
4
- require("core-js/modules/es.weak-map.js");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- require("core-js/modules/web.dom-collections.iterator.js");
10
- require("core-js/modules/es.promise.js");
11
- require("core-js/modules/es.array.includes.js");
12
- require("core-js/modules/es.string.includes.js");
13
- var _react = _interopRequireWildcard(require("react"));
14
- var _material = require("@mui/material");
15
- var _bell = _interopRequireDefault(require("../bell"));
16
- var _myDialog = _interopRequireDefault(require("../my-dialog"));
17
- require("./style.scss");
18
- var _myContext = require("../../config/my-context");
19
- var _notification = require("../../services/notification");
20
- var _StatusCode = _interopRequireDefault(require("../../utils/StatusCode"));
21
- var _notificationCard = _interopRequireDefault(require("../notification-card"));
22
- var _commonFun = require("../../helper/common-fun");
23
- var _ActionType = _interopRequireDefault(require("../../utils/ActionType"));
24
- var _ErrorMsg = _interopRequireDefault(require("../../utils/ErrorMsg"));
25
- var _Constant = require("../../utils/Constant");
26
- var _alertBody = _interopRequireDefault(require("./alert-body"));
27
- var _detailsBody = _interopRequireDefault(require("./details-body"));
28
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
- 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); }
30
- 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; }
31
- 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; }
32
- 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; }
33
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
34
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
35
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
36
- const Alert = _ref => {
37
- let {
38
- baseURL
39
- } = _ref;
40
- const dispatch = (0, _react.useContext)(_myContext.TasksDispatchContext);
41
- const {
42
- loading,
43
- data,
44
- isMarkAllAsRead
45
- } = (0, _react.useContext)(_myContext.TasksContext);
46
- const [open, setOpen] = (0, _react.useState)(false);
47
- const [showAllAlert, setShowAllAlert] = (0, _react.useState)(false);
48
- const [showDetails, setShowDetails] = (0, _react.useState)(false);
49
- const [detailsData, setDetailsData] = (0, _react.useState)({});
50
- const isEmpty = data.length === 0;
51
- const fetchNotification = (0, _react.useCallback)(async () => {
52
- dispatch({
53
- type: _ActionType.default.LOADING,
54
- loading: true
55
- });
56
- dispatch({
57
- type: _ActionType.default.SUCCESS,
58
- data: []
59
- });
60
- dispatch({
61
- type: _ActionType.default.MARK_ALL_AS_READ,
62
- isMarkAllAsRead: {
63
- count: 0,
64
- boo: false
65
- }
66
- });
67
- try {
68
- const res = await (0, _notification.getNotification)(baseURL);
69
- if (res.status === _StatusCode.default.OK) {
70
- var _res$data, _res$data2;
71
- dispatch({
72
- type: _ActionType.default.SUCCESS,
73
- data: ((_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.responseData) === null || _res$data === void 0 ? void 0 : _res$data.response) || []
74
- });
75
- const isMarkAll = (0, _commonFun.detectMarkAllAsRead)(((_res$data2 = res.data) === null || _res$data2 === void 0 || (_res$data2 = _res$data2.responseData) === null || _res$data2 === void 0 ? void 0 : _res$data2.response) || []);
76
- dispatch({
77
- type: _ActionType.default.MARK_ALL_AS_READ,
78
- isMarkAllAsRead: {
79
- count: isMarkAll,
80
- boo: isMarkAll > 0
81
- }
82
- });
83
- }
84
- } catch (err) {
85
- dispatch({
86
- type: _ActionType.default.ERROR,
87
- error: _ErrorMsg.default.SWR
88
- });
89
- } finally {
90
- dispatch({
91
- type: _ActionType.default.LOADING,
92
- loading: false
93
- });
94
- }
95
- }, [dispatch]);
96
- (0, _react.useEffect)(() => {
97
- fetchNotification();
98
- }, [fetchNotification]);
99
- const handleOpen = () => setOpen(!open);
100
- const handleClose = () => setOpen(!open);
101
- const handleShowAllAlert = () => setShowAllAlert(!showAllAlert);
102
- const handleHideAllAlert = () => setShowAllAlert(!showAllAlert);
103
- const handleOpenDetails = () => setShowDetails(!showDetails);
104
- const handleHideDetails = () => setShowDetails(!showDetails);
105
- const handleRefresh = () => {
106
- fetchNotification();
107
- };
108
- const handleShowAll = () => {
109
- handleShowAllAlert();
110
- };
111
- const handleShowDetails = id => {
112
- const filterData = data.find(item => item.id === id);
113
- setDetailsData(filterData);
114
- handleOpenDetails();
115
- };
116
-
117
- // mark as read function
118
- const handleRead = async id => {
119
- if (id.length === 0) return;
120
- dispatch({
121
- type: _ActionType.default.LOADING,
122
- loading: true
123
- });
124
- try {
125
- const res = await (0, _notification.putNotification)(baseURL, id);
126
- if (res.status === _StatusCode.default.OK) {
127
- let count = 0;
128
- const newData = data.map(item => {
129
- if (!item.isRead) count++;
130
- if (id.includes(item.id)) {
131
- return _objectSpread(_objectSpread({}, item), {}, {
132
- isRead: true
133
- });
134
- }
135
- return item;
136
- });
137
- dispatch({
138
- type: _ActionType.default.MARK_ALL_AS_READ,
139
- isMarkAllAsRead: {
140
- count: count,
141
- boo: count > 0
142
- }
143
- });
144
- dispatch({
145
- type: _ActionType.default.SUCCESS,
146
- data: newData
147
- });
148
- }
149
- } catch (e) {
150
- dispatch({
151
- type: _ActionType.default.ERROR,
152
- error: _ErrorMsg.default.SWR
153
- });
154
- } finally {
155
- dispatch({
156
- type: _ActionType.default.LOADING,
157
- loading: false
158
- });
159
- }
160
- };
161
-
162
- // mark all as read function
163
- const handleMarkAllAsRead = async () => {
164
- const payload = (0, _commonFun.createPayloadMarkAllAsRead)(data);
165
- dispatch({
166
- type: _ActionType.default.LOADING,
167
- loading: true
168
- });
169
- try {
170
- const res = await (0, _notification.putNotification)(baseURL, payload);
171
- if (res.status === _StatusCode.default.OK) {
172
- const newData = data.map(item => {
173
- return _objectSpread(_objectSpread({}, item), {}, {
174
- isRead: true
175
- });
176
- });
177
- dispatch({
178
- type: _ActionType.default.SUCCESS,
179
- data: newData
180
- });
181
- dispatch({
182
- type: _ActionType.default.MARK_ALL_AS_READ,
183
- isMarkAllAsRead: {
184
- count: 0,
185
- boo: false
186
- }
187
- });
188
- }
189
- } catch (e) {
190
- dispatch({
191
- type: _ActionType.default.ERROR,
192
- error: _ErrorMsg.default.SWR
193
- });
194
- } finally {
195
- dispatch({
196
- type: _ActionType.default.LOADING,
197
- loading: false
198
- });
199
- }
200
- };
201
- return /*#__PURE__*/_react.default.createElement(_material.Box, null, /*#__PURE__*/_react.default.createElement(_material.Box, {
202
- sx: {
203
- display: "flex",
204
- justifyContent: "center"
205
- }
206
- }, /*#__PURE__*/_react.default.createElement(_bell.default, {
207
- count: isMarkAllAsRead.count,
208
- handleClick: handleOpen
209
- })), /*#__PURE__*/_react.default.createElement(_myDialog.default, {
210
- title: "Alerts",
211
- open: open,
212
- loading: loading,
213
- isMarkAllAsRead: isMarkAllAsRead,
214
- onClose: handleClose,
215
- onRefresh: handleRefresh,
216
- handleShowAll: handleShowAll,
217
- handleMarkAllAsRead: handleMarkAllAsRead,
218
- headerIconType: _Constant.HEADER_ICON_TYPE.REFRESH,
219
- isDialogActionShow: true,
220
- className: "alert-dialog-main"
221
- }, /*#__PURE__*/_react.default.createElement(_material.DialogContent, {
222
- dividers: true
223
- }, /*#__PURE__*/_react.default.createElement(_material.Box, {
224
- sx: loading || isEmpty ? {
225
- display: "flex",
226
- justifyContent: "center",
227
- alignItems: "center",
228
- height: 320
229
- } : {
230
- height: 320
231
- }
232
- }, loading ? /*#__PURE__*/_react.default.createElement(_material.CircularProgress, null) : isEmpty ? /*#__PURE__*/_react.default.createElement(_material.Typography, {
233
- className: "no-record"
234
- }, _ErrorMsg.default.NRF) : /*#__PURE__*/_react.default.createElement(_notificationCard.default, {
235
- data: (0, _commonFun.filterAlertData)(data),
236
- handleRead: handleRead,
237
- handleShowDetails: handleShowDetails
238
- })))), /*#__PURE__*/_react.default.createElement(_myDialog.default, {
239
- title: "Alerts",
240
- open: showAllAlert,
241
- loading: loading,
242
- onClose: handleHideAllAlert,
243
- onRefresh: handleRefresh,
244
- headerIconType: _Constant.HEADER_ICON_TYPE.CLOSE,
245
- className: "alert-dialog"
246
- }, /*#__PURE__*/_react.default.createElement(_alertBody.default, {
247
- loading: loading,
248
- isEmpty: isEmpty,
249
- data: data,
250
- handleRefresh: handleRefresh,
251
- handleShowDetails: handleShowDetails,
252
- handleRead: handleRead
253
- })), /*#__PURE__*/_react.default.createElement(_myDialog.default, {
254
- title: detailsData === null || detailsData === void 0 ? void 0 : detailsData.message,
255
- subTitle: detailsData === null || detailsData === void 0 ? void 0 : detailsData.remark,
256
- open: showDetails,
257
- onClose: handleHideDetails,
258
- headerIconType: _Constant.HEADER_ICON_TYPE.CLOSE,
259
- className: "alert-dialog"
260
- }, /*#__PURE__*/_react.default.createElement(_detailsBody.default, {
261
- loading: loading,
262
- isEmpty: isEmpty,
263
- data: (detailsData === null || detailsData === void 0 ? void 0 : detailsData.notificationDetails) || []
264
- })));
265
- };
266
- var _default = exports.default = Alert;
@@ -1,166 +0,0 @@
1
- @import "../../sass/main.scss";
2
- .notification-dialog {
3
- .title {
4
- color: $secondary-color;
5
- font-family: Montserrat, sans-serif;
6
- font-size: 1.6rem;
7
- font-weight: 600;
8
- width: 95%;
9
- line-height: 1.2;
10
- }
11
-
12
- .sub-title {
13
- color: $primary-color;
14
- font-weight: 500;
15
- margin-top: 0.5rem;
16
- }
17
-
18
- .dialog-action {
19
- display: flex;
20
- align-items: center;
21
- justify-content: space-between;
22
-
23
- .view-all {
24
- color: $secondary-color;
25
- font-family: Montserrat, sans-serif;
26
- font-weight: 500;
27
- text-transform: initial;
28
- font-size: 1.2rem;
29
- }
30
- }
31
-
32
- .card {
33
- &:not(:last-child) {
34
- border-bottom: 1px solid rgba(0, 0, 0, 0.12);
35
- padding-bottom: 0.5rem;
36
- }
37
- padding: 0.5rem 0;
38
-
39
- .badge {
40
- margin-top: 0.6rem;
41
- }
42
-
43
- .title-card {
44
- color: $secondary-color;
45
- font-family: Montserrat, sans-serif;
46
- font-size: 1rem;
47
- font-weight: 600;
48
- max-height: 2.625rem;
49
- overflow: hidden;
50
- text-overflow: ellipsis;
51
- line-height: 1.2;
52
- display: -webkit-box;
53
- -webkit-line-clamp: 2;
54
- -webkit-box-orient: vertical;
55
- }
56
-
57
- .sub-title {
58
- font-size: 1rem;
59
- color: $light-grey;
60
- font-family: Montserrat, sans-serif;
61
- font-weight: 600;
62
- text-align: right;
63
- margin: 0.2rem 0;
64
- }
65
-
66
- .read {
67
- font-weight: 400;
68
- }
69
- }
70
- }
71
-
72
- .alert-dialog-main {
73
- .MuiPaper-root {
74
- width: 35rem;
75
- }
76
-
77
- .no-record {
78
- font-family: Montserrat, sans-serif;
79
- font-size: 1.2rem;
80
- font-weight: 600;
81
- text-transform: initial;
82
- color: $secondary-color;
83
- text-align: center;
84
- }
85
- }
86
-
87
- .alert-dialog {
88
- .MuiPaper-root {
89
- width: 70rem;
90
- }
91
-
92
- .no-record {
93
- font-family: Montserrat, sans-serif;
94
- font-size: 1.2rem;
95
- font-weight: 600;
96
- text-transform: initial;
97
- color: $secondary-color;
98
- text-align: center;
99
- }
100
-
101
- .sticky-input-select {
102
- display: flex;
103
- flex-direction: row;
104
- align-items: center;
105
- justify-content: space-between;
106
- gap: 1;
107
- position: sticky;
108
- background: #fff;
109
- z-index: 1;
110
- width: 100%;
111
- top: 0;
112
- height: 5rem;
113
- }
114
- }
115
-
116
- .action-show-all-dialog {
117
- .view-all {
118
- font-family: Montserrat, sans-serif;
119
- font-weight: 500;
120
- text-transform: initial;
121
- font-size: 1.2rem;
122
- }
123
- }
124
-
125
- .table {
126
- width: 100%;
127
- border-collapse: collapse;
128
-
129
- tr {
130
- th {
131
- span {
132
- display: flex;
133
- align-items: center;
134
- justify-content: space-between;
135
- gap: 0.5rem;
136
- cursor: pointer;
137
- }
138
- }
139
- }
140
-
141
- th,
142
- td {
143
- border: 0.125rem solid $secondary-color;
144
- font-family: Montserrat, sans-serif;
145
- }
146
-
147
- th {
148
- word-break: break-word;
149
- font-weight: 600;
150
- font-size: 1.3rem;
151
- line-height: 1.5rem;
152
- color: $secondary-color;
153
- background: $table-header;
154
- padding: 0.6rem 1.3125rem;
155
- text-align: left;
156
- vertical-align: middle;
157
- }
158
-
159
- td {
160
- word-break: break-word;
161
- color: $table-td-color;
162
- font-size: 1.1rem;
163
- line-height: 1.25rem;
164
- padding: 0.6rem 1.3125rem;
165
- }
166
- }
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- require("core-js/modules/web.dom-collections.iterator.js");
8
- var _react = _interopRequireDefault(require("react"));
9
- var _Constant = require("../../utils/Constant");
10
- var _sortIcon = _interopRequireDefault(require("../sort-icon"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- const TableDetail = _ref => {
13
- var _Object$entries;
14
- let {
15
- data,
16
- handleSort,
17
- sortDir,
18
- sortKey
19
- } = _ref;
20
- return /*#__PURE__*/_react.default.createElement("table", {
21
- className: "table"
22
- }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, (_Object$entries = Object.entries(_Constant.detailsHeadObj)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map((_ref2, index) => {
23
- let [col, colKey] = _ref2;
24
- return /*#__PURE__*/_react.default.createElement("th", {
25
- key: index
26
- }, /*#__PURE__*/_react.default.createElement("span", {
27
- onClick: () => handleSort(colKey)
28
- }, col, /*#__PURE__*/_react.default.createElement(_sortIcon.default, {
29
- column: colKey,
30
- sortKey: sortKey,
31
- sortDir: sortDir
32
- })));
33
- }))), /*#__PURE__*/_react.default.createElement("tbody", null, data.map((item, index) => /*#__PURE__*/_react.default.createElement("tr", {
34
- key: index
35
- }, /*#__PURE__*/_react.default.createElement("td", null, item.sku_name), /*#__PURE__*/_react.default.createElement("td", null, item.node), /*#__PURE__*/_react.default.createElement("td", null, item.channel_name)))));
36
- };
37
- var _default = exports.default = TableDetail;
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.symbol.description.js");
4
- require("core-js/modules/es.object.assign.js");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _NotificationsOutlined = _interopRequireDefault(require("@mui/icons-material/NotificationsOutlined"));
11
- var _material = require("@mui/material");
12
- var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
13
- const _excluded = ["count", "handleClick"];
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
- function 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; }
17
- 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; }
18
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
20
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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; }
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; }
23
- const Bell = _ref => {
24
- let {
25
- count,
26
- handleClick
27
- } = _ref,
28
- otherProps = _objectWithoutProperties(_ref, _excluded);
29
- return /*#__PURE__*/_react.default.createElement(_material.IconButton, {
30
- onClick: handleClick
31
- }, /*#__PURE__*/_react.default.createElement(_Badge.default, _extends({}, otherProps, {
32
- badgeContent: count,
33
- overlap: "circular",
34
- color: "primary"
35
- }), /*#__PURE__*/_react.default.createElement(_NotificationsOutlined.default, {
36
- sx: _objectSpread({
37
- fontSize: "3.5rem"
38
- }, count > 0 ? {
39
- color: "primary.main"
40
- } : {
41
- color: "secondary.main"
42
- })
43
- })));
44
- };
45
- var _default = exports.default = Bell;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Notification", {
7
- enumerable: true,
8
- get: function get() {
9
- return _notification.default;
10
- }
11
- });
12
- var _notification = _interopRequireDefault(require("../modules/notification"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,67 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.symbol.description.js");
4
- require("core-js/modules/es.object.assign.js");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _material = require("@mui/material");
11
- var _styles = require("@mui/material/styles");
12
- const _excluded = ["adornmentIcon"];
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
- 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; }
16
- 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; }
17
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
19
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- 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
- 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
- const CustomizeTextField = (0, _styles.styled)(_material.TextField)(_ref => {
23
- let {
24
- theme
25
- } = _ref;
26
- return {
27
- "& .MuiInputBase-root": {
28
- height: "3.52rem"
29
- },
30
- "& .MuiFormLabel-root": {
31
- color: "".concat(theme.palette.input.border, " !important"),
32
- fontSize: "1rem",
33
- marginTop: "0.4rem"
34
- },
35
- "& label.Mui-focused": {
36
- color: theme.palette.input.color
37
- },
38
- "& .MuiInput-underline:after": {
39
- borderBottomColor: theme.palette.input.border,
40
- borderBottomWidth: "0.1rem"
41
- },
42
- "& .MuiOutlinedInput-root": {
43
- "& fieldset": {
44
- borderColor: theme.palette.input.border,
45
- borderWidth: "0.1rem"
46
- },
47
- "&:hover fieldset": {
48
- borderColor: theme.palette.input.border,
49
- borderWidth: "0.1rem"
50
- },
51
- "&.Mui-focused fieldset": {
52
- borderColor: theme.palette.input.border,
53
- borderWidth: "0.1rem"
54
- }
55
- }
56
- };
57
- });
58
- const InputField = _ref2 => {
59
- let {
60
- adornmentIcon
61
- } = _ref2,
62
- otherProps = _objectWithoutProperties(_ref2, _excluded);
63
- return /*#__PURE__*/_react.default.createElement(CustomizeTextField, _extends({}, otherProps, {
64
- InputProps: _objectSpread({}, adornmentIcon ? adornmentIcon : {})
65
- }));
66
- };
67
- var _default = exports.default = InputField;