oa-componentbook 0.6.0 → 0.8.0

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 (45) hide show
  1. package/build/components/ColorVariables.js +25 -0
  2. package/build/components/oa-component-button/CustomButton.js +60 -0
  3. package/build/components/oa-component-button/styles.js +37 -0
  4. package/build/components/{Wallet Service Details/basicQuestions.js → oa-component-checkbox/CustomCheckBox.js} +28 -22
  5. package/build/components/oa-component-colorUsage/ColorUsage.js +27 -0
  6. package/build/components/oa-component-colorUsage/styles.js +13 -0
  7. package/build/components/oa-component-cornerRadius/CornerRadius.js +25 -0
  8. package/build/components/oa-component-cornerRadius/styles.js +35 -0
  9. package/build/components/{Drawer.js → oa-component-drawer/CustomDrawer.js} +31 -30
  10. package/build/components/oa-component-notification/CustomNotification.js +89 -0
  11. package/build/components/oa-component-notification/styles.js +13 -0
  12. package/build/components/oa-component-radio/CustomRadio.jsx.js +46 -0
  13. package/build/components/oa-component-spacingScales/SpacingScales.js +27 -0
  14. package/build/components/oa-component-spacingScales/styles.js +49 -0
  15. package/build/components/{Table.js → oa-component-table/CustomTable.js} +18 -17
  16. package/build/components/{Button.js → oa-component-tabs/CustomTabs.js} +41 -27
  17. package/build/components/oa-component-toggle/CustomToggle.js +49 -0
  18. package/build/components/oa-component-toggle/styles.js +16 -0
  19. package/build/components/oa-component-typography/Typography.js +34 -0
  20. package/build/components/oa-component-typography/styles.js +13 -0
  21. package/build/index.js +52 -55
  22. package/build/widgets/oa-widget-approval.js +134 -0
  23. package/build/widgets/oa-widget-keyValueDataView/KeyValueDataView.js +67 -0
  24. package/build/widgets/oa-widget-keyValueDataView/styles.js +16 -0
  25. package/build/widgets/oa-widget-stagesTimeline/StageTimeline.js +49 -0
  26. package/build/widgets/oa-widget-stagesTimeline/styles.js +22 -0
  27. package/package.json +17 -6
  28. package/build/components/KeyValueDataView.js +0 -37
  29. package/build/components/Login.js +0 -80
  30. package/build/components/QuesAnsView.js +0 -35
  31. package/build/components/Tabs.js +0 -58
  32. package/build/components/Wallet Service Details/complaintDetail.js +0 -65
  33. package/build/components/Wallet Service Details/serviceDetailsTabView.js +0 -169
  34. package/build/components/Wallet Service Details/styles/styles.css +0 -99
  35. package/build/components/Wallet Service Details/viewMoreDetailsDrawer.js +0 -83
  36. package/build/components/Wallet Service Details/walletServiceDetails.js +0 -71
  37. package/build/components/peclaim-components/CloseClaim.js +0 -212
  38. package/build/components/peclaim-components/ComplaintsTable.js +0 -78
  39. package/build/components/peclaim-components/WorkflowSummaryNotesModal.js +0 -50
  40. package/build/components/peclaim-components/WorkflowSummaryTable.js +0 -75
  41. package/build/components/peclaim-components/compMain.js +0 -54
  42. package/build/components/peclaim-components/wf Main.js +0 -192
  43. package/build/components/style/css/Button.module.css +0 -38
  44. package/build/components/style/css/login.css +0 -335
  45. package/build/components/styles.js +0 -155
@@ -1,78 +0,0 @@
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 _antd = require("antd");
9
- var _moment = _interopRequireDefault(require("moment"));
10
- var _Table = _interopRequireDefault(require("../Table"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- const ComplaintsTable = _ref => {
13
- let {
14
- complaints,
15
- complaintsMaster,
16
- loading,
17
- redirectToComplaints
18
- } = _ref;
19
- const columns = [{
20
- title: 'COMPLAINT NO.',
21
- dataIndex: 'oa_complaints_number',
22
- key: 'oa_complaints_number',
23
- render: (text, record) => /*#__PURE__*/_react.default.createElement("a", {
24
- onClick: () => redirectToComplaints(record.oa_complaints_number)
25
- }, text)
26
- }, {
27
- title: 'COMPLAINT TYPE',
28
- dataIndex: 'complaint_type_id',
29
- key: 'complaint_type_id',
30
- render: text => {
31
- var _complaintsMaster$com;
32
- return ((_complaintsMaster$com = complaintsMaster.complaint_type[text]) === null || _complaintsMaster$com === void 0 ? void 0 : _complaintsMaster$com.name) || '-';
33
- }
34
- }, {
35
- title: 'STATUS',
36
- dataIndex: 'status',
37
- key: 'status',
38
- render: text => complaintsMaster.status[text] || '-'
39
- }, {
40
- title: 'SOURCE',
41
- dataIndex: 'source',
42
- key: 'source',
43
- render: text => complaintsMaster.source[text] || '-'
44
- }, {
45
- title: 'PRIORITY',
46
- dataIndex: 'priority',
47
- key: 'priority',
48
- render: text => complaintsMaster.priority[text] || '-'
49
- }, {
50
- title: 'DATE',
51
- dataIndex: 'date_entered',
52
- key: 'date_entered',
53
- render: text => (0, _moment.default)(text).format('DD-MMM-YYYY h:mm A')
54
- }, {
55
- title: 'TEAM',
56
- dataIndex: 'complaint_type_id',
57
- key: 'complaint_type_id',
58
- render: text => {
59
- var _complaintsMaster$com2;
60
- return (_complaintsMaster$com2 = complaintsMaster.complaint_type[text]) !== null && _complaintsMaster$com2 !== void 0 && _complaintsMaster$com2.name ? complaintsMaster[complaintsMaster.complaint_type[text].name] || '-' : '-';
61
- }
62
- }, {
63
- title: 'CMS USER',
64
- dataIndex: 'cms_user_name',
65
- key: 'cms_user_name'
66
- }];
67
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Spin, {
68
- spinning: loading,
69
- size: "large"
70
- }, /*#__PURE__*/_react.default.createElement(_Table.default, {
71
- dataSource: complaints,
72
- columns: columns,
73
- pagination: false,
74
- rowKey: "oa_complaints_number"
75
- })));
76
- };
77
- var _default = ComplaintsTable;
78
- exports.default = _default;
@@ -1,50 +0,0 @@
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 _antd = require("antd");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- function WorkflowSummaryNotesModal(_ref) {
11
- let {
12
- visible,
13
- notesData,
14
- onClose,
15
- configData
16
- } = _ref;
17
- const columns = [{
18
- title: "Serial no.",
19
- dataIndex: "index",
20
- key: "index",
21
- render: (text, record, index) => index + 1
22
- }, {
23
- title: "Notes",
24
- dataIndex: "message",
25
- key: "message"
26
- }, {
27
- title: "Date and Time",
28
- dataIndex: "time",
29
- key: "time"
30
- }, {
31
- title: "User",
32
- dataIndex: "userDetails.firstName",
33
- key: "userDetails.firstName"
34
- }];
35
- return /*#__PURE__*/_react.default.createElement(_antd.Modal, {
36
- title: null,
37
- visible: visible,
38
- onOk: onClose,
39
- onCancel: onClose,
40
- footer: null,
41
- className: "statusModal notesDiv"
42
- }, notesData && notesData.length > 0 ? /*#__PURE__*/_react.default.createElement("div", {
43
- className: "notesDiv"
44
- }, /*#__PURE__*/_react.default.createElement("h4", null, " Notes "), /*#__PURE__*/_react.default.createElement(_antd.Table, {
45
- dataSource: notesData,
46
- columns: columns
47
- })) : /*#__PURE__*/_react.default.createElement("h4", null, "No Notes available"));
48
- }
49
- var _default = WorkflowSummaryNotesModal;
50
- exports.default = _default;
@@ -1,75 +0,0 @@
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 _antd = require("antd");
9
- var _Table = _interopRequireDefault(require("../Table"));
10
- var _styles = require("../styles");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function WorkflowSummaryTable(_ref) {
13
- let {
14
- data,
15
- onRowClick,
16
- configData
17
- } = _ref;
18
- const columns = [{
19
- title: "Stages",
20
- dataIndex: "taskName",
21
- key: "taskName"
22
- }, {
23
- title: "Status",
24
- dataIndex: "status",
25
- key: "status",
26
- render: status => {
27
- if (status === "In-Progress" || status === "Inprogress") {
28
- return /*#__PURE__*/_react.default.createElement("span", {
29
- className: "yellowBg"
30
- }, "In-Progress");
31
- } else if (status.toLowerCase() === "completed") {
32
- return /*#__PURE__*/_react.default.createElement("img", {
33
- style: _styles.tableStyles['.imgWidth'],
34
- src: "/static/oasys/images/checkbox-outline01.png",
35
- alt: "complete icon"
36
- });
37
- } else {
38
- return status;
39
- }
40
- }
41
- }, {
42
- title: "Notes",
43
- key: "taskId",
44
- render: (text, record) => {
45
- return /*#__PURE__*/_react.default.createElement("a", {
46
- "data-id": record.taskId,
47
- onClick: () => onRowClick(record.taskId, record.processInstanceId)
48
- }, record.taskId ? "View Notes" : "");
49
- }
50
- }, {
51
- title: "Start Date",
52
- dataIndex: "startTime",
53
- key: "startTime",
54
- render: startTime => startTime ? startTime : "Not Started"
55
- }, {
56
- title: "End Date",
57
- dataIndex: "endTime",
58
- key: "endTime",
59
- render: endTime => endTime ? endTime : "Not Started"
60
- }, {
61
- title: "Performed by",
62
- dataIndex: "assignee",
63
- key: "assignee"
64
- }, {
65
- title: "User Name",
66
- dataIndex: "assignee",
67
- key: "assignee"
68
- }];
69
- return /*#__PURE__*/_react.default.createElement(_Table.default, {
70
- columns: columns,
71
- dataSource: data
72
- });
73
- }
74
- var _default = WorkflowSummaryTable;
75
- exports.default = _default;
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.weak-map.js");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = SrComplaints;
8
- require("core-js/modules/web.dom-collections.iterator.js");
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _antd = require("antd");
11
- var _ComplaintsTable = _interopRequireDefault(require("./ComplaintsTable"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- //import { getComplaints, getComplaintsMaster } from "../../api-service";
16
-
17
- function SrComplaints(props) {
18
- const [complaints, setComplaints] = (0, _react.useState)([]);
19
- const [complaintsMaster, setComplaintsMaster] = (0, _react.useState)({});
20
- const [loading, setLoading] = (0, _react.useState)(true);
21
-
22
- // useEffect(() => {
23
- // const refPrimaryTrackingNo = props.srSummary.refPrimaryTrackingNo;
24
-
25
- // const fetchData = async () => {
26
- // try {
27
- // const complaintsResponse = await getComplaints(refPrimaryTrackingNo);
28
- // if (complaintsResponse.data.status === "success") {
29
- // setComplaints(complaintsResponse.data.data);
30
- // const complaintsMasterResponse = await getComplaintsMaster("0");
31
- // if (complaintsMasterResponse.data.status === "success") {
32
- // setComplaintsMaster(complaintsMasterResponse.data.data[0]);
33
- // }
34
- // }
35
- // setLoading(false);
36
- // } catch (error) {
37
- // console.log("Error:", error);
38
- // setLoading(false);
39
- // }
40
- // };
41
-
42
- // fetchData();
43
- // }, [props.srSummary.refPrimaryTrackingNo]);
44
-
45
- const redirectToComplaints = complaintId => {
46
- // Implement your logic to redirect to complaints page
47
- };
48
- return /*#__PURE__*/_react.default.createElement(_ComplaintsTable.default, {
49
- complaints: complaints,
50
- complaintsMaster: complaintsMaster,
51
- loading: loading,
52
- redirectToComplaints: redirectToComplaints
53
- });
54
- }
@@ -1,192 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.weak-map.js");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- require("core-js/modules/web.dom-collections.iterator.js");
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _WorkflowSummaryTable = _interopRequireDefault(require("./WorkflowSummaryTable"));
11
- var _WorkflowSummaryNotesModal = _interopRequireDefault(require("./WorkflowSummaryNotesModal"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- //import { getNotesById } from "../../api-service";
16
-
17
- function MainComponent(props) {
18
- const [viewNotesVisible, setViewNotesVisible] = (0, _react.useState)(false);
19
- const [renderedNotes, setRenderedNotes] = (0, _react.useState)([]);
20
- const [selectedTaskId, setSelectedTaskId] = (0, _react.useState)(null);
21
-
22
- // Define your data for srSummary and refPrimaryTrackingNo here
23
- const srSummaryData = [{
24
- "stageOrderId": 10,
25
- "processInstanceId": "4000000303135196",
26
- "taskName": "Document Upload",
27
- "assignee": "26969071",
28
- "startTime": "11-Sep-2023 13:42:48",
29
- "comments": [],
30
- "endTime": "11-Sep-2023 13:42:49",
31
- "status": "completed",
32
- "liveStatus": null,
33
- "userName": null,
34
- "taskId": "4000000303135251",
35
- "taskDefId": "DocumentUpload"
36
- }, {
37
- "stageOrderId": 20,
38
- "processInstanceId": "4000000303135196",
39
- "taskName": "Verification",
40
- "assignee": null,
41
- "startTime": "11-Sep-2023 13:42:49",
42
- "comments": [],
43
- "endTime": null,
44
- "status": "In-Progress",
45
- "liveStatus": null,
46
- "userName": null,
47
- "taskId": "4000000303135285",
48
- "taskDefId": "DocumentVerification"
49
- }, {
50
- "stageOrderId": 30,
51
- "processInstanceId": "4000000303135196",
52
- "taskName": "Pick Up",
53
- "assignee": null,
54
- "startTime": null,
55
- "comments": null,
56
- "endTime": null,
57
- "status": "Not-Started",
58
- "liveStatus": null,
59
- "userName": null,
60
- "taskId": null,
61
- "taskDefId": null
62
- }, {
63
- "stageOrderId": 40,
64
- "processInstanceId": "4000000303135196",
65
- "taskName": "Estimation",
66
- "assignee": null,
67
- "startTime": null,
68
- "comments": null,
69
- "endTime": null,
70
- "status": "Not-Started",
71
- "liveStatus": null,
72
- "userName": null,
73
- "taskId": null,
74
- "taskDefId": null
75
- }, {
76
- "stageOrderId": 50,
77
- "processInstanceId": "4000000303135196",
78
- "taskName": "Docs to IC",
79
- "assignee": null,
80
- "startTime": null,
81
- "comments": null,
82
- "endTime": null,
83
- "status": "Not-Started",
84
- "liveStatus": null,
85
- "userName": null,
86
- "taskId": null,
87
- "taskDefId": null
88
- }, {
89
- "stageOrderId": 60,
90
- "processInstanceId": "4000000303135196",
91
- "taskName": "IC Approval",
92
- "assignee": null,
93
- "startTime": null,
94
- "comments": null,
95
- "endTime": null,
96
- "status": "Not-Started",
97
- "liveStatus": null,
98
- "userName": null,
99
- "taskId": null,
100
- "taskDefId": null
101
- }, {
102
- "stageOrderId": 70,
103
- "processInstanceId": "4000000303135196",
104
- "taskName": "Repair Due Info",
105
- "assignee": null,
106
- "startTime": null,
107
- "comments": null,
108
- "endTime": null,
109
- "status": "Not-Started",
110
- "liveStatus": null,
111
- "userName": null,
112
- "taskId": null,
113
- "taskDefId": null
114
- }, {
115
- "stageOrderId": 80,
116
- "processInstanceId": "4000000303135196",
117
- "taskName": "Delivery",
118
- "assignee": null,
119
- "startTime": null,
120
- "comments": null,
121
- "endTime": null,
122
- "status": "Not-Started",
123
- "liveStatus": null,
124
- "userName": null,
125
- "taskId": null,
126
- "taskDefId": null
127
- }, {
128
- "stageOrderId": 90,
129
- "processInstanceId": "4000000303135196",
130
- "taskName": "Settlement Docs To IC",
131
- "assignee": null,
132
- "startTime": null,
133
- "comments": null,
134
- "endTime": null,
135
- "status": "Not-Started",
136
- "liveStatus": null,
137
- "userName": null,
138
- "taskId": null,
139
- "taskDefId": null
140
- }, {
141
- "stageOrderId": 100,
142
- "processInstanceId": "4000000303135196",
143
- "taskName": "IC Claim Payment",
144
- "assignee": null,
145
- "startTime": null,
146
- "comments": null,
147
- "endTime": null,
148
- "status": "Not-Started",
149
- "liveStatus": null,
150
- "userName": null,
151
- "taskId": null,
152
- "taskDefId": null
153
- }];
154
- const refPrimaryTrackingNoData = '';
155
- const handleViewNotes = (taskId, processInstanceId) => {
156
- console.log(taskId, processInstanceId);
157
- // Fetch and set notes data
158
- // getNotesById(refPrimaryTrackingNoData, taskId)
159
- // .then((response) => {
160
- // if (response.data.status === "success") {
161
- // setRenderedNotes(
162
- // response.data.data.activitiMap &&
163
- // response.data.data.activitiMap[taskId] &&
164
- // response.data.data.activitiMap[taskId].length > 0
165
- // ? response.data.data.activitiMap[taskId]
166
- // : []
167
- // );
168
- // setViewNotesVisible(true);
169
- // } else {
170
- // // Handle error or display a notification
171
- // }
172
- // })
173
- // .catch((error) => {
174
- // // Handle error or display a notification
175
- // console.log("error", error);
176
- // });
177
- };
178
-
179
- const handleCloseNotesModal = () => {
180
- setViewNotesVisible(false);
181
- };
182
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_WorkflowSummaryTable.default, {
183
- data: srSummaryData,
184
- onRowClick: handleViewNotes
185
- }), /*#__PURE__*/_react.default.createElement(_WorkflowSummaryNotesModal.default, {
186
- visible: viewNotesVisible,
187
- notesData: renderedNotes,
188
- onClose: handleCloseNotesModal
189
- }));
190
- }
191
- var _default = MainComponent;
192
- exports.default = _default;
@@ -1,38 +0,0 @@
1
- .button {
2
- color: white;
3
- padding: 10px 20px;
4
- border: none;
5
- border-radius: 5px;
6
- cursor: pointer;
7
- /* put all default classes */
8
-
9
- background-color: #a7a7a7;
10
- width: 200px;
11
- }
12
-
13
- .button.primary {
14
- background-color: #007bff;
15
- }
16
-
17
- .button.secondary {
18
- background-color: #ff005d;
19
- }
20
-
21
- .button.small {
22
- width: 100px;
23
- }
24
-
25
- .button.medium {
26
- width: 200px;
27
- }
28
-
29
- .button.large {
30
- width: 300px;
31
- }
32
-
33
-
34
- .button:hover {
35
- background-color: #0056b3;
36
- }
37
-
38
-